diff --git a/src/main/java/com/eactive/testmaster/queue/service/QueueListenerService.java b/src/main/java/com/eactive/testmaster/queue/service/QueueListenerService.java index 626786b..adaaee3 100644 --- a/src/main/java/com/eactive/testmaster/queue/service/QueueListenerService.java +++ b/src/main/java/com/eactive/testmaster/queue/service/QueueListenerService.java @@ -5,6 +5,7 @@ import com.eactive.testmaster.loadtest.service.Console; import com.eactive.testmaster.queue.entity.QueueHandler; import com.hazelcast.collection.IQueue; import com.hazelcast.core.HazelcastInstance; +import com.hazelcast.core.HazelcastInstanceNotActiveException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; @@ -66,11 +67,19 @@ public class QueueListenerService { private void processQueueItems() { while (running.get()) { try { - // Use take() instead of poll() to block until an item is available + // Optionally check if Hazelcast is still running + if (!hazelcastInstance.getLifecycleService().isRunning()) { + logger.info("Hazelcast instance is inactive. Stopping queue listener."); + break; + } + // Blocking call: will throw if Hazelcast is shut down Object item = taskQueue.take(); processItem(item); + } catch (HazelcastInstanceNotActiveException ex) { + // Hazelcast has been shut down, so exit the loop gracefully. + logger.info("Hazelcast instance not active. Exiting queue listener."); + break; } catch (InterruptedException e) { - // Handle interruption (likely from shutdown) logger.info("Queue listener interrupted, ending processing"); Thread.currentThread().interrupt(); break; @@ -82,6 +91,7 @@ public class QueueListenerService { } + private void processItem(Object message) { String script = queueHandler.getHandlerScript(); diff --git a/src/main/resources/static/css/custom.css b/src/main/resources/static/css/custom.css index 8f17fe6..b869c8c 100644 --- a/src/main/resources/static/css/custom.css +++ b/src/main/resources/static/css/custom.css @@ -879,7 +879,7 @@ li.selected { } .hidden { - display: none; + display: none !important; } .fullHeight { diff --git a/src/main/resources/static/plugins/apitestmanager/app.bundle.js b/src/main/resources/static/plugins/apitestmanager/app.bundle.js index 4b00762..e4319b9 100644 --- a/src/main/resources/static/plugins/apitestmanager/app.bundle.js +++ b/src/main/resources/static/plugins/apitestmanager/app.bundle.js @@ -1,2 +1,2 @@ /*! For license information please see app.bundle.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.APITestManager=t():e.APITestManager=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e,t,i={32757:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-action-bar {\n\twhite-space: nowrap;\n\theight: 100%;\n}\n\n.monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\theight: 100%;\n\twidth: 100%;\n\talign-items: center;\n}\n\n.monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-action-bar .action-item {\n\tdisplay: block;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: pointer;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-action-bar .action-item .icon,\n.monaco-action-bar .action-item .codicon {\n\tdisplay: block;\n}\n\n.monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 16px;\n\theight: 16px;\n}\n\n.monaco-action-bar .action-label {\n\tdisplay: flex;\n\tfont-size: 11px;\n\tpadding: 3px;\n\tborder-radius: 5px;\n}\n\n.monaco-action-bar .action-item.disabled .action-label,\n.monaco-action-bar .action-item.disabled .action-label::before,\n.monaco-action-bar .action-item.disabled .action-label:hover {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n/* Vertical actions */\n\n.monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-action-bar .action-item .action-label.separator {\n\twidth: 1px;\n\theight: 16px;\n\tmargin: 5px 4px !important;\n\tcursor: default;\n\tmin-width: 1px;\n\tpadding: 0;\n\tbackground-color: #bbb;\n}\n\n.secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-action-bar .action-item.action-dropdown-item {\n\tdisplay: flex;\n}\n\n.monaco-action-bar .action-item.action-dropdown-item > .action-dropdown-item-separator {\n\tdisplay: flex;\n\talign-items: center;\n\tcursor: default;\n}\n\n.monaco-action-bar .action-item.action-dropdown-item > .action-dropdown-item-separator > div {\n\twidth: 1px;\n}\n",""]);const a=r},93:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-aria-container {\n\tposition: absolute; /* try to hide from window but not from screen readers */\n\tleft:-999em;\n}",""]);const a=r},72013:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-text-button {\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\twidth: 100%;\n\tpadding: 4px;\n\tborder-radius: 2px;\n\ttext-align: center;\n\tcursor: pointer;\n\tjustify-content: center;\n\talign-items: center;\n\tborder: 1px solid var(--vscode-button-border, transparent);\n\tline-height: 18px;\n}\n\n.monaco-text-button:focus {\n\toutline-offset: 2px !important;\n}\n\n.monaco-text-button:hover {\n\ttext-decoration: none !important;\n}\n\n.monaco-button.disabled:focus,\n.monaco-button.disabled {\n\topacity: 0.4 !important;\n\tcursor: default;\n}\n\n.monaco-text-button .codicon {\n\tmargin: 0 0.2em;\n\tcolor: inherit !important;\n}\n\n.monaco-text-button.monaco-text-button-with-short-label {\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\tpadding: 0 4px;\n\toverflow: hidden;\n\theight: 28px;\n}\n\n.monaco-text-button.monaco-text-button-with-short-label > .monaco-button-label {\n\tflex-basis: 100%;\n}\n\n.monaco-text-button.monaco-text-button-with-short-label > .monaco-button-label-short {\n\tflex-grow: 1;\n\twidth: 0;\n\toverflow: hidden;\n}\n\n.monaco-text-button.monaco-text-button-with-short-label > .monaco-button-label,\n.monaco-text-button.monaco-text-button-with-short-label > .monaco-button-label-short {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tfont-weight: normal;\n\tfont-style: inherit;\n\tpadding: 4px 0;\n}\n\n.monaco-button-dropdown {\n\tdisplay: flex;\n\tcursor: pointer;\n}\n\n.monaco-button-dropdown.disabled {\n\tcursor: default;\n}\n\n.monaco-button-dropdown > .monaco-button:focus {\n\toutline-offset: -1px !important;\n}\n\n.monaco-button-dropdown.disabled > .monaco-button.disabled,\n.monaco-button-dropdown.disabled > .monaco-button.disabled:focus,\n.monaco-button-dropdown.disabled > .monaco-button-dropdown-separator {\n\topacity: 0.4 !important;\n}\n\n.monaco-button-dropdown > .monaco-button.monaco-text-button {\n\tborder-right-width: 0 !important;\n}\n\n.monaco-button-dropdown .monaco-button-dropdown-separator {\n\tpadding: 4px 0;\n\tcursor: default;\n}\n\n.monaco-button-dropdown .monaco-button-dropdown-separator > div {\n\theight: 100%;\n\twidth: 1px;\n}\n\n.monaco-button-dropdown > .monaco-button.monaco-dropdown-button {\n\tborder: 1px solid var(--vscode-button-border, transparent);\n\tborder-left-width: 0 !important;\n\tborder-radius: 0 2px 2px 0;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-button-dropdown > .monaco-button.monaco-text-button {\n\tborder-radius: 2px 0 0 2px;\n}\n\n.monaco-description-button {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tmargin: 4px 5px; /* allows button focus outline to be visible */\n}\n\n.monaco-description-button .monaco-button-description {\n\tfont-style: italic;\n\tfont-size: 11px;\n\tpadding: 4px 20px;\n}\n\n.monaco-description-button .monaco-button-label,\n.monaco-description-button .monaco-button-description {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n\n.monaco-description-button .monaco-button-label > .codicon,\n.monaco-description-button .monaco-button-description > .codicon {\n\tmargin: 0 0.2em;\n\tcolor: inherit !important;\n}\n\n/* default color styles - based on CSS variables */\n\n.monaco-button.default-colors,\n.monaco-button-dropdown.default-colors > .monaco-button{\n\tcolor: var(--vscode-button-foreground);\n\tbackground-color: var(--vscode-button-background);\n}\n\n.monaco-button.default-colors:hover,\n.monaco-button-dropdown.default-colors > .monaco-button:hover {\n\tbackground-color: var(--vscode-button-hoverBackground);\n}\n\n.monaco-button.default-colors.secondary,\n.monaco-button-dropdown.default-colors > .monaco-button.secondary {\n\tcolor: var(--vscode-button-secondaryForeground);\n\tbackground-color: var(--vscode-button-secondaryBackground);\n}\n\n.monaco-button.default-colors.secondary:hover,\n.monaco-button-dropdown.default-colors > .monaco-button.secondary:hover {\n\tbackground-color: var(--vscode-button-secondaryHoverBackground);\n}\n\n.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator {\n\tbackground-color: var(--vscode-button-background);\n\tborder-top: 1px solid var(--vscode-button-border);\n\tborder-bottom: 1px solid var(--vscode-button-border);\n}\n\n.monaco-button-dropdown.default-colors .monaco-button.secondary + .monaco-button-dropdown-separator {\n\tbackground-color: var(--vscode-button-secondaryBackground);\n}\n\n.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator > div {\n\tbackground-color: var(--vscode-button-separator);\n}\n",""]);const a=r},24081:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.codicon-wrench-subaction {\n\topacity: 0.5;\n}\n\n@keyframes codicon-spin {\n\t100% {\n\t\ttransform:rotate(360deg);\n\t}\n}\n\n.codicon-sync.codicon-modifier-spin,\n.codicon-loading.codicon-modifier-spin,\n.codicon-gear.codicon-modifier-spin,\n.codicon-notebook-state-executing.codicon-modifier-spin {\n\t/* Use steps to throttle FPS to reduce CPU usage */\n\tanimation: codicon-spin 1.5s steps(30) infinite;\n}\n\n.codicon-modifier-disabled {\n\topacity: 0.4;\n}\n\n/* custom speed & easing for loading icon */\n.codicon-loading,\n.codicon-tree-item-loading::before {\n\tanimation-duration: 1s !important;\n\tanimation-timing-function: cubic-bezier(0.53, 0.21, 0.29, 0.67) !important;\n}\n",""]);const a=r},50058:(e,t,i)=>{"use strict";i.d(t,{Z:()=>u});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s),a=i(61667),l=i.n(a),d=new URL(i(73251),i.b),c=r()(o()),h=l()(d);c.push([e.id,`/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n@font-face {\n\tfont-family: "codicon";\n\tfont-display: block;\n\tsrc: url(${h}) format("truetype");\n}\n\n.codicon[class*='codicon-'] {\n\tfont: normal normal normal 16px/1 codicon;\n\tdisplay: inline-block;\n\ttext-decoration: none;\n\ttext-rendering: auto;\n\ttext-align: center;\n\ttext-transform: none;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n/* icon rules are dynamically created by the platform theme service (see iconsStyleSheet.ts) */\n`,""]);const u=c},16328:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.context-view {\n\tposition: absolute;\n}\n\n.context-view.fixed {\n\tall: initial;\n\tfont-family: inherit;\n\tfont-size: 13px;\n\tposition: fixed;\n\tcolor: inherit;\n}\n",""]);const a=r},90477:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-count-badge {\n\tpadding: 3px 6px;\n\tborder-radius: 11px;\n\tfont-size: 11px;\n\tmin-width: 18px;\n\tmin-height: 18px;\n\tline-height: 11px;\n\tfont-weight: normal;\n\ttext-align: center;\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n}\n\n.monaco-count-badge.long {\n\tpadding: 2px 3px;\n\tborder-radius: 2px;\n\tmin-height: auto;\n\tline-height: normal;\n}\n",""]);const a=r},25035:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-dropdown {\n\theight: 100%;\n\tpadding: 0;\n}\n\n.monaco-dropdown > .dropdown-label {\n\tcursor: pointer;\n\theight: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.monaco-dropdown > .dropdown-label > .action-label.disabled {\n\tcursor: default;\n}\n\n.monaco-dropdown-with-primary {\n\tdisplay: flex !important;\n\tflex-direction: row;\n\tborder-radius: 5px;\n}\n\n.monaco-dropdown-with-primary > .action-container > .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\n\tfont-size: 12px;\n\tpadding-left: 0px;\n\tpadding-right: 0px;\n\tline-height: 16px;\n\tmargin-left: -3px;\n}\n\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\n\tdisplay: block;\n\tbackground-size: 16px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n}\n",""]);const a=r},96266:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/* ---------- Find input ---------- */\n\n.monaco-findInput {\n\tposition: relative;\n}\n\n.monaco-findInput .monaco-inputbox {\n\tfont-size: 13px;\n\twidth: 100%;\n}\n\n.monaco-findInput > .controls {\n\tposition: absolute;\n\ttop: 3px;\n\tright: 2px;\n}\n\n.vs .monaco-findInput.disabled {\n\tbackground-color: #E1E1E1;\n}\n\n/* Theming */\n.vs-dark .monaco-findInput.disabled {\n\tbackground-color: #333;\n}\n\n/* Highlighting */\n.monaco-findInput.highlight-0 .controls,\n.hc-light .monaco-findInput.highlight-0 .controls {\n\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\n}\n\n.monaco-findInput.highlight-1 .controls,\n.hc-light .monaco-findInput.highlight-1 .controls {\n\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\n}\n\n.hc-black .monaco-findInput.highlight-0 .controls,\n.vs-dark .monaco-findInput.highlight-0 .controls {\n\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\n}\n\n.hc-black .monaco-findInput.highlight-1 .controls,\n.vs-dark .monaco-findInput.highlight-1 .controls {\n\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\n}\n\n@keyframes monaco-findInput-highlight-0 {\n\t0% { background: rgba(253, 255, 0, 0.8); }\n\t100% { background: transparent; }\n}\n@keyframes monaco-findInput-highlight-1 {\n\t0% { background: rgba(253, 255, 0, 0.8); }\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\n\t99% { background: transparent; }\n}\n\n@keyframes monaco-findInput-highlight-dark-0 {\n\t0% { background: rgba(255, 255, 255, 0.44); }\n\t100% { background: transparent; }\n}\n@keyframes monaco-findInput-highlight-dark-1 {\n\t0% { background: rgba(255, 255, 255, 0.44); }\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\n\t99% { background: transparent; }\n}\n",""]);const a=r},93039:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-hover {\n\tcursor: default;\n\tposition: absolute;\n\toverflow: hidden;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\tbox-sizing: border-box;\n\tanimation: fadein 100ms linear;\n\tline-height: 1.5em;\n\twhite-space: var(--vscode-hover-whiteSpace, normal);\n}\n\n.monaco-hover.hidden {\n\tdisplay: none;\n}\n\n.monaco-hover a:hover:not(.disabled) {\n\tcursor: pointer;\n}\n\n.monaco-hover .hover-contents:not(.html-hover-contents) {\n\tpadding: 4px 8px;\n}\n\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {\n\tmax-width: var(--vscode-hover-maxWidth, 500px);\n\tword-wrap: break-word;\n}\n\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {\n\tmin-width: 100%;\n}\n\n.monaco-hover p,\n.monaco-hover .code,\n.monaco-hover ul,\n.monaco-hover h1,\n.monaco-hover h2,\n.monaco-hover h3,\n.monaco-hover h4,\n.monaco-hover h5,\n.monaco-hover h6 {\n\tmargin: 8px 0;\n}\n\n.monaco-hover h1,\n.monaco-hover h2,\n.monaco-hover h3,\n.monaco-hover h4,\n.monaco-hover h5,\n.monaco-hover h6 {\n\tline-height: 1.1;\n}\n\n.monaco-hover code {\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-hover hr {\n\tbox-sizing: border-box;\n\tborder-left: 0px;\n\tborder-right: 0px;\n\tmargin-top: 4px;\n\tmargin-bottom: -4px;\n\tmargin-left: -8px;\n\tmargin-right: -8px;\n\theight: 1px;\n}\n\n.monaco-hover p:first-child,\n.monaco-hover .code:first-child,\n.monaco-hover ul:first-child {\n\tmargin-top: 0;\n}\n\n.monaco-hover p:last-child,\n.monaco-hover .code:last-child,\n.monaco-hover ul:last-child {\n\tmargin-bottom: 0;\n}\n\n/* MarkupContent Layout */\n.monaco-hover ul {\n\tpadding-left: 20px;\n}\n.monaco-hover ol {\n\tpadding-left: 20px;\n}\n\n.monaco-hover li > p {\n\tmargin-bottom: 0;\n}\n\n.monaco-hover li > ul {\n\tmargin-top: 0;\n}\n\n.monaco-hover code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-hover .monaco-tokenized-source {\n\twhite-space: var(--vscode-hover-sourceWhiteSpace, pre-wrap);\n}\n\n.monaco-hover .hover-row.status-bar {\n\tfont-size: 12px;\n\tline-height: 22px;\n}\n\n.monaco-hover .hover-row.status-bar .info {\n\tfont-style: italic;\n\tpadding: 0px 8px;\n}\n\n.monaco-hover .hover-row.status-bar .actions {\n\tdisplay: flex;\n\tpadding: 0px 8px;\n}\n\n.monaco-hover .hover-row.status-bar .actions .action-container {\n\tmargin-right: 16px;\n\tcursor: pointer;\n}\n\n.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {\n\tpadding-right: 4px;\n}\n\n.monaco-hover .markdown-hover .hover-contents .codicon {\n\tcolor: inherit;\n\tfont-size: inherit;\n\tvertical-align: middle;\n}\n\n.monaco-hover .hover-contents a.code-link:hover,\n.monaco-hover .hover-contents a.code-link {\n\tcolor: inherit;\n}\n\n.monaco-hover .hover-contents a.code-link:before {\n\tcontent: '(';\n}\n\n.monaco-hover .hover-contents a.code-link:after {\n\tcontent: ')';\n}\n\n.monaco-hover .hover-contents a.code-link > span {\n\ttext-decoration: underline;\n\t/** Hack to force underline to show **/\n\tborder-bottom: 1px solid transparent;\n\ttext-underline-position: under;\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-hover .hover-contents a.code-link > span:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n/** Spans in markdown hovers need a margin-bottom to avoid looking cramped: https://github.com/microsoft/vscode/issues/101496 **/\n.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span {\n\tmargin-bottom: 4px;\n\tdisplay: inline-block;\n}\n\n.monaco-hover-content .action-container a {\n\t-webkit-user-select: none;\n\tuser-select: none;\n}\n\n.monaco-hover-content .action-container.disabled {\n\tpointer-events: none;\n\topacity: 0.4;\n\tcursor: default;\n}\n",""]);const a=r},94269:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* ---------- Icon label ---------- */\n\n.monaco-icon-label {\n\tdisplay: flex; /* required for icons support :before rule */\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-icon-label::before {\n\n\t/* svg icons rendered as background image */\n\tbackground-size: 16px;\n\tbackground-position: left center;\n\tbackground-repeat: no-repeat;\n\tpadding-right: 6px;\n\twidth: 16px;\n\theight: 22px;\n\tline-height: inherit !important;\n\tdisplay: inline-block;\n\n\t/* fonts icons */\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tvertical-align: top;\n\n\tflex-shrink: 0; /* fix for https://github.com/microsoft/vscode/issues/13787 */\n}\n\n.monaco-icon-label-container.disabled {\n\tcolor: var(--vscode-disabledForeground);\n}\n.monaco-icon-label > .monaco-icon-label-container {\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tflex: 1;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {\n\tcolor: inherit;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name > .label-separator {\n\tmargin: 0 2px;\n\topacity: 0.5;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-suffix-container > .label-suffix {\n\topacity: .7;\n\twhite-space: pre;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\topacity: .7;\n\tmargin-left: 0.5em;\n\tfont-size: 0.9em;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label.nowrap > .monaco-icon-label-container > .monaco-icon-description-container > .label-description{\n\twhite-space: nowrap\n}\n\n.vs .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\topacity: .95;\n}\n\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\tfont-style: italic;\n}\n\n.monaco-icon-label.deprecated {\n\ttext-decoration: line-through;\n\topacity: 0.66;\n}\n\n/* make sure apply italic font style to decorations as well */\n.monaco-icon-label.italic::after {\n\tfont-style: italic;\n}\n\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\ttext-decoration: line-through;\n}\n\n.monaco-icon-label::after {\n\topacity: 0.75;\n\tfont-size: 90%;\n\tfont-weight: 600;\n\tmargin: auto 16px 0 5px; /* https://github.com/microsoft/vscode/issues/113223 */\n\ttext-align: center;\n}\n\n/* make sure selection color wins when a label is being selected */\n.monaco-list:focus .selected .monaco-icon-label, /* list */\n.monaco-list:focus .selected .monaco-icon-label::after\n{\n\tcolor: inherit !important;\n}\n\n.monaco-list-row.focused.selected .label-description,\n.monaco-list-row.selected .label-description {\n\topacity: .8;\n}\n",""]);const a=r},41188:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-inputbox {\n\tposition: relative;\n\tdisplay: block;\n\tpadding: 0;\n\tbox-sizing:\tborder-box;\n\tborder-radius: 2px;\n\n\t/* Customizable */\n\tfont-size: inherit;\n}\n\n.monaco-inputbox > .ibwrapper > .input,\n.monaco-inputbox > .ibwrapper > .mirror {\n\n\t/* Customizable */\n\tpadding: 4px 6px;\n}\n\n.monaco-inputbox > .ibwrapper {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-inputbox > .ibwrapper > .input {\n\tdisplay: inline-block;\n\tbox-sizing:\tborder-box;\n\twidth: 100%;\n\theight: 100%;\n\tline-height: inherit;\n\tborder: none;\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tresize: none;\n\tcolor: inherit;\n}\n\n.monaco-inputbox > .ibwrapper > input {\n\ttext-overflow: ellipsis;\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input {\n\tdisplay: block;\n\tscrollbar-width: none; /* Firefox: hide scrollbars */\n\toutline: none;\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input::-webkit-scrollbar {\n\tdisplay: none; /* Chrome + Safari: hide scrollbar */\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input.empty {\n\twhite-space: nowrap;\n}\n\n.monaco-inputbox > .ibwrapper > .mirror {\n\tposition: absolute;\n\tdisplay: inline-block;\n\twidth: 100%;\n\ttop: 0;\n\tleft: 0;\n\tbox-sizing: border-box;\n\twhite-space: pre-wrap;\n\tvisibility: hidden;\n\tword-wrap: break-word;\n}\n\n/* Context view */\n\n.monaco-inputbox-container {\n\ttext-align: right;\n}\n\n.monaco-inputbox-container .monaco-inputbox-message {\n\tdisplay: inline-block;\n\toverflow: hidden;\n\ttext-align: left;\n\twidth: 100%;\n\tbox-sizing:\tborder-box;\n\tpadding: 0.4em;\n\tfont-size: 12px;\n\tline-height: 17px;\n\tmargin-top: -1px;\n\tword-wrap: break-word;\n}\n\n/* Action bar support */\n.monaco-inputbox .monaco-action-bar {\n\tposition: absolute;\n\tright: 2px;\n\ttop: 4px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item {\n\tmargin-left: 2px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item .codicon {\n\tbackground-repeat: no-repeat;\n\twidth: 16px;\n\theight: 16px;\n}\n",""]);const a=r},72298:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-keybinding {\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 10px;\n}\n\n.monaco-keybinding > .monaco-keybinding-key {\n\tdisplay: inline-block;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-radius: 3px;\n\tvertical-align: middle;\n\tfont-size: 11px;\n\tpadding: 3px 5px;\n\tmargin: 0 2px;\n}\n\n.monaco-keybinding > .monaco-keybinding-key:first-child {\n\tmargin-left: 0;\n}\n\n.monaco-keybinding > .monaco-keybinding-key:last-child {\n\tmargin-right: 0;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-separator {\n\tdisplay: inline-block;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\n\twidth: 6px;\n}\n",""]);const a=r},27703:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-list {\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n}\n\n.monaco-list.mouse-support {\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.monaco-list > .monaco-scrollable-element {\n\theight: 100%;\n}\n\n.monaco-list-rows {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-list.horizontal-scrolling .monaco-list-rows {\n\twidth: auto;\n\tmin-width: 100%;\n}\n\n.monaco-list-row {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\twidth: 100%;\n}\n\n.monaco-list.mouse-support .monaco-list-row {\n\tcursor: pointer;\n\ttouch-action: none;\n}\n\n/* Make sure the scrollbar renders above overlays (sticky scroll) */\n.monaco-list .monaco-scrollable-element > .scrollbar.vertical,\n.monaco-pane-view > .monaco-split-view2.vertical > .monaco-scrollable-element > .scrollbar.vertical {\n\tz-index: 14;\n}\n\n/* for OS X ballistic scrolling */\n.monaco-list-row.scrolling {\n\tdisplay: none !important;\n}\n\n/* Focus */\n.monaco-list.element-focused,\n.monaco-list.selection-single,\n.monaco-list.selection-multiple {\n\toutline: 0 !important;\n}\n\n/* Dnd */\n.monaco-drag-image {\n\tdisplay: inline-block;\n\tpadding: 1px 7px;\n\tborder-radius: 10px;\n\tfont-size: 12px;\n\tposition: absolute;\n\tz-index: 1000;\n}\n\n/* Filter */\n\n.monaco-list-type-filter-message {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\theight: 100%;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 40px 1em 1em 1em;\n\ttext-align: center;\n\twhite-space: normal;\n\topacity: 0.7;\n\tpointer-events: none;\n}\n\n.monaco-list-type-filter-message:empty {\n\tdisplay: none;\n}\n",""]);const a=r},67548:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-mouse-cursor-text {\n\tcursor: text;\n}\n",""]);const a=r},64185:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-progress-container {\n\twidth: 100%;\n\theight: 2px;\n\toverflow: hidden; /* keep progress bit in bounds */\n}\n\n.monaco-progress-container .progress-bit {\n\twidth: 2%;\n\theight: 2px;\n\tposition: absolute;\n\tleft: 0;\n\tdisplay: none;\n}\n\n.monaco-progress-container.active .progress-bit {\n\tdisplay: inherit;\n}\n\n.monaco-progress-container.discrete .progress-bit {\n\tleft: 0;\n\ttransition: width 100ms linear;\n}\n\n.monaco-progress-container.discrete.done .progress-bit {\n\twidth: 100%;\n}\n\n.monaco-progress-container.infinite .progress-bit {\n\tanimation-name: progress;\n\tanimation-duration: 4s;\n\tanimation-iteration-count: infinite;\n\ttransform: translate3d(0px, 0px, 0px);\n\tanimation-timing-function: linear;\n}\n\n.monaco-progress-container.infinite.infinite-long-running .progress-bit {\n\t/*\n\t\tThe more smooth `linear` timing function can cause\n\t\thigher GPU consumption as indicated in\n\t\thttps://github.com/microsoft/vscode/issues/97900 &\n\t\thttps://github.com/microsoft/vscode/issues/138396\n\t*/\n\tanimation-timing-function: steps(100);\n}\n\n/**\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\n * its relative size to the parent container:\n * parent width: 5000%\n * bit width: 100%\n * translateX should be as follow:\n * 50%: 5000% * 50% - 50% (set to center) = 2450%\n * 100%: 5000% * 100% - 100% (do not overflow) = 4900%\n */\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4900%) scaleX(1) } }\n",""]);const a=r},91629:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n:root {\n\t--vscode-sash-size: 4px;\n\t--vscode-sash-hover-size: 4px;\n}\n\n.monaco-sash {\n\tposition: absolute;\n\tz-index: 35;\n\ttouch-action: none;\n}\n\n.monaco-sash.disabled {\n\tpointer-events: none;\n}\n\n.monaco-sash.mac.vertical {\n\tcursor: col-resize;\n}\n\n.monaco-sash.vertical.minimum {\n\tcursor: e-resize;\n}\n\n.monaco-sash.vertical.maximum {\n\tcursor: w-resize;\n}\n\n.monaco-sash.mac.horizontal {\n\tcursor: row-resize;\n}\n\n.monaco-sash.horizontal.minimum {\n\tcursor: s-resize;\n}\n\n.monaco-sash.horizontal.maximum {\n\tcursor: n-resize;\n}\n\n.monaco-sash.disabled {\n\tcursor: default !important;\n\tpointer-events: none !important;\n}\n\n.monaco-sash.vertical {\n\tcursor: ew-resize;\n\ttop: 0;\n\twidth: var(--vscode-sash-size);\n\theight: 100%;\n}\n\n.monaco-sash.horizontal {\n\tcursor: ns-resize;\n\tleft: 0;\n\twidth: 100%;\n\theight: var(--vscode-sash-size);\n}\n\n.monaco-sash:not(.disabled) > .orthogonal-drag-handle {\n\tcontent: \" \";\n\theight: calc(var(--vscode-sash-size) * 2);\n\twidth: calc(var(--vscode-sash-size) * 2);\n\tz-index: 100;\n\tdisplay: block;\n\tcursor: all-scroll;\n\tposition: absolute;\n}\n\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\n\t> .orthogonal-drag-handle.start,\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\n\t> .orthogonal-drag-handle.end {\n\tcursor: nwse-resize;\n}\n\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\n\t> .orthogonal-drag-handle.end,\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\n\t> .orthogonal-drag-handle.start {\n\tcursor: nesw-resize;\n}\n\n.monaco-sash.vertical > .orthogonal-drag-handle.start {\n\tleft: calc(var(--vscode-sash-size) * -0.5);\n\ttop: calc(var(--vscode-sash-size) * -1);\n}\n.monaco-sash.vertical > .orthogonal-drag-handle.end {\n\tleft: calc(var(--vscode-sash-size) * -0.5);\n\tbottom: calc(var(--vscode-sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.start {\n\ttop: calc(var(--vscode-sash-size) * -0.5);\n\tleft: calc(var(--vscode-sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.end {\n\ttop: calc(var(--vscode-sash-size) * -0.5);\n\tright: calc(var(--vscode-sash-size) * -1);\n}\n\n.monaco-sash:before {\n\tcontent: '';\n\tpointer-events: none;\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tbackground: transparent;\n}\n\n.monaco-workbench:not(.reduce-motion) .monaco-sash:before {\n\ttransition: background-color 0.1s ease-out;\n}\n\n.monaco-sash.hover:before,\n.monaco-sash.active:before {\n\tbackground: var(--vscode-sash-hoverBorder);\n}\n\n.monaco-sash.vertical:before {\n\twidth: var(--vscode-sash-hover-size);\n\tleft: calc(50% - (var(--vscode-sash-hover-size) / 2));\n}\n\n.monaco-sash.horizontal:before {\n\theight: var(--vscode-sash-hover-size);\n\ttop: calc(50% - (var(--vscode-sash-hover-size) / 2));\n}\n\n.pointer-events-disabled {\n\tpointer-events: none !important;\n}\n\n/** Debug **/\n\n.monaco-sash.debug {\n\tbackground: cyan;\n}\n\n.monaco-sash.debug.disabled {\n\tbackground: rgba(0, 255, 255, 0.2);\n}\n\n.monaco-sash.debug:not(.disabled) > .orthogonal-drag-handle {\n\tbackground: red;\n}\n",""]);const a=r},7198:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n\t/* In front of peek view */\n\tz-index: 11;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset;\n}\n\n.monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: var(--vscode-scrollbarSlider-background);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: var(--vscode-scrollbarSlider-hoverBackground);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: var(--vscode-scrollbarSlider-activeBackground);\n}\n",""]);const a=r},46512:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-select-box {\n\twidth: 100%;\n\tcursor: pointer;\n\tborder-radius: 2px;\n}\n\n.monaco-select-box-dropdown-container {\n\tfont-size: 13px;\n\tfont-weight: normal;\n\ttext-transform: none;\n}\n\n/** Actions */\n\n.monaco-action-bar .action-item.select-container {\n\tcursor: default;\n}\n\n.monaco-action-bar .action-item .monaco-select-box {\n\tcursor: pointer;\n\tmin-width: 100px;\n\tmin-height: 18px;\n\tpadding: 2px 23px 2px 8px;\n}\n\n.mac .monaco-action-bar .action-item .monaco-select-box {\n\tfont-size: 11px;\n\tborder-radius: 5px;\n}\n",""]);const a=r},12675:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Use custom CSS vars to expose padding into parent select for padding calculation */\n.monaco-select-box-dropdown-padding {\n\t--dropdown-padding-top: 1px;\n\t--dropdown-padding-bottom: 1px;\n}\n\n.hc-black .monaco-select-box-dropdown-padding,\n.hc-light .monaco-select-box-dropdown-padding {\n\t--dropdown-padding-top: 3px;\n\t--dropdown-padding-bottom: 4px;\n}\n\n.monaco-select-box-dropdown-container {\n\tdisplay: none;\n\tbox-sizing:\tborder-box;\n}\n\n.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown * {\n\tmargin: 0;\n}\n\n.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a:focus {\n\toutline: 1px solid -webkit-focus-ring-color;\n\toutline-offset: -1px;\n}\n\n.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown code {\n\tline-height: 15px; /** For some reason, this is needed, otherwise will take up 20px height */\n\tfont-family: var(--monaco-monospace-font);\n}\n\n\n.monaco-select-box-dropdown-container.visible {\n\tdisplay: flex;\n\tflex-direction: column;\n\ttext-align: left;\n\twidth: 1px;\n\toverflow: hidden;\n\tborder-bottom-left-radius: 3px;\n\tborder-bottom-right-radius: 3px;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container {\n\tflex: 0 0 auto;\n\talign-self: flex-start;\n\tpadding-top: var(--dropdown-padding-top);\n\tpadding-bottom: var(--dropdown-padding-bottom);\n\tpadding-left: 1px;\n\tpadding-right: 1px;\n\twidth: 100%;\n\toverflow: hidden;\n\tbox-sizing:\tborder-box;\n}\n\n.monaco-select-box-dropdown-container > .select-box-details-pane {\n\tpadding: 5px;\n}\n\n.hc-black .monaco-select-box-dropdown-container > .select-box-dropdown-list-container {\n\tpadding-top: var(--dropdown-padding-top);\n\tpadding-bottom: var(--dropdown-padding-bottom);\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row {\n\tcursor: pointer;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .option-text {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tpadding-left: 3.5px;\n\twhite-space: nowrap;\n\tfloat: left;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .option-detail {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tpadding-left: 3.5px;\n\twhite-space: nowrap;\n\tfloat: left;\n\topacity: 0.7;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .option-decorator-right {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tpadding-right: 10px;\n\twhite-space: nowrap;\n\tfloat: right;\n}\n\n\n/* Accepted CSS hiding technique for accessibility reader text */\n/* https://webaim.org/techniques/css/invisiblecontent/ */\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .visually-hidden {\n\t\tposition: absolute;\n\t\tleft: -10000px;\n\t\ttop: auto;\n\t\twidth: 1px;\n\t\theight: 1px;\n\t\toverflow: hidden;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-container-width-control {\n\tflex: 1 1 auto;\n\talign-self: flex-start;\n\topacity: 0;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-container-width-control > .width-control-div {\n\toverflow: hidden;\n\tmax-height: 0px;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-container-width-control > .width-control-div > .option-text-width-control {\n\tpadding-left: 4px;\n\tpadding-right: 8px;\n\twhite-space: nowrap;\n}\n",""]);const a=r},82470:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-split-view2 {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-split-view2 > .sash-container {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tpointer-events: none;\n}\n\n.monaco-split-view2 > .sash-container > .monaco-sash {\n\tpointer-events: initial;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element {\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container {\n\twidth: 100%;\n\theight: 100%;\n\twhite-space: nowrap;\n\tposition: relative;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\twhite-space: initial;\n\tposition: absolute;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view:not(.visible) {\n\tdisplay: none;\n}\n\n.monaco-split-view2.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\twidth: 100%;\n}\n\n.monaco-split-view2.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\theight: 100%;\n}\n\n.monaco-split-view2.separator-border > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\tcontent: ' ';\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tz-index: 5;\n\tpointer-events: none;\n\tbackground-color: var(--separator-border);\n}\n\n.monaco-split-view2.separator-border.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\theight: 100%;\n\twidth: 1px;\n}\n\n.monaco-split-view2.separator-border.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\theight: 1px;\n\twidth: 100%;\n}\n",""]);const a=r},1728:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-table {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n\n.monaco-table > .monaco-split-view2 {\n\tborder-bottom: 1px solid transparent;\n}\n\n.monaco-table > .monaco-list {\n\tflex: 1;\n}\n\n.monaco-table-tr {\n\tdisplay: flex;\n\theight: 100%;\n}\n\n.monaco-table-th {\n\twidth: 100%;\n\theight: 100%;\n\tfont-weight: bold;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-table-th,\n.monaco-table-td {\n\tbox-sizing: border-box;\n\tflex-shrink: 0;\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\tcontent: "";\n\tposition: absolute;\n\tleft: calc(var(--vscode-sash-size) / 2);\n\twidth: 0;\n\tborder-left: 1px solid transparent;\n}\n\n.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\ttransition: border-color 0.2s ease-out;\n}\n',""]);const a=r},16310:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-custom-toggle {\n\tmargin-left: 2px;\n\tfloat: left;\n\tcursor: pointer;\n\toverflow: hidden;\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 3px;\n\tborder: 1px solid transparent;\n\tpadding: 1px;\n\tbox-sizing:\tborder-box;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.monaco-custom-toggle:hover {\n\tbackground-color: var(--vscode-inputOption-hoverBackground);\n}\n\n.hc-black .monaco-custom-toggle:hover,\n.hc-light .monaco-custom-toggle:hover {\n\tborder: 1px dashed var(--vscode-focusBorder);\n}\n\n.hc-black .monaco-custom-toggle,\n.hc-light .monaco-custom-toggle {\n\tbackground: none;\n}\n\n.hc-black .monaco-custom-toggle:hover,\n.hc-light .monaco-custom-toggle:hover {\n\tbackground: none;\n}\n\n.monaco-custom-toggle.monaco-checkbox {\n\theight: 18px;\n\twidth: 18px;\n\tborder: 1px solid transparent;\n\tborder-radius: 3px;\n\tmargin-right: 9px;\n\tmargin-left: 0px;\n\tpadding: 0px;\n\topacity: 1;\n\tbackground-size: 16px !important;\n}\n\n.monaco-action-bar .checkbox-action-item {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-action-bar .checkbox-action-item > .monaco-custom-toggle.monaco-checkbox {\n\tmargin-right: 4px;\n}\n\n.monaco-action-bar .checkbox-action-item > .checkbox-label {\n\tfont-size: 12px;\n}\n\n/* hide check when unchecked */\n.monaco-custom-toggle.monaco-checkbox:not(.checked)::before {\n\tvisibility: hidden;\n}\n",""]);const a=r},56651:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-toolbar {\n\theight: 100%;\n}\n\n.monaco-toolbar .toolbar-toggle-more {\n\tdisplay: inline-block;\n\tpadding: 0;\n}\n",""]);const a=r},61766:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-tl-row {\n\tdisplay: flex;\n\theight: 100%;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-tl-row.disabled {\n\tcursor: default;\n}\n.monaco-tl-indent {\n\theight: 100%;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 16px;\n\tpointer-events: none;\n}\n\n.hide-arrows .monaco-tl-indent {\n\tleft: 12px;\n}\n\n.monaco-tl-indent > .indent-guide {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\theight: 100%;\n\tborder-left: 1px solid transparent;\n}\n\n.monaco-workbench:not(.reduce-motion) .monaco-tl-indent > .indent-guide {\n\ttransition: border-color 0.1s linear;\n}\n\n.monaco-tl-twistie,\n.monaco-tl-contents {\n\theight: 100%;\n}\n\n.monaco-tl-twistie {\n\tfont-size: 10px;\n\ttext-align: right;\n\tpadding-right: 6px;\n\tflex-shrink: 0;\n\twidth: 16px;\n\tdisplay: flex !important;\n\talign-items: center;\n\tjustify-content: center;\n\ttransform: translateX(3px);\n}\n\n.monaco-tl-contents {\n\tflex: 1;\n\toverflow: hidden;\n}\n\n.monaco-tl-twistie::before {\n\tborder-radius: 20px;\n}\n\n.monaco-tl-twistie.collapsed::before {\n\ttransform: rotate(-90deg);\n}\n\n.monaco-tl-twistie.codicon-tree-item-loading::before {\n\t/* Use steps to throttle FPS to reduce CPU usage */\n\tanimation: codicon-spin 1.25s steps(30) infinite;\n}\n\n.monaco-tree-type-filter {\n\tposition: absolute;\n\ttop: 0;\n\tdisplay: flex;\n\tpadding: 3px;\n\tmax-width: 200px;\n\tz-index: 100;\n\tmargin: 0 6px;\n\tborder: 1px solid var(--vscode-widget-border);\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n}\n\n.monaco-workbench:not(.reduce-motion) .monaco-tree-type-filter {\n\ttransition: top 0.3s;\n}\n\n.monaco-tree-type-filter.disabled {\n\ttop: -40px !important;\n}\n\n.monaco-tree-type-filter-grab {\n\tdisplay: flex !important;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: grab;\n\tmargin-right: 2px;\n}\n\n.monaco-tree-type-filter-grab.grabbing {\n\tcursor: grabbing;\n}\n\n.monaco-tree-type-filter-input {\n\tflex: 1;\n}\n\n.monaco-tree-type-filter-input .monaco-inputbox {\n\theight: 23px;\n}\n\n.monaco-tree-type-filter-input .monaco-inputbox > .ibwrapper > .input,\n.monaco-tree-type-filter-input .monaco-inputbox > .ibwrapper > .mirror {\n\tpadding: 2px 4px;\n}\n\n.monaco-tree-type-filter-input .monaco-findInput > .controls {\n\ttop: 2px;\n}\n\n.monaco-tree-type-filter-actionbar {\n\tmargin-left: 4px;\n}\n\n.monaco-tree-type-filter-actionbar .monaco-action-bar .action-label {\n\tpadding: 2px;\n}\n\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container{\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 0;\n\tz-index: 13; /* Settings editor uses z-index: 12 */\n\n\t/* TODO@benibenj temporary solution, all lists should provide their background */\n\tbackground-color: var(--vscode-sideBar-background);\n}\n\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row.monaco-list-row{\n\tposition: absolute;\n\twidth: 100%;\n\topacity: 1 !important; /* Settings editor uses opacity < 1 */\n\toverflow: hidden;\n\n\t/* TODO@benibenj temporary solution, all lists should provide their background */\n\tbackground-color: var(--vscode-sideBar-background);\n}\n\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row:hover{\n\tbackground-color: var(--vscode-list-hoverBackground) !important;\n\tcursor: pointer;\n}\n\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container.empty,\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container.empty .monaco-tree-sticky-container-shadow {\n\tdisplay: none;\n}\n\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow{\n\tposition: absolute;\n\tbottom: -3px;\n\tleft: 0px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;\n}\n\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container[tabindex="0"]:focus{\n\toutline: none;\n}\n',""]);const a=r},40504:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inputarea {\n\tmin-width: 0;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\toutline: none !important;\n\tresize: none;\n\tborder: none;\n\toverflow: hidden;\n\tcolor: transparent;\n\tbackground-color: transparent;\n\tz-index: -10;\n}\n/*.monaco-editor .inputarea {\n\tposition: fixed !important;\n\twidth: 800px !important;\n\theight: 500px !important;\n\ttop: initial !important;\n\tleft: initial !important;\n\tbottom: 0 !important;\n\tright: 0 !important;\n\tcolor: black !important;\n\tbackground: white !important;\n\tline-height: 15px !important;\n\tfont-size: 14px !important;\n\tz-index: 10 !important;\n}*/\n.monaco-editor .inputarea.ime-input {\n\tz-index: 10;\n\tcaret-color: var(--vscode-editorCursor-foreground);\n\tcolor: var(--vscode-editor-foreground);\n}\n",""]);const a=r},29463:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .blockDecorations-container {\n\tposition: absolute;\n\ttop: 0;\n\tpointer-events: none;\n}\n\n.monaco-editor .blockDecorations-block {\n\tposition: absolute;\n\tbox-sizing: border-box;\n}\n",""]);const a=r},91260:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .margin-view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\n\tborder-right: 0;\n}\n",""]);const a=r},71329:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcdr = core decorations rendering (div)\n*/\n.monaco-editor .lines-content .cdr {\n\tposition: absolute;\n}",""]);const a=r},64827:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .glyph-margin {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcgmr = core glyph margin rendering (div)\n*/\n.monaco-editor .glyph-margin-widgets .cgmr {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/*\n\tEnsure spinning icons are pixel-perfectly centered and avoid wobble.\n\tThis is only applied to icons that spin to avoid unnecessary\n\tGPU layers and blurry subpixel AA.\n*/\n.monaco-editor .glyph-margin-widgets .cgmr.codicon-modifier-spin::before {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n}\n",""]);const a=r},86848:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .lines-content .core-guide {\n\tposition: absolute;\n\tbox-sizing: border-box;\n}\n",""]);const a=r},6184:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin-view-overlays .line-numbers {\n\tfont-variant-numeric: tabular-nums;\n\tposition: absolute;\n\ttext-align: right;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\tcursor: default;\n\theight: 100%;\n}\n\n.monaco-editor .relative-current-line-number {\n\ttext-align: left;\n\tdisplay: inline-block;\n\twidth: 100%;\n}\n\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\n\tmargin-top: 1px;\n}\n\n.monaco-editor .line-numbers {\n\tcolor: var(--vscode-editorLineNumber-foreground);\n}\n\n.monaco-editor .line-numbers.active-line-number {\n\tcolor: var(--vscode-editorLineNumber-activeForeground);\n}\n",""]);const a=r},89565:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Uncomment to see lines flashing when they're painted */\n/*.monaco-editor .view-lines > .view-line {\n\tbackground-color: none;\n\tanimation-name: flash-background;\n\tanimation-duration: 800ms;\n}\n@keyframes flash-background {\n\t0% { background-color: lightgreen; }\n\t100% { background-color: none }\n}*/\n\n.mtkcontrol {\n\tcolor: rgb(255, 255, 255) !important;\n\tbackground: rgb(150, 0, 0) !important;\n}\n\n.mtkoverflow {\n\tbackground-color: var(--vscode-button-background, var(--vscode-editor-background));\n\tcolor: var(--vscode-button-foreground, var(--vscode-editor-foreground));\n\tborder-width: 1px;\n\tborder-style: solid;\n\tborder-color: var(--vscode-contrastBorder);\n\tborder-radius: 2px;\n\tpadding: 4px;\n\tcursor: pointer;\n}\n.mtkoverflow:hover {\n\tbackground-color: var(--vscode-button-hoverBackground);\n}\n\n.monaco-editor.no-user-select .lines-content,\n.monaco-editor.no-user-select .view-line,\n.monaco-editor.no-user-select .view-lines {\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n/* Use user-select: text for lookup feature on macOS */\n/* https://github.com/microsoft/vscode/issues/85632 */\n.monaco-editor.mac .lines-content:hover,\n.monaco-editor.mac .view-line:hover,\n.monaco-editor.mac .view-lines:hover {\n\tuser-select: text;\n\t-webkit-user-select: text;\n\t-ms-user-select: text;\n}\n\n.monaco-editor.enable-user-select {\n\tuser-select: initial;\n\t-webkit-user-select: initial;\n}\n\n.monaco-editor .view-lines {\n\twhite-space: nowrap;\n}\n\n.monaco-editor .view-line {\n\tposition: absolute;\n\twidth: 100%;\n}\n\n.monaco-editor .mtkw {\n\tcolor: var(--vscode-editorWhitespace-foreground) !important;\n}\n\n.monaco-editor .mtkz {\n\tdisplay: inline-block;\n\tcolor: var(--vscode-editorWhitespace-foreground) !important;\n}\n\n/* TODO@tokenization bootstrap fix */\n/*.monaco-editor .view-line > span > span {\n\tfloat: none;\n\tmin-height: inherit;\n\tmargin-left: inherit;\n}*/\n",""]);const a=r},74444:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .lines-decorations {\n\tposition: absolute;\n\ttop: 0;\n\tbackground: white;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcldr = core lines decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cldr {\n\tposition: absolute;\n\theight: 100%;\n}",""]);const a=r},11596:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin {\n\tbackground-color: var(--vscode-editorGutter-background);\n}\n",""]);const a=r},29364:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcmdr = core margin decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cmdr {\n\tposition: absolute;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n}",""]);const a=r},40563:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* START cover the case that slider is visible on mouseover */\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\n\topacity: 0;\n\ttransition: opacity 100ms linear;\n}\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\n\topacity: 1;\n}\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\n\topacity: 1;\n}\n/* END cover the case that slider is visible on mouseover */\n.monaco-editor .minimap-slider .minimap-slider-horizontal {\n\tbackground: var(--vscode-minimapSlider-background);\n}\n.monaco-editor .minimap-slider:hover .minimap-slider-horizontal {\n\tbackground: var(--vscode-minimapSlider-hoverBackground);\n}\n.monaco-editor .minimap-slider.active .minimap-slider-horizontal {\n\tbackground: var(--vscode-minimapSlider-activeBackground);\n}\n.monaco-editor .minimap-shadow-visible {\n\tbox-shadow: var(--vscode-scrollbar-shadow) -6px 0 6px -6px inset;\n}\n.monaco-editor .minimap-shadow-hidden {\n\tposition: absolute;\n\twidth: 0;\n}\n.monaco-editor .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -6px;\n\twidth: 6px;\n}\n.monaco-editor.no-minimap-shadow .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -1px;\n\twidth: 1px;\n}\n\n/* 0.5s fade in/out for the minimap */\n.minimap.autohide {\n\topacity: 0;\n\ttransition: opacity 0.5s;\n}\n.minimap.autohide:hover {\n\topacity: 1;\n}\n\n.monaco-editor .minimap {\n\tz-index: 5;\n}\n",""]);const a=r},59822:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .overlayWidgets {\n\tposition: absolute;\n\ttop: 0;\n\tleft:0;\n}",""]);const a=r},29443:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-ruler {\n\tposition: absolute;\n\ttop: 0;\n\tbox-shadow: 1px 0 0 0 var(--vscode-editorRuler-foreground) inset;\n}\n",""]);const a=r},39649:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .scroll-decoration {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\theight: 6px;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;\n}\n",""]);const a=r},52595:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcslr = core selections layer rendering (div)\n*/\n.monaco-editor .lines-content .cslr {\n\tposition: absolute;\n}\n\n.monaco-editor .focused .selected-text {\n\tbackground-color: var(--vscode-editor-selectionBackground);\n}\n\n.monaco-editor .selected-text {\n\tbackground-color: var(--vscode-editor-inactiveSelectionBackground);\n}\n\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\n\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\n\n.monaco-editor.hc-light .top-left-radius\t\t{ border-top-left-radius: 0; }\n.monaco-editor.hc-light .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\n.monaco-editor.hc-light .top-right-radius\t\t{ border-top-right-radius: 0; }\n.monaco-editor.hc-light .bottom-right-radius\t{ border-bottom-right-radius: 0; }\n",""]);const a=r},4057:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .cursors-layer {\n\tposition: absolute;\n\ttop: 0;\n}\n\n.monaco-editor .cursors-layer > .cursor {\n\tposition: absolute;\n\toverflow: hidden;\n\tbox-sizing: border-box;\n}\n\n/* -- smooth-caret-animation -- */\n.monaco-editor .cursors-layer.cursor-smooth-caret-animation > .cursor {\n\ttransition: all 80ms;\n}\n\n/* -- block-outline-style -- */\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\n\tbackground: transparent !important;\n\tborder-style: solid;\n\tborder-width: 1px;\n}\n\n/* -- underline-style -- */\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\n\tborder-bottom-width: 2px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n}\n\n/* -- underline-thin-style -- */\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\n\tborder-bottom-width: 1px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n}\n\n@keyframes monaco-cursor-smooth {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t60%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-phase {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t90%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-expand {\n\t0%,\n\t20% {\n\t\ttransform: scaleY(1);\n\t}\n\t80%,\n\t100% {\n\t\ttransform: scaleY(0);\n\t}\n}\n\n.cursor-smooth {\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-phase {\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-expand > .cursor {\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\n}\n",""]);const a=r},19991:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .mwh {\n\tposition: absolute;\n\tcolor: var(--vscode-editorWhitespace-foreground) !important;\n}\n",""]);const a=r},92106:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-component.diff-review {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tz-index: 99;\n}\n\n.monaco-diff-editor .diff-review {\n\tposition: absolute;\n\n}\n\n.monaco-component.diff-review .diff-review-line-number {\n\ttext-align: right;\n\tdisplay: inline-block;\n\tcolor: var(--vscode-editorLineNumber-foreground);\n}\n\n.monaco-component.diff-review .diff-review-summary {\n\tpadding-left: 10px;\n}\n\n.monaco-component.diff-review .diff-review-shadow {\n\tposition: absolute;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 0 -6px 6px -6px inset;\n}\n\n.monaco-component.diff-review .diff-review-row {\n\twhite-space: pre;\n}\n\n.monaco-component.diff-review .diff-review-table {\n\tdisplay: table;\n\tmin-width: 100%;\n}\n\n.monaco-component.diff-review .diff-review-row {\n\tdisplay: table-row;\n\twidth: 100%;\n}\n\n.monaco-component.diff-review .diff-review-spacer {\n\tdisplay: inline-block;\n\twidth: 10px;\n\tvertical-align: middle;\n}\n\n.monaco-component.diff-review .diff-review-spacer > .codicon {\n\tfont-size: 9px !important;\n}\n\n.monaco-component.diff-review .diff-review-actions {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tright: 10px;\n\ttop: 2px;\n\tz-index: 100;\n}\n\n.monaco-component.diff-review .diff-review-actions .action-label {\n\twidth: 16px;\n\theight: 16px;\n\tmargin: 2px 0;\n}\n\n.monaco-component.diff-review .revertButton {\n\tcursor: pointer;\n}\n",""]);const a=r},73050:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .diff-hidden-lines-widget {\n\twidth: 100%;\n}\n\n.monaco-editor .diff-hidden-lines {\n\theight: 0px; /* The children each have a fixed height, the transform confuses the browser */\n\ttransform: translate(0px, -10px);\n\tfont-size: 13px;\n\tline-height: 14px;\n}\n\n.monaco-editor .diff-hidden-lines:not(.dragging) .top:hover,\n.monaco-editor .diff-hidden-lines:not(.dragging) .bottom:hover,\n.monaco-editor .diff-hidden-lines .top.dragging,\n.monaco-editor .diff-hidden-lines .bottom.dragging {\n\tbackground-color: var(--vscode-focusBorder);\n}\n\n.monaco-editor .diff-hidden-lines .top,\n.monaco-editor .diff-hidden-lines .bottom {\n\ttransition: background-color 0.1s ease-out;\n\theight: 4px;\n\tbackground-color: transparent;\n\tbackground-clip: padding-box;\n\tborder-bottom: 2px solid transparent;\n\tborder-top: 4px solid transparent;\n\t/*cursor: n-resize;*/\n}\n\n.monaco-editor.draggingUnchangedRegion.canMoveTop:not(.canMoveBottom) *,\n.monaco-editor .diff-hidden-lines .top.canMoveTop:not(.canMoveBottom),\n.monaco-editor .diff-hidden-lines .bottom.canMoveTop:not(.canMoveBottom) {\n\tcursor: n-resize !important;\n}\n\n.monaco-editor.draggingUnchangedRegion:not(.canMoveTop).canMoveBottom *,\n.monaco-editor .diff-hidden-lines .top:not(.canMoveTop).canMoveBottom,\n.monaco-editor .diff-hidden-lines .bottom:not(.canMoveTop).canMoveBottom {\n\tcursor: s-resize !important;\n}\n\n.monaco-editor.draggingUnchangedRegion.canMoveTop.canMoveBottom *,\n.monaco-editor .diff-hidden-lines .top.canMoveTop.canMoveBottom,\n.monaco-editor .diff-hidden-lines .bottom.canMoveTop.canMoveBottom {\n\tcursor: ns-resize !important;\n}\n\n.monaco-editor .diff-hidden-lines .top {\n\ttransform: translate(0px, 4px);\n}\n\n.monaco-editor .diff-hidden-lines .bottom {\n\ttransform: translate(0px, -6px);\n}\n\n.monaco-editor .diff-unchanged-lines {\n\tbackground: var(--vscode-diffEditor-unchangedCodeBackground);\n}\n\n.monaco-editor .noModificationsOverlay {\n\tz-index: 1;\n\tbackground: var(--vscode-editor-background);\n\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n\n\n.monaco-editor .diff-hidden-lines .center {\n\tbackground: var(--vscode-diffEditor-unchangedRegionBackground);\n\tcolor: var(--vscode-diffEditor-unchangedRegionForeground);\n\toverflow: hidden;\n\tdisplay: block;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\n\theight: 24px;\n\tbox-shadow: inset 0 -5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow), inset 0 5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow);\n}\n\n.monaco-editor .diff-hidden-lines .center span.codicon {\n\tvertical-align: middle;\n}\n\n.monaco-editor .diff-hidden-lines .center a:hover .codicon {\n\tcursor: pointer;\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n\n.monaco-editor .diff-hidden-lines div.breadcrumb-item {\n\tcursor: pointer;\n}\n\n.monaco-editor .diff-hidden-lines div.breadcrumb-item:hover {\n\tcolor: var(--vscode-editorLink-activeForeground);\n}\n\n.monaco-editor .movedOriginal {\n\tborder: 2px solid var(--vscode-diffEditor-move-border);\n}\n\n.monaco-editor .movedModified {\n\tborder: 2px solid var(--vscode-diffEditor-move-border);\n}\n\n.monaco-editor .movedOriginal.currentMove, .monaco-editor .movedModified.currentMove {\n\tborder: 2px solid var(--vscode-diffEditor-moveActive-border);\n}\n\n.monaco-diff-editor .moved-blocks-lines path.currentMove {\n\tstroke: var(--vscode-diffEditor-moveActive-border);\n}\n\n.monaco-diff-editor .moved-blocks-lines path {\n\tpointer-events: visiblestroke;\n}\n\n.monaco-diff-editor .moved-blocks-lines .arrow {\n\tfill: var(--vscode-diffEditor-move-border);\n}\n\n.monaco-diff-editor .moved-blocks-lines .arrow.currentMove {\n\tfill: var(--vscode-diffEditor-moveActive-border);\n}\n\n.monaco-diff-editor .moved-blocks-lines .arrow-rectangle {\n\tfill: var(--vscode-editor-background);\n}\n\n.monaco-diff-editor .moved-blocks-lines {\n\tposition: absolute;\n\tpointer-events: none;\n}\n\n.monaco-diff-editor .moved-blocks-lines path {\n\tfill: none;\n\tstroke: var(--vscode-diffEditor-move-border);\n\tstroke-width: 2;\n}\n\n.monaco-editor .char-delete.diff-range-empty {\n\tmargin-left: -1px;\n\tborder-left: solid var(--vscode-diffEditor-removedTextBackground) 3px;\n}\n\n.monaco-editor .char-insert.diff-range-empty {\n\tborder-left: solid var(--vscode-diffEditor-insertedTextBackground) 3px;\n}\n\n.monaco-editor .fold-unchanged {\n\tcursor: pointer;\n}\n\n.monaco-diff-editor .diff-moved-code-block {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tmargin-top: -4px;\n}\n\n.monaco-diff-editor .diff-moved-code-block .action-bar .action-label.codicon {\n\twidth: 12px;\n\theight: 12px;\n\tfont-size: 12px;\n}\n\n/* ---------- DiffEditor ---------- */\n\n.monaco-diff-editor .diffOverview {\n\tz-index: 9;\n}\n\n.monaco-diff-editor .diffOverview .diffViewport {\n\tz-index: 10;\n}\n\n/* colors not externalized: using transparancy on background */\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-light\t.scrollbar { background: none; }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\n\tz-index: 10;\n}\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\n.modified-in-monaco-diff-editor.hc-light\t.slider.active { background: none; }\n\n/* ---------- Diff ---------- */\n\n.monaco-editor .insert-sign,\n.monaco-diff-editor .insert-sign,\n.monaco-editor .delete-sign,\n.monaco-diff-editor .delete-sign {\n\tfont-size: 11px !important;\n\topacity: 0.7 !important;\n\tdisplay: flex !important;\n\talign-items: center;\n}\n.monaco-editor.hc-black .insert-sign,\n.monaco-diff-editor.hc-black .insert-sign,\n.monaco-editor.hc-black .delete-sign,\n.monaco-diff-editor.hc-black .delete-sign,\n.monaco-editor.hc-light .insert-sign,\n.monaco-diff-editor.hc-light .insert-sign,\n.monaco-editor.hc-light .delete-sign,\n.monaco-diff-editor.hc-light .delete-sign {\n\topacity: 1;\n}\n\n.monaco-editor .inline-deleted-margin-view-zone {\n\ttext-align: right;\n}\n.monaco-editor .inline-added-margin-view-zone {\n\ttext-align: right;\n}\n\n.monaco-editor .arrow-revert-change {\n\tz-index: 10;\n\tposition: absolute;\n}\n\n.monaco-editor .arrow-revert-change:hover {\n\tcursor: pointer;\n}\n\n/* ---------- Inline Diff ---------- */\n\n.monaco-editor .view-zones .view-lines .view-line span {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .margin-view-zones .lightbulb-glyph:hover {\n\tcursor: pointer;\n}\n\n.monaco-editor .char-insert, .monaco-diff-editor .char-insert {\n\tbackground-color: var(--vscode-diffEditor-insertedTextBackground);\n}\n\n.monaco-editor .line-insert, .monaco-diff-editor .line-insert {\n\tbackground-color: var(--vscode-diffEditor-insertedLineBackground, var(--vscode-diffEditor-insertedTextBackground));\n}\n\n.monaco-editor .line-insert,\n.monaco-editor .char-insert {\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-diffEditor-insertedTextBorder);\n}\n.monaco-editor.hc-black .line-insert, .monaco-editor.hc-light .line-insert,\n.monaco-editor.hc-black .char-insert, .monaco-editor.hc-light .char-insert {\n\tborder-style: dashed;\n}\n\n.monaco-editor .line-delete,\n.monaco-editor .char-delete {\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-diffEditor-removedTextBorder);\n}\n.monaco-editor.hc-black .line-delete, .monaco-editor.hc-light .line-delete,\n.monaco-editor.hc-black .char-delete, .monaco-editor.hc-light .char-delete {\n\tborder-style: dashed;\n}\n\n.monaco-editor .inline-added-margin-view-zone,\n.monaco-editor .gutter-insert, .monaco-diff-editor .gutter-insert {\n\tbackground-color: var(--vscode-diffEditorGutter-insertedLineBackground, var(--vscode-diffEditor-insertedLineBackground), var(--vscode-diffEditor-insertedTextBackground));\n}\n\n.monaco-editor .char-delete, .monaco-diff-editor .char-delete {\n\tbackground-color: var(--vscode-diffEditor-removedTextBackground);\n}\n\n.monaco-editor .line-delete, .monaco-diff-editor .line-delete {\n\tbackground-color: var(--vscode-diffEditor-removedLineBackground, var(--vscode-diffEditor-removedTextBackground));\n}\n\n.monaco-editor .inline-deleted-margin-view-zone,\n.monaco-editor .gutter-delete, .monaco-diff-editor .gutter-delete {\n\tbackground-color: var(--vscode-diffEditorGutter-removedLineBackground, var(--vscode-diffEditor-removedLineBackground), var(--vscode-diffEditor-removedTextBackground));\n}\n\n.monaco-diff-editor.side-by-side .editor.modified {\n\tbox-shadow: -6px 0 5px -5px var(--vscode-scrollbar-shadow);\n\tborder-left: 1px solid var(--vscode-diffEditor-border);\n}\n\n.monaco-diff-editor .diffViewport {\n\tbackground: var(--vscode-scrollbarSlider-background);\n}\n\n.monaco-diff-editor .diffViewport:hover {\n\tbackground: var(--vscode-scrollbarSlider-hoverBackground);\n}\n\n.monaco-diff-editor .diffViewport:active {\n\tbackground: var(--vscode-scrollbarSlider-activeBackground);\n}\n\n.monaco-editor .diagonal-fill {\n\tbackground-image: linear-gradient(\n\t\t-45deg,\n\t\tvar(--vscode-diffEditor-diagonalFill) 12.5%,\n\t\t#0000 12.5%, #0000 50%,\n\t\tvar(--vscode-diffEditor-diagonalFill) 50%, var(--vscode-diffEditor-diagonalFill) 62.5%,\n\t\t#0000 62.5%, #0000 100%\n\t);\n\tbackground-size: 8px 8px;\n}\n",""]);const a=r},81502:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-workbench .workbench-hover {\n\tposition: relative;\n\tfont-size: 13px;\n\tline-height: 19px;\n\t/* Must be higher than sash's z-index and terminal canvases */\n\tz-index: 40;\n\toverflow: hidden;\n\tmax-width: 700px;\n\tbackground: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n\tborder-radius: 3px;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbox-shadow: 0 2px 8px var(--vscode-widget-shadow);\n}\n\n.monaco-workbench .workbench-hover hr {\n\tborder-bottom: none;\n}\n\n.monaco-workbench .workbench-hover:not(.skip-fade-in) {\n\tanimation: fadein 100ms linear;\n}\n\n.monaco-workbench .workbench-hover.compact {\n\tfont-size: 12px;\n}\n\n.monaco-workbench .workbench-hover.compact .hover-contents {\n\tpadding: 2px 8px;\n}\n\n.monaco-workbench .workbench-hover-container.locked .workbench-hover {\n\toutline: 1px solid var(--vscode-editorHoverWidget-border);\n}\n.monaco-workbench .workbench-hover-container.locked .workbench-hover:focus,\n.monaco-workbench .workbench-hover-lock:focus {\n\toutline: 1px solid var(--vscode-focusBorder);\n}\n.monaco-workbench .workbench-hover-container.locked .workbench-hover-lock:hover {\n\tbackground: var(--vscode-toolbar-hoverBackground);\n}\n\n.monaco-workbench .workbench-hover-pointer {\n\tposition: absolute;\n\t/* Must be higher than workbench hover z-index */\n\tz-index: 41;\n\tpointer-events: none;\n}\n\n.monaco-workbench .workbench-hover-pointer:after {\n\tcontent: '';\n\tposition: absolute;\n\twidth: 5px;\n\theight: 5px;\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder-right: 1px solid var(--vscode-editorHoverWidget-border);\n\tborder-bottom: 1px solid var(--vscode-editorHoverWidget-border);\n}\n.monaco-workbench .locked .workbench-hover-pointer:after {\n\twidth: 4px;\n\theight: 4px;\n\tborder-right-width: 2px;\n\tborder-bottom-width: 2px;\n}\n\n.monaco-workbench .workbench-hover-pointer.left { left: -3px; }\n.monaco-workbench .workbench-hover-pointer.right { right: 3px; }\n.monaco-workbench .workbench-hover-pointer.top { top: -3px; }\n.monaco-workbench .workbench-hover-pointer.bottom { bottom: 3px; }\n\n.monaco-workbench .workbench-hover-pointer.left:after {\n\ttransform: rotate(135deg);\n}\n\n.monaco-workbench .workbench-hover-pointer.right:after {\n\ttransform: rotate(315deg);\n}\n\n.monaco-workbench .workbench-hover-pointer.top:after {\n\ttransform: rotate(225deg);\n}\n\n.monaco-workbench .workbench-hover-pointer.bottom:after {\n\ttransform: rotate(45deg);\n}\n\n.monaco-workbench .workbench-hover a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-workbench .workbench-hover a:focus {\n\toutline: 1px solid;\n\toutline-offset: -1px;\n\ttext-decoration: underline;\n\toutline-color: var(--vscode-focusBorder);\n}\n\n.monaco-workbench .workbench-hover a:hover,\n.monaco-workbench .workbench-hover a:active {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-workbench .workbench-hover code {\n\tbackground: var(--vscode-textCodeBlock-background);\n}\n\n.monaco-workbench .workbench-hover .hover-row .actions {\n\tbackground: var(--vscode-editorHoverWidget-statusBarBackground);\n}\n\n.monaco-workbench .workbench-hover.right-aligned {\n\t/* The context view service wraps strangely when it's right up against the edge without this */\n\tleft: 1px;\n}\n\n.monaco-workbench .workbench-hover.right-aligned .hover-row.status-bar .actions {\n\tflex-direction: row-reverse;\n}\n\n.monaco-workbench .workbench-hover.right-aligned .hover-row.status-bar .actions .action-container {\n\tmargin-right: 0;\n\tmargin-left: 16px;\n}\n",""]);const a=r},73044:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .rendered-markdown kbd {\n\tbackground-color: var(--vscode-keybindingLabel-background);\n\tcolor: var(--vscode-keybindingLabel-foreground);\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-radius: 3px;\n\tborder-color: var(--vscode-keybindingLabel-border);\n\tborder-bottom-color: var(--vscode-keybindingLabel-bottomBorder);\n\tbox-shadow: inset 0 -1px 0 var(--vscode-widget-shadow);\n\tvertical-align: middle;\n\tpadding: 1px 3px;\n}\n\n.rendered-markdown li:has(input[type=checkbox]) {\n\tlist-style-type: none;\n}\n",""]);const a=r},97337:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -------------------- IE10 remove auto clear button -------------------- */\n\n::-ms-clear {\n\tdisplay: none;\n}\n\n/* All widgets */\n/* I am not a big fan of this rule */\n.monaco-editor .editor-widget input {\n\tcolor: inherit;\n}\n\n/* -------------------- Editor -------------------- */\n\n.monaco-editor {\n\tposition: relative;\n\toverflow: visible;\n\t-webkit-text-size-adjust: 100%;\n\tcolor: var(--vscode-editor-foreground);\n\tbackground-color: var(--vscode-editor-background);\n}\n.monaco-editor-background {\n\tbackground-color: var(--vscode-editor-background);\n}\n.monaco-editor .rangeHighlight {\n\tbackground-color: var(--vscode-editor-rangeHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-rangeHighlightBorder);\n}\n.monaco-editor.hc-black .rangeHighlight, .monaco-editor.hc-light .rangeHighlight {\n\tborder-style: dotted;\n}\n.monaco-editor .symbolHighlight {\n\tbackground-color: var(--vscode-editor-symbolHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-symbolHighlightBorder);\n}\n.monaco-editor.hc-black .symbolHighlight, .monaco-editor.hc-light .symbolHighlight {\n\tborder-style: dotted;\n}\n\n/* -------------------- Misc -------------------- */\n\n.monaco-editor .overflow-guard {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.monaco-editor .view-overlays {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n.monaco-editor .auto-closed-character {\n\topacity: 0.3;\n}\n*/\n\n\n.monaco-editor .squiggly-error {\n\tborder-bottom: 4px double var(--vscode-editorError-border);\n}\n.monaco-editor .squiggly-error::before {\n\tdisplay: block;\n\tcontent: '';\n\twidth: 100%;\n\theight: 100%;\n\tbackground: var(--vscode-editorError-background);\n}\n.monaco-editor .squiggly-warning {\n\tborder-bottom: 4px double var(--vscode-editorWarning-border);\n}\n.monaco-editor .squiggly-warning::before {\n\tdisplay: block;\n\tcontent: '';\n\twidth: 100%;\n\theight: 100%;\n\tbackground: var(--vscode-editorWarning-background);\n}\n.monaco-editor .squiggly-info {\n\tborder-bottom: 4px double var(--vscode-editorInfo-border);\n}\n.monaco-editor .squiggly-info::before {\n\tdisplay: block;\n\tcontent: '';\n\twidth: 100%;\n\theight: 100%;\n\tbackground: var(--vscode-editorInfo-background);\n}\n.monaco-editor .squiggly-hint {\n\tborder-bottom: 2px dotted var(--vscode-editorHint-border);\n}\n.monaco-editor.showUnused .squiggly-unnecessary {\n\tborder-bottom: 2px dashed var(--vscode-editorUnnecessaryCode-border);\n}\n.monaco-editor.showDeprecated .squiggly-inline-deprecated {\n\ttext-decoration: line-through;\n\ttext-decoration-color: var(--vscode-editor-foreground, inherit);\n}\n",""]);const a=r},86508:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-component.multiDiffEditor {\n\tbackground: var(--vscode-multiDiffEditor-background);\n\toverflow-y: hidden;\n\n\t.focused {\n\t\t--vscode-multiDiffEditor-border: var(--vscode-focusBorder);\n\t}\n\n\t.multiDiffEntry {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tflex: 1;\n\t\toverflow: hidden;\n\n\n\t\t.collapse-button {\n\t\t\tmargin: 0 5px;\n\t\t\tcursor: pointer;\n\n\t\t\ta {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t}\n\n\t\t.header {\n\t\t\tz-index: 1000;\n\t\t\tbackground: var(--vscode-editor-background);\n\n\t\t\t&:not(.collapsed) .header-content {\n\t\t\t\tborder-bottom: 1px solid var(--vscode-sideBarSectionHeader-border);\n\t\t\t}\n\n\t\t\t.header-content {\n\t\t\t\tmargin: 8px 8px 0px 8px;\n\t\t\t\tpadding: 8px 5px;\n\n\t\t\t\tborder-top: 1px solid var(--vscode-multiDiffEditor-border);\n\t\t\t\tborder-right: 1px solid var(--vscode-multiDiffEditor-border);\n\t\t\t\tborder-left: 1px solid var(--vscode-multiDiffEditor-border);\n\t\t\t\tborder-top-left-radius: 2px;\n\t\t\t\tborder-top-right-radius: 2px;\n\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\n\t\t\t\tcolor: var(--vscode-foreground);\n\t\t\t\tbackground: var(--vscode-multiDiffEditor-headerBackground);\n\n\t\t\t\t&.shadow {\n\t\t\t\t\tbox-shadow: var(--vscode-scrollbar-shadow) 0px 6px 6px -6px;\n\t\t\t\t}\n\n\t\t\t\t.file-path {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex: 1;\n\t\t\t\t\tmin-width: 0;\n\n\t\t\t\t\t.title {\n\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\tline-height: 22px;\n\n\t\t\t\t\t\t&.original {\n\t\t\t\t\t\t\tflex: 1;\n\t\t\t\t\t\t\tmin-width: 0;\n\t\t\t\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t.status {\n\t\t\t\t\t\tfont-weight: 600;\n\t\t\t\t\t\topacity: 0.75;\n\t\t\t\t\t\tmargin: 0px 10px;\n\t\t\t\t\t\tline-height: 22px;\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t\tTODO@hediet: move colors from git extension to core!\n\t\t\t\t\t\t&.renamed {\n\t\t\t\t\t\t\tcolor: v ar(--vscode-gitDecoration-renamedResourceForeground);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.deleted {\n\t\t\t\t\t\t\tcolor: v ar(--vscode-gitDecoration-deletedResourceForeground);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.added {\n\t\t\t\t\t\t\tcolor: v ar(--vscode-gitDecoration-addedResourceForeground);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t*/\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.actions {\n\t\t\t\t\tpadding: 0 8px;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\n\t\t.editorParent {\n\t\t\tflex: 1;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\n\t\t\tmargin-right: 8px;\n\t\t\tmargin-left: 8px;\n\n\t\t\tborder-right: 1px solid var(--vscode-multiDiffEditor-border);\n\t\t\tborder-left: 1px solid var(--vscode-multiDiffEditor-border);\n\t\t\tborder-bottom: 1px solid var(--vscode-multiDiffEditor-border);\n\t\t\tborder-radius: 2px;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t.editorContainer {\n\t\t\tflex: 1;\n\t\t}\n\t}\n}\n",""]);const a=r},34055:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .selection-anchor {\n\tbackground-color: #007ACC;\n\twidth: 2px !important;\n}\n",""]);const a=r},12205:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .bracket-match {\n\tbox-sizing: border-box;\n\tbackground-color: var(--vscode-editorBracketMatch-background);\n\tborder: 1px solid var(--vscode-editorBracketMatch-border);\n}\n",""]);const a=r},32874:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .lightBulbWidget {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.monaco-editor .lightBulbWidget:hover{\n\tcursor: pointer;\n}\n\n.monaco-editor .lightBulbWidget.codicon-light-bulb,\n.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle {\n\tcolor: var(--vscode-editorLightBulb-foreground);\n}\n\n.monaco-editor .lightBulbWidget.codicon-lightbulb-autofix,\n.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle-autofix {\n\tcolor: var(--vscode-editorLightBulbAutoFix-foreground, var(--vscode-editorLightBulb-foreground));\n}\n\n.monaco-editor .lightBulbWidget.codicon-sparkle-filled {\n\tcolor: var(--vscode-editorLightBulbAi-foreground, var(--vscode-icon-foreground));\n}\n\n.monaco-editor .lightBulbWidget:before {\n\tposition: relative;\n\tz-index: 2;\n}\n\n.monaco-editor .lightBulbWidget:after {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tcontent: '';\n\tdisplay: block;\n\twidth: 100%;\n\theight: 100%;\n\topacity: 0.3;\n\tbackground-color: var(--vscode-editor-background);\n\tz-index: 1;\n}\n",""]);const a=r},32849:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .codelens-decoration {\n\toverflow: hidden;\n\tdisplay: inline-block;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\tcolor: var(--vscode-editorCodeLens-foreground);\n\tline-height: var(--vscode-editorCodeLens-lineHeight);\n\tfont-size: var(--vscode-editorCodeLens-fontSize);\n\tpadding-right: calc(var(--vscode-editorCodeLens-fontSize)*0.5);\n\tfont-feature-settings: var(--vscode-editorCodeLens-fontFeatureSettings);\n\tfont-family: var(--vscode-editorCodeLens-fontFamily), var(--vscode-editorCodeLens-fontFamilyDefault);\n}\n\n.monaco-editor .codelens-decoration > span,\n.monaco-editor .codelens-decoration > a {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\twhite-space: nowrap;\n\tvertical-align: sub;\n}\n\n.monaco-editor .codelens-decoration > a {\n\ttext-decoration: none;\n}\n\n.monaco-editor .codelens-decoration > a:hover {\n\tcursor: pointer;\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n\n.monaco-editor .codelens-decoration > a:hover .codicon {\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n\n.monaco-editor .codelens-decoration .codicon {\n\tvertical-align: middle;\n\tcolor: currentColor !important;\n\tcolor: var(--vscode-editorCodeLens-foreground);\n\tline-height: var(--vscode-editorCodeLens-lineHeight);\n\tfont-size: var(--vscode-editorCodeLens-fontSize);\n}\n\n.monaco-editor .codelens-decoration > a:hover .codicon::before {\n\tcursor: pointer;\n}\n\n@keyframes fadein {\n\t0% {\n\t\topacity: 0;\n\t\tvisibility: visible;\n\t}\n\n\t100% {\n\t\topacity: 1;\n\t}\n}\n\n.monaco-editor .codelens-decoration.fadein {\n\tanimation: fadein 0.1s linear;\n}\n",""]);const a=r},22313:(e,t,i)=>{"use strict";i.d(t,{Z:()=>u});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s),a=i(61667),l=i.n(a),d=new URL(i(94748),i.b),c=r()(o()),h=l()(d);c.push([e.id,`/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.colorpicker-widget {\n\theight: 190px;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n/* Decoration */\n\n.colorpicker-color-decoration,\n.hc-light .colorpicker-color-decoration {\n\tborder: solid 0.1em #000;\n\tbox-sizing: border-box;\n\tmargin: 0.1em 0.2em 0 0.2em;\n\twidth: 0.8em;\n\theight: 0.8em;\n\tline-height: 0.8em;\n\tdisplay: inline-block;\n\tcursor: pointer;\n}\n\n.hc-black .colorpicker-color-decoration,\n.vs-dark .colorpicker-color-decoration {\n\tborder: solid 0.1em #eee;\n}\n\n/* Header */\n\n.colorpicker-header {\n\tdisplay: flex;\n\theight: 24px;\n\tposition: relative;\n\tbackground: url(${h});\n\tbackground-size: 9px 9px;\n\timage-rendering: pixelated;\n}\n\n.colorpicker-header .picked-color {\n\twidth: 240px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tline-height: 24px;\n\tcursor: pointer;\n\tcolor: white;\n\tflex: 1;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n\n.colorpicker-header .picked-color .picked-color-presentation {\n\twhite-space: nowrap;\n\tmargin-left: 5px;\n\tmargin-right: 5px;\n}\n\n.colorpicker-header .picked-color .codicon {\n\tcolor: inherit;\n\tfont-size: 14px;\n}\n\n.colorpicker-header .picked-color.light {\n\tcolor: black;\n}\n\n.colorpicker-header .original-color {\n\twidth: 74px;\n\tz-index: inherit;\n\tcursor: pointer;\n}\n\n.standalone-colorpicker {\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.colorpicker-header.standalone-colorpicker {\n\tborder-bottom: none;\n}\n\n.colorpicker-header .close-button {\n\tcursor: pointer;\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder-left: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.colorpicker-header .close-button-inner-div {\n\twidth: 100%;\n\theight: 100%;\n\ttext-align: center;\n}\n\n.colorpicker-header .close-button-inner-div:hover {\n\tbackground-color: var(--vscode-toolbar-hoverBackground);\n}\n\n.colorpicker-header .close-icon {\n\tpadding: 3px;\n}\n\n/* Body */\n\n.colorpicker-body {\n\tdisplay: flex;\n\tpadding: 8px;\n\tposition: relative;\n}\n\n.colorpicker-body .saturation-wrap {\n\toverflow: hidden;\n\theight: 150px;\n\tposition: relative;\n\tmin-width: 220px;\n\tflex: 1;\n}\n\n.colorpicker-body .saturation-box {\n\theight: 150px;\n\tposition: absolute;\n}\n\n.colorpicker-body .saturation-selection {\n\twidth: 9px;\n\theight: 9px;\n\tmargin: -5px 0 0 -5px;\n\tborder: 1px solid rgb(255, 255, 255);\n\tborder-radius: 100%;\n\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\n\tposition: absolute;\n}\n\n.colorpicker-body .strip {\n\twidth: 25px;\n\theight: 150px;\n}\n\n.colorpicker-body .standalone-strip {\n\twidth: 25px;\n\theight: 122px;\n}\n\n.colorpicker-body .hue-strip {\n\tposition: relative;\n\tmargin-left: 8px;\n\tcursor: grab;\n\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\n}\n\n.colorpicker-body .opacity-strip {\n\tposition: relative;\n\tmargin-left: 8px;\n\tcursor: grab;\n\tbackground: url(${h});\n\tbackground-size: 9px 9px;\n\timage-rendering: pixelated;\n}\n\n.colorpicker-body .strip.grabbing {\n\tcursor: grabbing;\n}\n\n.colorpicker-body .slider {\n\tposition: absolute;\n\ttop: 0;\n\tleft: -2px;\n\twidth: calc(100% + 4px);\n\theight: 4px;\n\tbox-sizing: border-box;\n\tborder: 1px solid rgba(255, 255, 255, 0.71);\n\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\n}\n\n.colorpicker-body .strip .overlay {\n\theight: 150px;\n\tpointer-events: none;\n}\n\n.colorpicker-body .standalone-strip .standalone-overlay {\n\theight: 122px;\n\tpointer-events: none;\n}\n\n.standalone-colorpicker-body {\n\tdisplay: block;\n\tborder: 1px solid transparent;\n\tborder-bottom: 1px solid var(--vscode-editorHoverWidget-border);\n\toverflow: hidden;\n}\n\n.colorpicker-body .insert-button {\n\tposition: absolute;\n\theight: 20px;\n\twidth: 58px;\n\tpadding: 0px;\n\tright: 8px;\n\tbottom: 8px;\n\tbackground: var(--vscode-button-background);\n\tcolor: var(--vscode-button-foreground);\n\tborder-radius: 2px;\n\tborder: none;\n\tcursor: pointer;\n}\n\n.colorpicker-body .insert-button:hover{\n\tbackground: var(--vscode-button-hoverBackground);\n}\n`,""]);const u=c},97070:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor.vs .dnd-target,\n.monaco-editor.hc-light .dnd-target {\n\tborder-right: 2px dotted black;\n\tcolor: white; /* opposite of black */\n}\n.monaco-editor.vs-dark .dnd-target {\n\tborder-right: 2px dotted #AEAFAD;\n\tcolor: #51504f; /* opposite of #AEAFAD */\n}\n.monaco-editor.hc-black .dnd-target {\n\tborder-right: 2px dotted #fff;\n\tcolor: #000; /* opposite of #fff */\n}\n\n.monaco-editor.mouse-default .view-lines,\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\n.monaco-editor.hc-black.mac.mouse-default .view-lines,\n.monaco-editor.hc-light.mac.mouse-default .view-lines {\n\tcursor: default;\n}\n.monaco-editor.mouse-copy .view-lines,\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\n.monaco-editor.hc-black.mac.mouse-copy .view-lines,\n.monaco-editor.hc-light.mac.mouse-copy .view-lines {\n\tcursor: copy;\n}\n",""]);const a=r},33399:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.post-edit-widget {\n\tbox-shadow: 0 0 8px 2px var(--vscode-widget-shadow);\n\tborder: 1px solid var(--vscode-widget-border, transparent);\n\tborder-radius: 4px;\n\tbackground-color: var(--vscode-editorWidget-background);\n\toverflow: hidden;\n}\n\n.post-edit-widget .monaco-button {\n\tpadding: 2px;\n\tborder: none;\n\tborder-radius: 0;\n}\n\n.post-edit-widget .monaco-button:hover {\n\tbackground-color: var(--vscode-button-secondaryHoverBackground) !important;\n}\n\n.post-edit-widget .monaco-button .codicon {\n\tmargin: 0;\n}\n",""]);const a=r},68875:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .findOptionsWidget {\n\tbackground-color: var(--vscode-editorWidget-background);\n\tcolor: var(--vscode-editorWidget-foreground);\n\tbox-shadow: 0 0 8px 2px var(--vscode-widget-shadow);\n\tborder: 2px solid var(--vscode-contrastBorder);\n}\n",""]);const a=r},56950:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Find widget */\n.monaco-editor .find-widget {\n\tposition: absolute;\n\tz-index: 35;\n\theight: 33px;\n\toverflow: hidden;\n\tline-height: 19px;\n\ttransition: transform 200ms linear;\n\tpadding: 0 4px;\n\tbox-sizing: border-box;\n\ttransform: translateY(calc(-100% - 10px)); /* shadow (10px) */\n\tbox-shadow: 0 0 8px 2px var(--vscode-widget-shadow);\n\tcolor: var(--vscode-editorWidget-foreground);\n\tborder-left: 1px solid var(--vscode-widget-border);\n\tborder-right: 1px solid var(--vscode-widget-border);\n\tborder-bottom: 1px solid var(--vscode-widget-border);\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n\tbackground-color: var(--vscode-editorWidget-background);\n}\n\n.monaco-workbench.reduce-motion .monaco-editor .find-widget {\n\ttransition: transform 0ms linear;\n}\n\n.monaco-editor .find-widget textarea {\n\tmargin: 0px;\n}\n\n.monaco-editor .find-widget.hiddenEditor {\n\tdisplay: none;\n}\n\n/* Find widget when replace is toggled on */\n.monaco-editor .find-widget.replaceToggled > .replace-part {\n\tdisplay: flex;\n}\n\n.monaco-editor .find-widget.visible {\n\ttransform: translateY(0);\n}\n\n/* This outline-color rule is used to override the outline color for synthetic-focus find input. */\n.monaco-editor .find-widget .monaco-inputbox.synthetic-focus {\n\toutline: 1px solid -webkit-focus-ring-color;\n\toutline-offset: -1px;\n\toutline-color: var(--vscode-focusBorder);\n}\n\n.monaco-editor .find-widget .monaco-inputbox .input {\n\tbackground-color: transparent;\n\tmin-height: 0;\n}\n\n.monaco-editor .find-widget .monaco-findInput .input {\n\tfont-size: 13px;\n}\n\n.monaco-editor .find-widget > .find-part,\n.monaco-editor .find-widget > .replace-part {\n\tmargin: 3px 25px 0 17px;\n\tfont-size: 12px;\n\tdisplay: flex;\n}\n\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\n\tmin-height: 25px;\n}\n\n\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\n\tpadding-right: 22px;\n}\n\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .input,\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .mirror,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .input,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\n\tpadding-top: 2px;\n\tpadding-bottom: 2px;\n}\n\n.monaco-editor .find-widget > .find-part .find-actions {\n\theight: 25px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-editor .find-widget > .replace-part .replace-actions {\n\theight: 25px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-editor .find-widget .monaco-findInput {\n\tvertical-align: middle;\n\tdisplay: flex;\n\tflex:1;\n}\n\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element {\n\t/* Make sure textarea inherits the width correctly */\n\twidth: 100%;\n}\n\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical {\n\t/* Hide vertical scrollbar */\n\topacity: 0;\n}\n\n.monaco-editor .find-widget .matchesCount {\n\tdisplay: flex;\n\tflex: initial;\n\tmargin: 0 0 0 3px;\n\tpadding: 2px 0 0 2px;\n\theight: 25px;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\ttext-align: center;\n\tline-height: 23px;\n}\n\n.monaco-editor .find-widget .button {\n\twidth: 16px;\n\theight: 16px;\n\tpadding: 3px;\n\tborder-radius: 5px;\n\tdisplay: flex;\n\tflex: initial;\n\tmargin-left: 3px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tcursor: pointer;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* find in selection button */\n.monaco-editor .find-widget .codicon-find-selection {\n\twidth: 22px;\n\theight: 22px;\n\tpadding: 3px;\n\tborder-radius: 5px;\n}\n\n.monaco-editor .find-widget .button.left {\n\tmargin-left: 0;\n\tmargin-right: 3px;\n}\n\n.monaco-editor .find-widget .button.wide {\n\twidth: auto;\n\tpadding: 1px 6px;\n\ttop: -1px;\n}\n\n.monaco-editor .find-widget .button.toggle {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 3px;\n\twidth: 18px;\n\theight: 100%;\n\tborder-radius: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .find-widget .button.toggle.disabled {\n\tdisplay: none;\n}\n\n.monaco-editor .find-widget .disabled {\n\tcolor: var(--vscode-disabledForeground);\n\tcursor: default;\n}\n\n.monaco-editor .find-widget > .replace-part {\n\tdisplay: none;\n}\n\n.monaco-editor .find-widget > .replace-part > .monaco-findInput {\n\tposition: relative;\n\tdisplay: flex;\n\tvertical-align: middle;\n\tflex: auto;\n\tflex-grow: 0;\n\tflex-shrink: 0;\n}\n\n.monaco-editor .find-widget > .replace-part > .monaco-findInput > .controls {\n\tposition: absolute;\n\ttop: 3px;\n\tright: 2px;\n}\n\n/* REDUCED */\n.monaco-editor .find-widget.reduced-find-widget .matchesCount {\n\tdisplay:none;\n}\n\n/* NARROW (SMALLER THAN REDUCED) */\n.monaco-editor .find-widget.narrow-find-widget {\n\tmax-width: 257px !important;\n}\n\n/* COLLAPSED (SMALLER THAN NARROW) */\n.monaco-editor .find-widget.collapsed-find-widget {\n\tmax-width: 170px !important;\n}\n\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\n\tdisplay:none;\n}\n\n.monaco-editor .find-widget.no-results .matchesCount {\n\tcolor: var(--vscode-errorForeground);\n}\n\n.monaco-editor .findMatch {\n\tanimation-duration: 0;\n\tanimation-name: inherit !important;\n\tbackground-color: var(--vscode-editor-findMatchHighlightBackground);\n}\n\n.monaco-editor .currentFindMatch {\n\tbackground-color: var(--vscode-editor-findMatchBackground);\n\tborder: 2px solid var(--vscode-editor-findMatchBorder);\n\tpadding: 1px;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .findScope {\n\tbackground-color: var(--vscode-editor-findRangeHighlightBackground);\n}\n\n.monaco-editor .find-widget .monaco-sash {\n\tleft: 0 !important;\n\tbackground-color: var(--vscode-editorWidget-resizeBorder, var(--vscode-editorWidget-border));\n}\n\n.monaco-editor.hc-black .find-widget .button:before {\n\tposition: relative;\n\ttop: 1px;\n\tleft: 2px;\n}\n\n/* Action bars */\n.monaco-editor .find-widget .button:not(.disabled):hover,\n.monaco-editor .find-widget .codicon-find-selection:hover {\n\tbackground-color: var(--vscode-toolbar-hoverBackground) !important;\n}\n\n.monaco-editor.findMatch {\n\tbackground-color: var(--vscode-editor-findMatchHighlightBackground);\n}\n\n.monaco-editor.currentFindMatch {\n\tbackground-color: var(--vscode-editor-findMatchBackground);\n}\n\n.monaco-editor.findScope {\n\tbackground-color: var(--vscode-editor-findRangeHighlightBackground);\n}\n\n.monaco-editor.findMatch {\n\tbackground-color: var(--vscode-editorWidget-background);\n}\n\n/* Close button position. */\n.monaco-editor .find-widget > .button.codicon-widget-close {\n\tposition: absolute;\n\ttop: 5px;\n\tright: 4px;\n}\n",""]);const a=r},43388:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,\n.monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,\n.monaco-editor .margin-view-overlays .codicon-folding-expanded,\n.monaco-editor .margin-view-overlays .codicon-folding-collapsed {\n\tcursor: pointer;\n\topacity: 0;\n\ttransition: opacity 0.5s;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tfont-size: 140%;\n\tmargin-left: 2px;\n}\n\n.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,\n.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,\n.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-expanded,\n.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-collapsed {\n\ttransition: initial;\n}\n\n.monaco-editor .margin-view-overlays:hover .codicon,\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-manual-collapsed,\n.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons {\n\topacity: 1;\n}\n\n.monaco-editor .inline-folded:after {\n\tcolor: grey;\n\tmargin: 0.1em 0.2em 0 0.2em;\n\tcontent: "\\22EF"; /* ellipses unicode character */\n\tdisplay: inline;\n\tline-height: 1em;\n\tcursor: pointer;\n}\n\n.monaco-editor .folded-background {\n\tbackground-color: var(--vscode-editor-foldBackground);\n}\n\n.monaco-editor .cldr.codicon.codicon-folding-expanded,\n.monaco-editor .cldr.codicon.codicon-folding-collapsed,\n.monaco-editor .cldr.codicon.codicon-folding-manual-expanded,\n.monaco-editor .cldr.codicon.codicon-folding-manual-collapsed {\n\tcolor: var(--vscode-editorGutter-foldingControlForeground) !important;\n}\n\n',""]);const a=r},35351:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* marker zone */\n\n.monaco-editor .peekview-widget .head .peekview-title .severity-icon {\n\tdisplay: inline-block;\n\tvertical-align: text-top;\n\tmargin-right: 4px;\n}\n\n.monaco-editor .marker-widget {\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .marker-widget > .stale {\n\topacity: 0.6;\n\tfont-style: italic;\n}\n\n.monaco-editor .marker-widget .title {\n\tdisplay: inline-block;\n\tpadding-right: 5px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer {\n\tposition: absolute;\n\twhite-space: pre;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\tpadding: 8px 12px 0 20px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message .details {\n\tpadding-left: 6px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message .source,\n.monaco-editor .marker-widget .descriptioncontainer .message span.code {\n\topacity: 0.6;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link {\n\topacity: 0.6;\n\tcolor: inherit;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before {\n\tcontent: '(';\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after {\n\tcontent: ')';\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link > span {\n\ttext-decoration: underline;\n\t/** Hack to force underline to show **/\n\tborder-bottom: 1px solid transparent;\n\ttext-underline-position: under;\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .filename {\n\tcursor: pointer;\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n",""]);const a=r},33257:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .goto-definition-link {\n\ttext-decoration: underline;\n\tcursor: pointer;\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n",""]);const a=r},60879:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -- zone widget */\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\n\tborder-top-width: 1px;\n\tborder-bottom-width: 1px;\n}\n\n.monaco-editor .reference-zone-widget .inline {\n\tdisplay: inline-block;\n\tvertical-align: top;\n}\n\n.monaco-editor .reference-zone-widget .messages {\n\theight: 100%;\n\twidth: 100%;\n\ttext-align: center;\n\tpadding: 3em 0;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree {\n\tline-height: 23px;\n\tbackground-color: var(--vscode-peekViewResult-background);\n\tcolor: var(--vscode-peekViewResult-lineForeground);\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\n\tdisplay: inline-flex;\n\twidth: 100%;\n\theight: 100%;\n\tcolor: var(--vscode-peekViewResult-fileForeground);\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file {\n\tcolor: inherit !important;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) {\n\tbackground-color: var(--vscode-peekViewResult-selectionBackground);\n\tcolor: var(--vscode-peekViewResult-selectionForeground) !important;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\n\tmargin-right: 12px;\n\tmargin-left: auto;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight {\n\tbackground-color: var(--vscode-peekViewResult-matchHighlightBackground);\n}\n\n.monaco-editor .reference-zone-widget .preview .reference-decoration {\n\tbackground-color: var(--vscode-peekViewEditor-matchHighlightBackground);\n\tborder: 2px solid var(--vscode-peekViewEditor-matchHighlightBorder);\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,\n.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\n\tbackground-color: var(--vscode-peekViewEditor-background);\n}\n\n.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\n\tbackground-color: var(--vscode-peekViewEditorGutter-background);\n}\n\n/* High Contrast Theming */\n\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file,\n.monaco-editor.hc-light .reference-zone-widget .ref-tree .reference-file {\n\tfont-weight: bold;\n}\n\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .referenceMatch .highlight,\n.monaco-editor.hc-light .reference-zone-widget .ref-tree .referenceMatch .highlight {\n\tborder: 1px dotted var(--vscode-contrastActiveBorder, transparent);\n\tbox-sizing: border-box;\n}\n",""]);const a=r},41738:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .hoverHighlight {\n\tbackground-color: var(--vscode-editor-hoverHighlightBackground);\n}\n\n.monaco-editor .monaco-hover {\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n\tborder-radius: 3px;\n}\n\n.monaco-editor .monaco-hover a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .monaco-hover a:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-editor .monaco-hover .hover-row .actions {\n\tbackground-color: var(--vscode-editorHoverWidget-statusBarBackground);\n}\n\n.monaco-editor .monaco-hover code {\n\tbackground-color: var(--vscode-textCodeBlock-background);\n}\n\n\n",""]);const a=r},16921:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n.monaco-editor.vs .valueSetReplacement {\n\toutline: solid 2px var(--vscode-editorBracketMatch-border);\n}\n",""]);const a=r},77682:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .suggest-preview-additional-widget {\n\twhite-space: nowrap;\n}\n\n.monaco-editor .suggest-preview-additional-widget .content-spacer {\n\tcolor: transparent;\n\twhite-space: pre;\n}\n\n.monaco-editor .suggest-preview-additional-widget .button {\n\tdisplay: inline-block;\n\tcursor: pointer;\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .ghost-text-hidden {\n\topacity: 0;\n\tfont-size: 0;\n}\n\n.monaco-editor .ghost-text-decoration, .monaco-editor .suggest-preview-text .ghost-text {\n\tfont-style: italic;\n}\n\n.monaco-editor .inline-completion-text-to-replace {\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .ghost-text-decoration,\n.monaco-editor .ghost-text-decoration-preview,\n.monaco-editor .suggest-preview-text .ghost-text {\n\tcolor: var(--vscode-editorGhostText-foreground) !important;\n\tbackground-color: var(--vscode-editorGhostText-background);\n\tborder: 1px solid var(--vscode-editorGhostText-border);\n}\n",""]);const a=r},28300:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inlineSuggestionsHints.withBorder {\n\tz-index: 39;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .inlineSuggestionsHints a {\n\tcolor: var(--vscode-foreground);\n}\n\n.monaco-editor .inlineSuggestionsHints a:hover {\n\tcolor: var(--vscode-foreground);\n}\n\n.monaco-editor .inlineSuggestionsHints .keybinding {\n\tdisplay: flex;\n\tmargin-left: 4px;\n\topacity: 0.6;\n}\n\n.monaco-editor .inlineSuggestionsHints .keybinding .monaco-keybinding-key {\n\tfont-size: 8px;\n\tpadding: 2px 3px;\n}\n\n.monaco-editor .inlineSuggestionsHints .availableSuggestionCount a {\n\tdisplay: flex;\n\tmin-width: 19px;\n\tjustify-content: center;\n}\n\n.monaco-editor .inlineSuggestionStatusBarItemLabel {\n\tmargin-right: 2px;\n}\n",""]);const a=r},45426:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inline-edit-remove {\n\tbackground-color: var(--vscode-editorGhostText-background);\n\tfont-style: italic;\n\ttext-decoration: line-through;\n}\n\n.monaco-editor .inline-edit-remove.backgroundColoring {\n\tbackground-color: var(--vscode-diffEditor-removedLineBackground);\n}\n\n.monaco-editor .inline-edit-hidden {\n\topacity: 0;\n\tfont-size: 0;\n}\n\n.monaco-editor .inline-edit-decoration, .monaco-editor .suggest-preview-text .inline-edit {\n\tfont-style: italic;\n}\n\n.monaco-editor .inline-completion-text-to-replace {\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .inline-edit-decoration,\n.monaco-editor .inline-edit-decoration-preview,\n.monaco-editor .suggest-preview-text .inline-edit {\n\tcolor: var(--vscode-editorGhostText-foreground) !important;\n\tbackground-color: var(--vscode-editorGhostText-background);\n\tborder: 1px solid var(--vscode-editorGhostText-border);\n}\n\n\n",""]);const a=r},87280:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inlineEditHints.withBorder {\n\tz-index: 39;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .inlineEditHints a {\n\tcolor: var(--vscode-foreground);\n}\n\n.monaco-editor .inlineEditHints a:hover {\n\tcolor: var(--vscode-foreground);\n}\n\n.monaco-editor .inlineEditHints .keybinding {\n\tdisplay: flex;\n\tmargin-left: 4px;\n\topacity: 0.6;\n}\n\n.monaco-editor .inlineEditHints .keybinding .monaco-keybinding-key {\n\tfont-size: 8px;\n\tpadding: 2px 3px;\n}\n\n.monaco-editor .inlineEditStatusBarItemLabel {\n\tmargin-right: 2px;\n}\n",""]);const a=r},16668:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.inline-editor-progress-decoration {\n\tdisplay: inline-block;\n\twidth: 1em;\n\theight: 1em;\n}\n\n.inline-progress-widget {\n\tdisplay: flex !important;\n\tjustify-content: center;\n\talign-items: center;\n}\n\n.inline-progress-widget .icon {\n\tfont-size: 80% !important;\n}\n\n.inline-progress-widget:hover .icon {\n\tfont-size: 90% !important;\n\tanimation: none;\n}\n\n.inline-progress-widget:hover .icon::before {\n\tcontent: "\\ea76"; /* codicon-x */\n}\n',""]);const a=r},55040:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .linked-editing-decoration {\n\tbackground-color: var(--vscode-editor-linkedEditingBackground);\n\n\t/* Ensure decoration is visible even if range is empty */\n\tmin-width: 1px;\n}\n",""]);const a=r},28477:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .detected-link,\n.monaco-editor .detected-link-active {\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .detected-link-active {\n\tcursor: pointer;\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n",""]);const a=r},65807:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .monaco-editor-overlaymessage {\n\tpadding-bottom: 8px;\n\tz-index: 10000;\n}\n\n.monaco-editor .monaco-editor-overlaymessage.below {\n\tpadding-bottom: 0;\n\tpadding-top: 8px;\n\tz-index: 10000;\n}\n\n@keyframes fadeIn {\n\tfrom { opacity: 0; }\n\tto { opacity: 1; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\n\tanimation: fadeIn 150ms ease-out;\n}\n\n@keyframes fadeOut {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\n\tanimation: fadeOut 100ms ease-out;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message {\n\tpadding: 2px 4px;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-inputValidation-infoBorder);\n\tborder-radius: 3px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message p {\n\tmargin-block: 0px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message a:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-editor.hc-black .monaco-editor-overlaymessage .message,\n.monaco-editor.hc-light .monaco-editor-overlaymessage .message {\n\tborder-width: 2px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor {\n\twidth: 0 !important;\n\theight: 0 !important;\n\tborder-color: transparent;\n\tborder-style: solid;\n\tz-index: 1000;\n\tborder-width: 8px;\n\tposition: absolute;\n\tleft: 2px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor.top {\n\tborder-bottom-color: var(--vscode-inputValidation-infoBorder);\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor.below {\n\tborder-top-color: var(--vscode-inputValidation-infoBorder);\n}\n\n.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.below {\n\tdisplay: none;\n}\n\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.top {\n\tdisplay: inherit;\n\ttop: -8px;\n}\n",""]);const a=r},81386:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .parameter-hints-widget {\n\t/* Must be higher than the sash\'s z-index and terminal canvases but lower than the suggest widget */\n\tz-index: 39;\n\tdisplay: flex;\n\tflex-direction: column;\n\tline-height: 1.5em;\n\tcursor: default;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.hc-black .monaco-editor .parameter-hints-widget,\n.hc-light .monaco-editor .parameter-hints-widget {\n\tborder-width: 2px;\n}\n\n.monaco-editor .parameter-hints-widget > .phwrapper {\n\tmax-width: 440px;\n\tdisplay: flex;\n\tflex-direction: row;\n}\n\n.monaco-editor .parameter-hints-widget.multiple {\n\tmin-height: 3.3em;\n\tpadding: 0;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .body::before {\n\tcontent: "";\n\tdisplay: block;\n\theight: 100%;\n\tposition: absolute;\n\topacity: 0.5;\n\tborder-left: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .parameter-hints-widget p,\n.monaco-editor .parameter-hints-widget ul {\n\tmargin: 8px 0;\n}\n\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\n.monaco-editor .parameter-hints-widget .body {\n\tdisplay: flex;\n\tflex: 1;\n\tflex-direction: column;\n\tmin-height: 100%;\n}\n\n.monaco-editor .parameter-hints-widget .signature {\n\tpadding: 4px 5px;\n\tposition: relative;\n}\n\n.monaco-editor .parameter-hints-widget .signature.has-docs::after {\n\tcontent: "";\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\twidth: 100%;\n\tpadding-top: 4px;\n\topacity: 0.5;\n\tborder-bottom: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .parameter-hints-widget .docs {\n\tpadding: 0 10px 0 5px;\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .parameter-hints-widget .docs.empty {\n\tdisplay: none;\n}\n\n.monaco-editor .parameter-hints-widget .docs a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .parameter-hints-widget .docs a:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n\tcursor: pointer;\n}\n\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\n\twhite-space: initial;\n}\n\n.monaco-editor .parameter-hints-widget .docs code {\n\tfont-family: var(--monaco-monospace-font);\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n\tbackground-color: var(--vscode-textCodeBlock-background);\n}\n\n.monaco-editor .parameter-hints-widget .docs .monaco-tokenized-source,\n.monaco-editor .parameter-hints-widget .docs .code {\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .parameter-hints-widget .controls {\n\tdisplay: none;\n\tflex-direction: column;\n\talign-items: center;\n\tmin-width: 22px;\n\tjustify-content: flex-end;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .controls {\n\tdisplay: flex;\n\tpadding: 0 2px;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .button {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tcursor: pointer;\n}\n\n.monaco-editor .parameter-hints-widget .button.previous {\n\tbottom: 24px;\n}\n\n.monaco-editor .parameter-hints-widget .overloads {\n\ttext-align: center;\n\theight: 12px;\n\tline-height: 12px;\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\n\tcolor: var(--vscode-editorHoverWidget-highlightForeground);\n\tfont-weight: bold;\n}\n\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\n\tfont-weight: bold;\n\tmargin-right: 0.5em;\n}\n',""]);const a=r},8881:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .peekview-widget .head {\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tflex-wrap: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title {\n\tdisplay: flex;\n\talign-items: baseline;\n\tfont-size: 13px;\n\tmargin-left: 20px;\n\tmin-width: 0;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title.clickable {\n\tcursor: pointer;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\n\tfont-size: 0.9em;\n\tmargin-left: 0.5em;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .meta {\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .dirname {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .filename {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty)::before {\n\tcontent: '-';\n\tpadding: 0 0.3em;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions {\n\tflex: 1;\n\ttext-align: right;\n\tpadding-right: 2px;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\n\theight: 100%;\n}\n\n.monaco-editor .peekview-widget > .body {\n\tborder-top: 1px solid;\n\tposition: relative;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .codicon {\n\tmargin-right: 4px;\n\talign-self: center;\n}\n\n.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon {\n\tcolor: inherit !important;\n}\n",""]);const a=r},88342:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .rename-box {\n\tz-index: 100;\n\tcolor: inherit;\n\tborder-radius: 4px;\n}\n\n.monaco-editor .rename-box.preview {\n\tpadding: 4px 4px 0 4px;\n}\n\n.monaco-editor .rename-box .rename-input {\n\tpadding: 3px;\n\tborder-radius: 2px;\n\twidth: calc(100% - 8px); /* 4px padding on each side */\n}\n\n.monaco-editor .rename-box .rename-label {\n\tdisplay: none;\n\topacity: .8;\n}\n\n.monaco-editor .rename-box.preview .rename-label {\n\tdisplay: inherit;\n}\n",""]);const a=r},15756:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .snippet-placeholder {\n\tmin-width: 2px;\n\toutline-style: solid;\n\toutline-width: 1px;\n\tbackground-color: var(--vscode-editor-snippetTabstopHighlightBackground, transparent);\n\toutline-color: var(--vscode-editor-snippetTabstopHighlightBorder, transparent);\n}\n\n.monaco-editor .finish-snippet-placeholder {\n\toutline-style: solid;\n\toutline-width: 1px;\n\tbackground-color: var(--vscode-editor-snippetFinalTabstopHighlightBackground, transparent);\n\toutline-color: var(--vscode-editor-snippetFinalTabstopHighlightBorder, transparent);\n}\n",""]);const a=r},36098:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .sticky-widget {\n\toverflow: hidden;\n}\n\n.monaco-editor .sticky-widget-line-numbers {\n\tfloat: left;\n\tbackground-color: inherit;\n}\n\n.monaco-editor .sticky-widget-lines-scrollable {\n\tdisplay: inline-block;\n\tposition: absolute;\n\toverflow: hidden;\n\twidth: var(--vscode-editorStickyScroll-scrollableWidth);\n\tbackground-color: inherit;\n}\n\n.monaco-editor .sticky-widget-lines {\n\tposition: absolute;\n\tbackground-color: inherit;\n}\n\n.monaco-editor .sticky-line-number, .monaco-editor .sticky-line-content {\n\tcolor: var(--vscode-editorLineNumber-foreground);\n\twhite-space: nowrap;\n\tdisplay: inline-block;\n\tposition: absolute;\n\tbackground-color: inherit;\n}\n\n.monaco-editor .sticky-line-number .codicon-folding-expanded,\n.monaco-editor .sticky-line-number .codicon-folding-collapsed {\n\tfloat: right;\n\ttransition: var(--vscode-editorStickyScroll-foldingOpacityTransition);\n}\n\n.monaco-editor .sticky-line-content {\n\twidth: var(--vscode-editorStickyScroll-scrollableWidth);\n\tbackground-color: inherit;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .sticky-line-number-inner {\n\tdisplay: inline-block;\n\ttext-align: right;\n}\n\n.monaco-editor .sticky-widget {\n\tborder-bottom: 1px solid var(--vscode-editorStickyScroll-border);\n}\n\n.monaco-editor .sticky-line-content:hover {\n\tbackground-color: var(--vscode-editorStickyScrollHover-background);\n\tcursor: pointer;\n}\n\n.monaco-editor .sticky-widget {\n\twidth: 100%;\n\tbox-shadow: var(--vscode-editorStickyScroll-shadow) 0 3px 2px -2px;\n\tz-index: 4;\n\tbackground-color: var(--vscode-editorStickyScroll-background);\n}\n\n.monaco-editor .sticky-widget.peek {\n\tbackground-color: var(--vscode-peekViewEditorStickyScroll-background);\n}\n",""]);const a=r},45224:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Suggest widget*/\n\n.monaco-editor .suggest-widget {\n\twidth: 430px;\n\tz-index: 40;\n\tdisplay: flex;\n\tflex-direction: column;\n\tborder-radius: 3px;\n}\n\n.monaco-editor .suggest-widget.message {\n\tflex-direction: row;\n\talign-items: center;\n}\n\n.monaco-editor .suggest-widget,\n.monaco-editor .suggest-details {\n\tflex: 0 1 auto;\n\twidth: 100%;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-color: var(--vscode-editorSuggestWidget-border);\n\tbackground-color: var(--vscode-editorSuggestWidget-background);\n}\n\n.monaco-editor.hc-black .suggest-widget,\n.monaco-editor.hc-black .suggest-details,\n.monaco-editor.hc-light .suggest-widget,\n.monaco-editor.hc-light .suggest-details {\n\tborder-width: 2px;\n}\n\n/* Styles for status bar part */\n\n\n.monaco-editor .suggest-widget .suggest-status-bar {\n\tbox-sizing: border-box;\n\tdisplay: none;\n\tflex-flow: row nowrap;\n\tjustify-content: space-between;\n\twidth: 100%;\n\tfont-size: 80%;\n\tpadding: 0 4px 0 4px;\n\tborder-top: 1px solid var(--vscode-editorSuggestWidget-border);\n\toverflow: hidden;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar {\n\tdisplay: flex;\n}\n\n.monaco-editor .suggest-widget .suggest-status-bar .left {\n\tpadding-right: 8px;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label {\n\tcolor: var(--vscode-editorSuggestWidgetStatus-foreground);\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label::after {\n\tcontent: ', ';\n\tmargin-right: 0.3em;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row > .contents > .main > .right > .readMore,\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label > .contents > .main > .right > .readMore {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover > .contents > .main > .right.can-expand-details > .details-label {\n\twidth: 100%;\n}\n\n/* Styles for Message element for when widget is loading or is empty */\n\n.monaco-editor .suggest-widget > .message {\n\tpadding-left: 22px;\n}\n\n/** Styles for the list element **/\n\n.monaco-editor .suggest-widget > .tree {\n\theight: 100%;\n\twidth: 100%;\n}\n\n.monaco-editor .suggest-widget .monaco-list {\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n/** Styles for each row in the list element **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\n\tdisplay: flex;\n\t-mox-box-sizing: border-box;\n\tbox-sizing: border-box;\n\tpadding-right: 10px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 2px 2px;\n\twhite-space: nowrap;\n\tcursor: pointer;\n\ttouch-action: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused {\n\tcolor: var(--vscode-editorSuggestWidget-selectedForeground);\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon {\n\tcolor: var(--vscode-editorSuggestWidget-selectedIconForeground);\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents {\n\tflex: 1;\n\theight: 100%;\n\toverflow: hidden;\n\tpadding-left: 2px;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main {\n\tdisplay: flex;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: pre;\n\tjustify-content: space-between;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right {\n\tdisplay: flex;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.focused) > .contents > .main .monaco-icon-label {\n\tcolor: var(--vscode-editorSuggestWidget-foreground);\n}\n\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main .monaco-highlighted-label .highlight {\n\tcolor: var(--vscode-editorSuggestWidget-highlightForeground);\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main .monaco-highlighted-label .highlight {\n\tcolor: var(--vscode-editorSuggestWidget-focusHighlightForeground);\n}\n\n/** ReadMore Icon styles **/\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .codicon-close,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore::before {\n\tcolor: inherit;\n\topacity: 1;\n\tfont-size: 14px;\n\tcursor: pointer;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .codicon-close {\n\tposition: absolute;\n\ttop: 6px;\n\tright: 2px;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .codicon-close:hover,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore:hover {\n\topacity: 1;\n}\n\n/** signature, qualifier, type/details opacity **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label {\n\topacity: 0.7;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .signature-label {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\topacity: 0.6;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .qualifier-label {\n\tmargin-left: 12px;\n\topacity: 0.4;\n\tfont-size: 85%;\n\tline-height: initial;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\talign-self: center;\n}\n\n/** Type Info and icon next to the label in the focused completion item **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label {\n\tfont-size: 85%;\n\tmargin-left: 1.1em;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label > .monaco-tokenized-source {\n\tdisplay: inline;\n}\n\n/** Details: if using CompletionItem#details, show on focus **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused > .contents > .main > .right > .details-label {\n\tdisplay: inline;\n}\n\n/** Details: if using CompletionItemLabel#details, always show **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label) > .contents > .main > .right > .details-label,\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label) > .contents > .main > .right > .details-label {\n\tdisplay: inline;\n}\n\n/** Ellipsis on hover **/\n\n.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row.focused:hover > .contents > .main > .right.can-expand-details > .details-label {\n\twidth: calc(100% - 26px);\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left {\n\tflex-shrink: 1;\n\tflex-grow: 1;\n\toverflow: hidden;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .monaco-icon-label {\n\tflex-shrink: 0;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label) > .contents > .main > .left > .monaco-icon-label {\n\tmax-width: 100%;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label > .contents > .main > .left > .monaco-icon-label {\n\tflex-shrink: 1;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right {\n\toverflow: hidden;\n\tflex-shrink: 4;\n\tmax-width: 70%;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tright: 10px;\n\twidth: 18px;\n\theight: 18px;\n\tvisibility: hidden;\n}\n\n/** Do NOT display ReadMore when docs is side/below **/\n\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row > .contents > .main > .right > .readMore {\n\tdisplay: none !important;\n}\n\n/** Do NOT display ReadMore when using plain CompletionItemLabel (details/documentation might not be resolved) **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label > .contents > .main > .right > .readMore {\n\tdisplay: none;\n}\n\n/** Focused item can show ReadMore, but can't when docs is side/below **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label > .contents > .main > .right > .readMore {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused:hover > .contents > .main > .right > .readMore {\n\tvisibility: visible;\n}\n\n/** Styles for each row in the list **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated {\n\topacity: 0.66;\n\ttext-decoration: unset;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated > .monaco-icon-label-container > .monaco-icon-name-container {\n\ttext-decoration: line-through;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label::before {\n\theight: 100%;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\n\tdisplay: block;\n\theight: 16px;\n\twidth: 16px;\n\tmargin-left: 2px;\n\tbackground-repeat: no-repeat;\n\tbackground-size: 80%;\n\tbackground-position: center;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon {\n\tdisplay: flex;\n\talign-items: center;\n\tmargin-right: 4px;\n}\n\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon::before {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\n\tmargin: 0 0 0 0.3em;\n\tborder: 0.1em solid #000;\n\twidth: 0.7em;\n\theight: 0.7em;\n\tdisplay: inline-block;\n}\n\n/** Styles for the docs of the completion item in focus **/\n\n.monaco-editor .suggest-details-container {\n\tz-index: 41;\n}\n\n.monaco-editor .suggest-details {\n\tdisplay: flex;\n\tflex-direction: column;\n\tcursor: default;\n\tcolor: var(--vscode-editorSuggestWidget-foreground);\n}\n\n.monaco-editor .suggest-details.focused {\n\tborder-color: var(--vscode-focusBorder);\n}\n\n.monaco-editor .suggest-details a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .suggest-details a:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-editor .suggest-details code {\n\tbackground-color: var(--vscode-textCodeBlock-background);\n}\n\n.monaco-editor .suggest-details.no-docs {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element {\n\tflex: 1;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body {\n\tbox-sizing: border-box;\n\theight: 100%;\n\twidth: 100%;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .type {\n\tflex: 2;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\topacity: 0.7;\n\twhite-space: pre;\n\tmargin: 0 24px 0 0;\n\tpadding: 4px 0 12px 5px;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .type.auto-wrap {\n\twhite-space: normal;\n\tword-break: break-all;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs {\n\tmargin: 0;\n\tpadding: 4px 5px;\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .suggest-details.no-type > .monaco-scrollable-element > .body > .docs {\n\tmargin-right: 24px;\n\toverflow: hidden;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs {\n\tpadding: 0;\n\twhite-space: initial;\n\tmin-height: calc(1rem + 8px);\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs > div,\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs > span:not(:empty) {\n\tpadding: 4px 5px;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs > div > p:first-child {\n\tmargin-top: 0;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs > div > p:last-child {\n\tmargin-bottom: 0;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs .monaco-tokenized-source {\n\twhite-space: pre;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs .code {\n\twhite-space: pre-wrap;\n\tword-wrap: break-word;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs .codicon {\n\tvertical-align: sub;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > p:empty {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-details code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-editor .suggest-details ul {\n\tpadding-left: 20px;\n}\n\n.monaco-editor .suggest-details ol {\n\tpadding-left: 20px;\n}\n\n.monaco-editor .suggest-details p code {\n\tfont-family: var(--monaco-monospace-font);\n}\n",""]);const a=r},30745:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .codicon.codicon-symbol-array,\n.monaco-workbench .codicon.codicon-symbol-array { color: var(--vscode-symbolIcon-arrayForeground); }\n.monaco-editor .codicon.codicon-symbol-boolean,\n.monaco-workbench .codicon.codicon-symbol-boolean { color: var(--vscode-symbolIcon-booleanForeground); }\n.monaco-editor .codicon.codicon-symbol-class,\n.monaco-workbench .codicon.codicon-symbol-class { color: var(--vscode-symbolIcon-classForeground); }\n.monaco-editor .codicon.codicon-symbol-method,\n.monaco-workbench .codicon.codicon-symbol-method { color: var(--vscode-symbolIcon-methodForeground); }\n.monaco-editor .codicon.codicon-symbol-color,\n.monaco-workbench .codicon.codicon-symbol-color { color: var(--vscode-symbolIcon-colorForeground); }\n.monaco-editor .codicon.codicon-symbol-constant,\n.monaco-workbench .codicon.codicon-symbol-constant { color: var(--vscode-symbolIcon-constantForeground); }\n.monaco-editor .codicon.codicon-symbol-constructor,\n.monaco-workbench .codicon.codicon-symbol-constructor { color: var(--vscode-symbolIcon-constructorForeground); }\n.monaco-editor .codicon.codicon-symbol-value,\n.monaco-workbench .codicon.codicon-symbol-value,\n.monaco-editor .codicon.codicon-symbol-enum,\n.monaco-workbench .codicon.codicon-symbol-enum { color: var(--vscode-symbolIcon-enumeratorForeground); }\n.monaco-editor .codicon.codicon-symbol-enum-member,\n.monaco-workbench .codicon.codicon-symbol-enum-member { color: var(--vscode-symbolIcon-enumeratorMemberForeground); }\n.monaco-editor .codicon.codicon-symbol-event,\n.monaco-workbench .codicon.codicon-symbol-event { color: var(--vscode-symbolIcon-eventForeground); }\n.monaco-editor .codicon.codicon-symbol-field,\n.monaco-workbench .codicon.codicon-symbol-field { color: var(--vscode-symbolIcon-fieldForeground); }\n.monaco-editor .codicon.codicon-symbol-file,\n.monaco-workbench .codicon.codicon-symbol-file { color: var(--vscode-symbolIcon-fileForeground); }\n.monaco-editor .codicon.codicon-symbol-folder,\n.monaco-workbench .codicon.codicon-symbol-folder { color: var(--vscode-symbolIcon-folderForeground); }\n.monaco-editor .codicon.codicon-symbol-function,\n.monaco-workbench .codicon.codicon-symbol-function { color: var(--vscode-symbolIcon-functionForeground); }\n.monaco-editor .codicon.codicon-symbol-interface,\n.monaco-workbench .codicon.codicon-symbol-interface { color: var(--vscode-symbolIcon-interfaceForeground); }\n.monaco-editor .codicon.codicon-symbol-key,\n.monaco-workbench .codicon.codicon-symbol-key { color: var(--vscode-symbolIcon-keyForeground); }\n.monaco-editor .codicon.codicon-symbol-keyword,\n.monaco-workbench .codicon.codicon-symbol-keyword { color: var(--vscode-symbolIcon-keywordForeground); }\n.monaco-editor .codicon.codicon-symbol-module,\n.monaco-workbench .codicon.codicon-symbol-module { color: var(--vscode-symbolIcon-moduleForeground); }\n.monaco-editor .codicon.codicon-symbol-namespace,\n.monaco-workbench .codicon.codicon-symbol-namespace { color: var(--vscode-symbolIcon-namespaceForeground); }\n.monaco-editor .codicon.codicon-symbol-null,\n.monaco-workbench .codicon.codicon-symbol-null { color: var(--vscode-symbolIcon-nullForeground); }\n.monaco-editor .codicon.codicon-symbol-number,\n.monaco-workbench .codicon.codicon-symbol-number { color: var(--vscode-symbolIcon-numberForeground); }\n.monaco-editor .codicon.codicon-symbol-object,\n.monaco-workbench .codicon.codicon-symbol-object { color: var(--vscode-symbolIcon-objectForeground); }\n.monaco-editor .codicon.codicon-symbol-operator,\n.monaco-workbench .codicon.codicon-symbol-operator { color: var(--vscode-symbolIcon-operatorForeground); }\n.monaco-editor .codicon.codicon-symbol-package,\n.monaco-workbench .codicon.codicon-symbol-package { color: var(--vscode-symbolIcon-packageForeground); }\n.monaco-editor .codicon.codicon-symbol-property,\n.monaco-workbench .codicon.codicon-symbol-property { color: var(--vscode-symbolIcon-propertyForeground); }\n.monaco-editor .codicon.codicon-symbol-reference,\n.monaco-workbench .codicon.codicon-symbol-reference { color: var(--vscode-symbolIcon-referenceForeground); }\n.monaco-editor .codicon.codicon-symbol-snippet,\n.monaco-workbench .codicon.codicon-symbol-snippet { color: var(--vscode-symbolIcon-snippetForeground); }\n.monaco-editor .codicon.codicon-symbol-string,\n.monaco-workbench .codicon.codicon-symbol-string { color: var(--vscode-symbolIcon-stringForeground); }\n.monaco-editor .codicon.codicon-symbol-struct,\n.monaco-workbench .codicon.codicon-symbol-struct { color: var(--vscode-symbolIcon-structForeground); }\n.monaco-editor .codicon.codicon-symbol-text,\n.monaco-workbench .codicon.codicon-symbol-text { color: var(--vscode-symbolIcon-textForeground); }\n.monaco-editor .codicon.codicon-symbol-type-parameter,\n.monaco-workbench .codicon.codicon-symbol-type-parameter { color: var(--vscode-symbolIcon-typeParameterForeground); }\n.monaco-editor .codicon.codicon-symbol-unit,\n.monaco-workbench .codicon.codicon-symbol-unit { color: var(--vscode-symbolIcon-unitForeground); }\n.monaco-editor .codicon.codicon-symbol-variable,\n.monaco-workbench .codicon.codicon-symbol-variable { color: var(--vscode-symbolIcon-variableForeground); }\n",""]);const a=r},98367:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.editor-banner {\n\tbox-sizing: border-box;\n\tcursor: default;\n\twidth: 100%;\n\tfont-size: 12px;\n\tdisplay: flex;\n\toverflow: visible;\n\n\theight: 26px;\n\n\tbackground: var(--vscode-banner-background);\n}\n\n\n.editor-banner .icon-container {\n\tdisplay: flex;\n\tflex-shrink: 0;\n\talign-items: center;\n\tpadding: 0 6px 0 10px;\n}\n\n.editor-banner .icon-container.custom-icon {\n\tbackground-repeat: no-repeat;\n\tbackground-position: center center;\n\tbackground-size: 16px;\n\twidth: 16px;\n\tpadding: 0;\n\tmargin: 0 6px 0 10px;\n}\n\n.editor-banner .message-container {\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 26px;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n\n.editor-banner .message-container p {\n\tmargin-block-start: 0;\n\tmargin-block-end: 0;\n}\n\n.editor-banner .message-actions-container {\n\tflex-grow: 1;\n\tflex-shrink: 0;\n\tline-height: 26px;\n\tmargin: 0 4px;\n}\n\n.editor-banner .message-actions-container a.monaco-button {\n\twidth: inherit;\n\tmargin: 2px 8px;\n\tpadding: 0px 12px;\n}\n\n.editor-banner .message-actions-container a {\n\tpadding: 3px;\n\tmargin-left: 12px;\n\ttext-decoration: underline;\n}\n\n.editor-banner .action-container {\n\tpadding: 0 10px 0 6px;\n}\n\n.editor-banner {\n\tbackground-color: var(--vscode-banner-background);\n}\n\n.editor-banner,\n.editor-banner .action-container .codicon,\n.editor-banner .message-actions-container .monaco-link {\n\tcolor: var(--vscode-banner-foreground);\n}\n\n.editor-banner .icon-container .codicon {\n\tcolor: var(--vscode-banner-iconForeground);\n}\n",""]);const a=r},98679:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .unicode-highlight {\n\tborder: 1px solid var(--vscode-editorUnicodeHighlight-border);\n\tbackground-color: var(--vscode-editorUnicodeHighlight-background);\n\tbox-sizing: border-box;\n}\n",""]);const a=r},19620:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .focused .selectionHighlight {\n\tbackground-color: var(--vscode-editor-selectionHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-selectionHighlightBorder);\n}\n.monaco-editor.hc-black .focused .selectionHighlight, .monaco-editor.hc-light .focused .selectionHighlight {\n\tborder-style: dotted;\n}\n\n.monaco-editor .wordHighlight {\n\tbackground-color: var(--vscode-editor-wordHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-wordHighlightBorder);\n}\n.monaco-editor.hc-black .wordHighlight, .monaco-editor.hc-light .wordHighlight {\n\tborder-style: dotted;\n}\n\n.monaco-editor .wordHighlightStrong {\n\tbackground-color: var(--vscode-editor-wordHighlightStrongBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-wordHighlightStrongBorder);\n}\n.monaco-editor.hc-black .wordHighlightStrong, .monaco-editor.hc-light .wordHighlightStrong {\n\tborder-style: dotted;\n}\n\n.monaco-editor .wordHighlightText {\n\tbackground-color: var(--vscode-editor-wordHighlightTextBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-wordHighlightTextBorder);\n}\n.monaco-editor.hc-black .wordHighlightText, .monaco-editor.hc-light .wordHighlightText {\n\tborder-style: dotted;\n}\n",""]);const a=r},51564:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .zone-widget {\n\tposition: absolute;\n\tz-index: 10;\n}\n\n\n.monaco-editor .zone-widget .zone-widget-container {\n\tborder-top-style: solid;\n\tborder-bottom-style: solid;\n\tborder-top-width: 0;\n\tborder-bottom-width: 0;\n\tposition: relative;\n}\n",""]);const a=r},21556:(e,t,i)=>{"use strict";i.d(t,{Z:()=>p});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s),a=i(61667),l=i.n(a),d=new URL(i(6161),i.b),c=new URL(i(51096),i.b),h=r()(o()),u=l()(d),g=l()(c);h.push([e.id,`/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .iPadShowKeyboard {\n\twidth: 58px;\n\tmin-width: 0;\n\theight: 36px;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\tresize: none;\n\toverflow: hidden;\n\tbackground: url(${u}) center center no-repeat;\n\tborder: 4px solid #F6F6F6;\n\tborder-radius: 4px;\n}\n\n.monaco-editor.vs-dark .iPadShowKeyboard {\n\tbackground: url(${g}) center center no-repeat;\n\tborder: 4px solid #252526;\n}`,""]);const p=h},75189:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .tokens-inspect-widget {\n\tz-index: 50;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\tpadding: 10px;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n.monaco-editor.hc-black .tokens-inspect-widget, .monaco-editor.hc-light .tokens-inspect-widget {\n\tborder-width: 2px;\n}\n\n.monaco-editor .tokens-inspect-widget .tokens-inspect-separator {\n\theight: 1px;\n\tborder: 0;\n\tbackground-color: var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token {\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token-length {\n\tfont-weight: normal;\n\tfont-size: 60%;\n\tfloat: right;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\n\twidth: 100%;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\n\tfont-family: var(--monaco-monospace-font);\n\ttext-align: right;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token-type {\n\tfont-family: var(--monaco-monospace-font);\n}\n",""]);const a=r},93198:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.quick-input-widget {\n\tfont-size: 13px;\n}\n\n.quick-input-widget .monaco-highlighted-label .highlight,\n.quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0066BF;\n}\n\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight,\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight {\n\tcolor: #9DDDFF;\n}\n\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0097fb;\n}\n\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight,\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #F38518;\n}\n\n.hc-light .quick-input-widget .monaco-highlighted-label .highlight,\n.hc-light .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0F4A85;\n}\n\n.monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(221, 221, 221, 0.4);\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\n\tcolor: #555;\n}\n\n.hc-black .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: transparent;\n\tborder: solid 1px rgb(111, 195, 223);\n\tbox-shadow: none;\n\tcolor: #fff;\n}\n\n.hc-light .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: transparent;\n\tborder: solid 1px #0F4A85;\n\tbox-shadow: none;\n\tcolor: #292929;\n}\n\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(128, 128, 128, 0.17);\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\n\tcolor: #ccc;\n}\n",""]);const a=r},70643:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n/* Default standalone editor fonts */\n.monaco-editor {\n\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\n\tstroke-width: 1.2px;\n}\n\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n.monaco-editor.hc-light .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\tstroke-width: 1.2px;\n}\n\n.monaco-hover p {\n\tmargin: 0;\n}\n\n/* See https://github.com/microsoft/monaco-editor/issues/2168#issuecomment-780078600 */\n.monaco-aria-container {\n\tposition: absolute !important;\n\ttop: 0; /* avoid being placed underneath a sibling element */\n\theight: 1px;\n\twidth: 1px;\n\tmargin: -1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n}\n\n.monaco-editor, .monaco-diff-editor .synthetic-focus,\n.monaco-editor, .monaco-diff-editor [tabindex="0"]:focus,\n.monaco-editor, .monaco-diff-editor [tabindex="-1"]:focus,\n.monaco-editor, .monaco-diff-editor button:focus,\n.monaco-editor, .monaco-diff-editor input[type=button]:focus,\n.monaco-editor, .monaco-diff-editor input[type=checkbox]:focus,\n.monaco-editor, .monaco-diff-editor input[type=search]:focus,\n.monaco-editor, .monaco-diff-editor input[type=text]:focus,\n.monaco-editor, .monaco-diff-editor select:focus,\n.monaco-editor, .monaco-diff-editor textarea:focus {\n\toutline-width: 1px;\n\toutline-style: solid;\n\toutline-offset: -1px;\n\toutline-color: var(--vscode-focusBorder);\n\topacity: 1\n}\n',""]);const a=r},90711:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.action-widget {\n\tfont-size: 13px;\n\tborder-radius: 0;\n\tmin-width: 160px;\n\tmax-width: 80vw;\n\tz-index: 40;\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid var(--vscode-editorWidget-border) !important;\n\tborder-radius: 2px;\n\tbackground-color: var(--vscode-editorWidget-background);\n\tcolor: var(--vscode-editorWidget-foreground);\n}\n\n.context-view-block {\n\tposition: fixed;\n\tcursor: initial;\n\tleft: 0;\n\ttop: 0;\n\twidth: 100%;\n\theight: 100%;\n\tz-index: -1;\n}\n\n.context-view-pointerBlock {\n\tposition: fixed;\n\tcursor: initial;\n\tleft: 0;\n\ttop: 0;\n\twidth: 100%;\n\theight: 100%;\n\tz-index: 2;\n}\n\n.action-widget .monaco-list {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tborder: none !important;\n\tborder-width: 0 !important;\n}\n\n.action-widget .monaco-list:focus:before {\n\toutline: 0 !important;\n}\n\n.action-widget .monaco-list .monaco-scrollable-element {\n\toverflow: visible;\n}\n\n/** Styles for each row in the list element **/\n.action-widget .monaco-list .monaco-list-row {\n\tpadding: 0 10px;\n\twhite-space: nowrap;\n\tcursor: pointer;\n\ttouch-action: none;\n\twidth: 100%;\n}\n\n.action-widget .monaco-list .monaco-list-row.action.focused:not(.option-disabled) {\n\tbackground-color: var(--vscode-quickInputList-focusBackground) !important;\n\tcolor: var(--vscode-quickInputList-focusForeground);\n\toutline: 1px solid var(--vscode-menu-selectionBorder, transparent);\n\toutline-offset: -1px;\n}\n\n.action-widget .monaco-list-row.group-header {\n\tcolor: var(--vscode-descriptionForeground) !important;\n\tfont-weight: 600;\n}\n\n.action-widget .monaco-list .group-header,\n.action-widget .monaco-list .option-disabled,\n.action-widget .monaco-list .option-disabled:before,\n.action-widget .monaco-list .option-disabled .focused,\n.action-widget .monaco-list .option-disabled .focused:before {\n\tcursor: default !important;\n\t-webkit-touch-callout: none;\n\t-webkit-user-select: none;\n\tuser-select: none;\n\tbackground-color: transparent !important;\n\toutline: 0 solid !important;\n}\n\n.action-widget .monaco-list-row.action {\n\tdisplay: flex;\n\tgap: 6px;\n\talign-items: center;\n}\n\n.action-widget .monaco-list-row.action.option-disabled,\n.action-widget .monaco-list:focus .monaco-list-row.focused.action.option-disabled,\n.action-widget .monaco-list-row.action.option-disabled .codicon,\n.action-widget .monaco-list:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused).option-disabled {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n\n.action-widget .monaco-list-row.action:not(.option-disabled) .codicon {\n\tcolor: inherit;\n}\n\n.action-widget .monaco-list-row.action .title {\n\tflex: 1;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.action-widget .monaco-list-row.action .monaco-keybinding > .monaco-keybinding-key {\n\t\tbackground-color: var(--vscode-keybindingLabel-background);\n\t\tcolor: var(--vscode-keybindingLabel-foreground);\n\t\tborder-style: solid;\n\t\tborder-width: 1px;\n\t\tborder-radius: 3px;\n\t\tborder-color: var(--vscode-keybindingLabel-border);\n\t\tborder-bottom-color: var(--vscode-keybindingLabel-bottomBorder);\n\t\tbox-shadow: inset 0 -1px 0 var(--vscode-widget-shadow);\n}\n\n/* Action bar */\n\n.action-widget .action-widget-action-bar {\n\tbackground-color: var(--vscode-editorHoverWidget-statusBarBackground);\n\tborder-top: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.action-widget .action-widget-action-bar::before {\n\tdisplay: block;\n\tcontent: "";\n\twidth: 100%;\n}\n\n.action-widget .action-widget-action-bar .actions-container {\n\tpadding: 0 8px;\n}\n\n.action-widget-action-bar .action-label {\n\tcolor: var(--vscode-textLink-activeForeground);\n\tfont-size: 12px;\n\tline-height: 22px;\n\tpadding: 0;\n\tpointer-events: all;\n}\n\n.action-widget-action-bar .action-item {\n\tmargin-right: 16px;\n\tpointer-events: none;\n}\n\n.action-widget-action-bar .action-label:hover {\n\tbackground-color: transparent !important;\n}\n\n.monaco-action-bar .actions-container.highlight-toggled .action-label.checked {\n\t/* The important gives this rule precedence over the hover rule. */\n\tbackground: var(--vscode-actionBar-toggledBackground) !important;\n}\n',""]);const a=r},51854:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-action-bar .action-item.menu-entry .action-label.icon {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50%;\n\tbackground-size: 16px;\n}\n\n.monaco-dropdown-with-default {\n\tdisplay: flex !important;\n\tflex-direction: row;\n\tborder-radius: 5px;\n}\n\n.monaco-dropdown-with-default > .action-container > .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-dropdown-with-default > .action-container.menu-entry > .action-label.icon {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50%;\n\tbackground-size: 16px;\n}\n\n.monaco-dropdown-with-default:hover {\n\tbackground-color: var(--vscode-toolbar-hoverBackground);\n}\n\n.monaco-dropdown-with-default > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\n\tfont-size: 12px;\n\tpadding-left: 0px;\n\tpadding-right: 0px;\n\tline-height: 16px;\n\tmargin-left: -3px;\n}\n\n.monaco-dropdown-with-default > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\n\tdisplay: block;\n\tbackground-size: 16px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n}\n",""]);const a=r},57150:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-link {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-link:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n",""]);const a=r},51961:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.quick-input-widget {\n\tposition: absolute;\n\twidth: 600px;\n\tz-index: 2550;\n\tleft: 50%;\n\tmargin-left: -300px;\n\t-webkit-app-region: no-drag;\n\tborder-radius: 6px;\n}\n\n.quick-input-titlebar {\n\tdisplay: flex;\n\talign-items: center;\n\tborder-top-left-radius: 5px; /* match border radius of quick input widget */\n\tborder-top-right-radius: 5px;\n}\n\n.quick-input-left-action-bar {\n\tdisplay: flex;\n\tmargin-left: 4px;\n\tflex: 1;\n}\n\n.quick-input-title {\n\tpadding: 3px 0px;\n\ttext-align: center;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.quick-input-right-action-bar {\n\tdisplay: flex;\n\tmargin-right: 4px;\n\tflex: 1;\n}\n\n.quick-input-right-action-bar > .actions-container {\n\tjustify-content: flex-end;\n}\n\n.quick-input-titlebar .monaco-action-bar .action-label.codicon {\n\tbackground-position: center;\n\tbackground-repeat: no-repeat;\n\tpadding: 2px;\n}\n\n.quick-input-description {\n\tmargin: 6px 6px 6px 11px;\n}\n\n.quick-input-header .quick-input-description {\n\tmargin: 4px 2px;\n\tflex: 1;\n}\n\n.quick-input-header {\n\tdisplay: flex;\n\tpadding: 8px 6px 6px 6px;\n}\n\n.quick-input-widget.hidden-input .quick-input-header {\n\t/* reduce margins and paddings when input box hidden */\n\tpadding: 0;\n\tmargin-bottom: 0;\n}\n\n.quick-input-and-message {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex-grow: 1;\n\tmin-width: 0;\n\tposition: relative;\n}\n\n.quick-input-check-all {\n\talign-self: center;\n\tmargin: 0;\n}\n\n.quick-input-filter {\n\tflex-grow: 1;\n\tdisplay: flex;\n\tposition: relative;\n}\n\n.quick-input-box {\n\tflex-grow: 1;\n}\n\n.quick-input-widget.show-checkboxes .quick-input-box,\n.quick-input-widget.show-checkboxes .quick-input-message {\n\tmargin-left: 5px;\n}\n\n.quick-input-visible-count {\n\tposition: absolute;\n\tleft: -10000px;\n}\n\n.quick-input-count {\n\talign-self: center;\n\tposition: absolute;\n\tright: 4px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-count .monaco-count-badge {\n\tvertical-align: middle;\n\tpadding: 2px 4px;\n\tborder-radius: 2px;\n\tmin-height: auto;\n\tline-height: normal;\n}\n\n.quick-input-action {\n\tmargin-left: 6px;\n}\n\n.quick-input-action .monaco-text-button {\n\tfont-size: 11px;\n\tpadding: 0 6px;\n\tdisplay: flex;\n\theight: 25px;\n\talign-items: center;\n}\n\n.quick-input-message {\n\tmargin-top: -1px;\n\tpadding: 5px;\n\toverflow-wrap: break-word;\n}\n\n.quick-input-message > .codicon {\n\tmargin: 0 0.2em;\n\tvertical-align: text-bottom;\n}\n\n/* Links in descriptions & validations */\n.quick-input-message a {\n\tcolor: inherit;\n}\n\n.quick-input-progress.monaco-progress-container {\n\tposition: relative;\n}\n\n.quick-input-list {\n\tline-height: 22px;\n}\n\n.quick-input-widget.hidden-input .quick-input-list {\n\tmargin-top: 4px; /* reduce margins when input box hidden */\n\tpadding-bottom: 4px;\n}\n\n.quick-input-list .monaco-list {\n\toverflow: hidden;\n\tmax-height: calc(20 * 22px);\n\tpadding-bottom: 5px;\n}\n\n.quick-input-list .monaco-scrollable-element {\n\tpadding: 0px 5px;\n}\n\n.quick-input-list .quick-input-list-entry {\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\tdisplay: flex;\n\theight: 100%;\n\tpadding: 0 6px;\n}\n\n.quick-input-list .quick-input-list-entry.quick-input-list-separator-border {\n\tborder-top-width: 1px;\n\tborder-top-style: solid;\n}\n\n.quick-input-list .monaco-list-row {\n\tborder-radius: 3px;\n}\n\n.quick-input-list .monaco-list-row[data-index=\"0\"] .quick-input-list-entry.quick-input-list-separator-border {\n\tborder-top-style: none;\n}\n\n.quick-input-list .quick-input-list-label {\n\toverflow: hidden;\n\tdisplay: flex;\n\theight: 100%;\n\tflex: 1;\n}\n\n.quick-input-list .quick-input-list-checkbox {\n\talign-self: center;\n\tmargin: 0;\n}\n\n.quick-input-list .quick-input-list-icon {\n\tbackground-size: 16px;\n\tbackground-position: left center;\n\tbackground-repeat: no-repeat;\n\tpadding-right: 6px;\n\twidth: 16px;\n\theight: 22px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.quick-input-list .quick-input-list-rows {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n\tflex: 1;\n\tmargin-left: 5px;\n}\n\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows {\n\tmargin-left: 10px;\n}\n\n.quick-input-widget .quick-input-list .quick-input-list-checkbox {\n\tdisplay: none;\n}\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox {\n\tdisplay: inline;\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {\n\tflex: 1; /* make sure the icon label grows within the row */\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon[class*='codicon-'] {\n\tvertical-align: text-bottom;\n}\n\n.quick-input-list .quick-input-list-rows .monaco-highlighted-label > span {\n\topacity: 1;\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {\n\tmargin-right: 8px; /* separate from the separator label or scrollbar if any */\n}\n\n.quick-input-list .quick-input-list-label-meta {\n\topacity: 0.7;\n\tline-height: normal;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.quick-input-list .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-separator {\n\tmargin-right: 4px; /* separate from keybindings or actions */\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tdisplay: flex;\n\tflex: 0;\n\toverflow: visible;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar .action-label {\n\t/*\n\t * By default, actions in the quick input action bar are hidden\n\t * until hovered over them or selected.\n\t */\n\tdisplay: none;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\n\tmargin-right: 4px;\n\tpadding: 0px 2px 2px 2px;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tmargin-top: 1px;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tmargin-right: 4px; /* separate from scrollbar */\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,\n.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label {\n\tdisplay: flex;\n}\n\n/* focused items in quick pick */\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator {\n\tcolor: inherit\n}\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key {\n\tbackground: none;\n}\n\n/* Quick input separators as full-row item */\n.quick-input-list .quick-input-list-separator-as-item {\n\tfont-weight: 600;\n\tfont-size: 12px;\n}\n",""]);const a=r},81050:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .zone-widget .codicon.codicon-error,\n.markers-panel .marker-icon.error, .markers-panel .marker-icon .codicon.codicon-error,\n.text-search-provider-messages .providerMessage .codicon.codicon-error,\n.extensions-viewlet > .extensions .codicon.codicon-error,\n.extension-editor .codicon.codicon-error,\n.preferences-editor .codicon.codicon-error {\n\tcolor: var(--vscode-problemsErrorIcon-foreground);\n}\n\n.monaco-editor .zone-widget .codicon.codicon-warning,\n.markers-panel .marker-icon.warning, .markers-panel .marker-icon .codicon.codicon-warning,\n.text-search-provider-messages .providerMessage .codicon.codicon-warning,\n.extensions-viewlet > .extensions .codicon.codicon-warning,\n.extension-editor .codicon.codicon-warning,\n.preferences-editor .codicon.codicon-warning {\n\tcolor: var(--vscode-problemsWarningIcon-foreground);\n}\n\n.monaco-editor .zone-widget .codicon.codicon-info,\n.markers-panel .marker-icon.info, .markers-panel .marker-icon .codicon.codicon-info,\n.text-search-provider-messages .providerMessage .codicon.codicon-info,\n.extensions-viewlet > .extensions .codicon.codicon-info,\n.extension-editor .codicon.codicon-info,\n.preferences-editor .codicon.codicon-info {\n\tcolor: var(--vscode-problemsInfoIcon-foreground);\n}\n",""]);const a=r},23645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",n=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),n&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),n&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,n,o,s){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(n)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=s),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},61667:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},50283:function(e){"undefined"!=typeof self&&self,e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return n}));class n{constructor(e,t=null,i=null){this.events={},this.container=e,this.precanvas=null,this.nodeId=1,this.ele_selected=null,this.node_selected=null,this.drag=!1,this.reroute=!1,this.reroute_fix_curvature=!1,this.curvature=.5,this.reroute_curvature_start_end=.5,this.reroute_curvature=.5,this.reroute_width=6,this.drag_point=!1,this.editor_selected=!1,this.connection=!1,this.connection_ele=null,this.connection_selected=null,this.canvas_x=0,this.canvas_y=0,this.pos_x=0,this.pos_x_start=0,this.pos_y=0,this.pos_y_start=0,this.mouse_x=0,this.mouse_y=0,this.line_path=5,this.first_click=null,this.force_first_input=!1,this.draggable_inputs=!0,this.useuuid=!1,this.parent=i,this.noderegister={},this.render=t,this.drawflow={drawflow:{Home:{data:{}}}},this.module="Home",this.editor_mode="edit",this.zoom=1,this.zoom_max=1.6,this.zoom_min=.5,this.zoom_value=.1,this.zoom_last_value=1,this.evCache=new Array,this.prevDiff=-1}start(){this.container.classList.add("parent-drawflow"),this.container.tabIndex=0,this.precanvas=document.createElement("div"),this.precanvas.classList.add("drawflow"),this.container.appendChild(this.precanvas),this.container.addEventListener("mouseup",this.dragEnd.bind(this)),this.container.addEventListener("mousemove",this.position.bind(this)),this.container.addEventListener("mousedown",this.click.bind(this)),this.container.addEventListener("touchend",this.dragEnd.bind(this)),this.container.addEventListener("touchmove",this.position.bind(this)),this.container.addEventListener("touchstart",this.click.bind(this)),this.container.addEventListener("contextmenu",this.contextmenu.bind(this)),this.container.addEventListener("keydown",this.key.bind(this)),this.container.addEventListener("wheel",this.zoom_enter.bind(this)),this.container.addEventListener("input",this.updateNodeValue.bind(this)),this.container.addEventListener("dblclick",this.dblclick.bind(this)),this.container.onpointerdown=this.pointerdown_handler.bind(this),this.container.onpointermove=this.pointermove_handler.bind(this),this.container.onpointerup=this.pointerup_handler.bind(this),this.container.onpointercancel=this.pointerup_handler.bind(this),this.container.onpointerout=this.pointerup_handler.bind(this),this.container.onpointerleave=this.pointerup_handler.bind(this),this.load()}pointerdown_handler(e){this.evCache.push(e)}pointermove_handler(e){for(var t=0;t100&&(i>this.prevDiff&&this.zoom_in(),i=i&&(i=parseInt(e)+1)}))})),this.nodeId=i}removeReouteConnectionSelected(){this.dispatch("connectionUnselected",!0),this.reroute_fix_curvature&&this.connection_selected.parentElement.querySelectorAll(".main-path").forEach(((e,t)=>{e.classList.remove("selected")}))}click(e){if(this.dispatch("click",e),"fixed"===this.editor_mode){if(e.preventDefault(),"parent-drawflow"!==e.target.classList[0]&&"drawflow"!==e.target.classList[0])return!1;this.ele_selected=e.target.closest(".parent-drawflow")}else"view"===this.editor_mode?(null!=e.target.closest(".drawflow")||e.target.matches(".parent-drawflow"))&&(this.ele_selected=e.target.closest(".parent-drawflow"),e.preventDefault()):(this.first_click=e.target,this.ele_selected=e.target,0===e.button&&this.contextmenuDel(),null!=e.target.closest(".drawflow_content_node")&&(this.ele_selected=e.target.closest(".drawflow_content_node").parentElement));switch(this.ele_selected.classList[0]){case"drawflow-node":null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected!=this.ele_selected&&this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null),this.node_selected!=this.ele_selected&&this.dispatch("nodeSelected",this.ele_selected.id.slice(5)),this.node_selected=this.ele_selected,this.node_selected.classList.add("selected"),this.draggable_inputs?"SELECT"!==e.target.tagName&&(this.drag=!0):"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&"SELECT"!==e.target.tagName&&!0!==e.target.hasAttribute("contenteditable")&&(this.drag=!0);break;case"output":this.connection=!0,null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected=null,this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null),this.drawConnection(e.target);break;case"parent-drawflow":case"drawflow":null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected=null,this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null),this.editor_selected=!0;break;case"main-path":null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected=null,this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null),this.connection_selected=this.ele_selected,this.connection_selected.classList.add("selected");const t=this.connection_selected.parentElement.classList;t.length>1&&(this.dispatch("connectionSelected",{output_id:t[2].slice(14),input_id:t[1].slice(13),output_class:t[3],input_class:t[4]}),this.reroute_fix_curvature&&this.connection_selected.parentElement.querySelectorAll(".main-path").forEach(((e,t)=>{e.classList.add("selected")})));break;case"point":this.drag_point=!0,this.ele_selected.classList.add("selected");break;case"drawflow-delete":this.node_selected&&this.removeNodeId(this.node_selected.id),this.connection_selected&&this.removeConnection(),null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected=null,this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null)}"touchstart"===e.type?(this.pos_x=e.touches[0].clientX,this.pos_x_start=e.touches[0].clientX,this.pos_y=e.touches[0].clientY,this.pos_y_start=e.touches[0].clientY,this.mouse_x=e.touches[0].clientX,this.mouse_y=e.touches[0].clientY):(this.pos_x=e.clientX,this.pos_x_start=e.clientX,this.pos_y=e.clientY,this.pos_y_start=e.clientY),["input","output","main-path"].includes(this.ele_selected.classList[0])&&e.preventDefault(),this.dispatch("clickEnd",e)}position(e){if("touchmove"===e.type)var t=e.touches[0].clientX,i=e.touches[0].clientY;else t=e.clientX,i=e.clientY;if(this.connection&&this.updateConnection(t,i),this.editor_selected&&(n=this.canvas_x+-(this.pos_x-t),o=this.canvas_y+-(this.pos_y-i),this.dispatch("translate",{x:n,y:o}),this.precanvas.style.transform="translate("+n+"px, "+o+"px) scale("+this.zoom+")"),this.drag){e.preventDefault();var n=(this.pos_x-t)*this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom),o=(this.pos_y-i)*this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom);this.pos_x=t,this.pos_y=i,this.ele_selected.style.top=this.ele_selected.offsetTop-o+"px",this.ele_selected.style.left=this.ele_selected.offsetLeft-n+"px",this.drawflow.drawflow[this.module].data[this.ele_selected.id.slice(5)].pos_x=this.ele_selected.offsetLeft-n,this.drawflow.drawflow[this.module].data[this.ele_selected.id.slice(5)].pos_y=this.ele_selected.offsetTop-o,this.updateConnectionNodes(this.ele_selected.id)}if(this.drag_point){n=(this.pos_x-t)*this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom),o=(this.pos_y-i)*this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom),this.pos_x=t,this.pos_y=i;var s=this.pos_x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))-this.precanvas.getBoundingClientRect().x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom)),r=this.pos_y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))-this.precanvas.getBoundingClientRect().y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom));this.ele_selected.setAttributeNS(null,"cx",s),this.ele_selected.setAttributeNS(null,"cy",r);const e=this.ele_selected.parentElement.classList[2].slice(9),a=this.ele_selected.parentElement.classList[1].slice(13),l=this.ele_selected.parentElement.classList[3],d=this.ele_selected.parentElement.classList[4];let c=Array.from(this.ele_selected.parentElement.children).indexOf(this.ele_selected)-1;this.reroute_fix_curvature&&(c-=this.ele_selected.parentElement.querySelectorAll(".main-path").length-1,c<0&&(c=0));const h=e.slice(5),u=this.drawflow.drawflow[this.module].data[h].outputs[l].connections.findIndex((function(e,t){return e.node===a&&e.output===d}));this.drawflow.drawflow[this.module].data[h].outputs[l].connections[u].points[c]={pos_x:s,pos_y:r};const g=this.ele_selected.parentElement.classList[2].slice(9);this.updateConnectionNodes(g)}"touchmove"===e.type&&(this.mouse_x=t,this.mouse_y=i),this.dispatch("mouseMove",{x:t,y:i})}dragEnd(e){if("touchend"===e.type)var t=this.mouse_x,i=this.mouse_y,n=document.elementFromPoint(t,i);else t=e.clientX,i=e.clientY,n=e.target;if(this.drag&&(this.pos_x_start==t&&this.pos_y_start==i||this.dispatch("nodeMoved",this.ele_selected.id.slice(5))),this.drag_point&&(this.ele_selected.classList.remove("selected"),this.pos_x_start==t&&this.pos_y_start==i||this.dispatch("rerouteMoved",this.ele_selected.parentElement.classList[2].slice(14))),this.editor_selected&&(this.canvas_x=this.canvas_x+-(this.pos_x-t),this.canvas_y=this.canvas_y+-(this.pos_y-i),this.editor_selected=!1),!0===this.connection)if("input"===n.classList[0]||this.force_first_input&&(null!=n.closest(".drawflow_content_node")||"drawflow-node"===n.classList[0])){if(!this.force_first_input||null==n.closest(".drawflow_content_node")&&"drawflow-node"!==n.classList[0])o=n.parentElement.parentElement.id,s=n.classList[1];else{if(null!=n.closest(".drawflow_content_node"))var o=n.closest(".drawflow_content_node").parentElement.id;else o=n.id;if(0===Object.keys(this.getNodeFromId(o.slice(5)).inputs).length)var s=!1;else s="input_1"}var r=this.ele_selected.parentElement.parentElement.id,a=this.ele_selected.classList[1];if(r!==o&&!1!==s){if(0===this.container.querySelectorAll(".connection.node_in_"+o+".node_out_"+r+"."+a+"."+s).length){this.connection_ele.classList.add("node_in_"+o),this.connection_ele.classList.add("node_out_"+r),this.connection_ele.classList.add(a),this.connection_ele.classList.add(s);var l=o.slice(5),d=r.slice(5);this.drawflow.drawflow[this.module].data[d].outputs[a].connections.push({node:l,output:s}),this.drawflow.drawflow[this.module].data[l].inputs[s].connections.push({node:d,input:a}),this.updateConnectionNodes("node-"+d),this.updateConnectionNodes("node-"+l),this.dispatch("connectionCreated",{output_id:d,input_id:l,output_class:a,input_class:s})}else this.dispatch("connectionCancel",!0),this.connection_ele.remove();this.connection_ele=null}else this.dispatch("connectionCancel",!0),this.connection_ele.remove(),this.connection_ele=null}else this.dispatch("connectionCancel",!0),this.connection_ele.remove(),this.connection_ele=null;this.drag=!1,this.drag_point=!1,this.connection=!1,this.ele_selected=null,this.editor_selected=!1,this.dispatch("mouseUp",e)}contextmenu(e){if(this.dispatch("contextmenu",e),e.preventDefault(),"fixed"===this.editor_mode||"view"===this.editor_mode)return!1;if(this.precanvas.getElementsByClassName("drawflow-delete").length&&this.precanvas.getElementsByClassName("drawflow-delete")[0].remove(),this.node_selected||this.connection_selected){var t=document.createElement("div");t.classList.add("drawflow-delete"),t.innerHTML="x",this.node_selected&&this.node_selected.appendChild(t),this.connection_selected&&this.connection_selected.parentElement.classList.length>1&&(t.style.top=e.clientY*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))-this.precanvas.getBoundingClientRect().y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))+"px",t.style.left=e.clientX*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))-this.precanvas.getBoundingClientRect().x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))+"px",this.precanvas.appendChild(t))}}contextmenuDel(){this.precanvas.getElementsByClassName("drawflow-delete").length&&this.precanvas.getElementsByClassName("drawflow-delete")[0].remove()}key(e){if(this.dispatch("keydown",e),"fixed"===this.editor_mode||"view"===this.editor_mode)return!1;("Delete"===e.key||"Backspace"===e.key&&e.metaKey)&&(null!=this.node_selected&&"INPUT"!==this.first_click.tagName&&"TEXTAREA"!==this.first_click.tagName&&!0!==this.first_click.hasAttribute("contenteditable")&&this.removeNodeId(this.node_selected.id),null!=this.connection_selected&&this.removeConnection())}zoom_enter(e,t){e.ctrlKey&&(e.preventDefault(),e.deltaY>0?this.zoom_out():this.zoom_in())}zoom_refresh(){this.dispatch("zoom",this.zoom),this.canvas_x=this.canvas_x/this.zoom_last_value*this.zoom,this.canvas_y=this.canvas_y/this.zoom_last_value*this.zoom,this.zoom_last_value=this.zoom,this.precanvas.style.transform="translate("+this.canvas_x+"px, "+this.canvas_y+"px) scale("+this.zoom+")"}zoom_in(){this.zoomthis.zoom_min&&(this.zoom-=this.zoom_value,this.zoom_refresh())}zoom_reset(){1!=this.zoom&&(this.zoom=1,this.zoom_refresh())}createCurvature(e,t,i,n,o,s){var r=e,a=t,l=i,d=n,c=o;switch(s){case"open":if(e>=i)var h=r+Math.abs(l-r)*c,u=l-Math.abs(l-r)*(-1*c);else h=r+Math.abs(l-r)*c,u=l-Math.abs(l-r)*c;return" M "+r+" "+a+" C "+h+" "+a+" "+u+" "+d+" "+l+" "+d;case"close":return e>=i?(h=r+Math.abs(l-r)*(-1*c),u=l-Math.abs(l-r)*c):(h=r+Math.abs(l-r)*c,u=l-Math.abs(l-r)*c)," M "+r+" "+a+" C "+h+" "+a+" "+u+" "+d+" "+l+" "+d;case"other":return e>=i?(h=r+Math.abs(l-r)*(-1*c),u=l-Math.abs(l-r)*(-1*c)):(h=r+Math.abs(l-r)*c,u=l-Math.abs(l-r)*c)," M "+r+" "+a+" C "+h+" "+a+" "+u+" "+d+" "+l+" "+d;default:return" M "+r+" "+a+" C "+(h=r+Math.abs(l-r)*c)+" "+a+" "+(u=l-Math.abs(l-r)*c)+" "+d+" "+l+" "+d}}drawConnection(e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");this.connection_ele=t;var i=document.createElementNS("http://www.w3.org/2000/svg","path");i.classList.add("main-path"),i.setAttributeNS(null,"d",""),t.classList.add("connection"),t.appendChild(i),this.precanvas.appendChild(t);var n=e.parentElement.parentElement.id.slice(5),o=e.classList[1];this.dispatch("connectionStart",{output_id:n,output_class:o})}updateConnection(e,t){const i=this.precanvas,n=this.zoom;let o=i.clientWidth/(i.clientWidth*n);o=o||0;let s=i.clientHeight/(i.clientHeight*n);s=s||0;var r=this.connection_ele.children[0],a=this.ele_selected.offsetWidth/2+(this.ele_selected.getBoundingClientRect().x-i.getBoundingClientRect().x)*o,l=this.ele_selected.offsetHeight/2+(this.ele_selected.getBoundingClientRect().y-i.getBoundingClientRect().y)*s,d=e*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))-this.precanvas.getBoundingClientRect().x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom)),c=t*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))-this.precanvas.getBoundingClientRect().y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom)),h=this.curvature,u=this.createCurvature(a,l,d,c,h,"openclose");r.setAttributeNS(null,"d",u)}addConnection(e,t,i,n){var o=this.getModuleFromNodeId(e);if(o===this.getModuleFromNodeId(t)){var s=this.getNodeFromId(e),r=!1;for(var a in s.outputs[i].connections){var l=s.outputs[i].connections[a];l.node==t&&l.output==n&&(r=!0)}if(!1===r){if(this.drawflow.drawflow[o].data[e].outputs[i].connections.push({node:t.toString(),output:n}),this.drawflow.drawflow[o].data[t].inputs[n].connections.push({node:e.toString(),input:i}),this.module===o){var d=document.createElementNS("http://www.w3.org/2000/svg","svg"),c=document.createElementNS("http://www.w3.org/2000/svg","path");c.classList.add("main-path"),c.setAttributeNS(null,"d",""),d.classList.add("connection"),d.classList.add("node_in_node-"+t),d.classList.add("node_out_node-"+e),d.classList.add(i),d.classList.add(n),d.appendChild(c),this.precanvas.appendChild(d),this.updateConnectionNodes("node-"+e),this.updateConnectionNodes("node-"+t)}this.dispatch("connectionCreated",{output_id:e,input_id:t,output_class:i,input_class:n})}}}updateConnectionNodes(e){const t="node_in_"+e,i="node_out_"+e;this.line_path;const n=this.container,o=this.precanvas,s=this.curvature,r=this.createCurvature,a=this.reroute_curvature,l=this.reroute_curvature_start_end,d=this.reroute_fix_curvature,c=this.reroute_width,h=this.zoom;let u=o.clientWidth/(o.clientWidth*h);u=u||0;let g=o.clientHeight/(o.clientHeight*h);g=g||0;const p=n.querySelectorAll("."+i);Object.keys(p).map((function(t,i){if(null===p[t].querySelector(".point")){var m=n.querySelector("#"+e),f=p[t].classList[1].replace("node_in_",""),v=n.querySelector("#"+f).querySelectorAll("."+p[t].classList[4])[0],_=v.offsetWidth/2+(v.getBoundingClientRect().x-o.getBoundingClientRect().x)*u,b=v.offsetHeight/2+(v.getBoundingClientRect().y-o.getBoundingClientRect().y)*g,w=m.querySelectorAll("."+p[t].classList[3])[0],y=w.offsetWidth/2+(w.getBoundingClientRect().x-o.getBoundingClientRect().x)*u,C=w.offsetHeight/2+(w.getBoundingClientRect().y-o.getBoundingClientRect().y)*g;const i=r(y,C,_,b,s,"openclose");p[t].children[0].setAttributeNS(null,"d",i)}else{const i=p[t].querySelectorAll(".point");let s="";const m=[];i.forEach(((t,d)=>{if(0===d&&i.length-1==0){var p=n.querySelector("#"+e),f=((C=t).getBoundingClientRect().x-o.getBoundingClientRect().x)*u+c,v=(C.getBoundingClientRect().y-o.getBoundingClientRect().y)*g+c,_=(S=p.querySelectorAll("."+t.parentElement.classList[3])[0]).offsetWidth/2+(S.getBoundingClientRect().x-o.getBoundingClientRect().x)*u,b=S.offsetHeight/2+(S.getBoundingClientRect().y-o.getBoundingClientRect().y)*g,w=r(_,b,f,v,l,"open");s+=w,m.push(w),p=t;var y=t.parentElement.classList[1].replace("node_in_",""),C=(x=n.querySelector("#"+y)).querySelectorAll("."+t.parentElement.classList[4])[0];f=(k=x.querySelectorAll("."+t.parentElement.classList[4])[0]).offsetWidth/2+(k.getBoundingClientRect().x-o.getBoundingClientRect().x)*u,v=k.offsetHeight/2+(k.getBoundingClientRect().y-o.getBoundingClientRect().y)*g,_=(p.getBoundingClientRect().x-o.getBoundingClientRect().x)*u+c,b=(p.getBoundingClientRect().y-o.getBoundingClientRect().y)*g+c,w=r(_,b,f,v,l,"close"),s+=w,m.push(w)}else if(0===d){var S;p=n.querySelector("#"+e),f=((C=t).getBoundingClientRect().x-o.getBoundingClientRect().x)*u+c,v=(C.getBoundingClientRect().y-o.getBoundingClientRect().y)*g+c,_=(S=p.querySelectorAll("."+t.parentElement.classList[3])[0]).offsetWidth/2+(S.getBoundingClientRect().x-o.getBoundingClientRect().x)*u,b=S.offsetHeight/2+(S.getBoundingClientRect().y-o.getBoundingClientRect().y)*g,w=r(_,b,f,v,l,"open"),s+=w,m.push(w),p=t,f=((C=i[d+1]).getBoundingClientRect().x-o.getBoundingClientRect().x)*u+c,v=(C.getBoundingClientRect().y-o.getBoundingClientRect().y)*g+c,_=(p.getBoundingClientRect().x-o.getBoundingClientRect().x)*u+c,b=(p.getBoundingClientRect().y-o.getBoundingClientRect().y)*g+c,w=r(_,b,f,v,a,"other"),s+=w,m.push(w)}else if(d===i.length-1){var x,k;p=t,y=t.parentElement.classList[1].replace("node_in_",""),C=(x=n.querySelector("#"+y)).querySelectorAll("."+t.parentElement.classList[4])[0],f=(k=x.querySelectorAll("."+t.parentElement.classList[4])[0]).offsetWidth/2+(k.getBoundingClientRect().x-o.getBoundingClientRect().x)*u,v=k.offsetHeight/2+(k.getBoundingClientRect().y-o.getBoundingClientRect().y)*g,_=(p.getBoundingClientRect().x-o.getBoundingClientRect().x)*(o.clientWidth/(o.clientWidth*h))+c,b=(p.getBoundingClientRect().y-o.getBoundingClientRect().y)*(o.clientHeight/(o.clientHeight*h))+c,w=r(_,b,f,v,l,"close"),s+=w,m.push(w)}else p=t,f=((C=i[d+1]).getBoundingClientRect().x-o.getBoundingClientRect().x)*(o.clientWidth/(o.clientWidth*h))+c,v=(C.getBoundingClientRect().y-o.getBoundingClientRect().y)*(o.clientHeight/(o.clientHeight*h))+c,_=(p.getBoundingClientRect().x-o.getBoundingClientRect().x)*(o.clientWidth/(o.clientWidth*h))+c,b=(p.getBoundingClientRect().y-o.getBoundingClientRect().y)*(o.clientHeight/(o.clientHeight*h))+c,w=r(_,b,f,v,a,"other"),s+=w,m.push(w)})),d?m.forEach(((e,i)=>{p[t].children[i].setAttributeNS(null,"d",e)})):p[t].children[0].setAttributeNS(null,"d",s)}}));const m=n.querySelectorAll("."+t);Object.keys(m).map((function(t,i){if(null===m[t].querySelector(".point")){var h=n.querySelector("#"+e),p=m[t].classList[2].replace("node_out_",""),f=n.querySelector("#"+p).querySelectorAll("."+m[t].classList[3])[0],v=f.offsetWidth/2+(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*u,_=f.offsetHeight/2+(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*g,b=(h=h.querySelectorAll("."+m[t].classList[4])[0]).offsetWidth/2+(h.getBoundingClientRect().x-o.getBoundingClientRect().x)*u,w=h.offsetHeight/2+(h.getBoundingClientRect().y-o.getBoundingClientRect().y)*g;const i=r(v,_,b,w,s,"openclose");m[t].children[0].setAttributeNS(null,"d",i)}else{const i=m[t].querySelectorAll(".point");let s="";const h=[];i.forEach(((t,d)=>{if(0===d&&i.length-1==0){var p=n.querySelector("#"+e),m=((y=t).getBoundingClientRect().x-o.getBoundingClientRect().x)*u+c,f=(y.getBoundingClientRect().y-o.getBoundingClientRect().y)*g+c,v=(x=p.querySelectorAll("."+t.parentElement.classList[4])[0]).offsetWidth/2+(x.getBoundingClientRect().x-o.getBoundingClientRect().x)*u,_=x.offsetHeight/2+(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*g,b=r(m,f,v,_,l,"close");s+=b,h.push(b),p=t;var w=t.parentElement.classList[2].replace("node_out_",""),y=(S=n.querySelector("#"+w)).querySelectorAll("."+t.parentElement.classList[3])[0];m=(C=S.querySelectorAll("."+t.parentElement.classList[3])[0]).offsetWidth/2+(C.getBoundingClientRect().x-o.getBoundingClientRect().x)*u,f=C.offsetHeight/2+(C.getBoundingClientRect().y-o.getBoundingClientRect().y)*g,v=(p.getBoundingClientRect().x-o.getBoundingClientRect().x)*u+c,_=(p.getBoundingClientRect().y-o.getBoundingClientRect().y)*g+c,b=r(m,f,v,_,l,"open"),s+=b,h.push(b)}else if(0===d){var C;p=t,w=t.parentElement.classList[2].replace("node_out_",""),y=(S=n.querySelector("#"+w)).querySelectorAll("."+t.parentElement.classList[3])[0],m=(C=S.querySelectorAll("."+t.parentElement.classList[3])[0]).offsetWidth/2+(C.getBoundingClientRect().x-o.getBoundingClientRect().x)*u,f=C.offsetHeight/2+(C.getBoundingClientRect().y-o.getBoundingClientRect().y)*g,v=(p.getBoundingClientRect().x-o.getBoundingClientRect().x)*u+c,_=(p.getBoundingClientRect().y-o.getBoundingClientRect().y)*g+c,b=r(m,f,v,_,l,"open"),s+=b,h.push(b),p=t,v=((y=i[d+1]).getBoundingClientRect().x-o.getBoundingClientRect().x)*u+c,_=(y.getBoundingClientRect().y-o.getBoundingClientRect().y)*g+c,m=(p.getBoundingClientRect().x-o.getBoundingClientRect().x)*u+c,f=(p.getBoundingClientRect().y-o.getBoundingClientRect().y)*g+c,b=r(m,f,v,_,a,"other"),s+=b,h.push(b)}else if(d===i.length-1){var S,x;p=t,w=t.parentElement.classList[1].replace("node_in_",""),y=(S=n.querySelector("#"+w)).querySelectorAll("."+t.parentElement.classList[4])[0],v=(x=S.querySelectorAll("."+t.parentElement.classList[4])[0]).offsetWidth/2+(x.getBoundingClientRect().x-o.getBoundingClientRect().x)*u,_=x.offsetHeight/2+(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*g,m=(p.getBoundingClientRect().x-o.getBoundingClientRect().x)*u+c,f=(p.getBoundingClientRect().y-o.getBoundingClientRect().y)*g+c,b=r(m,f,v,_,l,"close"),s+=b,h.push(b)}else p=t,v=((y=i[d+1]).getBoundingClientRect().x-o.getBoundingClientRect().x)*u+c,_=(y.getBoundingClientRect().y-o.getBoundingClientRect().y)*g+c,m=(p.getBoundingClientRect().x-o.getBoundingClientRect().x)*u+c,f=(p.getBoundingClientRect().y-o.getBoundingClientRect().y)*g+c,b=r(m,f,v,_,a,"other"),s+=b,h.push(b)})),d?h.forEach(((e,i)=>{m[t].children[i].setAttributeNS(null,"d",e)})):m[t].children[0].setAttributeNS(null,"d",s)}}))}dblclick(e){null!=this.connection_selected&&this.reroute&&this.createReroutePoint(this.connection_selected),"point"===e.target.classList[0]&&this.removeReroutePoint(e.target)}createReroutePoint(e){this.connection_selected.classList.remove("selected");const t=this.connection_selected.parentElement.classList[2].slice(9),i=this.connection_selected.parentElement.classList[1].slice(13),n=this.connection_selected.parentElement.classList[3],o=this.connection_selected.parentElement.classList[4];this.connection_selected=null;const s=document.createElementNS("http://www.w3.org/2000/svg","circle");s.classList.add("point");var r=this.pos_x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))-this.precanvas.getBoundingClientRect().x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom)),a=this.pos_y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))-this.precanvas.getBoundingClientRect().y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom));s.setAttributeNS(null,"cx",r),s.setAttributeNS(null,"cy",a),s.setAttributeNS(null,"r",this.reroute_width);let l=0;if(this.reroute_fix_curvature){const t=e.parentElement.querySelectorAll(".main-path").length;var d=document.createElementNS("http://www.w3.org/2000/svg","path");if(d.classList.add("main-path"),d.setAttributeNS(null,"d",""),e.parentElement.insertBefore(d,e.parentElement.children[t]),1===t)e.parentElement.appendChild(s);else{const i=Array.from(e.parentElement.children).indexOf(e);l=i,e.parentElement.insertBefore(s,e.parentElement.children[i+t+1])}}else e.parentElement.appendChild(s);const c=t.slice(5),h=this.drawflow.drawflow[this.module].data[c].outputs[n].connections.findIndex((function(e,t){return e.node===i&&e.output===o}));void 0===this.drawflow.drawflow[this.module].data[c].outputs[n].connections[h].points&&(this.drawflow.drawflow[this.module].data[c].outputs[n].connections[h].points=[]),this.reroute_fix_curvature?(l>0||this.drawflow.drawflow[this.module].data[c].outputs[n].connections[h].points!==[]?this.drawflow.drawflow[this.module].data[c].outputs[n].connections[h].points.splice(l,0,{pos_x:r,pos_y:a}):this.drawflow.drawflow[this.module].data[c].outputs[n].connections[h].points.push({pos_x:r,pos_y:a}),e.parentElement.querySelectorAll(".main-path").forEach(((e,t)=>{e.classList.remove("selected")}))):this.drawflow.drawflow[this.module].data[c].outputs[n].connections[h].points.push({pos_x:r,pos_y:a}),this.dispatch("addReroute",c),this.updateConnectionNodes(t)}removeReroutePoint(e){const t=e.parentElement.classList[2].slice(9),i=e.parentElement.classList[1].slice(13),n=e.parentElement.classList[3],o=e.parentElement.classList[4];let s=Array.from(e.parentElement.children).indexOf(e);const r=t.slice(5),a=this.drawflow.drawflow[this.module].data[r].outputs[n].connections.findIndex((function(e,t){return e.node===i&&e.output===o}));if(this.reroute_fix_curvature){const t=e.parentElement.querySelectorAll(".main-path").length;e.parentElement.children[t-1].remove(),s-=t,s<0&&(s=0)}else s--;this.drawflow.drawflow[this.module].data[r].outputs[n].connections[a].points.splice(s,1),e.remove(),this.dispatch("removeReroute",r),this.updateConnectionNodes(t)}registerNode(e,t,i=null,n=null){this.noderegister[e]={html:t,props:i,options:n}}getNodeFromId(e){var t=this.getModuleFromNodeId(e);return JSON.parse(JSON.stringify(this.drawflow.drawflow[t].data[e]))}getNodesFromName(e){var t=[];const i=this.drawflow.drawflow;return Object.keys(i).map((function(n,o){for(var s in i[n].data)i[n].data[s].name==e&&t.push(i[n].data[s].id)})),t}addNode(e,t,i,n,o,s,r,a,l=!1){if(this.useuuid)var d=this.getUuid();else d=this.nodeId;const c=document.createElement("div");c.classList.add("parent-node");const h=document.createElement("div");h.innerHTML="",h.setAttribute("id","node-"+d),h.classList.add("drawflow-node"),""!=s&&h.classList.add(...s.split(" "));const u=document.createElement("div");u.classList.add("inputs");const g=document.createElement("div");g.classList.add("outputs");const p={};for(var m=0;me(this.noderegister[a].html,{props:this.noderegister[a].props}),...this.noderegister[a].options}).$mount();v.appendChild(e.$el)}Object.entries(r).forEach((function(e,t){if("object"==typeof e[1])!function e(t,i,n){null!==(t=null===t?r[i]:t[i])&&Object.entries(t).forEach((function(i,o){if("object"==typeof i[1])e(t,i[0],n+"-"+i[0]);else for(var s=v.querySelectorAll("[df-"+n+"-"+i[0]+"]"),r=0;rt(this.noderegister[e.html].html,{props:this.noderegister[e.html].props}),...this.noderegister[e.html].options}).$mount();a.appendChild(t.$el)}Object.entries(e.data).forEach((function(t,i){if("object"==typeof t[1])!function t(i,n,o){null!==(i=null===i?e.data[n]:i[n])&&Object.entries(i).forEach((function(e,n){if("object"==typeof e[1])t(i,e[0],o+"-"+e[0]);else for(var s=a.querySelectorAll("[df-"+o+"-"+e[0]+"]"),r=0;r{const d=e.outputs[o].connections[s].node,c=e.outputs[o].connections[s].output,h=n.querySelector(".connection.node_in_node-"+d+".node_out_node-"+e.id+"."+o+"."+c);if(i&&0===l)for(var u=0;u{this.removeSingleConnection(e.id_output,e.id,e.output_class,e.input_class)})),delete this.drawflow.drawflow[i].data[e].inputs[t];const s=[],r=this.drawflow.drawflow[i].data[e].inputs;Object.keys(r).map((function(e,t){s.push(r[e])})),this.drawflow.drawflow[i].data[e].inputs={};const a=t.slice(6);let l=[];s.forEach(((t,n)=>{t.connections.forEach(((e,t)=>{l.push(e)})),this.drawflow.drawflow[i].data[e].inputs["input_"+(n+1)]=t})),l=new Set(l.map((e=>JSON.stringify(e)))),l=Array.from(l).map((e=>JSON.parse(e))),this.module===i&&this.container.querySelectorAll("#node-"+e+" .inputs .input").forEach(((e,t)=>{const i=e.classList[1].slice(6);parseInt(a){this.drawflow.drawflow[i].data[t.node].outputs[t.input].connections.forEach(((n,o)=>{if(n.node==e){const s=n.output.slice(6);if(parseInt(a){this.removeSingleConnection(e.id,e.id_input,e.output_class,e.input_class)})),delete this.drawflow.drawflow[i].data[e].outputs[t];const s=[],r=this.drawflow.drawflow[i].data[e].outputs;Object.keys(r).map((function(e,t){s.push(r[e])})),this.drawflow.drawflow[i].data[e].outputs={};const a=t.slice(7);let l=[];s.forEach(((t,n)=>{t.connections.forEach(((e,t)=>{l.push({node:e.node,output:e.output})})),this.drawflow.drawflow[i].data[e].outputs["output_"+(n+1)]=t})),l=new Set(l.map((e=>JSON.stringify(e)))),l=Array.from(l).map((e=>JSON.parse(e))),this.module===i&&this.container.querySelectorAll("#node-"+e+" .outputs .output").forEach(((e,t)=>{const i=e.classList[1].slice(7);parseInt(a){this.drawflow.drawflow[i].data[t.node].inputs[t.output].connections.forEach(((n,o)=>{if(n.node==e){const s=n.input.slice(7);if(parseInt(a)-1){this.module===o&&this.container.querySelector(".connection.node_in_node-"+t+".node_out_node-"+e+"."+i+"."+n).remove();var s=this.drawflow.drawflow[o].data[e].outputs[i].connections.findIndex((function(e,i){return e.node==t&&e.output===n}));this.drawflow.drawflow[o].data[e].outputs[i].connections.splice(s,1);var r=this.drawflow.drawflow[o].data[t].inputs[n].connections.findIndex((function(t,n){return t.node==e&&t.input===i}));return this.drawflow.drawflow[o].data[t].inputs[n].connections.splice(r,1),this.dispatch("connectionRemoved",{output_id:e,input_id:t,output_class:i,input_class:n}),!0}return!1}return!1}removeConnectionNodeId(e){const t="node_in_"+e,i="node_out_"+e,n=this.container.querySelectorAll("."+i);for(var o=n.length-1;o>=0;o--){var s=n[o].classList,r=this.drawflow.drawflow[this.module].data[s[1].slice(13)].inputs[s[4]].connections.findIndex((function(e,t){return e.node===s[2].slice(14)&&e.input===s[3]}));this.drawflow.drawflow[this.module].data[s[1].slice(13)].inputs[s[4]].connections.splice(r,1);var a=this.drawflow.drawflow[this.module].data[s[2].slice(14)].outputs[s[3]].connections.findIndex((function(e,t){return e.node===s[1].slice(13)&&e.output===s[4]}));this.drawflow.drawflow[this.module].data[s[2].slice(14)].outputs[s[3]].connections.splice(a,1),n[o].remove(),this.dispatch("connectionRemoved",{output_id:s[2].slice(14),input_id:s[1].slice(13),output_class:s[3],input_class:s[4]})}const l=this.container.querySelectorAll("."+t);for(o=l.length-1;o>=0;o--)s=l[o].classList,a=this.drawflow.drawflow[this.module].data[s[2].slice(14)].outputs[s[3]].connections.findIndex((function(e,t){return e.node===s[1].slice(13)&&e.output===s[4]})),this.drawflow.drawflow[this.module].data[s[2].slice(14)].outputs[s[3]].connections.splice(a,1),r=this.drawflow.drawflow[this.module].data[s[1].slice(13)].inputs[s[4]].connections.findIndex((function(e,t){return e.node===s[2].slice(14)&&e.input===s[3]})),this.drawflow.drawflow[this.module].data[s[1].slice(13)].inputs[s[4]].connections.splice(r,1),l[o].remove(),this.dispatch("connectionRemoved",{output_id:s[2].slice(14),input_id:s[1].slice(13),output_class:s[3],input_class:s[4]})}getModuleFromNodeId(e){var t;const i=this.drawflow.drawflow;return Object.keys(i).map((function(n,o){Object.keys(i[n].data).map((function(i,o){i==e&&(t=n)}))})),t}addModule(e){this.drawflow.drawflow[e]={data:{}},this.dispatch("moduleCreated",e)}changeModule(e){this.dispatch("moduleChanged",e),this.module=e,this.precanvas.innerHTML="",this.canvas_x=0,this.canvas_y=0,this.pos_x=0,this.pos_y=0,this.mouse_x=0,this.mouse_y=0,this.zoom=1,this.zoom_last_value=1,this.precanvas.style.transform="",this.import(this.drawflow,!1)}removeModule(e){this.module===e&&this.changeModule("Home"),delete this.drawflow.drawflow[e],this.dispatch("moduleRemoved",e)}clearModuleSelected(){this.precanvas.innerHTML="",this.drawflow.drawflow[this.module]={data:{}}}clear(){this.precanvas.innerHTML="",this.drawflow={drawflow:{Home:{data:{}}}}}export(){const e=JSON.parse(JSON.stringify(this.drawflow));return this.dispatch("export",e),e}import(e,t=!0){this.clear(),this.drawflow=JSON.parse(JSON.stringify(e)),this.load(),t&&this.dispatch("import","import")}on(e,t){return"function"!=typeof t?(console.error("The listener callback must be a function, the given type is "+typeof t),!1):"string"!=typeof e?(console.error("The event name must be a string, the given type is "+typeof e),!1):(void 0===this.events[e]&&(this.events[e]={listeners:[]}),void this.events[e].listeners.push(t))}removeListener(e,t){if(!this.events[e])return!1;const i=this.events[e].listeners,n=i.indexOf(t);n>-1&&i.splice(n,1)}dispatch(e,t){if(void 0===this.events[e])return!1;this.events[e].listeners.forEach((e=>{e(t)}))}getUuid(){for(var e=[],t=0;t<36;t++)e[t]="0123456789abcdef".substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]="0123456789abcdef".substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}}}]).default},35717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}},36566:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CancellationTokenSource:()=>da,Emitter:()=>ca,KeyCode:()=>ha,KeyMod:()=>ua,MarkerSeverity:()=>va,MarkerTag:()=>_a,Position:()=>ga,Range:()=>pa,Selection:()=>ma,SelectionDirection:()=>fa,Token:()=>wa,Uri:()=>ba,default:()=>ka,editor:()=>ya,languages:()=>Ca});var n={};i.r(n),i.d(n,{CancellationTokenSource:()=>da,Emitter:()=>ca,KeyCode:()=>ha,KeyMod:()=>ua,MarkerSeverity:()=>va,MarkerTag:()=>_a,Position:()=>ga,Range:()=>pa,Selection:()=>ma,SelectionDirection:()=>fa,Token:()=>wa,Uri:()=>ba,editor:()=>ya,languages:()=>Ca}),i(43017),i(4215),i(69317),i(54367),i(72102),i(55833),i(51925),i(38593),i(46838),i(2719),i(23365),i(93740),i(41895),i(36865),i(58076),i(54555),i(76917),i(57811),i(63218),i(96962),i(63737),i(44125),i(61097),i(40832),i(43588),i(60628),i(53385),i(74271),i(41321),i(810),i(84602),i(66348),i(73156),i(99143),i(52165),i(95733),i(97615),i(50995),i(52293),i(34540),i(93519),i(77061),i(55584),i(68425),i(78944),i(48766),i(73945),i(45048),i(43448),i(61168),i(89995),i(102),i(98762),i(90165),i(49925),i(88088),i(15662),i(64662),i(52614),i(84677),i(79607),i(70943),i(37181),i(86709);var o=i(64141),s=i(20927),r=i(48906),a=i(5976),l=i(97295),d=i(70666),c=i(93379),h=i.n(c),u=i(7795),g=i.n(u),p=i(90569),m=i.n(p),f=i(3565),v=i.n(f),_=i(19216),b=i.n(_),w=i(44589),y=i.n(w),C=i(70643),S={};S.styleTagTransform=y(),S.setAttributes=v(),S.insert=m().bind(null,"head"),S.domAPI=g(),S.insertStyleElement=b(),h()(C.Z,S),C.Z&&C.Z.locals&&C.Z.locals;var x=i(27231),k=i(16830),L=i(11640),N=i(36248),D=i(35034);class E extends D.Q8{constructor(e,t,i){super(e,i.keepIdleModels||!1,i.label,t),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?(0,N.$E)(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o={};for(const e of t)o[e]=n(e,i);return o}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then((e=>this.getProxy()))}}var I=i(82334),T=i(27374),M=i(96518),R=i(96887),A=i(72042),P=i(51381),O=i(68801),F=i(276),B=i(84973),W=i(73733),H=i(70902),V=i(77514),z=i(77378),j=i(91557),U=i(1118);function q(e){return"string"==typeof e}function K(e){return!q(e)}function $(e){return!e}function G(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function Z(e){return e.replace(/[&<>'"_]/g,"-")}function Q(e,t){return new Error(`${e.languageId}: ${t}`)}function Y(e,t,i,n,o){let s=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,r,a,l,d,c,h,u,g){return $(a)?$(l)?!$(d)&&d0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}var X,ee=i(33108);class te{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new ie(e,t);let i=ie.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new ie(e,t),this._entries[i]=n,n)}}te._INSTANCE=new te(5);class ie{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return ie._equals(this,e)}push(e){return te.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return te.create(this.parent,e)}}class ne{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new ne(this.languageId,this.state)}}class oe{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==t)return new se(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new se(e,t);const i=ie.getStackElementId(e);let n=this._entries[i];return n||(n=new se(e,null),this._entries[i]=n,n)}}oe._INSTANCE=new oe(5);class se{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:oe.create(this.stack,this.embeddedLanguageData)}equals(e){return e instanceof se&&!!this.stack.equals(e.stack)&&(null===this.embeddedLanguageData&&null===e.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==e.embeddedLanguageData&&this.embeddedLanguageData.equals(e.embeddedLanguageData))}}class re{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new R.WU(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const o=i.languageId,s=i.state,r=R.RW.get(o);if(!r)return this.enterLanguage(o),this.emit(n,""),s;const a=r.tokenize(e,t,s);if(0!==n)for(const e of a.tokens)this._tokens.push(new R.WU(e.offset+n,e.type,e.language));else this._tokens=this._tokens.concat(a.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(e){return new R.hG(this._tokens,e)}}class ae{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=1024|this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=null!==e?e.length:0,o=t.length,s=null!==i?i.length:0;if(0===n&&0===o&&0===s)return new Uint32Array(0);if(0===n&&0===o)return i;if(0===o&&0===s)return e;const r=new Uint32Array(n+o+s);null!==e&&r.set(e);for(let e=0;e{if(s)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i{e.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})))}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const i=R.RW.get(t);if(i){if(i instanceof X){const t=i.getLoadStatus();!1===t.loaded&&e.push(t.promise)}}else R.RW.isResolved(t)||e.push(R.RW.getOrCreate(t))}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then((e=>{}))}}getInitialState(){const e=te.create(null,this._lexer.start);return oe.create(e,null)}tokenize(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,F.Ri)(this._languageId,i);const n=new re,o=this._tokenize(e,t,i,n);return n.finalize(o)}tokenizeEncoded(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,F.Dy)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const n=new ae(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),o=this._tokenize(e,t,i,n);return n.finalize(o)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=J(this._lexer,t.stack.state),!i))throw Q(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,o=!1;for(const t of i){if(!K(t.action)||"@pop"!==t.action.nextEmbedded)continue;o=!0;let i=t.regex;const s=t.regex.source;if("^(?:"===s.substr(0,4)&&")"===s.substr(s.length-1,1)){const e=(i.ignoreCase?"i":"")+(i.unicode?"u":"");i=new RegExp(s.substr(4,s.length-5),e)}const r=e.search(i);-1===r||0!==r&&t.matchOnlyAtLineStart||(-1===n||r0&&o.nestedLanguageTokenize(r,!1,i.embeddedLanguageData,n);const a=e.substring(s);return this._myTokenize(a,t,i,n+s,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,o){o.enterLanguage(this._languageId);const s=e.length,r=t&&this._lexer.includeLF?e+"\n":e,a=r.length;let l=i.embeddedLanguageData,d=i.stack,c=0,h=null,u=!0;for(;u||c=a)break;u=!1;let e=this._lexer.tokenizer[v];if(!e&&(e=J(this._lexer,v),!e))throw Q(this._lexer,"tokenizer state is not defined: "+v);const t=r.substr(c);for(const i of e)if((0===c||!i.matchOnlyAtLineStart)&&(_=t.match(i.regex),_)){b=_[0],w=i.action;break}}if(_||(_=[""],b=""),w||(c=this._lexer.maxStack)throw Q(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(v)}else if("@pop"===w.next){if(d.depth<=1)throw Q(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(y));d=d.pop()}else if("@popall"===w.next)d=d.popall();else{let e=Y(this._lexer,w.next,b,_,v);if("@"===e[0]&&(e=e.substr(1)),!J(this._lexer,e))throw Q(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(y));d=d.push(e)}}w.log&&"string"==typeof w.log&&(g=this._lexer,p=this._lexer.languageId+": "+Y(this._lexer,w.log,b,_,v),console.log(`${g.languageId}: ${p}`))}if(null===S)throw Q(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(y));const x=i=>{const s=this._languageService.getLanguageIdByLanguageName(i)||this._languageService.getLanguageIdByMimeType(i)||i,r=this._getNestedEmbeddedLanguageData(s);if(c0)throw Q(this._lexer,"groups cannot be nested: "+this._safeRuleName(y));if(_.length!==S.length+1)throw Q(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(y));let e=0;for(let t=1;t<_.length;t++)e+=_[t].length;if(e!==b.length)throw Q(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(y));h={rule:y,matches:_,groups:[]};for(let e=0;e=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(ce=4,he=ee.Ui,function(e,t){he(e,t,ce)})],le);const ue=(0,V.Z)("standaloneColorizer",{createHTML:e=>e});class ge{static colorizeElement(e,t,i,n){const o=(n=n||{}).theme||"vs",s=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();const r=t.getLanguageIdByMimeType(s)||s;e.setTheme(o);const a=i.firstChild?i.firstChild.nodeValue:"";return i.className+=" "+o,this.colorize(t,a||"",r,n).then((e=>{var t;const n=null!==(t=null==ue?void 0:ue.createHTML(e))&&void 0!==t?t:e;i.innerHTML=n}),(e=>console.error(e)))}static async colorize(e,t,i,n){const o=e.languageIdCodec;let s=4;n&&"number"==typeof n.tabSize&&(s=n.tabSize),l.uS(t)&&(t=t.substr(1));const r=l.uq(t);if(!e.isRegisteredLanguageId(i))return pe(r,s,o);const a=await R.RW.getOrCreate(i);return a?function(e,t,i,n){return new Promise(((o,s)=>{const r=()=>{const a=function(e,t,i,n){let o=[],s=i.getInitialState();for(let r=0,a=e.length;r"),s=l.endState}return o.join("")}(e,t,i,n);if(i instanceof le){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,s)}o(a)};r()}))}(r,s,a,o):pe(r,s,o)}static colorizeLine(e,t,i,n,o=4){const s=U.wA.isBasicASCII(e,t),r=U.wA.containsRTL(e,s,i);return(0,j.tF)(new j.IJ(!1,!0,e,!1,s,r,0,n,[],o,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.tokenization.forceTokenization(t);const o=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,i)}}function pe(e,t,i){let n=[];const o=new Uint32Array(2);o[0]=0,o[1]=33587200;for(let s=0,r=e.length;s")}return n.join("")}var me=i(56346),fe=i(15762),ve=i(30653),_e=i(65321),be=i(66663),we=i(4669),ye=i(91741),Ce=i(97781);let Se=class extends a.JT{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new we.Q5),this._onCodeEditorAdd=this._register(new we.Q5),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new we.Q5),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new we.Q5),this._onDiffEditorAdd=this._register(new we.Q5),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new we.Q5),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new ye.S,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)}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((t=>t.removeDecorationsByType(e)))))}setModelProperty(e,t,i){const n=e.toString();let o;this._modelProperties.has(n)?o=this._modelProperties.get(n):(o=new Map,this._modelProperties.set(n,o)),o.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 o=await n(e,t,i);if(null!==o)return o}return null}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return(0,a.OF)(t)}};Se=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,Ce.XE)],Se);var xe=i(93983),ke=i(65026),Le=function(e,t){return function(i,n){t(i,n,e)}};let Ne=class extends Se{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(e,t,i)=>t?this.doOpenEditor(t,e):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 i=t.resource.scheme;if(i===be.lg.http||i===be.lg.https)return(0,_e.V3)(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};Ne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Le(0,xe.i6),Le(1,Ce.XE)],Ne),(0,ke.z)(L.$,Ne,0);var De=i(9488),Ee=i(72065);const Ie=(0,Ee.yh)("layoutService");var Te=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Me=function(e,t){return function(i,n){t(i,n,e)}};let Re=class{get mainContainer(){var e,t;return null!==(t=null===(e=(0,De.Xh)(this._codeEditorService.listCodeEditors()))||void 0===e?void 0:e.getContainerDomNode())&&void 0!==t?t:r.Ex.document.body}get activeContainer(){var e,t;const i=null!==(e=this._codeEditorService.getFocusedCodeEditor())&&void 0!==e?e:this._codeEditorService.getActiveCodeEditor();return null!==(t=null==i?void 0:i.getContainerDomNode())&&void 0!==t?t:this.mainContainer}get mainContainerDimension(){return _e.D6(this.mainContainer)}get activeContainerDimension(){return _e.D6(this.activeContainer)}get containers(){return(0,De.kX)(this._codeEditorService.listCodeEditors().map((e=>e.getContainerDomNode())))}getContainer(){return this.activeContainer}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=we.ju.None,this.onDidLayoutActiveContainer=we.ju.None,this.onDidLayoutContainer=we.ju.None,this.onDidChangeActiveContainer=we.ju.None,this.onDidAddContainer=we.ju.None,this.whenActiveContainerStylesLoaded=Promise.resolve(),this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};Re=Te([Me(0,L.$)],Re);let Ae=class extends Re{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};Ae=Te([Me(1,L.$)],Ae),(0,ke.z)(Ie,Re,1);var Pe=i(17301),Oe=i(14603),Fe=i(63580),Be=i(28820),We=i(59422),He=i(64862),Ve=function(e,t){return function(i,n){t(i,n,e)}};function ze(e){return e.scheme===be.lg.file?e.fsPath:e.path}let je=0;class Ue{constructor(e,t,i,n,o,s,r){this.id=++je,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=o,this.sourceId=s,this.sourceOrder=r,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 qe{constructor(e,t){this.resourceLabel=e,this.reason=t}}class Ke{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements)(0===i.reason?e:t).push(i.resourceLabel);const i=[];return e.length>0&&i.push(Fe.NC({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(Fe.NC({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}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 $e{constructor(e,t,i,n,o,s,r){this.id=++je,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=o,this.sourceId=s,this.sourceOrder=r,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new Ke),this.removedResources.has(t)||this.removedResources.set(t,new qe(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Ke),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new qe(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Ge{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)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&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("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?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 e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,i=this._past.length;e=0;e--)t.push(this._future[e].id);return new He.YO(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let s=0,r=this._past.length;s=t||r.id!==e.elements[n])&&(i=!1,o=0),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let o=this._future.length-1;o>=0;o--,n++){const r=this._future[o];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,s=o),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==s&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?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 Ze{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;et.sourceOrder)&&(t=s,i=n)}return[t,i]}canUndo(e){if(e instanceof He.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasPastElements()}_onError(e,t){(0,Pe.dL)(e);for(const e of t.strResources)this.removeElements(e);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,o){const s=this._acquireLocks(i);let r;try{r=t()}catch(t){return s(),n.dispose(),this._onError(t,e)}return r?r.then((()=>(s(),n.dispose(),o())),(t=>(s(),n.dispose(),this._onError(t,e)))):(s(),n.dispose(),o())}async _invokeWorkspacePrepare(e){if(void 0===e.actual.prepareUndoRedo)return a.JT.None;const t=e.actual.prepareUndoRedo();return void 0===t?a.JT.None:t}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(a.JT.None);const i=e.actual.prepareUndoRedo();return i?(0,a.Wf)(i)?t(i):i.then((e=>t(e))):t(a.JT.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||Qe);return new Ze(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new Je(this._undo(e,0,!0));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new Je}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,Fe.NC({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,Fe.NC({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of i.editStacks)e.getClosestPastElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,Fe.NC({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const e of i.editStacks)e.locked&&s.push(e.resourceLabel);return s.length>0?this._tryToSplitAndUndo(e,t,null,Fe.NC({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,Fe.NC({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"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),o=this._checkWorkspaceUndo(e,t,n,!1);return o?o.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 i=t.getSecondClosestPastElement();if(i&&i.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 o;!function(e){e[e.All=0]="All",e[e.This=1]="This",e[e.Cancel=2]="Cancel"}(o||(o={}));const{result:s}=await this._dialogService.prompt({type:Oe.Z.Info,message:Fe.NC("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:Fe.NC({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",i.editStacks.length),run:()=>o.All},{label:Fe.NC({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>o.This}],cancelButton:{run:()=>o.Cancel}});if(s===o.Cancel)return;if(s===o.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,i,!1);if(r)return r.returnValue;n=!0}let o;try{o=await this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const s=this._checkWorkspaceUndo(e,t,i,!0);if(s)return o.dispose(),s.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),i,o,(()=>this._continueUndoInGroup(t.groupId,n)))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new Ze([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=Fe.NC({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestPastElement();s&&s.groupId===e&&(!t||s.groupOrder>t.groupOrder)&&(t=s,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof He.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"==typeof e?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),o=n.getClosestPastElement();if(o){if(o.groupId){const[e,n]=this._findClosestUndoElementInGroup(o.groupId);if(o!==e&&n)return this._undo(n,t,i)}if((o.sourceId!==t||o.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,o);try{return 1===o.type?this._workspaceUndo(e,o,i):this._resourceUndo(n,o,i)}finally{}}}async _confirmAndContinueUndo(e,t,i){if((await this._dialogService.confirm({message:Fe.NC("confirmDifferentSource","Would you like to undo '{0}'?",i.label),primaryButton:Fe.NC({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:Fe.NC("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&s.sourceId===e&&(!t||s.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,Fe.NC({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const e of i.editStacks)e.locked&&s.push(e.resourceLabel);return s.length>0?this._tryToSplitAndRedo(e,t,null,Fe.NC({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,Fe.NC({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"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(e){return this._onError(e,t)}const o=this._checkWorkspaceRedo(e,t,i,!0);if(o)return n.dispose(),o.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new Ze([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=Fe.NC({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&s.groupId===e&&(!t||s.groupOrder=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ve(0,Be.S),Ve(1,We.lT)],Ye);class Je{constructor(e){this.returnValue=e}}(0,ke.z)(He.tJ,Ye,1),i(88191);var Xe=i(43557),et=i(26909),tt=i(73343),it=function(e,t){return function(i,n){t(i,n,e)}};let nt=class extends a.JT{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 et.$(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};nt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([it(0,Ce.XE),it(1,Xe.VZ),it(2,A.O)],nt),(0,ke.z)(tt.s,nt,1);var ot=i(22970);function st(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(st):!!e.exclusive)}class rt{constructor(e,t,i,n){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n}equals(e){var t,i;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&(null===(t=this.notebookUri)||void 0===t?void 0:t.toString())===(null===(i=e.notebookUri)||void 0===i?void 0:i.toString())}}class at{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new we.Q5,this.onDidChange=this._onDidChange.event}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),(0,a.OF)((()=>{if(i){const e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,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);const t=[];for(const e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,(e=>t.push(e.provider))),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}_updateScores(e){var t,i;const n=null===(t=this._notebookInfoResolver)||void 0===t?void 0:t.call(this,e.uri),o=n?new rt(e.uri,e.getLanguageId(),n.uri,n.type):new rt(e.uri,e.getLanguageId(),void 0,void 0);if(!(null===(i=this._lastCandidate)||void 0===i?void 0:i.equals(o))){this._lastCandidate=o;for(const t of this._entries)if(t._score=(0,ot.G)(t.selector,o.uri,o.languageId,(0,B.pt)(e),o.notebookUri,o.notebookType),st(t.selector)&&t._score>0){for(const e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(at._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:lt(e.selector)&&!lt(t.selector)?1:!lt(e.selector)&<(t.selector)?-1:e._timet._time?-1:0}}function lt(e){return"string"!=typeof e&&(Array.isArray(e)?e.some(lt):Boolean(e.isBuiltin))}var dt=i(71922);(0,ke.z)(dt.p,class{constructor(){this.referenceProvider=new at(this._score.bind(this)),this.renameProvider=new at(this._score.bind(this)),this.newSymbolNamesProvider=new at(this._score.bind(this)),this.codeActionProvider=new at(this._score.bind(this)),this.definitionProvider=new at(this._score.bind(this)),this.typeDefinitionProvider=new at(this._score.bind(this)),this.declarationProvider=new at(this._score.bind(this)),this.implementationProvider=new at(this._score.bind(this)),this.documentSymbolProvider=new at(this._score.bind(this)),this.inlayHintsProvider=new at(this._score.bind(this)),this.colorProvider=new at(this._score.bind(this)),this.codeLensProvider=new at(this._score.bind(this)),this.documentFormattingEditProvider=new at(this._score.bind(this)),this.documentRangeFormattingEditProvider=new at(this._score.bind(this)),this.onTypeFormattingEditProvider=new at(this._score.bind(this)),this.signatureHelpProvider=new at(this._score.bind(this)),this.hoverProvider=new at(this._score.bind(this)),this.documentHighlightProvider=new at(this._score.bind(this)),this.multiDocumentHighlightProvider=new at(this._score.bind(this)),this.selectionRangeProvider=new at(this._score.bind(this)),this.foldingRangeProvider=new at(this._score.bind(this)),this.linkProvider=new at(this._score.bind(this)),this.inlineCompletionsProvider=new at(this._score.bind(this)),this.inlineEditProvider=new at(this._score.bind(this)),this.completionProvider=new at(this._score.bind(this)),this.linkedEditingRangeProvider=new at(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new at(this._score.bind(this)),this.documentSemanticTokensProvider=new at(this._score.bind(this)),this.documentOnDropEditProvider=new at(this._score.bind(this)),this.documentPasteEditProvider=new at(this._score.bind(this))}_score(e){var t;return null===(t=this._notebookTypeResolver)||void 0===t?void 0:t.call(this,e)}},1);var ct=i(73910),ht=function(e,t){return function(i,n){t(i,n,e)}};const ut=(0,Ee.yh)("hoverService");let gt=class extends a.JT{get delay(){return this.instantHover&&Date.now()-this.lastHoverHideTime{e.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))})))}showHover(e,t){const i="function"==typeof this.overrideOptions?this.overrideOptions(e,t):this.overrideOptions;this.hoverDisposables.clear();const n=e.target instanceof HTMLElement?[e.target]:e.target.targetElements;for(const e of n)this.hoverDisposables.add((0,_e.mu)(e,"keydown",(e=>{e.equals(9)&&this.hoverService.hideHover()})));return this.hoverService.showHover({...e,persistence:{hideOnHover:!0},...i},t)}onDidHideHover(){this.hoverDisposables.clear(),this.instantHover&&(this.lastHoverHideTime=Date.now())}};gt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ht(3,ee.Ui),ht(4,ut)],gt);var pt=i(5606),mt=i(81502),ft={};ft.styleTagTransform=y(),ft.setAttributes=v(),ft.insert=m().bind(null,"head"),ft.domAPI=g(),ft.insertStyleElement=b(),h()(mt.Z,ft),mt.Z&&mt.Z.locals&&mt.Z.locals;var vt=i(91847),_t=i(82246),bt=i(93794),wt=i(50988),yt=i(92467),Ct=i(59365),St=i(1432),xt=i(31106),kt=function(e,t){return function(i,n){t(i,n,e)}};const Lt=_e.$;let Nt=class extends bt.${get _targetWindow(){return _e.Jj(this._target.targetElements[0])}get _targetDocumentElement(){return _e.Jj(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 2===this._hoverPosition?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))}constructor(e,t,i,n,s,r){var l,d,c,h,u,g,p,m;super(),this._keybindingService=t,this._configurationService=i,this._openerService=n,this._instantiationService=s,this._accessibilityService=r,this._messageListeners=new a.SL,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new we.Q5),this._onRequestLayout=this._register(new we.Q5),this._linkHandler=e.linkHandler||(t=>(0,yt.N)(this._openerService,t,(0,Ct.Fr)(e.content)?e.content.isTrusted:void 0)),this._target="targetElements"in e.target?e.target:new Et(e.target),this._hoverPointer=(null===(l=e.appearance)||void 0===l?void 0:l.showPointer)?Lt("div.workbench-hover-pointer"):void 0,this._hover=this._register(new _t.c8),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),(null===(d=e.appearance)||void 0===d?void 0:d.compact)&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),(null===(c=e.appearance)||void 0===c?void 0:c.skipFadeInAnimation)&&this._hover.containerDomNode.classList.add("skip-fade-in"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),(null===(h=e.position)||void 0===h?void 0:h.forcePosition)&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=null!==(g=null===(u=e.position)||void 0===u?void 0:u.hoverPosition)&&void 0!==g?g:3,this.onmousedown(this._hover.containerDomNode,(e=>e.stopPropagation())),this.onkeydown(this._hover.containerDomNode,(e=>{e.equals(9)&&this.dispose()})),this._register(_e.nm(this._targetWindow,"blur",(()=>this.dispose())));const f=Lt("div.hover-row.markdown-hover"),v=Lt("div.hover-contents");if("string"==typeof e.content)v.textContent=e.content,v.style.whiteSpace="pre-wrap";else if(e.content instanceof HTMLElement)v.appendChild(e.content),v.classList.add("html-hover-contents");else{const t=e.content,i=this._instantiationService.createInstance(yt.$,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||o.hL.fontFamily}),{element:n}=i.render(t,{actionHandler:{callback:e=>this._linkHandler(e),disposables:this._messageListeners},asyncRenderCallback:()=>{v.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});v.appendChild(n)}if(f.appendChild(v),this._hover.contentsDomNode.appendChild(f),e.actions&&e.actions.length>0){const t=Lt("div.hover-row.status-bar"),i=Lt("div.actions");e.actions.forEach((e=>{const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;_t.Sr.render(i,{label:e.label,commandId:e.commandId,run:t=>{e.run(t),this.dispose()},iconClass:e.iconClass},n)})),t.appendChild(i),this._hover.containerDomNode.appendChild(t)}let _;if(this._hoverContainer=Lt("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode),_=!(e.actions&&e.actions.length>0)&&(void 0===(null===(p=e.persistence)||void 0===p?void 0:p.hideOnHover)?"string"==typeof e.content||(0,Ct.Fr)(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):e.persistence.hideOnHover),_&&(null===(m=e.appearance)||void 0===m?void 0:m.showHoverHint)){const e=Lt("div.hover-row.status-bar"),t=Lt("div.info");t.textContent=(0,Fe.NC)("hoverhint","Hold {0} key to mouse over",St.dz?"Option":"Alt"),e.appendChild(t),this._hover.containerDomNode.appendChild(e)}const b=[...this._target.targetElements];_||b.push(this._hoverContainer);const w=this._register(new Dt(b));if(this._register(w.onMouseOut((()=>{this._isLocked||this.dispose()}))),_){const e=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new Dt(e)),this._register(this._lockMouseTracker.onMouseOut((()=>{this._isLocked||this.dispose()})))}else this._lockMouseTracker=w}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=_e.Ce(this._hoverContainer,Lt("div")),n=_e.R3(this._hoverContainer,Lt("div"));i.tabIndex=0,n.tabIndex=0,this._register(_e.nm(n,"focus",(t=>{e.focus(),t.preventDefault()}))),this._register(_e.nm(i,"focus",(e=>{t.focus(),e.preventDefault()})))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t=0)return e}const n=this.findLastFocusableChild(i);if(n)return n}}render(e){var t;e.appendChild(this._hoverContainer);const i=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&(0,_t.uX)(!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),null===(t=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))||void 0===t?void 0:t.getAriaLabel());i&&(0,me.i7)(i),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const e=this._target.targetElements.map((e=>(e=>{const t=_e.I8(e),i=e.getBoundingClientRect();return{top:i.top*t,bottom:i.bottom*t,right:i.right*t,left:i.left*t}})(e))),t=Math.min(...e.map((e=>e.top))),i=Math.max(...e.map((e=>e.right))),n=Math.max(...e.map((e=>e.bottom))),o=Math.min(...e.map((e=>e.left))),s=i-o,r=n-t,a={top:t,right:i,bottom:n,left:o,width:s,height:r,center:{x:o+s/2,y:t+r/2}};if(this.adjustHorizontalHoverPosition(a),this.adjustVerticalHoverPosition(a),this.adjustHoverMaxHeight(a),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:a.left+=3,a.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:a.left-=3,a.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:a.top+=3,a.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:a.top-=3,a.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px"}a.center.x=a.left+s/2,a.center.y=a.top+r/2}this.computeXCordinate(a),this.computeYCordinate(a),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(a)),this._hover.onContentsChanged()}computeXCordinate(e){const t=this._hover.containerDomNode.clientWidth+2;void 0!==this._target.x?this._x=this._target.x:1===this._hoverPosition?this._x=e.right:0===this._hoverPosition?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(void 0===this._target.x)if(this._forcePosition){const t=2+(this._hoverPointer?3:0);1===this._hoverPosition?this._hover.containerDomNode.style.maxWidth=this._targetDocumentElement.clientWidth-e.right-t+"px":0===this._hoverPosition&&(this._hover.containerDomNode.style.maxWidth=e.left-t+"px")}else 1===this._hoverPosition?this._targetDocumentElement.clientWidth-e.right=this._hover.containerDomNode.clientWidth?this._hoverPosition=0:this._hoverPosition=2):0===this._hoverPosition&&(e.left=this._hover.containerDomNode.clientWidth?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(e){void 0!==this._target.y||this._forcePosition||(3===this._hoverPosition?e.top-this._hover.containerDomNode.clientHeight<0&&(this._hoverPosition=2):2===this._hoverPosition&&e.bottom+this._hover.containerDomNode.clientHeight>this._targetWindow.innerHeight&&(this._hoverPosition=3))}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight/2;if(this._forcePosition){const i=2+(this._hoverPointer?3:0);3===this._hoverPosition?t=Math.min(t,e.top-i):2===this._hoverPosition&&(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(3===this._hoverPosition?"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._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};Nt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([kt(1,vt.d),kt(2,ee.Ui),kt(3,wt.v),kt(4,Ee.TG),kt(5,xt.F)],Nt);class Dt extends bt.${get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e){super(),this._elements=e,this._isMouseIn=!0,this._onMouseOut=this._register(new we.Q5),this._elements.forEach((e=>this.onmouseover(e,(()=>this._onTargetMouseOver(e))))),this._elements.forEach((e=>this.onmouseleave(e,(()=>this._onTargetMouseLeave(e)))))}_onTargetMouseOver(e){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(e)}_onTargetMouseLeave(e){this._isMouseIn=!1,this._evaluateMouseState(e)}_evaluateMouseState(e){this._clearEvaluateMouseStateTimeout(e),this._mouseTimeout=_e.Jj(e).setTimeout((()=>this._fireIfMouseOutside()),0)}_clearEvaluateMouseStateTimeout(e){this._mouseTimeout&&(_e.Jj(e).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}}class Et{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}var It=i(59069),Tt=function(e,t){return function(i,n){t(i,n,e)}};let Mt=class{constructor(e,t,i,n,o,s){this._instantiationService=e,this._contextViewService=t,this._keybindingService=n,this._layoutService=o,this._accessibilityService=s,i.onDidShowContextMenu((()=>this.hideHover()))}showHover(e,t,i){var n,o,s,l;if(Rt(this._currentHoverOptions)===Rt(e))return;if(this._currentHover&&(null===(o=null===(n=this._currentHoverOptions)||void 0===n?void 0:n.persistence)||void 0===o?void 0:o.sticky))return;this._currentHoverOptions=e,this._lastHoverOptions=e;const d=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),c=(0,_e.vY)();i||(this._lastFocusedElementBeforeOpen=d&&c?c:void 0);const h=new a.SL,u=this._instantiationService.createInstance(Nt,e);if((null===(s=e.persistence)||void 0===s?void 0:s.sticky)&&(u.isLocked=!0),u.onDispose((()=>{var t,i;(null===(t=this._currentHover)||void 0===t?void 0:t.domNode)&&(0,_e.b5)(this._currentHover.domNode)&&(null===(i=this._lastFocusedElementBeforeOpen)||void 0===i||i.focus()),this._currentHoverOptions===e&&(this._currentHoverOptions=void 0),h.dispose()})),!e.container){const t=e.target instanceof HTMLElement?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer((0,_e.Jj)(t))}const g=this._contextViewService;if(g.showContextView(new At(u,t),e.container),u.onRequestLayout((()=>g.layout())),null===(l=e.persistence)||void 0===l?void 0:l.sticky)h.add((0,_e.nm)((0,_e.Jj)(e.container).document,_e.tw.MOUSE_DOWN,(e=>{(0,_e.jg)(e.target,u.domNode)||this.doHideHover()})));else{if("targetElements"in e.target)for(const t of e.target.targetElements)h.add((0,_e.nm)(t,_e.tw.CLICK,(()=>this.hideHover())));else h.add((0,_e.nm)(e.target,_e.tw.CLICK,(()=>this.hideHover())));const t=(0,_e.vY)();if(t){const i=(0,_e.Jj)(t).document;h.add((0,_e.nm)(t,_e.tw.KEY_DOWN,(t=>{var i;return this._keyDown(t,u,!!(null===(i=e.persistence)||void 0===i?void 0:i.hideOnKeyDown))}))),h.add((0,_e.nm)(i,_e.tw.KEY_DOWN,(t=>{var i;return this._keyDown(t,u,!!(null===(i=e.persistence)||void 0===i?void 0:i.hideOnKeyDown))}))),h.add((0,_e.nm)(t,_e.tw.KEY_UP,(e=>this._keyUp(e,u)))),h.add((0,_e.nm)(i,_e.tw.KEY_UP,(e=>this._keyUp(e,u))))}}if("IntersectionObserver"in r.Ex){const t=new IntersectionObserver((e=>this._intersectionChange(e,u)),{threshold:0}),i="targetElements"in e.target?e.target.targetElements[0]:e.target;t.observe(i),h.add((0,a.OF)((()=>t.disconnect())))}return this._currentHover=u,u}hideHover(){var e;!(null===(e=this._currentHover)||void 0===e?void 0:e.isLocked)&&this._currentHoverOptions&&this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewService.hideContextView()}_intersectionChange(e,t){e[e.length-1].isIntersecting||t.dispose()}_keyDown(e,t,i){var n,o;if("Alt"===e.key)return void(t.isLocked=!0);const s=new It.y(e);this._keybindingService.resolveKeyboardEvent(s).getSingleModifierDispatchChords().some((e=>!!e))||0!==this._keybindingService.softDispatch(s,s.target).kind||!i||(null===(n=this._currentHoverOptions)||void 0===n?void 0:n.trapFocus)&&"Tab"===e.key||(this.hideHover(),null===(o=this._lastFocusedElementBeforeOpen)||void 0===o||o.focus())}_keyUp(e,t){var i;"Alt"===e.key&&(t.isLocked=!1,t.isMouseIn||(this.hideHover(),null===(i=this._lastFocusedElementBeforeOpen)||void 0===i||i.focus()))}};function Rt(e){var t;if(void 0!==e)return null!==(t=null==e?void 0:e.id)&&void 0!==t?t:e}Mt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Tt(0,Ee.TG),Tt(1,pt.u),Tt(2,pt.i),Tt(3,vt.d),Tt(4,Ie),Tt(5,xt.F)],Mt);class At{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1){this._hover=e,this._focus=t}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()}}(0,ke.z)(ut,Mt,1),(0,Ce.Ic)(((e,t)=>{const i=e.getColor(ct.CNo);i&&(t.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`))}));var Pt=i(8313),Ot=i(66007),Ft=i(800),Bt=i(69386),Wt=i(50187),Ht=i(24314),Vt=i(88216),zt=i(71765),jt=i(94565),Ut=i(43702),qt=i(98401),Kt=i(23193),$t=i(89872);function Gt(e){return Object.isFrozen(e)?e:N._A(e)}class Zt{constructor(e={},t=[],i=[],n){this._contents=e,this._keys=t,this._overrides=i,this.raw=n,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if(null===(e=this.raw)||void 0===e?void 0:e.length){const e=this.raw.map((e=>{if(e instanceof Zt)return e;const t=new Qt("");return t.parseRaw(e),t.configurationModel}));this._rawConfiguration=e.reduce(((e,t)=>t===e?t:e.merge(t)),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?(0,ee.Mt)(this.contents,e):this.contents}inspect(e,t){const i=this;return{get value(){return Gt(i.rawConfiguration.getValue(e))},get override(){return t?Gt(i.rawConfiguration.getOverrideValue(e,t)):void 0},get merged(){return Gt(t?i.rawConfiguration.override(t).getValue(e):i.rawConfiguration.getValue(e))},get overrides(){const t=[];for(const{contents:n,identifiers:o,keys:s}of i.rawConfiguration.overrides){const i=new Zt(n,s).getValue(e);void 0!==i&&t.push({identifiers:o,value:i})}return t.length?Gt(t):void 0}}}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?(0,ee.Mt)(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){var t,i;const n=N.I8(this.contents),o=N.I8(this.overrides),s=[...this.keys],r=(null===(t=this.raw)||void 0===t?void 0:t.length)?[...this.raw]:[this];for(const t of e)if(r.push(...(null===(i=t.raw)||void 0===i?void 0:i.length)?t.raw:[t]),!t.isEmpty()){this.mergeContents(n,t.contents);for(const e of t.overrides){const[t]=o.filter((t=>De.fS(t.identifiers,e.identifiers)));t?(this.mergeContents(t.contents,e.contents),t.keys.push(...e.keys),t.keys=De.EB(t.keys)):o.push(N.I8(e))}for(const e of t.keys)-1===s.indexOf(e)&&s.push(e)}return new Zt(n,s,o,r.every((e=>e instanceof Zt))?void 0:r)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;const i={};for(const e of De.EB([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e];const o=t[e];o&&("object"==typeof n&&"object"==typeof o?(n=N.I8(n),this.mergeContents(n,o)):n=o),i[e]=n}return new Zt(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&qt.Kn(e[i])&&qt.Kn(t[i])?this.mergeContents(e[i],t[i]):e[i]=N.I8(t[i])}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=e=>{e&&(i?this.mergeContents(i,e):i=N.I8(e))};for(const i of this.overrides)1===i.identifiers.length&&i.identifiers[0]===e?t=i.contents:i.identifiers.includes(e)&&n(i.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(e,t){this.updateValue(e,t,!0)}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);-1!==t&&(this.keys.splice(t,1),(0,ee.xL)(this.contents,e),Kt.eU.test(e)&&this.overrides.splice(this.overrides.findIndex((t=>De.fS(t.identifiers,(0,Kt.ny)(e)))),1))}updateValue(e,t,i){(0,ee.KV)(this.contents,e,t,(e=>console.error(e))),(i=i||-1===this.keys.indexOf(e))&&this.keys.push(e),Kt.eU.test(e)&&this.overrides.push({identifiers:(0,Kt.ny)(e),keys:Object.keys(this.contents[e]),contents:(0,ee.Od)(this.contents[e],(e=>console.error(e)))})}}class Qt{constructor(e){this._name=e,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new Zt}parseRaw(e,t){this._raw=e;const{contents:i,keys:n,overrides:o,restricted:s,hasExcludedProperties:r}=this.doParseRaw(e,t);this._configurationModel=new Zt(i,n,o,r?[e]:void 0),this._restrictedConfigurations=s||[]}doParseRaw(e,t){const i=$t.B.as(Kt.IP.Configuration).getConfigurationProperties(),n=this.filter(e,i,!0,t);return e=n.raw,{contents:(0,ee.Od)(e,(e=>console.error(`Conflict in settings file ${this._name}: ${e}`))),keys:Object.keys(e),overrides:this.toOverrides(e,(e=>console.error(`Conflict in settings file ${this._name}: ${e}`))),restricted:n.restricted,hasExcludedProperties:n.hasExcludedProperties}}filter(e,t,i,n){var o,s,r;let a=!1;if(!(null==n?void 0:n.scopes)&&!(null==n?void 0:n.skipRestricted)&&!(null===(o=null==n?void 0:n.exclude)||void 0===o?void 0:o.length))return{raw:e,restricted:[],hasExcludedProperties:a};const l={},d=[];for(const o in e)if(Kt.eU.test(o)&&i){const i=this.filter(e[o],t,!1,n);l[o]=i.raw,a=a||i.hasExcludedProperties,d.push(...i.restricted)}else{const i=t[o],c=i?void 0!==i.scope?i.scope:3:void 0;(null==i?void 0:i.restricted)&&d.push(o),(null===(s=n.exclude)||void 0===s?void 0:s.includes(o))||!(null===(r=n.include)||void 0===r?void 0:r.includes(o))&&(void 0!==c&&void 0!==n.scopes&&!n.scopes.includes(c)||n.skipRestricted&&(null==i?void 0:i.restricted))?a=!0:l[o]=e[o]}return{raw:l,restricted:d,hasExcludedProperties:a}}toOverrides(e,t){const i=[];for(const n of Object.keys(e))if(Kt.eU.test(n)){const o={};for(const t in e[n])o[t]=e[n][t];i.push({identifiers:(0,Kt.ny)(n),keys:Object.keys(o),contents:(0,ee.Od)(o,t)})}return i}}class Yt{constructor(e,t,i,n,o,s,r,a,l,d,c,h,u){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=o,this.policyConfiguration=s,this.applicationConfiguration=r,this.userConfiguration=a,this.localUserConfiguration=l,this.remoteUserConfiguration=d,this.workspaceConfiguration=c,this.folderConfigurationModel=h,this.memoryConfigurationModel=u}toInspectValue(e){return void 0!==(null==e?void 0:e.value)||void 0!==(null==e?void 0:e.override)||void 0!==(null==e?void 0:e.overrides)?e:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.toInspectValue(this.userInspectValue)}}class Jt{constructor(e,t,i,n,o=new Zt,s=new Zt,r=new Ut.Y9,a=new Zt,l=new Ut.Y9){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=o,this._workspaceConfiguration=s,this._folderConfigurations=r,this._memoryConfiguration=a,this._memoryConfigurationByResource=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Ut.Y9,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=new Zt,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i),o=this.getFolderConfigurationModelForResource(t.resource,i),s=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,r=new Set;for(const t of n.overrides)for(const i of t.identifiers)void 0!==n.getOverrideValue(e,i)&&r.add(i);return new Yt(e,t,n.getValue(e),r.size?[...r]: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,o||void 0,s)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),this._policyConfiguration.isEmpty()||void 0===this._policyConfiguration.getValue(e)||(n=n.merge(this._policyConfiguration)),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 o=this._memoryConfigurationByResource.get(e);o&&(i=i.merge(o))}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},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},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:o}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:o}]),e}),[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.policy),n=this.parseConfigurationModel(e.application),o=this.parseConfigurationModel(e.user),s=this.parseConfigurationModel(e.workspace),r=e.folders.reduce(((e,t)=>(e.set(d.o.revive(t[0]),this.parseConfigurationModel(t[1])),e)),new Ut.Y9);return new Jt(t,i,n,o,new Zt,s,r,new Zt,new Ut.Y9)}static parseConfigurationModel(e){return new Zt(e.contents,e.keys,e.overrides)}}class Xt{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._marker="\n",this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const t of e.keys)this.affectedKeys.add(t);for(const[,t]of e.overrides)for(const e of t)this.affectedKeys.add(e);this._affectsConfigStr=this._marker;for(const e of this.affectedKeys)this._affectsConfigStr+=e+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Jt.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;const n=this._marker+e,o=this._affectsConfigStr.indexOf(n);if(o<0)return!1;const s=o+n.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 n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,o=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!N.fS(n,o)}return!0}}var ei=i(15393),ti=i(77173);const ii={kind:0},ni={kind:1};class oi{constructor(e,t,i){var n;this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const t of e){const e=t.command;e&&"-"!==e.charAt(0)&&this._defaultBoundCommands.set(e,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=oi.handleRemovals([].concat(e).concat(t));for(let e=0,t=this._keybindings.length;e=0;e--){const n=i[e];if(n.command===t.command)continue;let o=!0;for(let e=1;e=0;e--){const n=i[e];if(t.contextMatchesRules(n.when))return n}return i[i.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const o=this._map.get(n[0]);if(void 0===o)return this._log("\\ No keybinding entries."),ii;let s=null;if(n.length<2)s=o;else{s=[];for(let e=0,t=o.length;et.chords.length)continue;let i=!0;for(let e=1;e=0;i--){const n=t[i];if(oi._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return!t||t.evaluate(e)}}function si(e){return e?`${e.serialize()}`:"no when condition"}function ri(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}const ai=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class li extends a.JT{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:we.ju.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=o,this._onDidUpdateKeybindings=this._register(new we.Q5),this._currentChords=[],this._currentChordChecker=new ei.zh,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=di.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new ei._F,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.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"),ii;const[n]=i.getDispatchChords();if(null===n)return this._log("\\ Keyboard event cannot be dispatched"),ii;const o=this._contextKeyService.getContext(t),s=this._currentChords.map((({keypress:e})=>e));return this._getResolver().resolve(o,s,n)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-e>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw(0,Pe.L6)("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(Fe.NC("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{const e=this._currentChords.map((({label:e})=>e)).join(", ");this._currentChordStatusMessage=this._notificationService.status(Fe.NC("next.chord","({0}) was pressed. Waiting for next key of chord...",e))}}this._scheduleLeaveChordMode(),ti.F.enabled&&ti.F.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],ti.F.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=di.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=di.EMPTY,null===this._currentSingleModifier?(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[o]=i.getChords();return this._ignoreSingleModifiers=new di(o),null!==this._currentSingleModifier&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){var n;let o=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let s=null,r=null;if(i){const[t]=e.getSingleModifierDispatchChords();s=t,r=t?[t]:[]}else[s]=e.getDispatchChords(),r=this._currentChords.map((({keypress:e})=>e));if(null===s)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),o;const a=this._contextKeyService.getContext(t),l=e.getLabel(),d=this._getResolver().resolve(a,r,s);switch(d.kind){case 0:if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${e}, ${l}".`),this._notificationService.status(Fe.NC("missing.chord","The key combination ({0}, {1}) is not a command.",e,l),{hideAfter:1e4}),this._leaveChordMode(),o=!0}return o;case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),o=!0,this._expectAnotherChord(s,l),this._log(1===this._currentChords.length?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),o;case 2:if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${d.commandId} ]`),null===d.commandId||""===d.commandId){if(this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${e}, ${l}".`),this._notificationService.status(Fe.NC("missing.chord","The key combination ({0}, {1}) is not a command.",e,l),{hideAfter:1e4}),this._leaveChordMode(),o=!0}}else{this.inChordMode&&this._leaveChordMode(),d.isBubble||(o=!0),this._log(`+ Invoking command ${d.commandId}.`),this._currentlyDispatchingCommandId=d.commandId;try{void 0===d.commandArgs?this._commandService.executeCommand(d.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(d.commandId,d.commandArgs).then(void 0,(e=>this._notificationService.warn(e)))}finally{this._currentlyDispatchingCommandId=null}ai.test(d.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:d.commandId,from:"keybinding",detail:null!==(n=e.getUserSettingsLabel())&&void 0!==n?n:void 0})}return o}}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class di{constructor(e){this._ctrlKey=!!e&&e.ctrlKey,this._shiftKey=!!e&&e.shiftKey,this._altKey=!!e&&e.altKey,this._metaKey=!!e&&e.metaKey}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}di.EMPTY=new di(null);var ci=i(49989);class hi{constructor(e,t,i,n,o,s,r){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?ui(e.getDispatchChords()):[],e&&0===this.chords.length&&(this.chords=ui(e.getSingleModifierDispatchChords())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=o,this.extensionId=s,this.isBuiltinExtension=r}}function ui(e){const t=[];for(let i=0,n=e.length;ithis._getLabel(e)))}getAriaLabel(){return pi.X4.toLabel(this._os,this._chords,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:pi.jC.toLabel(this._os,this._chords,(e=>this._getElectronAccelerator(e)))}getUserSettingsLabel(){return pi.r6.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 Pt.aZ(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 fi extends mi{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return gi.kL.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":gi.kL.toString(e.keyCode)}_getElectronAccelerator(e){return gi.kL.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=gi.kL.toUserSettingsUS(e.keyCode);return t?t.toLowerCase():t}_getChordDispatch(e){return fi.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+=gi.kL.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}static _scanCodeToKeyCode(e){const t=gi.Vd[e];if(-1!==t)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 Pt.$M)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new Pt.$M(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const i=ui(e.chords.map((e=>this._toKeyCodeChord(e))));return i.length>0?[new fi(i,t)]:[]}}var vi,_i=i(44349),bi=i(90535),wi=i(10829),yi=i(40382),Ci=i(20913),Si=i(95935),xi=i(33425),ki=i(10161),Li=i(61134),Ni=i(16328),Di={};function Ei(e,t,i){const n=i.mode===vi.ALIGN?i.offset:i.offset+i.size,o=i.mode===vi.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=o?o-t:Math.max(e-t,0):t<=o?o-t:t<=e-n?n:0}Di.styleTagTransform=y(),Di.setAttributes=v(),Di.insert=m().bind(null,"head"),Di.domAPI=g(),Di.insertStyleElement=b(),h()(Ni.Z,Di),Ni.Z&&Ni.Z.locals&&Ni.Z.locals,function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(vi||(vi={}));class Ii extends a.JT{constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=a.JT.None,this.toDisposeOnSetContainer=a.JT.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=_e.$(".context-view"),_e.Cp(this.view),this.setContainer(e,t),this._register((0,a.OF)((()=>this.setContainer(null,1))))}setContainer(e,t){var i;this.useFixedPosition=1!==t;const n=this.useShadowDOM;if(this.useShadowDOM=3===t,(e!==this.container||n!==this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(i=this.shadowRootHostElement)||void 0===i||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=_e.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=Ti,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(_e.$("slot"))}else this.container.appendChild(this.view);const t=new a.SL;Ii.BUBBLE_UP_EVENTS.forEach((e=>{t.add(_e.mu(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),Ii.BUBBLE_DOWN_EVENTS.forEach((e=>{t.add(_e.mu(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=t}}show(e){var t,i;this.isVisible()&&this.hide(),_e.PO(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",_e.$Z(this.view),this.toDisposeOnClean=e.render(this.view)||a.JT.None,this.delegate=e,this.doLayout(),null===(i=(t=this.delegate).focus)||void 0===i||i.call(t)}getViewElement(){return this.view}layout(){var e,t;this.isVisible()&&(!1!==this.delegate.canRelayout||St.gn&&ki.D.pointerEvents?(null===(t=null===(e=this.delegate)||void 0===e?void 0:e.layout)||void 0===t||t.call(e),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(e instanceof HTMLElement){const i=_e.i(e),n=_e.I8(e);t={top:i.top*n,left:i.left*n,width:i.width*n,height:i.height*n}}else t=function(e){const t=e;return!!t&&"number"==typeof t.x&&"number"==typeof t.y}(e)?{top:e.y,left:e.x,width:e.width||1,height:e.height||2}:{top:e.posy,left:e.posx,width:2,height:2};const i=_e.w(this.view),n=_e.wn(this.view),o=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0,r=this.delegate.anchorAxisAlignment||0;let a,l;const d=_e.WN();if(0===r){const e={offset:t.top-d.pageYOffset,size:t.height,position:0===o?0:1},r={offset:t.left,size:t.width,position:0===s?0:1,mode:vi.ALIGN};a=Ei(d.innerHeight,n,e)+d.pageYOffset,Li.e.intersects({start:a,end:a+n},{start:e.offset,end:e.offset+e.size})&&(r.mode=vi.AVOID),l=Ei(d.innerWidth,i,r)}else{const e={offset:t.left,size:t.width,position:0===s?0:1},r={offset:t.top,size:t.height,position:0===o?0:1,mode:vi.ALIGN};l=Ei(d.innerWidth,i,e),Li.e.intersects({start:l,end:l+i},{start:e.offset,end:e.offset+e.size})&&(r.mode=vi.AVOID),a=Ei(d.innerHeight,n,r)+d.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===o?"bottom":"top"),this.view.classList.add(0===s?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const c=_e.i(this.container);this.view.style.top=a-(this.useFixedPosition?_e.i(this.view).top:c.top)+"px",this.view.style.left=l-(this.useFixedPosition?_e.i(this.view).left:c.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),_e.Cp(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,_e.Jj(e).document.activeElement):t&&!_e.jg(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}Ii.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],Ii.BUBBLE_DOWN_EVENTS=["click"];const Ti='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t: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; }\n\t: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; }\n\t: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; }\n\t: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; }\n';let Mi=class extends a.JT{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=a.JT.None,this.contextView=this._register(new Ii(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer((()=>this.layout())))}showContextView(e,t,i){let n;n=t?t===this.layoutService.getContainer((0,_e.Jj)(t))?1:i?3:2:1,this.contextView.setContainer(null!=t?t:this.layoutService.activeContainer,n),this.contextView.show(e);const o=(0,a.OF)((()=>{this.currentViewDisposable===o&&this.hideContextView()}));return this.currentViewDisposable=o,o}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}dispose(){super.dispose(),this.currentViewDisposable.dispose(),this.currentViewDisposable=a.JT.None}};Mi=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,Ie)],Mi);var Ri=i(14118),Ai=i(81170),Pi=i(82663);let Oi=[],Fi=[],Bi=[];function Wi(e,t=!1){!function(e,t,i){const n=function(e,t){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:false,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?(0,Ri.Qc)(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(Pi.KR.sep)>=0}}(e);Oi.push(n),n.userConfigured?Bi.push(n):Fi.push(n),i&&!n.userConfigured&&Oi.forEach((e=>{e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&e.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&e.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&e.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))}))}(e,0,t)}function Hi(e,t,i){var n;let o,s,r;for(let a=i.length-1;a>=0;a--){const l=i[a];if(t===l.filenameLowercase){o=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const i=l.filepatternOnPath?e:t;(null===(n=l.filepatternLowercase)||void 0===n?void 0:n.call(l,i))&&(s=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&t.endsWith(l.extensionLowercase)&&(r=l)}return o||s||r||void 0}const Vi=Object.prototype.hasOwnProperty,zi="vs.editor.nullLanguage";class ji{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(zi,0),this._register(O.bd,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]||zi}}class Ui extends a.JT{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new we.Q5),this.onDidChange=this._onDidChange.event,Ui.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new ji,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(O.dQ.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){Ui.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Oi=Oi.filter((e=>e.userConfigured)),Fi=[];const e=[].concat(O.dQ.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((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),$t.B.as(Kt.IP.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;Vi.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 e of t.extensions)Wi({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const o of t.filenames)Wi({id:i,mime:n,filename:o},this._warnOnOverwrite),e.filenames.push(o);if(Array.isArray(t.filenamePatterns))for(const e of t.filenamePatterns)Wi({id:i,mime:n,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);(0,l.IO)(t)||Wi({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(i){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,i)}}e.aliases.push(i);let o=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const t of o)t&&0!==t.length&&e.aliases.push(t);const s=null!==o&&o.length>0;if(s&&null===o[0]);else{const t=(s?o[0]:null)||i;!s&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&Vi.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return Vi.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&Vi.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?function(e,t){return function(e,t){let i;if(e)switch(e.scheme){case be.lg.file:i=e.fsPath;break;case be.lg.data:i=Si.Vb.parseMetaData(e).get(Si.Vb.META_DATA_LABEL);break;case be.lg.vscodeNotebookCell:i=void 0;break;default:i=e.path}if(!i)return[{id:"unknown",mime:Ai.v.unknown}];i=i.toLowerCase();const n=(0,Pi.EZ)(i),o=Hi(i,n,Bi);if(o)return[o,{id:O.bd,mime:Ai.v.text}];const s=Hi(i,n,Fi);if(s)return[s,{id:O.bd,mime:Ai.v.text}];if(t){const e=function(e){if((0,l.uS)(e)&&(e=e.substr(1)),e.length>0)for(let t=Oi.length-1;t>=0;t--){const i=Oi[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i}}(t);if(e)return[e,{id:O.bd,mime:Ai.v.text}]}return[{id:"unknown",mime:Ai.v.unknown}]}(e,t).map((e=>e.id))}(e,t):[]}}Ui.instanceCount=0;class qi extends a.JT{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new we.Q5),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new we.Q5),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new we.Q5({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,qi.instanceCount++,this._registry=this._register(new Ui(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){qi.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){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return(0,De.Xh)(i,null)}createById(e){return new Ki(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new Ki(this.onDidChange,(()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=O.bd),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),R.RW.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}qi.instanceCount=0;class Ki{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages((()=>this._evaluate()))),this._emitter||(this._emitter=new we.Q5({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;const t=this._selector();t!==this.languageId&&(this.languageId=t,null===(e=this._emitter)||void 0===e||e.fire(this.languageId))}}var $i=i(74741),Gi=i(44691),Zi=i(84144),Qi=i(7448),Yi=i(16268),Ji=i(10553),Xi=i(90317),en=i(10244),tn=i(64117),nn=i(73046),on=i(25670),sn=i(21212);const rn=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,an=/(&)?(&)([^\s&])/g;var ln;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(ln||(ln={}));class dn extends Xi.o{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const o=document.createElement("div");o.classList.add("monaco-menu"),o.setAttribute("role","presentation"),super(o,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,s),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...St.dz||St.IJ?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=o,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,n),this._register(Ji.o.addTarget(o)),this._register((0,_e.nm)(o,_e.tw.KEY_DOWN,(e=>{new It.y(e).equals(2)&&e.preventDefault()}))),i.enableMnemonics&&this._register((0,_e.nm)(o,_e.tw.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){_e.zB.stop(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof hn&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),St.IJ&&this._register((0,_e.nm)(o,_e.tw.KEY_DOWN,(e=>{const t=new It.y(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),_e.zB.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),_e.zB.stop(e,!0))}))),this._register((0,_e.nm)(this.domNode,_e.tw.MOUSE_OUT,(e=>{const t=e.relatedTarget;(0,_e.jg)(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register((0,_e.nm)(this.actionsList,_e.tw.MOUSE_OVER,(e=>{let t=e.target;if(t&&(0,_e.jg)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}))),this._register(Ji.o.addTarget(this.actionsList)),this._register((0,_e.nm)(this.actionsList,Ji.t.Tap,(e=>{let t=e.initialTarget;if(t&&(0,_e.jg)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));const s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new tn.s$(o,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this.styleScrollElement(r,n),this._register((0,_e.nm)(o,Ji.t.Change,(e=>{_e.zB.stop(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register((0,_e.nm)(r,_e.tw.MOUSE_UP,(e=>{e.preventDefault()})));const a=(0,_e.Jj)(e);o.style.maxHeight=`${Math.max(10,a.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(((e,n)=>{var o;if(null===(o=i.submenuIds)||void 0===o?void 0:o.has(e.id))return console.warn(`Found submenu cycle: ${e.id}`),!1;if(e instanceof $i.Z0){if(n===t.length-1||0===n)return!1;if(t[n-1]instanceof $i.Z0)return!1}return!0})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof un))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeOrUpdateStyleSheet(e,t){this.styleSheet||((0,_e.OO)(e)?this.styleSheet=(0,_e.dS)(e):(dn.globalStyleSheet||(dn.globalStyleSheet=(0,_e.dS)()),this.styleSheet=dn.globalStyleSheet)),this.styleSheet.textContent=function(e,t){let i=`\n.monaco-menu {\n\tfont-size: 13px;\n\tborder-radius: 5px;\n\tmin-width: 160px;\n}\n\n${gn(nn.l.menuSelection)}\n${gn(nn.l.menuSubmenu)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid var(--vscode-menu-separatorBackground);\n\tpadding-top: 1px;\n\tpadding: 30px;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 0 4px;\n\tborder-radius: 4px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {\n\topacity: unset;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\twidth: 100%;\n\theight: 0px !important;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.hc-black .context-view.monaco-menu-container,\n.hc-light .context-view.monaco-menu-container,\n:host-context(.hc-black) .context-view.monaco-menu-container,\n:host-context(.hc-light) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: 4px 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tmargin: 5px 0 !important;\n\tpadding: 0;\n\tborder-radius: 0;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}`;if(t){i+="\n\t\t\t/* Arrows */\n\t\t\t.monaco-scrollable-element > .scrollbar > .scra {\n\t\t\t\tcursor: pointer;\n\t\t\t\tfont-size: 11px !important;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .visible {\n\t\t\t\topacity: 1;\n\n\t\t\t\t/* Background rule added for IE9 - to allow clicks on dom node */\n\t\t\t\tbackground:rgba(0,0,0,0);\n\n\t\t\t\ttransition: opacity 100ms linear;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible {\n\t\t\t\topacity: 0;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible.fade {\n\t\t\t\ttransition: opacity 800ms linear;\n\t\t\t}\n\n\t\t\t/* Scrollable Content Inset Shadow */\n\t\t\t.monaco-scrollable-element > .shadow {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 3px;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top-left-corner {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t";const t=e.scrollbarShadow;t&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\t\tbox-shadow: ${t} 0 6px 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 0 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 6px 6px -6px inset;\n\t\t\t\t}\n\t\t\t`);const n=e.scrollbarSliderBackground;n&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\t\tbackground: ${n};\n\t\t\t\t}\n\t\t\t`);const o=e.scrollbarSliderHoverBackground;o&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\t\tbackground: ${o};\n\t\t\t\t}\n\t\t\t`);const s=e.scrollbarSliderActiveBackground;s&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\t\tbackground: ${s};\n\t\t\t\t}\n\t\t\t`)}return i}(t,(0,_e.OO)(e))}styleScrollElement(e,t){var i,n;const o=null!==(i=t.foregroundColor)&&void 0!==i?i:"",s=null!==(n=t.backgroundColor)&&void 0!==n?n:"",r=t.borderColor?`1px solid ${t.borderColor}`:"",a=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=r,e.style.borderRadius="5px",e.style.color=o,e.style.backgroundColor=s,e.style.boxShadow=a}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((0,_e.nm)(this.element,_e.tw.MOUSE_UP,(e=>{if(_e.zB.stop(e,!0),Yi.vU){if(new Qi.n((0,_e.Jj)(this.element),e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register((0,_e.nm)(this.element,_e.tw.CONTEXT_MENU,(e=>{_e.zB.stop(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=(0,_e.R3)(this.element,(0,_e.$)("a.action-menu-item")),this._action.id===$i.Z0.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,_e.R3)(this.item,(0,_e.$)("span.menu-item-check"+on.k.asCSSSelector(nn.l.menuSelection))),this.check.setAttribute("role","none"),this.label=(0,_e.R3)(this.item,(0,_e.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,_e.R3)(this.item,(0,_e.$)("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(){var e;super.focus(),null===(e=this.item)||void 0===e||e.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(this.label&&this.options.label){(0,_e.PO)(this.label);let t=(0,sn.x$)(this.action.label);if(t){const i=function(e){const t=rn,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}(t);this.options.enableMnemonics||(t=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const n=rn.exec(t);if(n){t=l.YU(t),an.lastIndex=0;let i=an.exec(t);for(;i&&i[1];)i=an.exec(t);const o=e=>e.replace(/&&/g,"&");i?this.label.append(l.j3(o(t.substr(0,i.index))," "),(0,_e.$)("u",{"aria-hidden":"true"},i[3]),l.oL(o(t.substr(i.index+i[0].length))," ")):this.label.innerText=o(t).trim(),null===(e=this.item)||void 0===e||e.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=t.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),void 0!==e?(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}`:"",o=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=null!=t?t:"",this.item.style.backgroundColor=null!=i?i:"",this.item.style.outline=n,this.item.style.outlineOffset=o),this.check&&(this.check.style.color=null!=t?t:"")}}class hn extends cn{constructor(e,t,i,n,o){super(e,e,n,o),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new a.SL),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:ln.Right,this.showScheduler=new ei.pY((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new ei.pY((()=>{this.element&&!(0,_e.jg)((0,_e.vY)(),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=(0,_e.R3)(this.item,(0,_e.$)("span.submenu-indicator"+on.k.asCSSSelector(nn.l.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,_e.nm)(this.element,_e.tw.KEY_UP,(e=>{const t=new It.y(e);(t.equals(17)||t.equals(3))&&(_e.zB.stop(e,!0),this.createSubmenu(!0))}))),this._register((0,_e.nm)(this.element,_e.tw.KEY_DOWN,(e=>{const t=new It.y(e);(0,_e.vY)()===this.item&&(t.equals(17)||t.equals(3))&&_e.zB.stop(e,!0)}))),this._register((0,_e.nm)(this.element,_e.tw.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register((0,_e.nm)(this.element,_e.tw.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register((0,_e.nm)(this.element,_e.tw.FOCUS_OUT,(e=>{this.element&&!(0,_e.jg)((0,_e.vY)(),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){_e.zB.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(e){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const o={top:0,left:0};return o.left=Ei(e.width,t.width,{position:n===ln.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left{new It.y(e).equals(15)&&(_e.zB.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add((0,_e.nm)(this.submenuContainer,_e.tw.KEY_DOWN,(e=>{new It.y(e).equals(15)&&_e.zB.stop(e,!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){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=null!=e?e:"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class un extends en.gU{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 gn(e){const t=(0,nn.u)()[e.id];return`.codicon-${e.id}:before { content: '\\${t.toString(16)}'; }`}var pn=i(86253);class mn{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;let i;this.focusToReturn=(0,_e.vY)();const n=e.domForShadowRoot instanceof HTMLElement?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{var o;this.lastContainer=n;const s=e.getMenuClassName?e.getMenuClassName():"";s&&(n.className+=" "+s),this.options.blockMouse&&(this.block=n.appendChild((0,_e.$)(".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",null===(o=this.blockDisposable)||void 0===o||o.dispose(),this.blockDisposable=(0,_e.nm)(this.block,_e.tw.MOUSE_DOWN,(e=>e.stopPropagation())));const r=new a.SL,l=e.actionRunner||new $i.Wi;l.onWillRun((t=>this.onActionRun(t,!e.skipTelemetry)),this,r),l.onDidRun(this.onDidActionRun,this,r),i=new dn(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)},pn.ZR),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,r),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,r);const d=(0,_e.Jj)(n);return r.add((0,_e.nm)(d,_e.tw.BLUR,(()=>this.contextViewService.hideContextView(!0)))),r.add((0,_e.nm)(d,_e.tw.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;const t=new Qi.n(d,e);let i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),(0,a.F8)(r,i)},focus:()=>{null==i||i.focus(!!e.autoSelectFirstItem)},onHide:t=>{var i,n,o;null===(i=e.onHide)||void 0===i||i.call(e,!!t),this.block&&(this.block.remove(),this.block=null),null===(n=this.blockDisposable)||void 0===n||n.dispose(),this.blockDisposable=null,this.lastContainer&&((0,_e.vY)()===this.lastContainer||(0,_e.jg)((0,_e.vY)(),this.lastContainer))&&(null===(o=this.focusToReturn)||void 0===o||o.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&&!(0,Pe.n2)(e.error)&&this.notificationService.error(e.error)}}var fn=function(e,t){return function(i,n){t(i,n,e)}};let vn=class extends a.JT{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new mn(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,o,s){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=o,this.contextKeyService=s,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new we.Q5),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new we.Q5)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=_n.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{var i;null===(i=e.onHide)||void 0===i||i.call(e,t),this._onDidHideContextMenu.fire()}}),_e._q.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};var _n;vn=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([fn(0,wi.b),fn(1,We.lT),fn(2,pt.u),fn(3,vt.d),fn(4,Zi.co),fn(5,xe.i6)],vn),function(e){e.transform=function(e,t,i){if(!((n=e)&&n.menuId instanceof Zi.eH))return e;var n;const{menuId:o,menuActionOptions:s,contextKeyService:r}=e;return{...e,getActions:()=>{const n=[];if(o){const e=t.createMenu(o,null!=r?r:i);(0,Gi.LJ)(e,s,n),e.dispose()}return e.getActions?$i.Z0.join(e.getActions(),n):n}}}}(_n||(_n={}));var bn,wn=i(71050),yn=i(23897);!function(e){e[e.API=0]="API",e[e.USER=1]="USER"}(bn||(bn={}));var Cn=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Sn=function(e,t){return function(i,n){t(i,n,e)}};let xn=class{constructor(e){this._commandService=e}async open(e,t){if(!(0,be.xn)(e,be.lg.command))return!1;if(!(null==t?void 0:t.allowCommands))return!0;if("string"==typeof e&&(e=d.o.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path))return!0;let i=[];try{i=(0,yn.Qc)(decodeURIComponent(e.query))}catch(t){try{i=(0,yn.Qc)(e.query)}catch(e){}}return Array.isArray(i)||(i=[i]),await this._commandService.executeCommand(e.path,...i),!0}};xn=Cn([Sn(0,jt.H)],xn);let kn=class{constructor(e){this._editorService=e}async open(e,t){"string"==typeof e&&(e=d.o.parse(e));const{selection:i,uri:n}=(0,wt.x)(e);return(e=n).scheme===be.lg.file&&(e=(0,Si.AH)(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:i,source:(null==t?void 0:t.fromUserGesture)?bn.USER:bn.API,...null==t?void 0:t.editorOptions}},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}};kn=Cn([Sn(0,L.$)],kn);let Ln=class{constructor(e,t){this._openers=new ye.S,this._validators=new ye.S,this._resolvers=new ye.S,this._resolvedUriTargets=new Ut.Y9((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new ye.S,this._defaultExternalOpener={openExternal:async e=>((0,be.Gs)(e,be.lg.http,be.lg.https)?_e.V3(e):r.Ex.location.href=e,!0)},this._openers.push({open:async(e,t)=>!(!(null==t?void 0:t.openExternal)&&!(0,be.Gs)(e,be.lg.mailto,be.lg.http,be.lg.https,be.lg.vsls)||(await this._doOpenExternal(e,t),0))}),this._openers.push(new xn(t)),this._openers.push(new kn(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,t){var i;const n="string"==typeof e?d.o.parse(e):e,o=null!==(i=this._resolvedUriTargets.get(n))&&void 0!==i?i:e;for(const e of this._validators)if(!await e.shouldOpen(o,t))return!1;for(const i of this._openers)if(await i.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(e){}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){const i="string"==typeof e?d.o.parse(e):e;let n,o;try{n=(await this.resolveExternalUri(i,t)).resolved}catch(e){n=i}if(o="string"==typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),null==t?void 0:t.allowContributedOpeners){const e="string"==typeof(null==t?void 0:t.allowContributedOpeners)?null==t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners)if(await t.openExternal(o,{sourceUri:i,preferredOpenerId:e},wn.T.None))return!0}return this._defaultExternalOpener.openExternal(o,{sourceUri:i},wn.T.None)}dispose(){this._validators.clear()}};Ln=Cn([Sn(0,L.$),Sn(1,jt.H)],Ln);var Nn=i(85215),Dn=i(98674),En=i(8625),In=i(6626),Tn=function(e,t){return function(i,n){t(i,n,e)}};let Mn=class extends a.JT{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new we.Q5),this._markerDecorations=new Ut.Y9,e.getModels().forEach((e=>this._onModelAdded(e))),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((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new Rn(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;const i=this._markerDecorations.get(e.uri);i&&(i.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==be.lg.inMemory&&e.uri.scheme!==be.lg.internal&&e.uri.scheme!==be.lg.vscode||null===(t=this._markerService)||void 0===t||t.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};Mn=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Tn(0,W.q),Tn(1,Dn.lT)],Mn);class Rn extends a.JT{constructor(e){super(),this.model=e,this._map=new Ut.YQ,this._register((0,a.OF)((()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()})))}update(e){const{added:t,removed:i}=(0,In.q)(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===i.length)return!1;const n=i.map((e=>this._map.get(e))),o=t.map((e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)}))),s=this.model.deltaDecorations(n,o);for(const e of i)this._map.delete(e);for(let e=0;e=t)return i;const n=e.getWordAtPosition(i.getStartPosition());n&&(i=new Ht.e(i.startLineNumber,n.startColumn,i.endLineNumber,n.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0}}var An,Pn=i(36357),On=i(13961),Fn=i(22075),Bn=i(89954),Wn=i(95215),Hn=function(e,t){return function(i,n){t(i,n,e)}};function Vn(e){return e.toString()}class zn{constructor(e,t,i){this.model=e,this._modelEventListeners=new a.SL,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}dispose(){this._modelEventListeners.dispose()}}const jn=St.IJ||St.dz?1:2;class Un{constructor(e,t,i,n,o,s,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=s,this.versionId=r,this.alternativeVersionId=a}}let qn=An=class extends a.JT{constructor(e,t,i,n,o){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=i,this._languageService=n,this._languageConfigurationService=o,this._onModelAdded=this._register(new we.Q5),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new we.Q5),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new we.Q5),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){var i;let n=Fn.D.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let o="tabSize";if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(o=Math.max(t,1))}let s=Fn.D.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(s="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let r=jn;const a=e.eol;"\r\n"===a?r=2:"\n"===a&&(r=1);let l=Fn.D.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let d=Fn.D.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(d="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let c=Fn.D.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(c="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let h=Fn.D.bracketPairColorizationOptions;return(null===(i=e.editor)||void 0===i?void 0:i.bracketPairColorization)&&"object"==typeof e.editor.bracketPairColorization&&(h={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:o,insertSpaces:s,detectIndentation:d,defaultEOL:r,trimAutoWhitespace:l,largeFileOptimizations:c,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"==typeof i&&"auto"!==i?i:3===St.OS||2===St.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(e,t,i){const n="string"==typeof e?e:e.languageId;let o=this._modelCreationOptionsByLanguageAndResource[n+t];if(!o){const e=this._configurationService.getValue("editor",{overrideIdentifier:n,resource:t}),s=this._getEOL(t,n);o=An._readModelOptions({editor:e,eol:s},i),this._modelCreationOptionsByLanguageAndResource[n+t]=o}return o}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,o=i.length;ne){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const o=this.getCreationOptions(t,i,n),s=new On.yO(e,t,o,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(Vn(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=this._getSHA1Computer(),o=!!n.canComputeSHA1(s)&&n.computeSHA1(s)===e.sha1;if(o||e.sharesUndoRedoStack){for(const e of t.past)(0,Wn.e9)(e)&&e.matchesResource(i)&&e.setModel(s);for(const e of t.future)(0,Wn.e9)(e)&&e.matchesResource(i)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(i,!0,(e=>(0,Wn.e9)(e)&&e.matchesResource(i))),o&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=Vn(s.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const a=new zn(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[r]=a,a}createModel(e,t,i,n=!1){let o;return o=t?this._createModelData(e,t,i,n):this._createModelData(e,O.bd,i,n),this._onModelAdded.fire(o.model),o.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||t.future.length>0){for(const i of t.past)(0,Wn.e9)(i)&&i.matchesResource(e.uri)&&(o=!0,s+=i.heapSize(e.uri),i.setModel(e.uri));for(const i of t.future)(0,Wn.e9)(i)&&i.matchesResource(e.uri)&&(o=!0,s+=i.heapSize(e.uri),i.setModel(e.uri))}}const r=An.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,a=this._getSHA1Computer();if(o)if(n||!(s>r)&&a.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(r-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>(0,Wn.e9)(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new Un(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,s,a.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!n){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}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(),o=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(n,e.uri,e.isForSimpleWidget);An._setModelOptionsForModel(e,s,o),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}_getSHA1Computer(){return new Kn}};qn.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,qn=An=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Hn(0,ee.Ui),Hn(1,zt.y),Hn(2,He.tJ),Hn(3,A.O),Hn(4,P.c_)],qn);class Kn{canComputeSHA1(e){return e.getValueLength()<=Kn.MAX_MODEL_SIZE}computeSHA1(e){const t=new Bn.yP,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}}Kn.MAX_MODEL_SIZE=10485760;var $n=i(93198),Gn={};Gn.styleTagTransform=y(),Gn.setAttributes=v(),Gn.insert=m().bind(null,"head"),Gn.domAPI=g(),Gn.insertStyleElement=b(),h()($n.Z,Gn),$n.Z&&$n.Z.locals&&$n.Z.locals;var Zn=i(95191),Qn=i(90725),Yn=i(41157),Jn=function(e,t){return function(i,n){t(i,n,e)}};let Xn=class extends a.JT{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=$t.B.as(Qn.IP.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[o,s]=this.getOrInstantiateProvider(e),r=this.visibleQuickAccess,l=null==r?void 0:r.descriptor;if(r&&s&&l===s)return e===s.prefix||(null==i?void 0:i.preserveValue)||(r.picker.value=e),void this.adjustValueSelection(r.picker,s,i);if(s&&!(null==i?void 0:i.preserveValue)){let t;if(r&&l&&l!==s){const e=r.value.substr(l.prefix.length);e&&(t=`${s.prefix}${e}`)}if(!t){const e=null==o?void 0:o.defaultFilterValue;e===Qn.Ry.LAST?t=this.lastAcceptedPickerValues.get(s):"string"==typeof e&&(t=`${s.prefix}${e}`)}"string"==typeof t&&(e=t)}const d=new a.SL,c=d.add(this.quickInputService.createQuickPick());let h;c.value=e,this.adjustValueSelection(c,s,i),c.placeholder=null==s?void 0:s.placeholder,c.quickNavigate=null==i?void 0:i.quickNavigateConfiguration,c.hideInput=!!c.quickNavigate&&!r,("number"==typeof(null==i?void 0:i.itemActivation)||(null==i?void 0:i.quickNavigateConfiguration))&&(c.itemActivation=null!==(n=null==i?void 0:i.itemActivation)&&void 0!==n?n:Yn.jG.SECOND),c.contextKey=null==s?void 0:s.contextKey,c.filterValue=e=>e.substring(s?s.prefix.length:0),t&&(h=new ei.CR,d.add(we.ju.once(c.onWillAccept)((e=>{e.veto(),c.hide()})))),d.add(this.registerPickerListeners(c,o,s,e,null==i?void 0:i.providerOptions));const u=d.add(new wn.A);return o&&d.add(o.provide(c,u.token,null==i?void 0:i.providerOptions)),we.ju.once(c.onDidHide)((()=>{0===c.selectedItems.length&&u.cancel(),d.dispose(),null==h||h.complete(c.selectedItems.slice(0))})),c.show(),t?null==h?void 0:h.p:void 0}adjustValueSelection(e,t,i){var n;let o;o=(null==i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null==t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,i,n,o){const s=new a.SL,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return s.add((0,a.OF)((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),s.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0,providerOptions:o}):r.value=e}))),i&&s.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),s}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};Xn=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Jn(0,Yn.eJ),Jn(1,Ee.TG)],Xn);var eo=i(98892),to=i(51961),io={};io.styleTagTransform=y(),io.setAttributes=v(),io.insert=m().bind(null,"head"),io.domAPI=g(),io.insertStyleElement=b(),h()(to.Z,io),to.Z&&to.Z.locals&&to.Z.locals;var no=i(32107),oo=i(12983),so=i(79579);const ro=new so.o((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));new so.o((()=>({collator:new Intl.Collator(void 0,{numeric:!0})}))),new so.o((()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})})));var ao=i(49898),lo=i(4850),co=i(56811),ho=i(44742);class uo{constructor(e){this.nodes=e}toString(){return this.nodes.map((e=>"string"==typeof e?e:e.label)).join("")}}!function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);s>3&&r&&Object.defineProperty(t,i,r)}([ao.H],uo.prototype,"toString",null);const go=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi,po={},mo=new ho.R("quick-input-button-icon-");function fo(e,t,i){let n=e.iconClass||function(e){if(!e)return;let t;const i=e.dark.toString();return po[i]?t=po[i]:(t=mo.nextId(),_e.fk(`.${t}, .hc-light .${t}`,`background-image: ${_e.wY(e.light||e.dark)}`),_e.fk(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${_e.wY(e.dark)}`),po[i]=t),t}(e.iconPath);return e.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible"),{id:t,label:"",tooltip:e.tooltip||"",class:n,enabled:!0,run:i}}var vo=i(92321),_o=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};const bo=_e.$;class wo{constructor(e,t,i,n,o,s,r){var a,l,d;this._checked=!1,this._hidden=!1,this.hasCheckbox=n,this.index=i,this.fireButtonTriggered=o,this.fireSeparatorButtonTriggered=s,this._onChecked=r,this.onChecked=n?we.ju.map(we.ju.filter(this._onChecked.event,(e=>e.listElement===this)),(e=>e.checked)):we.ju.None,"separator"===e.type?this._separator=e:(this.item=e,t&&"separator"===t.type&&!t.buttons&&(this._separator=t),this.saneDescription=this.item.description,this.saneDetail=this.item.detail,this._labelHighlights=null===(a=this.item.highlights)||void 0===a?void 0:a.label,this._descriptionHighlights=null===(l=this.item.highlights)||void 0===l?void 0:l.description,this._detailHighlights=null===(d=this.item.highlights)||void 0===d?void 0:d.detail,this.saneTooltip=this.item.tooltip),this._init=new so.o((()=>{var t;const i=null!==(t=e.label)&&void 0!==t?t:"",n=(0,sn.Ho)(i).text.trim(),o=e.ariaLabel||[i,this.saneDescription,this.saneDetail].map((e=>(0,sn.JL)(e))).filter((e=>!!e)).join(", ");return{saneLabel:i,saneSortLabel:n,saneAriaLabel:o}}))}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 checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({listElement:this,checked:e}))}get separator(){return this._separator}set separator(e){this._separator=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 yo{constructor(e,t){this.themeService=e,this.hoverDelegate=t}get templateId(){return yo.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=_e.R3(e,bo(".quick-input-list-entry"));const i=_e.R3(t.entry,bo("label.quick-input-list-label"));t.toDisposeTemplate.push(_e.mu(i,_e.tw.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=_e.R3(i,bo("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(_e.mu(t.checkbox,_e.tw.CHANGE,(e=>{t.element.checked=t.checkbox.checked})));const n=_e.R3(i,bo(".quick-input-list-rows")),o=_e.R3(n,bo(".quick-input-list-row")),s=_e.R3(n,bo(".quick-input-list-row"));t.label=new no.g(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.push(t.label),t.icon=_e.Ce(t.label.element,bo(".quick-input-list-icon"));const r=_e.R3(o,bo(".quick-input-list-entry-keybinding"));t.keybinding=new oo.e(r,St.OS);const a=_e.R3(s,bo(".quick-input-list-label-meta"));return t.detail=new no.g(a,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.push(t.detail),t.separator=_e.R3(t.entry,bo(".quick-input-list-separator")),t.actionBar=new Xi.o(t.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){var n,o,s,r;i.element=e,e.element=null!==(n=i.entry)&&void 0!==n?n:void 0;const a=e.item?e.item:e.separator;i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked((e=>i.checkbox.checked=e)));const{labelHighlights:l,descriptionHighlights:c,detailHighlights:h}=e;if(null===(o=e.item)||void 0===o?void 0:o.iconPath){const t=(0,vo._T)(this.themeService.getColorTheme().type)?e.item.iconPath.dark:null!==(s=e.item.iconPath.light)&&void 0!==s?s:e.item.iconPath.dark,n=d.o.revive(t);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=_e.wY(n)}else i.icon.style.backgroundImage="",i.icon.className=(null===(r=e.item)||void 0===r?void 0:r.iconClass)?`quick-input-list-icon ${e.item.iconClass}`:"";let u;!e.saneTooltip&&e.saneDescription&&(u={markdown:{value:e.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:e.saneDescription});const g={matches:l||[],descriptionTitle:u,descriptionMatches:c||[],labelEscapeNewLines:!0};if("separator"!==a.type?(g.extraClasses=a.iconClasses,g.italic=a.italic,g.strikethrough=a.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item")):i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(e.saneLabel,e.saneDescription,g),i.keybinding.set("separator"===a.type?void 0:a.keybinding),e.saneDetail){let t;e.saneTooltip||(t={markdown:{value:e.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:e.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(e.saneDetail,void 0,{matches:h,title:t,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";e.item&&e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator);const p=a.buttons;p&&p.length?(i.actionBar.push(p.map(((t,i)=>fo(t,`id-${i}`,(()=>"separator"!==a.type?e.fireButtonTriggered({button:t,item:a}):e.fireSeparatorButtonTriggered({button:t,separator:a}))))),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=(0,a.B9)(i.toDisposeElement),i.actionBar.clear()}disposeTemplate(e){e.toDisposeElement=(0,a.B9)(e.toDisposeElement),e.toDisposeTemplate=(0,a.B9)(e.toDisposeTemplate)}}yo.ID="listelement";class Co{getHeight(e){return e.item?e.saneDetail?44:22:24}getTemplateId(e){return yo.ID}}var So;!function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage"}(So||(So={}));class xo{constructor(e,t,i,n){this.parent=e,this.options=i,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.sortByLabel=!0,this._onChangedAllVisibleChecked=new we.Q5,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new we.Q5,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new we.Q5,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new we.Q5,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new we.Q5,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new we.Q5,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new we.Q5,this.onKeyDown=this._onKeyDown.event,this._onLeave=new we.Q5,this.onLeave=this._onLeave.event,this._listElementChecked=new we.Q5,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=_e.R3(this.parent,bo(".quick-input-list"));const o=new Co,s=new Lo;this.list=i.createList("QuickInput",this.container,o,[new yo(n,i.hoverDelegate)],{identityProvider:{getId:e=>{var t,i,n,o,s,r,a,l;return null!==(l=null!==(r=null!==(o=null!==(i=null===(t=e.item)||void 0===t?void 0:t.id)&&void 0!==i?i:null===(n=e.item)||void 0===n?void 0:n.label)&&void 0!==o?o:null===(s=e.separator)||void 0===s?void 0:s.id)&&void 0!==r?r:null===(a=e.separator)||void 0===a?void 0:a.label)&&void 0!==l?l:""}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:s}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown((e=>{const t=new It.y(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(St.dz?e.metaKey:e.ctrlKey)&&this.list.setFocus((0,De.w6)(this.list.length));break;case 16:{const e=this.list.getFocus();1===e.length&&0===e[0]&&this._onLeave.fire();break}case 18:{const e=this.list.getFocus();1===e.length&&e[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(t)}))),this.disposables.push(this.list.onMouseDown((e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()}))),this.disposables.push(_e.nm(this.container,_e.tw.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()}))),this.disposables.push(this.list.onMouseMiddleClick((e=>{this._onLeave.fire()}))),this.disposables.push(this.list.onContextMenu((e=>{"number"==typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))})));const r=new ei.rH(i.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver((async e=>{var t;if(e.browserEvent.target instanceof HTMLAnchorElement)r.cancel();else if(e.browserEvent.relatedTarget instanceof HTMLAnchorElement||!_e.jg(e.browserEvent.relatedTarget,null===(t=e.element)||void 0===t?void 0:t.element))try{await r.trigger((async()=>{e.element&&this.showHover(e.element)}))}catch(e){if(!(0,Pe.n2)(e))throw e}}))),this.disposables.push(this.list.onMouseOut((e=>{var t;_e.jg(e.browserEvent.relatedTarget,null===(t=e.element)||void 0===t?void 0:t.element)||r.cancel()}))),this.disposables.push(r),this.disposables.push(this._listElementChecked.event((e=>this.fireCheckedEvents()))),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return we.ju.map(this.list.onDidChangeFocus,(e=>e.elements.map((e=>e.item))))}get onDidChangeSelection(){return we.ju.map(this.list.onDidChangeSelection,(e=>({items:e.elements.map((e=>e.item)),event:e.browserEvent})))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(e){this.list.getHTMLElement().ariaLabel=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{t.hidden||(t.checked=e)}))}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=(0,a.B9)(this.elementDisposables);const t=e=>this.fireButtonTriggered(e),i=e=>this.fireSeparatorButtonTriggered(e);this.inputElements=e;const n=new Map,o=this.parent.classList.contains("show-checkboxes");this.elements=e.reduce(((s,r,a)=>{var l;const d=a>0?e[a-1]:void 0;if("separator"===r.type&&!r.buttons)return s;const c=new wo(r,d,a,o,t,i,this._listElementChecked),h=s.length;return s.push(c),n.set(null!==(l=c.item)&&void 0!==l?l:c.separator,h),s}),[]),this.elementsToIndexes=n,this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map((e=>e.item))}setFocusedElements(e){if(this.list.setFocus(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e)))),e.length>0){const e=this.list.getFocus()[0];"number"==typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e))))}getCheckedElements(){return this.elements.filter((e=>e.checked)).map((e=>e.item)).filter((e=>!!e))}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===So.Second&&this.list.length<2&&(e=So.First),e){case So.First:this.list.scrollTop=0,this.list.focusFirst(void 0,(e=>!!e.item));break;case So.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,(e=>!!e.item));break;case So.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,(e=>!!e.item));break;case So.Next:{this.list.focusNext(void 0,!0,void 0,(e=>!!e.item));const e=this.list.getFocus()[0];0!==e&&!this.elements[e-1].item&&this.list.firstVisibleIndex>e-1&&this.list.reveal(e-1);break}case So.Previous:{this.list.focusPrevious(void 0,!0,void 0,(e=>!!e.item));const e=this.list.getFocus()[0];0!==e&&!this.elements[e-1].item&&this.list.firstVisibleIndex>e-1&&this.list.reveal(e-1);break}case So.NextPage:this.list.focusNextPage(void 0,(e=>!!e.item));break;case So.PreviousPage:this.list.focusPreviousPage(void 0,(e=>!!e.item))}const t=this.list.getFocus()[0];"number"==typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(e){var t,i,n;this._lastHover&&!this._lastHover.isDisposed&&(null===(i=(t=this.options.hoverDelegate).onDidHideHover)||void 0===i||i.call(t),null===(n=this._lastHover)||void 0===n||n.dispose()),e.element&&e.saneTooltip&&(this._lastHover=this.options.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:e=>{this.options.linkOpenerDelegate(e)},appearance:{showPointer:!0},container:this.container,position:{hoverPosition:1}},!1))}layout(e){this.list.getHTMLElement().style.maxHeight=e?44*Math.floor(e/44)+6+"px":"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const t=e;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let i;this.elements.forEach((n=>{var o,s,r,a;let d;d="fuzzy"===this.matchOnLabelMode?this.matchOnLabel&&null!==(o=(0,sn.Gt)(e,(0,sn.Ho)(n.saneLabel)))&&void 0!==o?o:void 0:this.matchOnLabel&&null!==(s=function(e,t){const{text:i,iconOffsets:n}=t;if(!n||0===n.length)return ko(e,i);const o=(0,l.j3)(i," "),s=i.length-o.length,r=ko(e,o);if(r)for(const e of r){const t=n[e.start+s]+s;e.start+=t,e.end+=t}return r}(t,(0,sn.Ho)(n.saneLabel)))&&void 0!==s?s:void 0;const c=this.matchOnDescription&&null!==(r=(0,sn.Gt)(e,(0,sn.Ho)(n.saneDescription||"")))&&void 0!==r?r:void 0,h=this.matchOnDetail&&null!==(a=(0,sn.Gt)(e,(0,sn.Ho)(n.saneDetail||"")))&&void 0!==a?a:void 0;if(d||c||h?(n.labelHighlights=d,n.descriptionHighlights=c,n.detailHighlights=h,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item||!n.item.alwaysShow),n.item?n.separator=void 0:n.separator&&(n.hidden=!0),!this.sortByLabel){const e=n.index&&this.inputElements[n.index-1];i=e&&"separator"===e.type?e:i,i&&!n.hidden&&(n.separator=i,i=void 0)}}))}else this.elements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.item&&(e.separator=t&&"separator"===t.type&&!t.buttons?t:void 0)}));const i=this.elements.filter((e=>!e.hidden));if(this.sortByLabel&&e){const t=e.toLowerCase();i.sort(((e,i)=>function(e,t,i){const n=e.labelHighlights||[],o=t.labelHighlights||[];return n.length&&!o.length?-1:!n.length&&o.length?1:0===n.length&&0===o.length?0:function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=n.startsWith(i),r=o.startsWith(i);if(s!==r)return s?-1:1;if(s&&r){if(n.lengtho.length)return 1}return 0}(e,t,i);if(s)return s;const r=n.endsWith(i);if(r!==o.endsWith(i))return r?-1:1;const a=function(e,t,i=!1){const n=e||"",o=t||"",s=ro.value.collator.compare(n,o);return ro.value.collatorIsNumeric&&0===s&&n!==o?n{var n;return e.set(null!==(n=t.item)&&void 0!==n?n:t.separator,i),e}),new Map),this.list.splice(0,this.list.length,i),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(i.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=(0,a.B9)(this.elementDisposables),this.disposables=(0,a.B9)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}fireSeparatorButtonTriggered(e){this._onSeparatorButtonTriggered.fire(e)}style(e){this.list.style(e)}toggleHover(){const e=this.list.getFocusedElements()[0];if(!(null==e?void 0:e.saneTooltip))return;if(this._lastHover&&!this._lastHover.isDisposed)return void this._lastHover.dispose();const t=this.list.getFocusedElements()[0];if(!t)return;this.showHover(t);const i=new a.SL;i.add(this.list.onDidChangeFocus((e=>{e.indexes.length&&this.showHover(e.elements[0])}))),this._lastHover&&i.add(this._lastHover),this._toggleHover=i,this.elementDisposables.push(this._toggleHover)}}function ko(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1!==i?[{start:i,end:i+e.length}]:null}_o([ao.H],xo.prototype,"onDidChangeFocus",null),_o([ao.H],xo.prototype,"onDidChangeSelection",null);class Lo{getWidgetAriaLabel(){return(0,Fe.NC)("quickInput","Quick Input")}getAriaLabel(e){var t;return(null===(t=e.separator)||void 0===t?void 0:t.label)?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}var No=function(e,t){return function(i,n){t(i,n,e)}};const Do={iconClass:on.k.asClassName(nn.l.quickInputBack),tooltip:(0,Fe.NC)("quickInput.back","Back"),handle:-1};class Eo extends a.JT{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=Eo.noPromptMessage,this._severity=Oe.Z.Ignore,this.onDidTriggerButtonEmitter=this._register(new we.Q5),this.onDidHideEmitter=this._register(new we.Q5),this.onDisposeEmitter=this._register(new we.Q5),this.visibleDisposables=this._register(new a.SL),this.onDidHide=this.onDidHideEmitter.event}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&&!St.gn;this._ignoreFocusOut=e&&!St.gn,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=null!=e?e:[],this.togglesUpdated=!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=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=Yn.Jq.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){var e,t;if(!this.visible)return;const i=this.getTitle();i&&this.ui.title.textContent!==i?this.ui.title.textContent=i:i||" "===this.ui.title.innerHTML||(this.ui.title.innerText=" ");const n=this.getDescription();if(this.ui.description1.textContent!==n&&(this.ui.description1.textContent=n),this.ui.description2.textContent!==n&&(this.ui.description2.textContent=n),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?_e.mc(this.ui.widget,this._widget):_e.mc(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new ei._F,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter((e=>e===Do)).map(((e,t)=>fo(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.leftActionBar.push(e,{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter((e=>e!==Do)).map(((e,t)=>fo(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.rightActionBar.push(t,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const i=null!==(t=null===(e=this.toggles)||void 0===e?void 0:e.filter((e=>e instanceof eo.Z)))&&void 0!==t?t:[];this.ui.inputBox.toggles=i}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const o=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==o&&(this._lastValidationMessage=o,_e.mc(this.ui.message),function(e,t,i){_e.mc(t);const n=function(e){const t=[];let i,n=0;for(;i=go.exec(e);){i.index-n>0&&t.push(e.substring(n,i.index));const[,o,s,,r]=i;r?t.push({label:o,href:s,title:r}):t.push({label:o,href:s}),n=i.index+i[0].length}return n{_e.cl(t)&&_e.zB.stop(t,!0),i.callback(e.href)},a=i.disposables.add(new lo.Y(s,_e.tw.CLICK)).event,l=i.disposables.add(new lo.Y(s,_e.tw.KEY_DOWN)).event,d=we.ju.chain(l,(e=>e.filter((e=>{const t=new It.y(e);return t.equals(10)||t.equals(3)}))));i.disposables.add(Ji.o.addTarget(s));const c=i.disposables.add(new lo.Y(s,Ji.t.Tap)).event;we.ju.any(a,c,d)(r,null,i.disposables),t.appendChild(s)}}(o,this.ui.message,{callback:e=>{this.ui.linkOpenerDelegate(e)},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?(0,Fe.NC)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==Oe.Z.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()}}Eo.noPromptMessage=(0,Fe.NC)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class Io extends Eo{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new we.Q5),this.onWillAcceptEmitter=this._register(new we.Q5),this.onDidAcceptEmitter=this._register(new we.Q5),this.onDidCustomEmitter=this._register(new we.Q5),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=Yn.jG.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new we.Q5),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new we.Q5),this.onDidTriggerItemButtonEmitter=this._register(new we.Q5),this.onDidTriggerSeparatorButtonEmitter=this._register(new we.Q5),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,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}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 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?Yn.X5:this.ui.keyMods}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 ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(So.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{this.doSetValue(e,!0)}))),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown((e=>{switch(e.keyCode){case 18:this.ui.list.focus(So.Next),this.canSelectMany&&this.ui.list.domFocus(),_e.zB.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(So.Previous):this.ui.list.focus(So.Last),this.canSelectMany&&this.ui.list.domFocus(),_e.zB.stop(e,!0);break;case 12:this.ui.list.focus(So.NextPage),this.canSelectMany&&this.ui.list.domFocus(),_e.zB.stop(e,!0);break;case 11:this.ui.list.focus(So.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),_e.zB.stop(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(So.First),_e.zB.stop(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(So.Last),_e.zB.stop(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.ui.list.onDidChangeFocus((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,De.fS)(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&(0,De.fS)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(_e.N5(t)&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,De.fS)(e,this._selectedItems,((e,t)=>e===t))||(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 _e.nm(this.ui.container,_e.tw.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new It.y(e),i=t.keyCode;this._quickNavigate.keybindings.some((e=>{const n=e.getChords();return!(n.length>1||(n[0].shiftKey&&4===i?t.ctrlKey||t.altKey||t.metaKey:!(n[0].altKey&&6===i||n[0].ctrlKey&&5===i||n[0].metaKey&&57===i)))}))&&(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.buttons.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:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,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;if(!n&&i.inputBox&&(n=this.placeholder||Io.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.list.ariaLabel!==n&&(this.ui.list.ariaLabel=null!=n?n:null),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)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case Yn.jG.NONE:this._itemActivation=Yn.jG.FIRST;break;case Yn.jG.SECOND:this.ui.list.focus(So.Second),this._itemActivation=Yn.jG.FIRST;break;case Yn.jG.LAST:this.ui.list.focus(So.Last),this._itemActivation=Yn.jG.FIRST;break;default:this.trySelectFirst()}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.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(So.First)),this.keepScrollPosition&&(this.scrollTop=e)}}Io.DEFAULT_ARIA_LABEL=(0,Fe.NC)("quickInputBox.ariaLabel","Type to narrow down results.");class To extends Eo{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new we.Q5),this.onDidAcceptEmitter=this._register(new we.Q5),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,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()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.buttons.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 Mo=class extends gt{constructor(e,t){super("element",!1,(e=>this.getOverrideOptions(e)),e,t)}getOverrideOptions(e){var t;return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:(e.content instanceof HTMLElement?null!==(t=e.content.textContent)&&void 0!==t?t:"":"string"==typeof e.content?e.content:e.content.value).includes("\n"),skipFadeInAnimation:!0}}}};Mo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([No(0,ee.Ui),No(1,ut)],Mo);var Ro=i(32052),Ao=i(89162),Po=i(64185),Oo={};Oo.styleTagTransform=y(),Oo.setAttributes=v(),Oo.insert=m().bind(null,"head"),Oo.domAPI=g(),Oo.insertStyleElement=b(),h()(Po.Z,Oo),Po.Z&&Po.Z.locals&&Po.Z.locals;const Fo="done",Bo="active",Wo="infinite",Ho="infinite-long-running",Vo="discrete";class zo extends a.JT{constructor(e,t){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new ei.pY((()=>(0,_e.$Z)(this.element)),0)),this.longRunningScheduler=this._register(new ei.pY((()=>this.infiniteLongRunning()),zo.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"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(null==t?void 0:t.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Bo,Wo,Ho,Vo),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(Fo),this.element.classList.contains(Wo)?(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(Vo,Fo,Ho),this.element.classList.add(Bo,Wo),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(Ho)}getContainer(){return this.element}}zo.LONG_RUNNING_INFINITE_THRESHOLD=1e4;var jo=i(3070);const Uo=_e.$;class qo extends a.JT{constructor(e,t,i){super(),this.parent=e,this.onKeyDown=e=>_e.mu(this.findInput.inputBox.inputElement,_e.tw.KEY_DOWN,e),this.onDidChange=e=>this.findInput.onDidChange(e),this.container=_e.R3(this.parent,Uo(".quick-input-box")),this.findInput=this._register(new jo.V(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const n=this.findInput.inputBox.inputElement;n.role="combobox",n.ariaHasPopup="menu",n.ariaAutoComplete="list",n.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}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"password"===this.findInput.inputBox.inputElement.type}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)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===Oe.Z.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===Oe.Z.Info?1:e===Oe.Z.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===Oe.Z.Info?1:e===Oe.Z.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}const Ko=_e.$;class $o extends a.JT{get container(){return this._container}constructor(e,t,i){super(),this.options=e,this.themeService=t,this.layoutService=i,this.enabled=!0,this.onDidAcceptEmitter=this._register(new we.Q5),this.onDidCustomEmitter=this._register(new we.Q5),this.onDidTriggerButtonEmitter=this._register(new we.Q5),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new we.Q5),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new we.Q5),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(we.ju.runAndSubscribe(_e.Xo,(({window:e,disposables:t})=>this.registerKeyModsListeners(e,t)),{window:r.Ex,disposables:this._store})),this._register(_e.Jc((e=>{this.ui&&_e.Jj(this.ui.container)===e&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))})))}registerKeyModsListeners(e,t){const i=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};for(const n of[_e.tw.KEY_DOWN,_e.tw.KEY_UP,_e.tw.MOUSE_DOWN])t.add(_e.nm(e,n,i,!0))}getUI(e){if(this.ui)return e&&_e.Jj(this._container)!==_e.Jj(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;const t=_e.R3(this._container,Ko(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";const i=_e.dS(t),n=_e.R3(t,Ko(".quick-input-titlebar")),o=this._register(new Xi.o(n,{hoverDelegate:this.options.hoverDelegate}));o.domNode.classList.add("quick-input-left-action-bar");const s=_e.R3(n,Ko(".quick-input-title")),r=this._register(new Xi.o(n,{hoverDelegate:this.options.hoverDelegate}));r.domNode.classList.add("quick-input-right-action-bar");const a=_e.R3(t,Ko(".quick-input-header")),l=_e.R3(a,Ko("input.quick-input-check-all"));l.type="checkbox",l.setAttribute("aria-label",(0,Fe.NC)("quickInput.checkAll","Toggle all checkboxes")),this._register(_e.mu(l,_e.tw.CHANGE,(e=>{const t=l.checked;L.setAllVisibleChecked(t)}))),this._register(_e.nm(l,_e.tw.CLICK,(e=>{(e.x||e.y)&&u.setFocus()})));const d=_e.R3(a,Ko(".quick-input-description")),c=_e.R3(a,Ko(".quick-input-and-message")),h=_e.R3(c,Ko(".quick-input-filter")),u=this._register(new qo(h,this.styles.inputBox,this.styles.toggle));u.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=_e.R3(h,Ko(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new Ao.Z(g,{countFormat:(0,Fe.NC)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),m=_e.R3(h,Ko(".quick-input-count"));m.setAttribute("aria-live","polite");const f=new Ao.Z(m,{countFormat:(0,Fe.NC)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),v=_e.R3(a,Ko(".quick-input-action")),_=this._register(new Ro.z(v,this.styles.button));_.label=(0,Fe.NC)("ok","OK"),this._register(_.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const b=_e.R3(a,Ko(".quick-input-action")),w=this._register(new Ro.z(b,{...this.styles.button,supportIcons:!0}));w.label=(0,Fe.NC)("custom","Custom"),this._register(w.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const y=_e.R3(c,Ko(`#${this.idPrefix}message.quick-input-message`)),C=this._register(new zo(t,this.styles.progressBar));C.getContainer().classList.add("quick-input-progress");const S=_e.R3(t,Ko(".quick-input-html-widget"));S.tabIndex=-1;const x=_e.R3(t,Ko(".quick-input-description")),k=this.idPrefix+"list",L=this._register(new xo(t,k,this.options,this.themeService));u.setAttribute("aria-controls",k),this._register(L.onDidChangeFocus((()=>{var e;u.setAttribute("aria-activedescendant",null!==(e=L.getActiveDescendant())&&void 0!==e?e:"")}))),this._register(L.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(L.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(L.onChangedCheckedCount((e=>{f.setCount(e)}))),this._register(L.onLeave((()=>{setTimeout((()=>{this.controller&&(u.setFocus(),this.controller instanceof Io&&this.controller.canSelectMany&&L.clearFocus())}),0)})));const N=_e.go(t);return this._register(N),this._register(_e.nm(t,_e.tw.FOCUS,(e=>{_e.jg(e.relatedTarget,t)||(this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0)}),!0)),this._register(N.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(Yn.Jq.Blur),this.previousFocusElement=void 0}))),this._register(_e.nm(t,_e.tw.FOCUS,(e=>{u.setFocus()}))),this._register(_e.mu(t,_e.tw.KEY_DOWN,(e=>{if(!_e.jg(e.target,S))switch(e.keyCode){case 3:_e.zB.stop(e,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:_e.zB.stop(e,!0),this.hide(Yn.Jq.Gesture);break;case 2:if(!e.altKey&&!e.ctrlKey&&!e.metaKey){const i=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(t.classList.contains("show-checkboxes")?i.push("input"):i.push("input[type=text]"),this.getUI().list.isDisplayed()&&i.push(".monaco-list"),this.getUI().message&&i.push(".quick-input-message a"),this.getUI().widget){if(_e.jg(e.target,this.getUI().widget))break;i.push(".quick-input-html-widget")}const n=t.querySelectorAll(i.join(", "));e.shiftKey&&e.target===n[0]?(_e.zB.stop(e,!0),L.clearFocus()):!e.shiftKey&&_e.jg(e.target,n[n.length-1])&&(_e.zB.stop(e,!0),n[0].focus())}break;case 10:e.ctrlKey&&(_e.zB.stop(e,!0),this.getUI().list.toggleHover())}}))),this.ui={container:t,styleSheet:i,leftActionBar:o,titleBar:n,title:s,description1:x,description2:d,widget:S,rightActionBar:r,checkAll:l,inputContainer:c,filterContainer:h,inputBox:u,visibleCountContainer:g,visibleCount:p,countContainer:m,count:f,okContainer:v,ok:_,message:y,customButtonContainer:b,customButton:w,list:L,progressBar:C,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e),linkOpenerDelegate:e=>this.options.linkOpenerDelegate(e)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this._container=e,_e.R3(this._container,this.ui.container))}pick(e,t={},i=wn.T.None){return new Promise(((n,o)=>{let s=e=>{var i;s=n,null===(i=t.onKeyMods)||void 0===i||i.call(t,r.keyMods),n(e)};if(i.isCancellationRequested)return void s(void 0);const r=this.createQuickPick();let l;const d=[r,r.onDidAccept((()=>{if(r.canSelectMany)s(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(s(e),r.hide())}})),r.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),r.onDidChangeSelection((e=>{if(!r.canSelectMany){const t=e[0];t&&(s(t),r.hide())}})),r.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...e,removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice(),i=e.splice(t,1),n=r.activeItems.filter((e=>e!==i[0])),o=r.keepScrollPosition;r.keepScrollPosition=!0,r.items=e,n&&(r.activeItems=n),r.keepScrollPosition=o}}}))),r.onDidTriggerSeparatorButton((e=>{var i;return null===(i=t.onDidTriggerSeparatorButton)||void 0===i?void 0:i.call(t,e)})),r.onDidChangeValue((e=>{!l||e||1===r.activeItems.length&&r.activeItems[0]===l||(r.activeItems=[l])})),i.onCancellationRequested((()=>{r.hide()})),r.onDidHide((()=>{(0,a.B9)(d),s(void 0)}))];r.title=t.title,r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.quickNavigate=t.quickNavigate,r.hideInput=!!t.hideInput,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{l=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),l&&(r.activeItems=[l])})),r.show(),Promise.resolve(e).then(void 0,(e=>{o(e),r.hide()}))}))}createQuickPick(){const e=this.getUI(!0);return new Io(e)}createInputBox(){const e=this.getUI(!0);return new To(e)}show(e){const t=this.getUI(!0);this.onShowEmitter.fire();const i=this.controller;this.controller=e,null==i||i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",_e.mc(t.widget),t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(Oe.Z.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),_e.mc(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const n=this.options.backKeybindingLabel();Do.tooltip=n?(0,Fe.NC)("quickInput.backWithKeybinding","Back ({0})",n):(0,Fe.NC)("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}isVisible(){return!!this.ui&&"none"!==this.ui.container.style.display}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.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.display(!!e.list),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;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t,i;const n=this.controller;if(!n)return;const o=null===(t=this.ui)||void 0===t?void 0:t.container,s=o&&!_e.b5(o);if(this.controller=null,this.onHideEmitter.fire(),o&&(o.style.display="none"),!s){let e=this.previousFocusElement;for(;e&&!e.offsetParent;)e=null!==(i=e.parentElement)&&void 0!==i?i:void 0;(null==e?void 0:e.offsetParent)?(e.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}n.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,$o.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,widgetBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=null!=e?e:"",this.ui.container.style.backgroundColor=null!=t?t:"",this.ui.container.style.color=null!=i?i:"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.list.style(this.styles.list);const s=[];this.styles.pickerGroup.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(s.push(".quick-input-list .monaco-keybinding > .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("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}}$o.MAX_WIDTH=600;var Go=function(e,t){return function(i,n){t(i,n,e)}};let Zo=class extends Ce.bB{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(Xn))),this._quickAccess}constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this.configurationService=o,this._onShow=this._register(new we.Q5),this._onHide=this._register(new we.Q5),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),linkOpenerDelegate:e=>{this.instantiationService.invokeFunction((t=>{t.get(wt.v).open(e,{allowCommands:!0,fromUserGesture:!0})}))},returnFocus:()=>e.focus(),createList:(e,t,i,n,o)=>this.instantiationService.createInstance(Zn.ev,e,t,i,n,o),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(Mo))},n=this._register(new $o({...i,...t},this.themeService,this.layoutService));return n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer((t=>{(0,_e.Jj)(e.activeContainer)===(0,_e.Jj)(n.container)&&n.layout(t,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()}))),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new xe.uy(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),null==t||t.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t={},i=wn.T.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:(0,ct.n_1)(ct.zKr),quickInputForeground:(0,ct.n_1)(ct.tZ6),quickInputTitleBackground:(0,ct.n_1)(ct.loF),widgetBorder:(0,ct.n_1)(ct.A42),widgetShadow:(0,ct.n_1)(ct.rh)},inputBox:pn.Hc,toggle:pn.pl,countBadge:pn.ku,button:pn.wG,progressBar:pn.b5,keybindingLabel:pn.eO,list:(0,pn.TU)({listBackground:ct.zKr,listFocusBackground:ct.Vqd,listFocusForeground:ct.NPS,listInactiveFocusForeground:ct.NPS,listInactiveSelectionIconForeground:ct.cbQ,listInactiveFocusBackground:ct.Vqd,listFocusOutline:ct.xL1,listInactiveFocusOutline:ct.xL1}),pickerGroup:{pickerGroupBorder:(0,ct.n_1)(ct.opG),pickerGroupForeground:(0,ct.n_1)(ct.kJk)}}}};Zo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Go(0,Ee.TG),Go(1,xe.i6),Go(2,Ce.XE),Go(3,Ie),Go(4,ee.Ui)],Zo);var Qo=i(88289),Yo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Jo=function(e,t){return function(i,n){t(i,n,e)}};let Xo=class extends Zo{constructor(e,t,i,n,o,s){super(t,i,n,new Ae(e.getContainerDomNode(),o),s),this.host=void 0;const r=ts.get(e);if(r){const t=r.widget;this.host={_serviceBrand:void 0,get mainContainer(){return t.getDomNode()},getContainer:()=>t.getDomNode(),get containers(){return[t.getDomNode()]},get activeContainer(){return t.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return we.ju.map(e.onDidLayoutChange,(e=>({container:t.getDomNode(),dimension:e})))},get onDidChangeActiveContainer(){return we.ju.None},get onDidAddContainer(){return we.ju.None},get whenActiveContainerStylesLoaded(){return Promise.resolve()},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)}};Xo=Yo([Jo(1,Ee.TG),Jo(2,xe.i6),Jo(3,Ce.XE),Jo(4,L.$),Jo(5,ee.Ui)],Xo);let es=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(Xo,e);this.mapEditorToService.set(e,t),(0,Qo.M)(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t={},i=wn.T.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};es=Yo([Jo(0,Ee.TG),Jo(1,L.$)],es);class ts{static get(e){return e.getContribution(ts.ID)}constructor(e){this.editor=e,this.widget=new is(this.editor)}dispose(){this.widget.dispose()}}ts.ID="editor.controller.quickInput";class is{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return is.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}is.ID="editor.contrib.quickInputWidget",(0,k._K)(ts.ID,ts,4);var ns=i(58763),os=i(44156),ss=function(e,t){return function(i,n){t(i,n,e)}};let rs=class extends a.JT{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new we.Q5,this._onDidChangeReducedMotion=new we.Q5,this._accessibilityModeEnabledContext=xt.U.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),e.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())}))),n(),this._register(this.onDidChangeScreenReaderOptimized((()=>n())));const o=r.Ex.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=o.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(o)}initReducedMotionListeners(e){this._register((0,_e.nm)(e,"change",(()=>{this._systemMotionReduced=e.matches,"auto"===this._configMotionReduced&&this._onDidChangeReducedMotion.fire()})));const t=()=>{const e=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",e),this._layoutService.mainContainer.classList.toggle("enable-motion",!e)};t(),this._register(this.onDidChangeReducedMotion((()=>t())))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return"on"===e||"auto"===e&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};rs=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ss(0,xe.i6),ss(1,Ie),ss(2,ee.Ui)],rs);var as,ls,ds=i(26904),cs=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},hs=function(e,t){return function(i,n){t(i,n,e)}};let us=class{constructor(e,t){this._commandService=e,this._hiddenStates=new gs(t)}createMenu(e,t,i){return new ms(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,t)}resetHiddenStates(e){this._hiddenStates.reset(e)}};us=cs([hs(0,jt.H),hs(1,ds.Uy)],us);let gs=as=class{constructor(e){this._storageService=e,this._disposables=new a.SL,this._onDidChange=new we.Q5,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(as._key,0,"{}");this._data=JSON.parse(t)}catch(e){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,as._key,this._disposables)((()=>{if(!this._ignoreChangeEvent)try{const t=e.get(as._key,0,"{}");this._data=JSON.parse(t)}catch(e){console.log("FAILED to read storage after UPDATE",e)}this._onDidChange.fire()})))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){var i;return null!==(i=this._hiddenByDefaultCache.get(`${e.id}/${t}`))&&void 0!==i&&i}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){var i,n;const o=this._isHiddenByDefault(e,t),s=null!==(n=null===(i=this._data[e.id])||void 0===i?void 0:i.includes(t))&&void 0!==n&&n;return o?!s:s}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);const n=this._data[e.id];if(i)n?n.indexOf(t)<0&&n.push(t):this._data[e.id]=[t];else if(n){const i=n.indexOf(t);i>=0&&(0,De.LS)(n,i),0===n.length&&delete this._data[e.id]}this._persist()}reset(e){if(void 0===e)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(as._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};gs._key="menu.hiddenCommands",gs=as=cs([hs(0,ds.Uy)],gs);let ps=ls=class{constructor(e,t,i,n,o){this._id=e,this._hiddenStates=t,this._collectContextKeysForSubmenus=i,this._commandService=n,this._contextKeyService=o,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=Zi.BH.getMenuItems(this._id);let t;e.sort(ls._compareMenuItems);for(const i of e){const e=i.group||"";t&&t[0]===e||(t=[e,[]],this._menuGroups.push(t)),t[1].push(i),this._collectContextKeys(i)}}_collectContextKeys(e){if(ls._fillInKbExprKeys(e.when,this._structureContextKeys),(0,Zi.vr)(e)){if(e.command.precondition&&ls._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;ls._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&Zi.BH.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}createActionGroups(e){const t=[];for(const i of this._menuGroups){const[n,o]=i,s=[];for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const i=(0,Zi.vr)(t);i&&this._hiddenStates.setDefaultState(this._id,t.command.id,!!t.isHiddenByDefault);const n=fs(this._id,i?t.command:t,this._hiddenStates);if(i)s.push(new Zi.U8(t.command,t.alt,e,n,this._contextKeyService,this._commandService));else{const i=new ls(t.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(e),o=$i.Z0.join(...i.map((e=>e[1])));o.length>0&&s.push(new Zi.NZ(t,n,o))}}s.length>0&&t.push([n,s])}return t}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}static _compareMenuItems(e,t){const i=e.group,n=t.group;if(i!==n){if(!i)return 1;if(!n)return-1;if("navigation"===i)return-1;if("navigation"===n)return 1;const e=i.localeCompare(n);if(0!==e)return e}const o=e.order||0,s=t.order||0;return os?1:ls._compareTitles((0,Zi.vr)(e)?e.command.title:e.title,(0,Zi.vr)(t)?t.command.title:t.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};ps=ls=cs([hs(3,jt.H),hs(4,xe.i6)],ps);let ms=class{constructor(e,t,i,n,o){this._disposables=new a.SL,this._menuInfo=new ps(e,t,i.emitEventsForSubmenuChanges,n,o);const s=new ei.pY((()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})}),i.eventDebounceDelay);this._disposables.add(s),this._disposables.add(Zi.BH.onDidChangeMenu((t=>{t.has(e)&&s.schedule()})));const r=this._disposables.add(new a.SL);this._onDidChange=new we.D0({onWillAddFirstListener:()=>{r.add(o.onDidChangeContext((e=>{const t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})}))),r.add(t.onDidChange((e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})})))},onDidRemoveLastListener:r.clear.bind(r),delay:i.eventDebounceDelay,merge:e=>{let t=!1,i=!1,n=!1;for(const o of e)if(t=t||o.isStructuralChange,i=i||o.isEnablementChange,n=n||o.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}}}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function fs(e,t,i){const n=(0,Zi.f6)(t)?t.submenu.id:t.id,o="string"==typeof t.title?t.title:t.title.value,s=(0,$i.xw)({id:`hide/${e.id}/${n}`,label:(0,Fe.NC)("hide.label","Hide '{0}'",o),run(){i.updateHidden(e,n,!0)}}),r=(0,$i.xw)({id:`toggle/${e.id}/${n}`,label:o,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:s,toggle:r,get isHidden(){return!r.checked}}}ms=cs([hs(3,jt.H),hs(4,xe.i6)],ms);var vs,_s=function(e,t){return function(i,n){t(i,n,e)}};let bs=vs=class extends a.JT{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(Yi.G6||Yi.MG)&&this.installWebKitWriteTextWorkaround(),this._register(we.ju.runAndSubscribe(_e.Xo,(({window:e,disposables:t})=>{t.add((0,_e.nm)(e.document,"copy",(()=>this.clearResources())))}),{window:r.Ex,disposables:this._store}))}installWebKitWriteTextWorkaround(){const e=()=>{const e=new ei.CR;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=e,navigator.clipboard.write([new ClipboardItem({"text/plain":e.p})]).catch((async t=>{t instanceof Error&&"NotAllowedError"===t.name&&e.isRejected||this.logService.error(t)}))};this._register(we.ju.runAndSubscribe(this.layoutService.onDidAddContainer,(({container:t,disposables:i})=>{i.add((0,_e.nm)(t,"click",e)),i.add((0,_e.nm)(t,"keydown",e))}),{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(this.writeResources([]),t)this.mapTextToType.set(t,e);else{if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await navigator.clipboard.writeText(e)}catch(e){console.error(e)}this.fallbackWriteText(e)}}fallbackWriteText(e){const t=(0,_e.uP)(),i=t.activeElement,n=t.body.appendChild((0,_e.$)("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"),i instanceof HTMLElement&&i.focus(),t.body.removeChild(n)}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await navigator.clipboard.readText()}catch(e){console.error(e)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}async writeResources(e){0===e.length?this.clearResources():(this.resources=e,this.resourcesStateHash=await this.computeResourcesStateHash())}async readResources(){const e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResources(),this.resources}async computeResourcesStateHash(){if(0===this.resources.length)return;const e=await this.readText();return(0,Bn.vp)(e.substring(0,vs.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearResources(){this.resources=[],this.resourcesStateHash=void 0}};bs.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3,bs=vs=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([_s(0,Ie),_s(1,Xe.VZ)],bs);var ws=i(84972),ys=i(53725),Cs=i(4767);const Ss="data-keybinding-context";class xs{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 this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}}class ks extends xs{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}ks.INSTANCE=new ks;class Ls extends xs{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=Cs.Id.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(7===e.source){const e=Array.from(this._values,(([e])=>e));this._values.clear(),i.fire(new Es(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...ys.$.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new Es(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(Ls._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(Ls._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}Ls._keyPrefix="config.";class Ns{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class Ds{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class Es{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 Is{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)))}}class Ts extends a.JT{constructor(e){super(),this._onDidChangeContext=this._register(new we.K3({merge:e=>new Is(e)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Ns(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 Rs(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)}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 Ds(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new Ds(e))}getContext(e){return this._isDisposed?ks.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(Ss)){const t=e.getAttribute(Ss);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}dispose(){super.dispose(),this._isDisposed=!0}}let Ms=class extends Ts{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const t=this._register(new Ls(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?ks.INSTANCE:this._contexts.get(e)||ks.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 xs(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};Ms=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,ee.Ui)],Ms);class Rs extends Ts{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new a.XK),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(Ss)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(Ss,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext((e=>{var t;t=this._parent.getContextValuesContainer(this._myContextId).value,e.allKeysContainedIn(new Set(Object.keys(t)))||this._onDidChangeContext.fire(e)}))}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(Ss),super.dispose())}getContextValuesContainer(e){return this._isDisposed?ks.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._isDisposed||this._parent.disposeContext(e)}}jt.P.registerCommand("_setContext",(function(e,t,i){e.get(xe.i6).createKey(String(t),function(e){return(0,N.rs)(e,(e=>"object"==typeof e&&1===e.$mid?d.o.revive(e).toString():e instanceof d.o?e.toString():void 0))}(i))})),jt.P.registerCommand({id:"getContextKeyInfo",handler:()=>[...xe.uy.all()].sort(((e,t)=>e.key.localeCompare(t.key))),metadata:{description:(0,Fe.NC)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),jt.P.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(const i of xe.uy.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));var As=i(97108);class Ps{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}}class Os{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())0===t.outgoing.size&&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 e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new Ps(t,e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t}\n\t(-> incoming)[${[...i.incoming.keys()].join(", ")}]\n\t(outgoing ->)[${[...i.outgoing.keys()].join(",")}]\n`);return e.join("\n")}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 e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}var Fs=i(60972);class Bs extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=null!==(t=e.findCycleSlow())&&void 0!==t?t:`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class Ws{constructor(e=new Fs.y,t=!1,i,n=!1){var o;this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._activeInstantiations=new Set,this._services.set(Ee.TG,this),this._globalGraph=n?null!==(o=null==i?void 0:i._globalGraph)&&void 0!==o?o:new Os((e=>e)):void 0}createChild(e){return new Ws(e,this._strict,this,this._enableTracing)}invokeFunction(e,...t){const i=Hs.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:e=>{if(n)throw(0,Pe.L6)("service accessor is only valid during the invocation of its target method");const t=this._getOrCreateServiceInstance(e,i);if(!t)throw new Error(`[invokeFunction] unknown service '${e}'`);return t}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof As.M?(i=Hs.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Hs.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=Ee.I8.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),o=[];for(const t of n){const n=this._getOrCreateServiceInstance(t.id,i);n||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`,!1),o.push(n)}const s=n.length>0?n[0].index:t.length;if(t.length!==s){console.trace(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${t.length} static arguments`);const i=s-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,s)}return Reflect.construct(e,t.concat(o))}_setServiceInstance(e,t){if(this._services.get(e)instanceof As.M)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_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 As.M?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){var n;const o=new Os((e=>e.id.toString()));let s=0;const r=[{id:e,desc:t,_trace:i}];for(;r.length;){const t=r.pop();if(o.lookupOrInsertNode(t),s++>1e3)throw new Bs(o);for(const i of Ee.I8.getServiceDependencies(t.desc.ctor)){const s=this._getServiceInstanceOrDescriptor(i.id);if(s||this._throwIfStrict(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`,!0),null===(n=this._globalGraph)||void 0===n||n.insertEdge(String(t.id),String(i.id)),s instanceof As.M){const e={id:i.id,desc:s,_trace:t._trace.branch(i.id,!0)};o.insertEdge(t,e),r.push(e)}}}for(;;){const e=o.roots();if(0===e.length){if(!o.isEmpty())throw new Bs(o);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof As.M){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}o.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,o){if(this._services.get(e)instanceof As.M)return this._createServiceInstance(e,t,i,n,o);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,o);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,o){if(n){const n=new Ws(void 0,this._strict,this,this._enableTracing);n._globalGraphImplicitDependency=String(e);const s=new Map,r=new ei.R5((()=>{const e=n._createInstance(t,i,o);for(const[t,i]of s){const n=e[t];if("function"==typeof n)for(const t of i)t.disposable=n.apply(e,t.listener)}return s.clear(),e}));return new Proxy(Object.create(null),{get(e,t){if(!r.isInitialized&&"string"==typeof t&&(t.startsWith("onDid")||t.startsWith("onWill"))){let e=s.get(t);return e||(e=new ye.S,s.set(t,e)),(i,n,o)=>{if(r.isInitialized)return r.value[t](i,n,o);{const t={listener:[i,n,o],disposable:void 0},s=e.push(t);return(0,a.OF)((()=>{var e;s(),null===(e=t.disposable)||void 0===e||e.dispose()}))}}}if(t in e)return e[t];const i=r.value;let n=i[t];return"function"!=typeof n||(n=n.bind(i),e[t]=n),n},set:(e,t,i)=>(r.value[t]=i,!0),getPrototypeOf:e=>t.prototype})}return this._createInstance(t,i,o)}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class Hs{static traceInvocation(e,t){return e?new Hs(2,t.name||(new Error).stack.split("\n").slice(3,4).join("\n")):Hs._None}static traceCreation(e,t){return e?new Hs(1,t.name):Hs._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new Hs(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;Hs._totals+=e;let t=!1;const i=[`${1===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){const o=[],s=new Array(i+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,o.push(`${s}CREATES -> ${r}`);const n=e(i+1,l);n&&o.push(n)}else o.push(`${s}uses -> ${r}`);return o.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Hs._totals.toFixed(2)}ms)`];(e>2||t)&&Hs.all.add(i.join("\n"))}}Hs.all=new Set,Hs._None=new class extends Hs{constructor(){super(0,null)}stop(){}branch(){return this}},Hs._totals=0;const Vs=new Set([be.lg.inMemory,be.lg.vscodeSourceControl,be.lg.walkThrough,be.lg.walkThroughSnippet]);class zs{constructor(){this._byResource=new Ut.Y9,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 o=this._byOwner.get(t);o||(o=new Ut.Y9,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){const i=this._byResource.get(e);return null==i?void 0:i.get(t)}delete(e,t){let i=!1,n=!1;const o=this._byResource.get(e);o&&(i=o.delete(t));const s=this._byOwner.get(t);if(s&&(n=s.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,o;return"string"==typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:ys.$.empty():d.o.isUri(e)?null!==(o=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==o?o:ys.$.empty():ys.$.map(ys.$.concat(...this._byOwner.values()),(e=>e[1]))}}class js{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Ut.Y9,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(Vs.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===Dn.ZL.Error?t.errors+=1:i===Dn.ZL.Warning?t.warnings+=1:i===Dn.ZL.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 Us{constructor(){this._onMarkerChanged=new we.D0({delay:0,merge:Us._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new zs,this._stats=new js(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if((0,De.XY)(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const o of i){const i=Us._toMarker(e,t,o);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:d,endColumn:c,relatedInformation:h,tags:u}=i;if(s)return a=a>0?a:1,l=l>0?l:1,d=d>=a?d:a,c=c>0?c:l,{resource:t,owner:e,code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:d,endColumn:c,relatedInformation:h,tags:u}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const t of n){const n=ys.$.first(t);n&&(i.push(n.resource),this._data.delete(n.resource,e))}if((0,De.Of)(t)){const n=new Ut.Y9;for(const{resource:o,marker:s}of t){const t=Us._toMarker(e,o,s);if(!t)continue;const r=n.get(o);r?r.push(t):(n.set(o,[t]),i.push(o))}for(const[t,i]of n)this._data.set(t,e,i)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(Us._accept(i,n)){const e=t.push(i);if(o>0&&e===o)break}return t}return[]}if(t||i){const e=this._data.values(null!=i?i:t),s=[];for(const t of e)for(const e of t)if(Us._accept(e,n)){const t=s.push(e);if(o>0&&t===o)return s}return s}{const e=[];for(const t of this._data.values())for(const i of t)if(Us._accept(i,n)){const t=e.push(i);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new Ut.Y9;for(const i of e)for(const e of i)t.set(e,!0);return Array.from(t.keys())}}class qs extends a.JT{constructor(){super(...arguments),this._configurationModel=new Zt}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new Zt;const e=$t.B.as(Kt.IP.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const e=i[n],o=t[n];void 0!==e?this._configurationModel.addValue(n,e):o?this._configurationModel.addValue(n,o.default):this._configurationModel.removeValue(n)}}}var Ks=i(38832);class $s extends a.JT{constructor(e,t=[]){super(),this.logger=new Xe.qA([e,...t]),this._register(e.onDidChangeLogLevel((e=>this.setLevel(e))))}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)}}var Gs=i(10637),Zs=i(48814),Qs=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ys=function(e,t){return function(i,n){t(i,n,e)}};class Js{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new we.Q5}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let Xs=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new a.Jz(new Js(t))):Promise.reject(new Error("Model not found"))}};Xs=Qs([Ys(0,W.q)],Xs);class er{show(){return er.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}}er.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class tr{info(e){return this.notify({severity:Oe.Z.Info,message:e})}warn(e){return this.notify({severity:Oe.Z.Warning,message:e})}error(e){return this.notify({severity:Oe.Z.Error,message:e})}notify(e){switch(e.severity){case Oe.Z.Error:console.error(e.message);break;case Oe.Z.Warning:console.warn(e.message);break;default:console.log(e.message)}return tr.NO_OP}prompt(e,t,i,n){return tr.NO_OP}status(e,t){return a.JT.None}}tr.NO_OP=new We.EO;let ir=class{constructor(e){this._onWillExecuteCommand=new we.Q5,this._onDidExecuteCommand=new we.Q5,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=jt.P.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(e){return Promise.reject(e)}}};ir=Qs([Ys(0,Ee.TG)],ir);let nr=class extends li{constructor(e,t,i,n,o,s){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const r=e=>{const t=new a.SL;t.add(_e.nm(e,_e.tw.KEY_DOWN,(e=>{const t=new It.y(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),t.add(_e.nm(e,_e.tw.KEY_UP,(e=>{const t=new It.y(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()}))),this._domNodeListeners.push(new or(e,t))},l=e=>{for(let t=0;t{e.getOption(61)||r(e.getContainerDomNode())};this._register(s.onCodeEditorAdd(d)),this._register(s.onCodeEditorRemove((e=>{e.getOption(61)||l(e.getContainerDomNode())}))),s.listCodeEditors().forEach(d);const c=e=>{r(e.getContainerDomNode())};this._register(s.onDiffEditorAdd(c)),this._register(s.onDiffEditorRemove((e=>{l(e.getContainerDomNode())}))),s.listDiffEditors().forEach(c)}addDynamicKeybinding(e,t,i,n){return(0,a.F8)(jt.P.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map((e=>{var t;return{keybinding:(0,Pt.Z9)(e.keybinding,St.OS),command:null!==(t=e.command)&&void 0!==t?t:null,commandArgs:e.commandArgs,when:e.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),(0,a.OF)((()=>{for(let e=0;ethis._log(e)))}return this._cachedResolver}_documentHasFocus(){return r.Ex.document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const o of e){const e=o.when||void 0,s=o.keybinding;if(s){const r=fi.resolveKeybinding(s,St.OS);for(const s of r)i[n++]=new hi(s,o.command,o.commandArgs,e,t,null,!1)}else i[n++]=new hi(void 0,o.command,o.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){const t=new Pt.$M(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new fi([t],St.OS)}};nr=Qs([Ys(0,xe.i6),Ys(1,jt.H),Ys(2,wi.b),Ys(3,We.lT),Ys(4,Xe.VZ),Ys(5,L.$)],nr);class or extends a.JT{constructor(e,t){super(),this.domNode=e,this._register(t)}}function sr(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof d.o)}class rr{constructor(){this._onDidChangeConfiguration=new we.Q5,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const e=new qs;this._configuration=new Jt(e.reload(),new Zt,new Zt,new Zt),e.dispose()}getValue(e,t){const i="string"==typeof e?e:void 0,n=sr(e)?e:sr(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const t of e){const[e,n]=t;this.getValue(e)!==n&&(this._configuration.updateValue(e,n),i.push(e))}if(i.length>0){const e=new Xt({keys:i,overrides:[]},t,this._configuration);e.source=8,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let ar=class{constructor(e,t,i){this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=new we.Q5,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=Wt.L.isIPosition(t)?t:null,o=n?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0,s=e?this.getLanguage(e,n):void 0;return void 0===o?this.configurationService.getValue({resource:e,overrideIdentifier:s}):this.configurationService.getValue(o,{resource:e,overrideIdentifier:s})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};ar=Qs([Ys(0,ee.Ui),Ys(1,W.q),Ys(2,A.O)],ar);let lr=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"string"==typeof i&&"auto"!==i?i:St.IJ||St.dz?"\n":"\r\n"}};lr=Qs([Ys(0,ee.Ui)],lr);class dr{constructor(){const e=d.o.from({scheme:dr.SCHEME,authority:"model",path:"/"});this.workspace={id:yi.p$,folders:[new yi.md({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===dr.SCHEME?this.workspace.folders[0]:null}}function cr(e,t,i){if(!t)return;if(!(e instanceof rr))return;const n=[];Object.keys(t).forEach((e=>{(0,Ft.ei)(e)&&n.push([`editor.${e}`,t[e]]),i&&(0,Ft.Pe)(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}dr.SCHEME="inmemory";let hr=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:Ot.fo.convert(e),n=new Map;for(const e of i){if(!(e instanceof Ot.Gl))throw new Error("bad edit - only text edits are supported");const t=this._modelService.getModel(e.resource);if(!t)throw new Error("bad edit - model not found");if("number"==typeof e.versionId&&t.getVersionId()!==e.versionId)throw new Error("bad state - model changed in the meantime");let i=n.get(t);i||(i=[],n.set(t,i)),i.push(Bt.h.replaceMove(Ht.e.lift(e.textEdit.range),e.textEdit.text))}let o=0,s=0;for(const[e,t]of n)e.pushStackElement(),e.pushEditOperations([],t,(()=>[])),e.pushStackElement(),s+=1,o+=t.length;return{ariaSummary:l.WU(Ci.iN.bulkEditServiceSummary,o,s),isApplied:o>0}}};hr=Qs([Ys(0,W.q)],hr);let ur=class extends Mi{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const e=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();e&&(t=e.getContainerDomNode())}return super.showContextView(e,t,i)}};ur=Qs([Ys(0,Ie),Ys(1,L.$)],ur);let gr=class extends vn{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s),this.configure({blockMouse:!1})}};var pr;gr=Qs([Ys(0,wi.b),Ys(1,We.lT),Ys(2,pt.u),Ys(3,vt.d),Ys(4,Zi.co),Ys(5,xe.i6)],gr),(0,ke.z)(ee.Ui,rr,0),(0,ke.z)(zt.V,ar,0),(0,ke.z)(zt.y,lr,0),(0,ke.z)(yi.ec,dr,0),(0,ke.z)(_i.e,class{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}getUriBasenameLabel(e){return(0,Si.EZ)(e)}},0),(0,ke.z)(wi.b,class{publicLog2(){}},0),(0,ke.z)(Be.S,class{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let i=e;return t&&(i=i+"\n\n"+t),r.Ex.confirm(i)}async prompt(e){var t,i;let n;if(this.doConfirm(e.message,e.detail)){const o=[...null!==(t=e.buttons)&&void 0!==t?t:[]];e.cancelButton&&"string"!=typeof e.cancelButton&&"boolean"!=typeof e.cancelButton&&o.push(e.cancelButton),n=await(null===(i=o[0])||void 0===i?void 0:i.run({checkboxChecked:!1}))}return{result:n}}async error(e,t){await this.prompt({type:Oe.Z.Error,message:e,detail:t})}},0),(0,ke.z)(Zs.Y,class{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}},0),(0,ke.z)(We.lT,tr,0),(0,ke.z)(Dn.lT,Us,0),(0,ke.z)(A.O,class extends qi{constructor(){super()}},0),(0,ke.z)(os.Z,ns.nI,0),(0,ke.z)(Xe.VZ,class extends $s{constructor(){super(new Xe.kw)}},0),(0,ke.z)(W.q,qn,0),(0,ke.z)(Pn.i,Mn,0),(0,ke.z)(xe.i6,Ms,0),(0,ke.z)(bi.R9,class{withProgress(e,t,i){return t({report:()=>{}})}},0),(0,ke.z)(bi.ek,er,0),(0,ke.z)(ds.Uy,ds.vm,0),(0,ke.z)(Nn.p,D.eu,0),(0,ke.z)(Ot.vu,hr,0),(0,ke.z)(xi.Y,class{constructor(){this._neverEmitter=new we.Q5,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},0),(0,ke.z)(Vt.S,Xs,0),(0,ke.z)(xt.F,rs,0),(0,ke.z)(Zn.Lw,Zn.XN,0),(0,ke.z)(jt.H,ir,0),(0,ke.z)(vt.d,nr,0),(0,ke.z)(Yn.eJ,es,0),(0,ke.z)(pt.u,ur,0),(0,ke.z)(wt.v,Ln,0),(0,ke.z)(ws.p,bs,0),(0,ke.z)(pt.i,gr,0),(0,ke.z)(Zi.co,us,0),(0,ke.z)(Ks.IV,class{async playSignal(e,t){}},0),function(e){const t=new Fs.y;for(const[e,i]of(0,ke.d)())t.set(e,i);const i=new Ws(t,!0);t.set(Ee.TG,i),e.get=function(e){n||s({});const o=t.get(e);if(!o)throw new Error("Missing service "+e);return o instanceof As.M?i.invokeFunction((t=>t.get(e))):o};let n=!1;const o=new we.Q5;function s(e){if(n)return i;n=!0;for(const[e,i]of(0,ke.d)())t.get(e)||t.set(e,i);for(const i in e)if(e.hasOwnProperty(i)){const n=(0,Ee.yh)(i);t.get(n)instanceof As.M&&t.set(n,e[i])}const s=(0,Gs.n)();for(const e of s)try{i.createInstance(e)}catch(e){(0,Pe.dL)(e)}return o.fire(),i}e.initialize=s,e.withServices=function(e){if(n)return e();const t=new a.SL,i=t.add(o.event((()=>{i.dispose(),t.add(e())})));return t}}(pr||(pr={}));var mr=i(48728),fr=i(17057),vr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_r=function(e,t){return function(i,n){t(i,n,e)}};let br=0,wr=!1,yr=class extends fe.Gm{constructor(e,t,i,n,o,s,a,l,d,c,h,u){const g={...t};g.ariaLabel=g.ariaLabel||Ci.B8.editorViewAccessibleLabel,g.ariaLabel=g.ariaLabel+";"+Ci.B8.accessibilityHelpMessage,super(e,g,{},i,n,o,s,l,d,c,h,u),this._standaloneKeybindingService=a instanceof nr?a:null,function(e){if(!e){if(wr)return;wr=!0}me.wW(e||r.Ex.document.body)}(g.ariaContainerElement),(0,fr.r)(((e,t)=>i.createInstance(gt,e,t,{})))}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_"+ ++br,o=xe.Ao.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,o),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)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"),a.JT.None;const t=e.id,i=e.label,n=xe.Ao.and(xe.Ao.equals("editorId",this.getId()),xe.Ao.deserialize(e.precondition)),o=e.keybindings,s=xe.Ao.and(n,xe.Ao.deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,d=(t,...i)=>Promise.resolve(e.run(this,...i)),c=new a.SL,h=this.getId()+":"+t;if(c.add(jt.P.registerCommand(h,d)),r){const e={command:{id:h,title:i},when:n,group:r,order:l};c.add(Zi.BH.appendMenuItem(Zi.eH.EditorContext,e))}if(Array.isArray(o))for(const e of o)c.add(this._standaloneKeybindingService.addDynamicKeybinding(h,e,d,s));const u=new ve.p(h,i,i,void 0,n,((...t)=>Promise.resolve(e.run(this,...t))),this._contextKeyService);return this._actions.set(t,u),c.add((0,a.OF)((()=>{this._actions.delete(t)}))),c}_triggerCommand(e,t){if(this._codeEditorService instanceof Ne)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};yr=vr([_r(2,Ee.TG),_r(3,L.$),_r(4,jt.H),_r(5,xe.i6),_r(6,vt.d),_r(7,Ce.XE),_r(8,We.lT),_r(9,xt.F),_r(10,P.c_),_r(11,dt.p)],yr);let Cr=class extends yr{constructor(e,t,i,n,o,s,r,a,l,d,c,h,u,g,p){const m={...t};cr(d,m,!1);const f=a.registerEditorContainer(e);"string"==typeof m.theme&&a.setTheme(m.theme),void 0!==m.autoDetectHighContrast&&a.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));const v=m.model;let _;if(delete m.model,super(e,m,i,n,o,s,r,a,l,c,g,p),this._configurationService=d,this._standaloneThemeService=a,this._register(f),void 0===v){const e=u.getLanguageIdByMimeType(m.language)||m.language||O.bd;_=xr(h,u,m.value||"",e,void 0),this._ownsModel=!0}else _=v,this._ownsModel=!1;if(this._attachModel(_),_){const e={oldModelUrl:null,newModelUrl:_.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){cr(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};Cr=vr([_r(2,Ee.TG),_r(3,L.$),_r(4,jt.H),_r(5,xe.i6),_r(6,vt.d),_r(7,os.Z),_r(8,We.lT),_r(9,ee.Ui),_r(10,xt.F),_r(11,W.q),_r(12,A.O),_r(13,P.c_),_r(14,dt.p)],Cr);let Sr=class extends mr.p{constructor(e,t,i,n,o,s,r,a,l,d,c,h){const u={...t};cr(a,u,!0);const g=s.registerEditorContainer(e);"string"==typeof u.theme&&s.setTheme(u.theme),void 0!==u.autoDetectHighContrast&&s.setAutoDetectHighContrast(Boolean(u.autoDetectHighContrast)),super(e,u,{},n,i,o,h,d),this._configurationService=a,this._standaloneThemeService=s,this._register(g)}dispose(){super.dispose()}updateOptions(e){cr(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(yr,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)}};function xr(e,t,i,n,o){if(i=i||"",!n){const n=i.indexOf("\n");let s=i;return-1!==n&&(s=i.substring(0,n)),kr(e,i,t.createByFilepathOrFirstLine(o||null,s),o)}return kr(e,i,t.createById(n),o)}function kr(e,t,i,n){return e.createModel(t,i,n)}Sr=vr([_r(2,Ee.TG),_r(3,xe.i6),_r(4,L.$),_r(5,os.Z),_r(6,We.lT),_r(7,ee.Ui),_r(8,pt.i),_r(9,bi.ek),_r(10,ws.p),_r(11,Ks.IV)],Sr);var Lr=i(21070),Nr=i(15512),Dr=i(35534),Er=i(96512),Ir=i(76633),Tr=i(86508),Mr={};Mr.styleTagTransform=y(),Mr.setAttributes=v(),Mr.insert=m().bind(null,"head"),Mr.domAPI=g(),Mr.insertStyleElement=b(),h()(Tr.Z,Mr),Tr.Z&&Tr.Z.locals&&Tr.Z.locals;var Rr=i(19247),Ar=i(3860),Pr=i(29102),Or=i(75194);class Fr extends $i.Wi{constructor(e){super(),this._getContext=e}runAction(e,t){return super.runAction(e,this._getContext())}}class Br{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}}let Wr=class extends a.JT{constructor(e,t,i,n){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=(0,Er.uh)(this,void 0),this._collapsed=(0,Lr.nK)(this,(e=>{var t;return null===(t=this._viewModel.read(e))||void 0===t?void 0:t.collapsed.read(e)})),this._editorContentHeight=(0,Er.uh)(this,500),this.contentHeight=(0,Lr.nK)(this,(e=>(this._collapsed.read(e)?0:this._editorContentHeight.read(e))+this._outerEditorHeight)),this._modifiedContentWidth=(0,Er.uh)(this,0),this._modifiedWidth=(0,Er.uh)(this,0),this._originalContentWidth=(0,Er.uh)(this,0),this._originalWidth=(0,Er.uh)(this,0),this.maxScroll=(0,Lr.nK)(this,(e=>{const t=this._modifiedContentWidth.read(e)-this._modifiedWidth.read(e),i=this._originalContentWidth.read(e)-this._originalWidth.read(e);return t>i?{maxScroll:t,width:this._modifiedWidth.read(e)}:{maxScroll:i,width:this._originalWidth.read(e)}})),this._elements=(0,_e.h)("div.multiDiffEntry",[(0,_e.h)("div.header@header",[(0,_e.h)("div.header-content",[(0,_e.h)("div.collapse-button@collapseButton"),(0,_e.h)("div.file-path",[(0,_e.h)("div.title.modified.show-file-icons@primaryPath",[]),(0,_e.h)("div.status.deleted@status",["R"]),(0,_e.h)("div.title.original.show-file-icons@secondaryPath",[])]),(0,_e.h)("div.actions@actions")])]),(0,_e.h)("div.editorParent",[(0,_e.h)("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(mr.p,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=Hr(this.editor.getModifiedEditor()),this.isOriginalFocused=Hr(this.editor.getOriginalEditor()),this.isFocused=(0,Lr.nK)(this,(e=>this.isModifedFocused.read(e)||this.isOriginalFocused.read(e))),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=new a.SL,this._headerHeight=48,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const o=new Ro.z(this._elements.collapseButton,{});this._register((0,Lr.EH)((e=>{o.element.className="",o.icon=this._collapsed.read(e)?nn.l.chevronRight:nn.l.chevronDown}))),this._register(o.onDidClick((()=>{var e;null===(e=this._viewModel.get())||void 0===e||e.collapsed.set(!this._collapsed.get(),void 0)}))),this._register((0,Lr.EH)((e=>{this._elements.editor.style.display=this._collapsed.read(e)?"none":"block"}))),this._register(this.editor.getModifiedEditor().onDidLayoutChange((e=>{const t=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(t,void 0)}))),this._register(this.editor.getOriginalEditor().onDidLayoutChange((e=>{const t=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(t,void 0)}))),this._register(this.editor.onDidContentSizeChange((e=>{(0,Er.Bl)((t=>{this._editorContentHeight.set(e.contentHeight,t),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),t),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),t)}))}))),this._register(this.editor.getOriginalEditor().onDidScrollChange((e=>{if(this._isSettingScrollTop)return;if(!e.scrollTopChanged||!this._data)return;const t=e.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(t)}))),this._register((0,Lr.EH)((e=>{const t=this.isFocused.read(e);this._elements.root.classList.toggle("focused",t)}))),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._register(this._instantiationService.createInstance(Or.r,this._elements.actions,Zi.eH.MultiDiffEditorFileToolbar,{actionRunner:this._register(new Fr((()=>{var e;return null===(e=this._viewModel.get())||void 0===e?void 0:e.modifiedUri}))),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("navigation")},actionViewItemProvider:(e,t)=>(0,Gi.Id)(n,e,t)}))}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){function t(e){return{...e,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}this._data=e;const i=e.viewModel.entry.value;i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange((()=>{var e;this.editor.updateOptions(t(null!==(e=i.options)&&void 0!==e?e:{}))}))),(0,Er.Bl)((n=>{var o,s,r,a;null===(o=this._resourceLabel)||void 0===o||o.setUri(null!==(s=e.viewModel.modifiedUri)&&void 0!==s?s:e.viewModel.originalUri,{strikethrough:void 0===e.viewModel.modifiedUri});let l=!1,d=!1,c=!1,h="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(h="R",l=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(h="A",c=!0):(h="D",d=!0),this._elements.status.classList.toggle("renamed",l),this._elements.status.classList.toggle("deleted",d),this._elements.status.classList.toggle("added",c),this._elements.status.innerText=h,null===(r=this._resourceLabel2)||void 0===r||r.setUri(l?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,n),this.editor.setModel(e.viewModel.diffEditorViewModel,n),this.editor.updateOptions(t(null!==(a=i.options)&&void 0!==a?a:{}))}))}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 o=e.length-this._headerHeight,s=Math.max(0,Math.min(n.start-e.start,o));this._elements.header.style.transform=`translateY(${s}px)`,(0,Er.Bl)((i=>{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",s>0||i>0),this._elements.header.classList.toggle("collapsed",s===o)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};function Hr(e){return(0,Lr.rD)((t=>{const i=new a.SL;return i.add(e.onDidFocusEditorWidget((()=>t(!0)))),i.add(e.onDidBlurEditorWidget((()=>t(!1)))),i}),(()=>e.hasWidgetFocus()))}Wr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,Ee.TG)],Wr);class Vr{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){var t;let i;if(0===this._unused.size)i=this._create(e),this._itemData.set(i,e);else{const n=[...this._unused.values()];i=null!==(t=n.find((t=>this._itemData.get(t).getId()===e.getId())))&&void 0!==t?t:n[0],this._unused.delete(i),this._itemData.set(i,e),i.setData(e)}return this._used.add(i),{object:i,dispose:()=>{this._used.delete(i),this._unused.size>5?i.dispose():this._unused.add(i)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var zr=function(e,t){return function(i,n){t(i,n,e)}};let jr=class extends a.JT{constructor(e,t,i,n,o,s){super(),this._element=e,this._dimension=t,this._viewModel=i,this._workbenchUIElementFactory=n,this._parentContextKeyService=o,this._parentInstantiationService=s,this._elements=(0,_e.h)("div.monaco-component.multiDiffEditor",[(0,_e.h)("div@content",{style:{overflow:"hidden"}}),(0,_e.h)("div.monaco-editor@overflowWidgetsDomNode",{})]),this._sizeObserver=this._register(new Nr.DU(this._element,void 0)),this._objectPool=this._register(new Vr((e=>{const t=this._instantiationService.createInstance(Wr,this._elements.content,this._elements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return t.setData(e),t}))),this._scrollable=this._register(new Ir.Rm({forceIntegerValues:!1,scheduleAtNextAnimationFrame:e=>(0,_e.jL)((0,_e.Jj)(this._element),e),smoothScrollDuration:100})),this._scrollableElement=this._register(new tn.$Z(this._elements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this.scrollTop=(0,Lr.rD)(this._scrollableElement.onScroll,(()=>this._scrollableElement.getScrollPosition().scrollTop)),this.scrollLeft=(0,Lr.rD)(this._scrollableElement.onScroll,(()=>this._scrollableElement.getScrollPosition().scrollLeft)),this._viewItems=(0,Lr.Be)(this,((e,t)=>{const i=this._viewModel.read(e);return i?i.items.read(e).map((e=>{var i;const n=t.add(new Ur(e,this._objectPool,this.scrollLeft,(e=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+e})}))),o=null===(i=this._lastDocStates)||void 0===i?void 0:i[n.getKey()];return o&&(0,Er.PS)((e=>{n.setViewState(o,e)})),n})):[]})),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,((e,t)=>e.reduce(((e,i)=>e+i.contentHeight.read(t)+this._spaceBetweenPx),0))),this.activeDiffItem=(0,Lr.nK)(this,(e=>this._viewItems.read(e).find((t=>{var i;return null===(i=t.template.read(e))||void 0===i?void 0:i.isFocused.read(e)})))),this.lastActiveDiffItem=(0,Lr.bx)(((e,t)=>{var i;return null!==(i=this.activeDiffItem.read(e))&&void 0!==i?i:t})),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._parentInstantiationService.createChild(new Fs.y([xe.i6,this._contextKeyService])),this._lastDocStates={},this._contextKeyService.createKey(Pr.u.inMultiDiffEditor.key,!0),this._register((0,Lr.gp)(((e,t)=>{const i=this._viewModel.read(e);if(i&&i.contextKeys)for(const[e,n]of Object.entries(i.contextKeys)){const i=this._contextKeyService.createKey(e,void 0);i.set(n),t.add((0,a.OF)((()=>i.reset())))}})));const r=this._parentContextKeyService.createKey(Pr.u.multiDiffEditorAllCollapsed.key,!1);this._register((0,Lr.EH)((e=>{const t=this._viewModel.read(e);if(t){const i=t.items.read(e).every((t=>t.collapsed.read(e)));r.set(i)}}))),this._register((0,Lr.EH)((e=>{const t=this.lastActiveDiffItem.read(e);(0,Er.PS)((i=>{var n;null===(n=this._viewModel.read(e))||void 0===n||n.activeDiffItem.set(null==t?void 0:t.viewModel,i)}))}))),this._register((0,Lr.EH)((e=>{const t=this._dimension.read(e);this._sizeObserver.observe(t)}))),this._elements.content.style.position="relative",this._register((0,Lr.EH)((e=>{const t=this._sizeObserver.height.read(e);this._elements.root.style.height=`${t}px`;const i=this._totalHeight.read(e);this._elements.content.style.height=`${i}px`;const n=this._sizeObserver.width.read(e);let o=n;const s=this._viewItems.read(e),r=(0,Dr.dI)(s,(t=>t.maxScroll.read(e).maxScroll));r&&(o=n+r.maxScroll.read(e).maxScroll),this._scrollableElement.setScrollDimensions({width:n,height:t,scrollHeight:i,scrollWidth:o})}))),e.replaceChildren(this._scrollableElement.getDomNode()),this._register((0,a.OF)((()=>{e.replaceChildren()}))),this._register(this._register((0,Lr.EH)((e=>{(0,Er.Bl)((t=>{this.render(e)}))}))))}render(e){const t=this.scrollTop.read(e);let i=0,n=0,o=0;const s=this._sizeObserver.height.read(e),r=Rr.q.ofStartAndLength(t,s),a=this._sizeObserver.width.read(e);for(const l of this._viewItems.read(e)){const d=l.contentHeight.read(e),c=Math.min(d,s),h=Rr.q.ofStartAndLength(n,c),u=Rr.q.ofStartAndLength(o,d);if(u.isBefore(r))i-=d-c,l.hide();else if(u.isAfter(r))l.hide();else{const e=Math.max(0,Math.min(r.start-u.start,d-c));i-=e;const n=Rr.q.ofStartAndLength(t+i,s);l.render(h,e,a,n)}n+=c+this._spaceBetweenPx,o+=d+this._spaceBetweenPx}this._elements.content.style.transform=`translateY(${-(t+i)}px)`}};jr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([zr(4,xe.i6),zr(5,Ee.TG)],jr);class Ur extends a.JT{constructor(e,t,i,n){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=i,this._deltaScrollVertical=n,this._templateRef=this._register((0,Er.DN)(this,void 0)),this.contentHeight=(0,Lr.nK)(this,(e=>{var t,i,n;return null!==(n=null===(i=null===(t=this._templateRef.read(e))||void 0===t?void 0:t.object.contentHeight)||void 0===i?void 0:i.read(e))&&void 0!==n?n:this.viewModel.lastTemplateData.read(e).contentHeight})),this.maxScroll=(0,Lr.nK)(this,(e=>{var t,i;return null!==(i=null===(t=this._templateRef.read(e))||void 0===t?void 0:t.object.maxScroll.read(e))&&void 0!==i?i:{maxScroll:0,scrollWidth:0}})),this.template=(0,Lr.nK)(this,(e=>{var t;return null===(t=this._templateRef.read(e))||void 0===t?void 0:t.object})),this._isHidden=(0,Lr.uh)(this,!1),this._register((0,Lr.EH)((e=>{var t;const i=this._scrollLeft.read(e);null===(t=this._templateRef.read(e))||void 0===t||t.object.setScrollLeft(i)}))),this._register((0,Lr.EH)((e=>{const t=this._templateRef.read(e);t&&this._isHidden.read(e)&&(t.object.isFocused.read(e)||this._clear())})))}dispose(){this._clear(),super.dispose()}toString(){var e;return`VirtualViewItem(${null===(e=this.viewModel.entry.value.modified)||void 0===e?void 0:e.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){var i;this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);const n=this.viewModel.lastTemplateData.get(),o=null===(i=e.selections)||void 0===i?void 0:i.map(Ar.Y.liftSelection);this.viewModel.lastTemplateData.set({...n,selections:o},t);const s=this._templateRef.get();s&&o&&s.object.editor.setSelections(o)}_updateTemplateData(e){var t;const i=this._templateRef.get();i&&this.viewModel.lastTemplateData.set({contentHeight:i.object.contentHeight.get(),selections:null!==(t=i.object.editor.getSelections())&&void 0!==t?t:void 0},e)}_clear(){const e=this._templateRef.get();e&&(0,Er.PS)((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 o=this._templateRef.get();if(!o){o=this._objectPool.getUnusedObj(new Br(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(o,void 0);const e=this.viewModel.lastTemplateData.get().selections;e&&o.object.editor.setSelections(e)}o.object.render(e,i,t,n)}}(0,ct.P6G)("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},(0,Fe.NC)("multiDiffEditor.headerBackground","The background color of the diff editor's header")),(0,ct.P6G)("multiDiffEditor.background",{dark:"editorBackground",light:"editorBackground",hcDark:"editorBackground",hcLight:"editorBackground"},(0,Fe.NC)("multiDiffEditor.background","The background color of the multi file diff editor")),(0,ct.P6G)("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},(0,Fe.NC)("multiDiffEditor.border","The border color of the multi file diff editor"));let qr=class extends a.JT{constructor(e,t,i){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=i,this._dimension=(0,Lr.uh)(this,void 0),this._viewModel=(0,Lr.uh)(this,void 0),this._widgetImpl=(0,Lr.Be)(this,((e,t)=>((0,Nr.NW)(Wr,e),t.add(this._instantiationService.createInstance((0,Nr.NW)(jr,e),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory))))),this._register((0,Lr.jx)(this._widgetImpl))}};function Kr(e){const t=pr.get(vt.d);return t instanceof nr?t.addDynamicKeybindings(e.map((e=>({keybinding:e.keybinding,command:e.command,commandArgs:e.commandArgs,when:xe.Ao.deserialize(e.when)})))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),a.JT.None)}qr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(2,Ee.TG)],qr);var $r=i(41264);function Gr(e,t){return"boolean"==typeof e?e:t}function Zr(e,t){return"string"==typeof e?e:t}function Qr(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=function(e){const t={};for(const i of e)t[i]=!0;return t}(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function Yr(e,t){t=t.replace(/@@/g,"");let i,n=0;do{i=!1,t=t.replace(/@(\w+)/g,(function(n,o){i=!0;let s="";if("string"==typeof e[o])s=e[o];else{if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?Q(e,"language definition does not contain attribute '"+o+"', used at: "+t):Q(e,"attribute reference '"+o+"' must be a string, used at: "+t);s=e[o].source}return $(s)?"":"(?:"+s+")"})),n++}while(i&&n<5);t=t.replace(/\x01/g,"@");const o=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,o)}function Jr(e,t,i,n){let o=-1,s=i,r=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);r&&(r[3]&&(o=parseInt(r[3]),r[2]&&(o+=100)),s=r[4]);let a,l="~",d=s;if(s&&0!==s.length?/^\w*$/.test(d)?l="==":(r=s.match(/^(@|!@|~|!~|==|!=)(.*)$/),r&&(l=r[1],d=r[2])):(l="!=",d=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(d))if("@"===l||"!@"===l){const i=e[d];if(!i)throw Q(e,"the @ match target '"+d+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const e of t)if("string"!=typeof e)return!1;return!0}(0,i))throw Q(e,"the @ match target '"+d+"' must be an array of strings, in rule: "+t);const n=Qr(i,e.ignoreCase);a=function(e){return"@"===l?n(e):!n(e)}}else if("~"===l||"!~"===l)if(d.indexOf("$")<0){const t=Yr(e,"^"+d+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,i,n,o){return Yr(e,"^"+Y(e,d,i,n,o)+"$").test(t)};else if(d.indexOf("$")<0){const t=G(e,d);a=function(e){return"=="===l?e===t:e!==t}}else{const t=G(e,d);a=function(i,n,o,s,r){const a=Y(e,t,n,o,s);return"=="===l?i===a:i!==a}}else{const t=Qr(d.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===o?{name:i,value:n,test:function(e,t,i,n){return a(e,e,t,i,n)}}:{name:i,value:n,test:function(e,t,i,n){const s=function(e,t,i,n){if(n<0)return e;if(n=100){n-=100;const e=i.split(".");if(e.unshift(i),n=0&&(n.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw Q(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!=typeof i.next)throw Q(e,"the next state must be a string value in rule: "+t);{let o=i.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!function(e,t){let i=t;for(;i&&i.length>0;){if(e.stateNames[i])return!0;const t=i.lastIndexOf(".");i=t<0?null:i.substr(0,t)}return!1}(e,Y(e,o,"",[],""))))throw Q(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=o}}return"number"==typeof i.goBack&&(n.goBack=i.goBack),"string"==typeof i.switchTo&&(n.switchTo=i.switchTo),"string"==typeof i.log&&(n.log=i.log),"string"==typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){const n=[];for(let o=0,s=i.length;o0&&"^"===i[0],this.name=this.name+": "+i,this.regex=Yr(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=Xr(e,this.name,t)}}function ta(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");const i={};i.languageId=e,i.includeLF=Gr(t.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start="string"==typeof t.start?t.start:null,i.ignoreCase=Gr(t.ignoreCase,!1),i.unicode=Gr(t.unicode,!1),i.tokenPostfix=Zr(t.tokenPostfix,"."+i.languageId),i.defaultToken=Zr(t.defaultToken,"source"),i.usesEmbedded=!1;const n=t;function o(e,s,r){for(const a of r){let r=a.include;if(r){if("string"!=typeof r)throw Q(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw Q(i,"include target '"+r+"' is not defined at: "+e);o(e+"."+r,s,t.tokenizer[r])}else{const t=new ea(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw Q(i,"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: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw Q(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=Gr(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}s.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw Q(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(const e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){i.start||(i.start=e);const n=t.tokenizer[e];i.tokenizer[e]=new Array,o("tokenizer."+e,i.tokenizer[e],n)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw Q(i,"the 'brackets' attribute must be defined as an array")}else t.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 e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw Q(i,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof t.open||"string"!=typeof t.token||"string"!=typeof t.close)throw Q(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");s.push({token:t.token+i.tokenPostfix,open:G(i,t.open),close:G(i,t.close)})}return i.brackets=s,i.noThrow=!0,i}class ia{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if("function"==typeof this._actual.tokenize)return na.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 R.DI(n.tokens,n.endState)}}class na{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 o=0,s=e.length;o0&&o[s-1]===l)continue;let d=a.startIndex;0===e?d=0:d{const i=await Promise.resolve(t.create());return i?"function"==typeof i.getInitialState?sa(e,i):new le(pr.get(A.O),pr.get(os.Z),e,ta(e,i),pr.get(ee.Ui)):null}));return R.RW.registerFactory(e,i)}var aa=i(58823);o.BH.wrappingIndent.defaultValue=0,o.BH.glyphMargin.defaultValue=!1,o.BH.autoIndent.defaultValue=3,o.BH.overviewRulerLanes.defaultValue=2,aa.xC.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const la=(0,s.O)();la.editor={create:function(e,t,i){return pr.initialize(i||{}).createInstance(Cr,e,t)},getEditors:function(){return pr.get(L.$).listCodeEditors()},getDiffEditors:function(){return pr.get(L.$).listDiffEditors()},onDidCreateEditor:function(e){return pr.get(L.$).onCodeEditorAdd((t=>{e(t)}))},onDidCreateDiffEditor:function(e){return pr.get(L.$).onDiffEditorAdd((t=>{e(t)}))},createDiffEditor:function(e,t,i){return pr.initialize(i||{}).createInstance(Sr,e,t)},addCommand:function(e){if("string"!=typeof e.id||"function"!=typeof e.run)throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return jt.P.registerCommand(e.id,e.run)},addEditorAction:function(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const t=xe.Ao.deserialize(e.precondition),i=new a.SL;if(i.add(jt.P.registerCommand(e.id,((i,...n)=>k._l.runEditorCommand(i,n,t,((t,i,n)=>Promise.resolve(e.run(i,...n))))))),e.contextMenuGroupId){const n={command:{id:e.id,title:e.label},when:t,group:e.contextMenuGroupId,order:e.contextMenuOrder||0};i.add(Zi.BH.appendMenuItem(Zi.eH.EditorContext,n))}if(Array.isArray(e.keybindings)){const n=pr.get(vt.d);if(n instanceof nr){const o=xe.Ao.and(t,xe.Ao.deserialize(e.keybindingContext));i.add(n.addDynamicKeybindings(e.keybindings.map((t=>({keybinding:t,command:e.id,when:o})))))}else console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService")}return i},addKeybindingRule:function(e){return Kr([e])},addKeybindingRules:Kr,createModel:function(e,t,i){const n=pr.get(A.O),o=n.getLanguageIdByMimeType(t)||t;return xr(pr.get(W.q),n,e,o,i)},setModelLanguage:function(e,t){const i=pr.get(A.O),n=i.getLanguageIdByMimeType(t)||t||O.bd;e.setLanguage(i.createById(n))},setModelMarkers:function(e,t,i){e&&pr.get(Dn.lT).changeOne(t,e.uri,i)},getModelMarkers:function(e){return pr.get(Dn.lT).read(e)},removeAllMarkers:function(e){pr.get(Dn.lT).changeAll(e,[])},onDidChangeMarkers:function(e){return pr.get(Dn.lT).onMarkerChanged(e)},getModels:function(){return pr.get(W.q).getModels()},getModel:function(e){return pr.get(W.q).getModel(e)},onDidCreateModel:function(e){return pr.get(W.q).onModelAdded(e)},onWillDisposeModel:function(e){return pr.get(W.q).onModelRemoved(e)},onDidChangeModelLanguage:function(e){return pr.get(W.q).onModelLanguageChanged((t=>{e({model:t.model,oldLanguage:t.oldLanguageId})}))},createWebWorker:function(e){return function(e,t,i){return new E(e,t,i)}(pr.get(W.q),pr.get(P.c_),e)},colorizeElement:function(e,t){const i=pr.get(A.O),n=pr.get(os.Z);return ge.colorizeElement(n,i,e,t).then((()=>{n.registerEditorContainer(e)}))},colorize:function(e,t,i){const n=pr.get(A.O);return pr.get(os.Z).registerEditorContainer(r.Ex.document.body),ge.colorize(n,e,t,i)},colorizeModelLine:function(e,t,i=4){return pr.get(os.Z).registerEditorContainer(r.Ex.document.body),ge.colorizeModelLine(e,t,i)},tokenize:function(e,t){R.RW.getOrCreate(t);const i=(s=t,R.RW.get(s)||{getInitialState:()=>F.TJ,tokenize:(e,t,i)=>(0,F.Ri)(s,i)}),n=(0,l.uq)(e),o=[];var s;let r=i.getInitialState();for(let e=0,t=n.length;e("string"==typeof t&&(t=d.o.parse(t)),e.open(t))})},registerEditorOpener:function(e){return pr.get(L.$).registerCodeEditorOpenHandler((async(t,i,n)=>{var o;if(!i)return null;const s=null===(o=t.options)||void 0===o?void 0:o.selection;let r;return s&&"number"==typeof s.endLineNumber&&"number"==typeof s.endColumn?r=s:s&&(r={lineNumber:s.startLineNumber,column:s.startColumn}),await e.openCodeEditor(i,t.resource,r)?i:null}))},AccessibilitySupport:H.ao,ContentWidgetPositionPreference:H.r3,CursorChangeReason:H.Vi,DefaultEndOfLine:H._x,EditorAutoIndentStrategy:H.rf,EditorOption:H.wT,EndOfLinePreference:H.gm,EndOfLineSequence:H.jl,MinimapPosition:H.F5,MouseTargetType:H.MG,OverlayWidgetPositionPreference:H.E$,OverviewRulerLane:H.sh,GlyphMarginLane:H.U,RenderLineNumbersType:H.Lu,RenderMinimap:H.vQ,ScrollbarVisibility:H.g_,ScrollType:H.g4,TextEditorCursorBlinkingStyle:H.In,TextEditorCursorStyle:H.d2,TrackedRangeStickiness:H.OI,WrappingIndent:H.up,InjectedTextCursorStops:H.RM,PositionAffinity:H.py,ShowLightbulbIconMode:H.$r,ConfigurationChangedEvent:o.Bb,BareFontInfo:T.E4,FontInfo:T.pR,TextModelResolvedOptions:B.dJ,FindMatch:B.tk,ApplyUpdateResult:o.rk,EditorZoom:I.C,createMultiFileDiffEditor:function(e,t){const i=pr.initialize(t||{});return new qr(e,{},i)},EditorType:M.g,EditorOptions:o.BH},la.languages={register:function(e){O.dQ.registerLanguage(e)},getLanguages:function(){let e=[];return e=e.concat(O.dQ.getLanguages()),e},onLanguage:function(e,t){return pr.withServices((()=>{const i=pr.get(A.O).onDidRequestRichLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))},onLanguageEncountered:function(e,t){return pr.withServices((()=>{const i=pr.get(A.O).onDidRequestBasicLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))},getEncodedLanguageId:function(e){return pr.get(A.O).languageIdCodec.encodeLanguageId(e)},setLanguageConfiguration:function(e,t){if(!pr.get(A.O).isRegisteredLanguageId(e))throw new Error(`Cannot set configuration for unknown language ${e}`);return pr.get(P.c_).register(e,t,100)},setColorMap:function(e){const t=pr.get(os.Z);if(e){const i=[null];for(let t=1,n=e.length;tt}):R.RW.register(e,sa(e,t))},setMonarchTokensProvider:function(e,t){return oa(t)?ra(e,{create:()=>t}):R.RW.register(e,(t=>new le(pr.get(A.O),pr.get(os.Z),e,ta(e,t),pr.get(ee.Ui)))(t))},registerReferenceProvider:function(e,t){return pr.get(dt.p).referenceProvider.register(e,t)},registerRenameProvider:function(e,t){return pr.get(dt.p).renameProvider.register(e,t)},registerNewSymbolNameProvider:function(e,t){return pr.get(dt.p).newSymbolNamesProvider.register(e,t)},registerCompletionItemProvider:function(e,t){return pr.get(dt.p).completionProvider.register(e,t)},registerSignatureHelpProvider:function(e,t){return pr.get(dt.p).signatureHelpProvider.register(e,t)},registerHoverProvider:function(e,t){return pr.get(dt.p).hoverProvider.register(e,{provideHover:(e,i,n)=>{const o=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n)).then((e=>{if(e)return!e.range&&o&&(e.range=new Ht.e(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),e.range||(e.range=new Ht.e(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})},registerDocumentSymbolProvider:function(e,t){return pr.get(dt.p).documentSymbolProvider.register(e,t)},registerDocumentHighlightProvider:function(e,t){return pr.get(dt.p).documentHighlightProvider.register(e,t)},registerLinkedEditingRangeProvider:function(e,t){return pr.get(dt.p).linkedEditingRangeProvider.register(e,t)},registerDefinitionProvider:function(e,t){return pr.get(dt.p).definitionProvider.register(e,t)},registerImplementationProvider:function(e,t){return pr.get(dt.p).implementationProvider.register(e,t)},registerTypeDefinitionProvider:function(e,t){return pr.get(dt.p).typeDefinitionProvider.register(e,t)},registerCodeLensProvider:function(e,t){return pr.get(dt.p).codeLensProvider.register(e,t)},registerCodeActionProvider:function(e,t,i){return pr.get(dt.p).codeActionProvider.register(e,{providedCodeActionKinds:null==i?void 0:i.providedCodeActionKinds,documentation:null==i?void 0:i.documentation,provideCodeActions:(e,i,n,o)=>{const s=pr.get(Dn.lT).read({resource:e.uri}).filter((e=>Ht.e.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:s,only:n.only,trigger:n.trigger},o)},resolveCodeAction:t.resolveCodeAction})},registerDocumentFormattingEditProvider:function(e,t){return pr.get(dt.p).documentFormattingEditProvider.register(e,t)},registerDocumentRangeFormattingEditProvider:function(e,t){return pr.get(dt.p).documentRangeFormattingEditProvider.register(e,t)},registerOnTypeFormattingEditProvider:function(e,t){return pr.get(dt.p).onTypeFormattingEditProvider.register(e,t)},registerLinkProvider:function(e,t){return pr.get(dt.p).linkProvider.register(e,t)},registerColorProvider:function(e,t){return pr.get(dt.p).colorProvider.register(e,t)},registerFoldingRangeProvider:function(e,t){return pr.get(dt.p).foldingRangeProvider.register(e,t)},registerDeclarationProvider:function(e,t){return pr.get(dt.p).declarationProvider.register(e,t)},registerSelectionRangeProvider:function(e,t){return pr.get(dt.p).selectionRangeProvider.register(e,t)},registerDocumentSemanticTokensProvider:function(e,t){return pr.get(dt.p).documentSemanticTokensProvider.register(e,t)},registerDocumentRangeSemanticTokensProvider:function(e,t){return pr.get(dt.p).documentRangeSemanticTokensProvider.register(e,t)},registerInlineCompletionsProvider:function(e,t){return pr.get(dt.p).inlineCompletionsProvider.register(e,t)},registerInlineEditProvider:function(e,t){return pr.get(dt.p).inlineEditProvider.register(e,t)},registerInlayHintsProvider:function(e,t){return pr.get(dt.p).inlayHintsProvider.register(e,t)},DocumentHighlightKind:H.MY,CompletionItemKind:H.cm,CompletionItemTag:H.we,CompletionItemInsertTextRule:H.a7,SymbolKind:H.cR,SymbolTag:H.r4,IndentAction:H.wU,CompletionTriggerKind:H.Ij,SignatureHelpTriggerKind:H.WW,InlayHintKind:H.gl,InlineCompletionTriggerKind:H.bw,InlineEditTriggerKind:H.rn,CodeActionTriggerType:H.np,NewSymbolNameTag:H.w,FoldingRangeKind:R.AD,SelectedSuggestionInfo:R.ln};const da=la.CancellationTokenSource,ca=la.Emitter,ha=la.KeyCode,ua=la.KeyMod,ga=la.Position,pa=la.Range,ma=la.Selection,fa=la.SelectionDirection,va=la.MarkerSeverity,_a=la.MarkerTag,ba=la.Uri,wa=la.Token,ya=la.editor,Ca=la.languages,Sa=globalThis.MonacoEnvironment;var xa;((null==Sa?void 0:Sa.globalAPI)||"function"==typeof define&&i.amdO)&&(globalThis.monaco=la),void 0!==globalThis.require&&"function"==typeof globalThis.require.config&&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"]}),i(29126),i(89808),i(13598),i(52042),i(50497),i(11336),i(76334),i(30253),i(47940),i(18162),i(79556),i(56292),i(40605),i(30282),i(42429),i(24129),i(88765),i(43814),i(45067),i(21589),i(97820),i(40927),i(26220),i(1526),i(64091),i(40902),i(68423),i(17476),i(16745),i(43763),i(72323),i(46595),i(36831),i(66079),i(90158),i(38698),i(82665),i(51944),i(77365),i(37562),i(6595),i(75769),i(51714),i(86935),i(62893),i(27616),i(83335),i(46266),i(89723),i(55788),i(48746),i(94992),i(16563),i(57296),i(85098),i(83187),i(12026),i(76194),i(5566),i(26254),i(5734),i(40191),i(93127),i(34483),i(40840),i(37266),i(2375),i(96461),i(76628),i(40185),i(27776),i(28118),i(96337),i(87530),i(25929),i(17918),i(6205),i(46837),i(88307),i(39585),i(58203),i(67077),i(81905),i(94199),self.MonacoEnvironment=(xa={editorWorkerService:"editor.worker.js",css:"css.worker.js",html:"html.worker.js",json:"json.worker.js",typescript:"ts.worker.js",javascript:"ts.worker.js",less:"css.worker.js",scss:"css.worker.js",handlebars:"html.worker.js",razor:"html.worker.js"},{globalAPI:!1,getWorkerUrl:function(e,t){var n=i.p,o=(n?n.replace(/\/$/,"")+"/":"")+xa[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(o)){var s=String(window.location),r=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(o.substring(0,r.length)!==r){/^(\/\/)/.test(o)&&(o=window.location.protocol+o);var a=new Blob(["/*"+t+'*/importScripts("'+o+'");'],{type:"application/javascript"});return URL.createObjectURL(a)}}return o}});const ka=n},16268:(e,t,i)=>{"use strict";i.d(t,{$W:()=>m,Dt:()=>g,G6:()=>h,MG:()=>u,Pf:()=>d,i7:()=>c,ie:()=>r,uB:()=>s,vU:()=>l});var n=i(48906);class o{constructor(){this.mapWindowIdToZoomFactor=new Map}getZoomFactor(e){var t;return null!==(t=this.mapWindowIdToZoomFactor.get(this.getWindowId(e)))&&void 0!==t?t:1}getWindowId(e){return e.vscodeWindowId}}function s(e,t,i){"string"==typeof t&&(t=e.matchMedia(t)),t.addEventListener("change",i)}function r(e){return o.INSTANCE.getZoomFactor(e)}o.INSTANCE=new o;const a=navigator.userAgent,l=a.indexOf("Firefox")>=0,d=a.indexOf("AppleWebKit")>=0,c=a.indexOf("Chrome")>=0,h=!c&&a.indexOf("Safari")>=0,u=!c&&!h&&d,g=(a.indexOf("Electron/"),a.indexOf("Android")>=0);let p=!1;if("function"==typeof n.Ex.matchMedia){const e=n.Ex.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=n.Ex.matchMedia("(display-mode: fullscreen)");p=e.matches,s(n.Ex,e,(({matches:e})=>{p&&t.matches||(p=e)}))}function m(){return p}},10161:(e,t,i)=>{"use strict";i.d(t,{D:()=>r});var n=i(16268),o=i(48906),s=i(1432);const r={clipboard:{writeText:s.tY||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:s.tY||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:s.tY||n.$W()?0:navigator.keyboard||n.G6?1:2,touch:"ontouchstart"in o.Ex||navigator.maxTouchPoints>0,pointerEvents:o.Ex.PointerEvent&&("ontouchstart"in o.Ex||navigator.maxTouchPoints>0)}},23547:(e,t,i)=>{"use strict";i.d(t,{g:()=>n});const n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:i(81170).v.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}},65321:(e,t,i)=>{"use strict";i.d(t,{$:()=>Pe,$Z:()=>Fe,Ay:()=>te,Ce:()=>Ie,Cp:()=>Be,D6:()=>H,Dx:()=>W,FK:()=>G,GQ:()=>M,H9:()=>ne,I8:()=>K,If:()=>Z,Jc:()=>k,Jj:()=>v,N5:()=>be,OO:()=>ee,PO:()=>N,R3:()=>Ee,Ro:()=>z,Uh:()=>We,V3:()=>He,WN:()=>re,XT:()=>Ue,Xo:()=>x,ZY:()=>y,_0:()=>ke,_F:()=>qe,_h:()=>je,_q:()=>$e,aU:()=>le,b5:()=>oe,cl:()=>Ce,dS:()=>ce,dp:()=>U,e4:()=>De,ed:()=>C,eg:()=>Ge,ey:()=>L,fk:()=>fe,go:()=>Ne,h:()=>Qe,i:()=>q,iJ:()=>Oe,jL:()=>O,jg:()=>Y,jt:()=>Ve,lI:()=>P,mc:()=>Te,mu:()=>T,ne:()=>F,nm:()=>E,sQ:()=>Ke,se:()=>R,tw:()=>ye,uN:()=>ve,uP:()=>se,uU:()=>J,vL:()=>xe,vY:()=>ie,vd:()=>we,vx:()=>A,w:()=>$,wY:()=>ze,wn:()=>Q,xQ:()=>j,zB:()=>Se});var n=i(16268),o=i(10161),s=i(59069),r=i(7448),a=i(15393),l=i(17301),d=i(4669),c=i(70921),h=i(5976),u=i(66663),g=i(1432),p=i(89954),m=i(48906);const{registerWindow:f,getWindow:v,getDocument:_,getWindows:b,getWindowsCount:w,getWindowId:y,getWindowById:C,hasWindow:S,onDidRegisterWindow:x,onWillUnregisterWindow:k,onDidUnregisterWindow:L}=function(){const e=new Map;(0,m.HA)(m.Ex,1);const t={window:m.Ex,disposables:new h.SL};e.set(m.Ex.vscodeWindowId,t);const i=new d.Q5,n=new d.Q5,o=new d.Q5;return{onDidRegisterWindow:i.event,onWillUnregisterWindow:o.event,onDidUnregisterWindow:n.event,registerWindow(t){if(e.has(t.vscodeWindowId))return h.JT.None;const s=new h.SL,r={window:t,disposables:s.add(new h.SL)};return e.set(t.vscodeWindowId,r),s.add((0,h.OF)((()=>{e.delete(t.vscodeWindowId),n.fire(t)}))),s.add(E(t,ye.BEFORE_UNLOAD,(()=>{o.fire(t)}))),i.fire(r),s},getWindows:()=>e.values(),getWindowsCount:()=>e.size,getWindowId:e=>e.vscodeWindowId,hasWindow:t=>e.has(t),getWindowById:function(i,n){const o="number"==typeof i?e.get(i):void 0;return null!=o?o:n?t:void 0},getWindow(e){var t;const i=e;if(null===(t=null==i?void 0:i.ownerDocument)||void 0===t?void 0:t.defaultView)return i.ownerDocument.defaultView.window;const n=e;return(null==n?void 0:n.view)?n.view.window:m.Ex},getDocument:e=>v(e).document}}();function N(e){for(;e.firstChild;)e.firstChild.remove()}class D{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function E(e,t,i,n){return new D(e,t,i,n)}function I(e,t){return function(i){return t(new r.n(e,i))}}const T=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t?o=I(v(e),i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=function(e){return function(t){return e(new s.y(t))}}(i)),E(e,t,o,n)},M=function(e,t,i){return function(e,t,i){return E(e,g.gn&&o.D.pointerEvents?ye.POINTER_DOWN:ye.MOUSE_DOWN,t,i)}(e,I(v(e),t),i)};function R(e,t,i){return(0,a.y5)(e,t,i)}class A extends a.hF{constructor(e,t){super(e,t)}}let P,O;class F extends a.zh{constructor(e){super(),this.defaultTarget=e&&v(e)}cancelAndSet(e,t,i){return super.cancelAndSet(e,t,null!=i?i:this.defaultTarget)}}class B{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){(0,l.dL)(e)}}static sort(e,t){return t.priority-e.priority}}function W(e){return v(e).getComputedStyle(e,null)}function H(e,t){const i=v(e),n=i.document;if(e!==n.body)return new z(e.clientWidth,e.clientHeight);if(g.gn&&(null==i?void 0:i.visualViewport))return new z(i.visualViewport.width,i.visualViewport.height);if((null==i?void 0:i.innerWidth)&&i.innerHeight)return new z(i.innerWidth,i.innerHeight);if(n.body&&n.body.clientWidth&&n.body.clientHeight)return new z(n.body.clientWidth,n.body.clientHeight);if(n.documentElement&&n.documentElement.clientWidth&&n.documentElement.clientHeight)return new z(n.documentElement.clientWidth,n.documentElement.clientHeight);if(t)return H(t);throw new Error("Unable to figure out browser width and height")}!function(){const e=new Map,t=new Map,i=new Map,n=new Map;O=(o,s,r=0)=>{const a=y(o),l=new B(s,r);let d=e.get(a);return d||(d=[],e.set(a,d)),d.push(l),i.get(a)||(i.set(a,!0),o.requestAnimationFrame((()=>(o=>{var s;i.set(o,!1);const r=null!==(s=e.get(o))&&void 0!==s?s:[];for(t.set(o,r),e.set(o,[]),n.set(o,!0);r.length>0;)r.sort(B.sort),r.shift().execute();n.set(o,!1)})(a)))),l},P=(e,i,o)=>{const s=y(e);if(n.get(s)){const e=new B(i,o);let n=t.get(s);return n||(n=[],t.set(s,n)),n.push(e),e}return O(e,i,o)}}();class V{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){const n=W(e),o=n?n.getPropertyValue(t):"0";return V.convertToPixels(e,o)}static getBorderLeftWidth(e){return V.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return V.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return V.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return V.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return V.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return V.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return V.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return V.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return V.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return V.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return V.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return V.getDimension(e,"margin-bottom","marginBottom")}}class z{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new z(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof z?e:new z(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function j(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==e.ownerDocument.body&&e!==e.ownerDocument.documentElement;){i-=e.scrollTop;const o=X(e)?null:W(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=V.getBorderLeftWidth(e),i+=V.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function U(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)}function q(e){const t=e.getBoundingClientRect(),i=v(e);return{left:t.left+i.scrollX,top:t.top+i.scrollY,width:t.width,height:t.height}}function K(e){let t=e,i=1;do{const e=W(t).zoom;null!=e&&"1"!==e&&(i*=e),t=t.parentElement}while(null!==t&&t!==t.ownerDocument.documentElement);return i}function $(e){const t=V.getMarginLeft(e)+V.getMarginRight(e);return e.offsetWidth+t}function G(e){const t=V.getBorderLeftWidth(e)+V.getBorderRightWidth(e),i=V.getPaddingLeft(e)+V.getPaddingRight(e);return e.offsetWidth-t-i}function Z(e){const t=V.getBorderTopWidth(e)+V.getBorderBottomWidth(e),i=V.getPaddingTop(e)+V.getPaddingBottom(e);return e.offsetHeight-t-i}function Q(e){const t=V.getMarginTop(e)+V.getMarginBottom(e);return e.offsetHeight+t}function Y(e,t){return Boolean(null==t?void 0:t.contains(e))}function J(e,t,i){return!!function(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}(e,t,i)}function X(e){return e&&!!e.host&&!!e.mode}function ee(e){return!!te(e)}function te(e){for(var t;e.parentNode;){if(e===(null===(t=e.ownerDocument)||void 0===t?void 0:t.body))return null;e=e.parentNode}return X(e)?e:null}function ie(){let e=se().activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function ne(e){return ie()===e}function oe(e){return Y(ie(),e)}function se(){var e;return w()<=1?m.Ex.document:null!==(e=Array.from(b()).map((({window:e})=>e.document)).find((e=>e.hasFocus())))&&void 0!==e?e:m.Ex.document}function re(){var e,t;return null!==(t=null===(e=se().defaultView)||void 0===e?void 0:e.window)&&void 0!==t?t:m.Ex}z.None=new z(0,0);const ae=new Map;function le(){return new de}class de{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(e){e!==this._currentCssStyle&&(this._currentCssStyle=e,this._styleSheet?this._styleSheet.innerText=e:this._styleSheet=ce(m.Ex.document.head,(t=>t.innerText=e)))}dispose(){this._styleSheet&&(this._styleSheet.remove(),this._styleSheet=void 0)}}function ce(e=m.Ex.document.head,t,i){const n=document.createElement("style");if(n.type="text/css",n.media="screen",null==t||t(n),e.appendChild(n),i&&i.add((0,h.OF)((()=>e.removeChild(n)))),e===m.Ex.document.head){const e=new Set;ae.set(n,e);for(const{window:t,disposables:o}of b()){if(t===m.Ex)continue;const s=o.add(he(n,e,t));null==i||i.add(s)}}return n}function he(e,t,i){var n,o;const s=new h.SL,r=e.cloneNode(!0);i.document.head.appendChild(r),s.add((0,h.OF)((()=>i.document.head.removeChild(r))));for(const t of me(e))null===(n=r.sheet)||void 0===n||n.insertRule(t.cssText,null===(o=r.sheet)||void 0===o?void 0:o.cssRules.length);return s.add(ue.observe(e,s,{childList:!0})((()=>{r.textContent=e.textContent}))),t.add(r),s.add((0,h.OF)((()=>t.delete(r)))),s}const ue=new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let n=this.mutationObservers.get(e);n||(n=new Map,this.mutationObservers.set(e,n));const o=(0,p.vp)(i);let s=n.get(o);if(s)s.users+=1;else{const r=new d.Q5,a=new MutationObserver((e=>r.fire(e)));a.observe(e,i);const l=s={users:1,observer:a,onDidMutate:r.event};t.add((0,h.OF)((()=>{l.users-=1,0===l.users&&(r.dispose(),a.disconnect(),null==n||n.delete(o),0===(null==n?void 0:n.size)&&this.mutationObservers.delete(e))}))),n.set(o,s)}return s.onDidMutate}};let ge=null;function pe(){return ge||(ge=ce()),ge}function me(e){var t,i;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null==e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}function fe(e,t,i=pe()){var n,o;if(i&&t){null===(n=i.sheet)||void 0===n||n.insertRule(`${e} {${t}}`,0);for(const n of null!==(o=ae.get(i))&&void 0!==o?o:[])fe(e,t,n)}}function ve(e,t=pe()){var i,n;if(!t)return;const o=me(t),s=[];for(let t=0;t=0;e--)null===(i=t.sheet)||void 0===i||i.deleteRule(s[e]);for(const i of null!==(n=ae.get(t))&&void 0!==n?n:[])ve(e,i)}function _e(e){return"string"==typeof e.selectorText}function be(e){return e instanceof MouseEvent||e instanceof v(e).MouseEvent}function we(e){return e instanceof KeyboardEvent||e instanceof v(e).KeyboardEvent}const ye={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:n.Pf?"webkitAnimationStart":"animationstart",ANIMATION_END:n.Pf?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.Pf?"webkitAnimationIteration":"animationiteration"};function Ce(e){const t=e;return!(!t||"function"!=typeof t.preventDefault||"function"!=typeof t.stopPropagation)}const Se={stop:(e,t)=>(e.preventDefault(),t&&e.stopPropagation(),e)};function xe(e){const t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}function ke(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}class Le extends h.JT{static hasFocusWithin(e){if(e instanceof HTMLElement){const t=te(e);return Y(t?t.activeElement:e.ownerDocument.activeElement,e)}{const t=e;return Y(t.document.activeElement,t.document)}}constructor(e){super(),this._onDidFocus=this._register(new d.Q5),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new d.Q5),this.onDidBlur=this._onDidBlur.event;let t=Le.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(i=!0,(e instanceof HTMLElement?v(e):e).setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{Le.hasFocusWithin(e)!==t&&(t?o():n())},this._register(E(e,ye.FOCUS,n,!0)),this._register(E(e,ye.BLUR,o,!0)),e instanceof HTMLElement&&(this._register(E(e,ye.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(E(e,ye.FOCUS_OUT,(()=>this._refreshStateHandler()))))}}function Ne(e){return new Le(e)}function De(e,t){return e.after(t),t}function Ee(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function Ie(e,t){return e.insertBefore(t,e.firstChild),t}function Te(e,...t){e.innerText="",Ee(e,...t)}const Me=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Re;function Ae(e,t,i,...n){const o=Me.exec(t);if(!o)throw new Error("Bad use of emmet");const s=o[1]||"div";let r;return r=e!==Re.HTML?document.createElementNS(e,s):document.createElement(s),o[3]&&(r.id=o[3]),o[4]&&(r.className=o[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach((([e,t])=>{void 0!==t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...n),r}function Pe(e,t,...i){return Ae(Re.HTML,e,t,...i)}function Oe(e,...t){e?Fe(...t):Be(...t)}function Fe(...e){for(const t of e)t.style.display="",t.removeAttribute("aria-hidden")}function Be(...e){for(const t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function We(e,t){const i=e.devicePixelRatio*t;return Math.max(1,Math.floor(i))/e.devicePixelRatio}function He(e){m.Ex.open(e,"_blank","noopener")}function Ve(e,t){const i=()=>{t(),n=O(e,i)};let n=O(e,i);return(0,h.OF)((()=>n.dispose()))}function ze(e){return e?`url('${u.Gi.uriToBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function je(e){return`'${e.replace(/'/g,"%27")}'`}function Ue(e,t){if(void 0!==e){const i=e.match(/^\s*var\((.+)\)$/);if(i){const e=i[1].split(",",2);return 2===e.length&&(t=Ue(e[1].trim(),t)),`var(${e[0]}, ${t})`}return e}return t}function qe(e,t=!1){const i=document.createElement("a");return c.v5("afterSanitizeAttributes",(n=>{for(const o of["href","src"])if(n.hasAttribute(o)){const s=n.getAttribute(o);if("href"===o&&s.startsWith("#"))continue;if(i.href=s,!e.includes(i.protocol.replace(/:$/,""))){if(t&&"src"===o&&i.href.startsWith("data:"))continue;n.removeAttribute(o)}}})),(0,h.OF)((()=>{c.ok("afterSanitizeAttributes")}))}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(Re||(Re={})),Pe.SVG=function(e,t,...i){return Ae(Re.SVG,e,t,...i)},u.WX.setPreferredWebSchema(/^https:/.test(m.Ex.location.href)?"https":"http");const Ke=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","input","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0});class $e extends d.Q5{constructor(){super(),this._subscriptions=new h.SL,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(d.ju.runAndSubscribe(x,(({window:e,disposables:t})=>this.registerListeners(e,t)),{window:m.Ex,disposables:this._subscriptions}))}registerListeners(e,t){t.add(E(e,"keydown",(e=>{if(e.defaultPrevented)return;const t=new s.y(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),t.add(E(e,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),t.add(E(e.document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),t.add(E(e.document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),t.add(E(e.document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),t.add(E(e,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return $e.instance||($e.instance=new $e),$e.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class Ge extends h.JT{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(E(this.element,ye.DRAG_START,(e=>{var t,i;null===(i=(t=this.callbacks).onDragStart)||void 0===i||i.call(t,e)}))),this.callbacks.onDrag&&this._register(E(this.element,ye.DRAG,(e=>{var t,i;null===(i=(t=this.callbacks).onDrag)||void 0===i||i.call(t,e)}))),this._register(E(this.element,ye.DRAG_ENTER,(e=>{var t,i;this.counter++,this.dragStartTime=e.timeStamp,null===(i=(t=this.callbacks).onDragEnter)||void 0===i||i.call(t,e)}))),this._register(E(this.element,ye.DRAG_OVER,(e=>{var t,i;e.preventDefault(),null===(i=(t=this.callbacks).onDragOver)||void 0===i||i.call(t,e,e.timeStamp-this.dragStartTime)}))),this._register(E(this.element,ye.DRAG_LEAVE,(e=>{var t,i;this.counter--,0===this.counter&&(this.dragStartTime=0,null===(i=(t=this.callbacks).onDragLeave)||void 0===i||i.call(t,e))}))),this._register(E(this.element,ye.DRAG_END,(e=>{var t,i;this.counter=0,this.dragStartTime=0,null===(i=(t=this.callbacks).onDragEnd)||void 0===i||i.call(t,e)}))),this._register(E(this.element,ye.DROP,(e=>{var t,i;this.counter=0,this.dragStartTime=0,null===(i=(t=this.callbacks).onDrop)||void 0===i||i.call(t,e)})))}}const Ze=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function Qe(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const o=Ze.exec(e);if(!o||!o.groups)throw new Error("Bad use of h");const s=o.groups.tag||"div",r=document.createElement(s);o.groups.id&&(r.id=o.groups.id);const a=[];if(o.groups.class)for(const e of o.groups.class.split("."))""!==e&&a.push(e);if(void 0!==i.className)for(const e of i.className.split("."))""!==e&&a.push(e);a.length>0&&(r.className=a.join(" "));const l={};if(o.groups.name&&(l[o.groups.name]=r),n)for(const e of n)e instanceof HTMLElement?r.appendChild(e):"string"==typeof e?r.append(e):"root"in e&&(Object.assign(l,e),r.appendChild(e.root));for(const[e,t]of Object.entries(i))if("className"!==e)if("style"===e)for(const[e,i]of Object.entries(t))r.style.setProperty(Ye(e),"number"==typeof i?i+"px":""+i);else"tabIndex"===e?r.tabIndex=t:r.setAttribute(Ye(e),t.toString());return l.root=r,l}function Ye(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}},70921:(e,t,i)=>{"use strict";i.d(t,{Nw:()=>J,ok:()=>ee,v5:()=>X});const{entries:n,setPrototypeOf:o,isFrozen:s,getPrototypeOf:r,getOwnPropertyDescriptor:a}=Object;let{freeze:l,seal:d,create:c}=Object,{apply:h,construct:u}="undefined"!=typeof Reflect&&Reflect;h||(h=function(e,t,i){return e.apply(t,i)}),l||(l=function(e){return e}),d||(d=function(e){return e}),u||(u=function(e,t){return new e(...t)});const g=k(Array.prototype.forEach),p=k(Array.prototype.pop),m=k(Array.prototype.push),f=k(String.prototype.toLowerCase),v=k(String.prototype.toString),_=k(String.prototype.match),b=k(String.prototype.replace),w=k(String.prototype.indexOf),y=k(String.prototype.trim),C=k(RegExp.prototype.test),S=(x=TypeError,function(){for(var e=arguments.length,t=new Array(e),i=0;i1?i-1:0),o=1;o/gm),z=d(/\${[\w\W]*}/gm),j=d(/^data-[\-\w.\u00B7-\uFFFF]/),U=d(/^aria-[\-\w]+$/),q=d(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=d(/^(?:\w+script|data):/i),$=d(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G=d(/^html$/i);var Z=Object.freeze({__proto__:null,MUSTACHE_EXPR:H,ERB_EXPR:V,TMPLIT_EXPR:z,DATA_ATTR:j,ARIA_ATTR:U,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:$,DOCTYPE_NAME:G});const Q=()=>"undefined"==typeof window?null:window;var Y=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q();const i=t=>e(t);if(i.version="3.0.5",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;const o=t.document,s=o.currentScript;let{document:r}=t;const{DocumentFragment:a,HTMLTemplateElement:d,Node:c,Element:h,NodeFilter:u,NamedNodeMap:x=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:k,DOMParser:H,trustedTypes:V}=t,z=h.prototype,j=D(z,"cloneNode"),U=D(z,"nextSibling"),K=D(z,"childNodes"),$=D(z,"parentNode");if("function"==typeof d){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Y,J="";const{implementation:X,createNodeIterator:ee,createDocumentFragment:te,getElementsByTagName:ie}=r,{importNode:ne}=o;let oe={};i.isSupported="function"==typeof n&&"function"==typeof $&&X&&void 0!==X.createHTMLDocument;const{MUSTACHE_EXPR:se,ERB_EXPR:re,TMPLIT_EXPR:ae,DATA_ATTR:le,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:ce,ATTR_WHITESPACE:he}=Z;let{IS_ALLOWED_URI:ue}=Z,ge=null;const pe=L({},[...E,...I,...T,...R,...P]);let me=null;const fe=L({},[...O,...F,...B,...W]);let ve=Object.seal(Object.create(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}})),_e=null,be=null,we=!0,ye=!0,Ce=!1,Se=!0,xe=!1,ke=!1,Le=!1,Ne=!1,De=!1,Ee=!1,Ie=!1,Te=!0,Me=!1,Re=!0,Ae=!1,Pe={},Oe=null;const Fe=L({},["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 Be=null;const We=L({},["audio","video","img","source","image","track"]);let He=null;const Ve=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ze="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",Ue="http://www.w3.org/1999/xhtml";let qe=Ue,Ke=!1,$e=null;const Ge=L({},[ze,je,Ue],v);let Ze;const Qe=["application/xhtml+xml","text/html"];let Ye,Je=null;const Xe=r.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},tt=function(e){if(!Je||Je!==e){if(e&&"object"==typeof e||(e={}),e=N(e),Ze=Ze=-1===Qe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ye="application/xhtml+xml"===Ze?v:f,ge="ALLOWED_TAGS"in e?L({},e.ALLOWED_TAGS,Ye):pe,me="ALLOWED_ATTR"in e?L({},e.ALLOWED_ATTR,Ye):fe,$e="ALLOWED_NAMESPACES"in e?L({},e.ALLOWED_NAMESPACES,v):Ge,He="ADD_URI_SAFE_ATTR"in e?L(N(Ve),e.ADD_URI_SAFE_ATTR,Ye):Ve,Be="ADD_DATA_URI_TAGS"in e?L(N(We),e.ADD_DATA_URI_TAGS,Ye):We,Oe="FORBID_CONTENTS"in e?L({},e.FORBID_CONTENTS,Ye):Fe,_e="FORBID_TAGS"in e?L({},e.FORBID_TAGS,Ye):{},be="FORBID_ATTR"in e?L({},e.FORBID_ATTR,Ye):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,ye=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,xe=e.SAFE_FOR_TEMPLATES||!1,ke=e.WHOLE_DOCUMENT||!1,De=e.RETURN_DOM||!1,Ee=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,Te=!1!==e.SANITIZE_DOM,Me=e.SANITIZE_NAMED_PROPS||!1,Re=!1!==e.KEEP_CONTENT,Ae=e.IN_PLACE||!1,ue=e.ALLOWED_URI_REGEXP||q,qe=e.NAMESPACE||Ue,ve=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ve.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ve.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ve.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xe&&(ye=!1),Ee&&(De=!0),Pe&&(ge=L({},[...P]),me=[],!0===Pe.html&&(L(ge,E),L(me,O)),!0===Pe.svg&&(L(ge,I),L(me,F),L(me,W)),!0===Pe.svgFilters&&(L(ge,T),L(me,F),L(me,W)),!0===Pe.mathMl&&(L(ge,R),L(me,B),L(me,W))),e.ADD_TAGS&&(ge===pe&&(ge=N(ge)),L(ge,e.ADD_TAGS,Ye)),e.ADD_ATTR&&(me===fe&&(me=N(me)),L(me,e.ADD_ATTR,Ye)),e.ADD_URI_SAFE_ATTR&&L(He,e.ADD_URI_SAFE_ATTR,Ye),e.FORBID_CONTENTS&&(Oe===Fe&&(Oe=N(Oe)),L(Oe,e.FORBID_CONTENTS,Ye)),Re&&(ge["#text"]=!0),ke&&L(ge,["html","head","body"]),ge.table&&(L(ge,["tbody"]),delete _e.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Y=e.TRUSTED_TYPES_POLICY,J=Y.createHTML("")}else void 0===Y&&(Y=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));const o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(V,s)),null!==Y&&"string"==typeof J&&(J=Y.createHTML(""));l&&l(e),Je=e}},it=L({},["mi","mo","mn","ms","mtext"]),nt=L({},["foreignobject","desc","title","annotation-xml"]),ot=L({},["title","style","font","a","script"]),st=L({},I);L(st,T),L(st,M);const rt=L({},R);L(rt,A);const at=function(e){m(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},lt=function(e,t){try{m(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!me[e])if(De||Ee)try{at(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t,i;if(Ne)e=""+e;else{const t=_(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===Ze&&qe===Ue&&(e=''+e+"");const n=Y?Y.createHTML(e):e;if(qe===Ue)try{t=(new H).parseFromString(n,Ze)}catch(e){}if(!t||!t.documentElement){t=X.createDocument(qe,"template",null);try{t.documentElement.innerHTML=Ke?J:n}catch(e){}}const o=t.body||t.documentElement;return e&&i&&o.insertBefore(r.createTextNode(i),o.childNodes[0]||null),qe===Ue?ie.call(t,ke?"html":"body")[0]:ke?t.documentElement:o},ct=function(e){return ee.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},ht=function(e){return"object"==typeof c?e instanceof c:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ut=function(e,t,n){oe[e]&&g(oe[e],(e=>{e.call(i,t,n,Je)}))},gt=function(e){let t;if(ut("beforeSanitizeElements",e,null),(n=e)instanceof k&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof x)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return at(e),!0;var n;const o=Ye(e.nodeName);if(ut("uponSanitizeElement",e,{tagName:o,allowedTags:ge}),e.hasChildNodes()&&!ht(e.firstElementChild)&&(!ht(e.content)||!ht(e.content.firstElementChild))&&C(/<[/\w]/g,e.innerHTML)&&C(/<[/\w]/g,e.textContent))return at(e),!0;if(!ge[o]||_e[o]){if(!_e[o]&&mt(o)){if(ve.tagNameCheck instanceof RegExp&&C(ve.tagNameCheck,o))return!1;if(ve.tagNameCheck instanceof Function&&ve.tagNameCheck(o))return!1}if(Re&&!Oe[o]){const t=$(e)||e.parentNode,i=K(e)||e.childNodes;if(i&&t)for(let n=i.length-1;n>=0;--n)t.insertBefore(j(i[n],!0),U(e))}return at(e),!0}return e instanceof h&&!function(e){let t=$(e);t&&t.tagName||(t={namespaceURI:qe,tagName:"template"});const i=f(e.tagName),n=f(t.tagName);return!!$e[e.namespaceURI]&&(e.namespaceURI===je?t.namespaceURI===Ue?"svg"===i:t.namespaceURI===ze?"svg"===i&&("annotation-xml"===n||it[n]):Boolean(st[i]):e.namespaceURI===ze?t.namespaceURI===Ue?"math"===i:t.namespaceURI===je?"math"===i&&nt[n]:Boolean(rt[i]):e.namespaceURI===Ue?!(t.namespaceURI===je&&!nt[n])&&!(t.namespaceURI===ze&&!it[n])&&!rt[i]&&(ot[i]||!st[i]):!("application/xhtml+xml"!==Ze||!$e[e.namespaceURI]))}(e)?(at(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!C(/<\/no(script|embed|frames)/i,e.innerHTML)?(xe&&3===e.nodeType&&(t=e.textContent,t=b(t,se," "),t=b(t,re," "),t=b(t,ae," "),e.textContent!==t&&(m(i.removed,{element:e.cloneNode()}),e.textContent=t)),ut("afterSanitizeElements",e,null),!1):(at(e),!0)},pt=function(e,t,i){if(Te&&("id"===t||"name"===t)&&(i in r||i in Xe))return!1;if(ye&&!be[t]&&C(le,t));else if(we&&C(de,t));else if(!me[t]||be[t]){if(!(mt(e)&&(ve.tagNameCheck instanceof RegExp&&C(ve.tagNameCheck,e)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(e))&&(ve.attributeNameCheck instanceof RegExp&&C(ve.attributeNameCheck,t)||ve.attributeNameCheck instanceof Function&&ve.attributeNameCheck(t))||"is"===t&&ve.allowCustomizedBuiltInElements&&(ve.tagNameCheck instanceof RegExp&&C(ve.tagNameCheck,i)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(i))))return!1}else if(He[t]);else if(C(ue,b(i,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==w(i,"data:")||!Be[e])if(Ce&&!C(ce,b(i,he,"")));else if(i)return!1;return!0},mt=function(e){return e.indexOf("-")>0},ft=function(e){let t,n,o,s;ut("beforeSanitizeAttributes",e,null);const{attributes:r}=e;if(!r)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:me};for(s=r.length;s--;){t=r[s];const{name:l,namespaceURI:d}=t;if(n="value"===l?t.value:y(t.value),o=Ye(l),a.attrName=o,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,ut("uponSanitizeAttribute",e,a),n=a.attrValue,a.forceKeepAttr)continue;if(lt(l,e),!a.keepAttr)continue;if(!Se&&C(/\/>/i,n)){lt(l,e);continue}xe&&(n=b(n,se," "),n=b(n,re," "),n=b(n,ae," "));const c=Ye(e.nodeName);if(pt(c,o,n)){if(!Me||"id"!==o&&"name"!==o||(lt(l,e),n="user-content-"+n),Y&&"object"==typeof V&&"function"==typeof V.getAttributeType)if(d);else switch(V.getAttributeType(c,o)){case"TrustedHTML":n=Y.createHTML(n);break;case"TrustedScriptURL":n=Y.createScriptURL(n)}try{d?e.setAttributeNS(d,l,n):e.setAttribute(l,n),p(i.removed)}catch(e){}}}ut("afterSanitizeAttributes",e,null)},vt=function e(t){let i;const n=ct(t);for(ut("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)ut("uponSanitizeShadowNode",i,null),gt(i)||(i.content instanceof a&&e(i.content),ft(i));ut("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e){let t,n,s,r,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ht(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!i.isSupported)return e;if(Le||tt(l),i.removed=[],"string"==typeof e&&(Ae=!1),Ae){if(e.nodeName){const t=Ye(e.nodeName);if(!ge[t]||_e[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)t=dt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!De&&!xe&&!ke&&-1===e.indexOf("<"))return Y&&Ie?Y.createHTML(e):e;if(t=dt(e),!t)return De?null:Ie?J:""}t&&Ne&&at(t.firstChild);const d=ct(Ae?e:t);for(;s=d.nextNode();)gt(s)||(s.content instanceof a&&vt(s.content),ft(s));if(Ae)return e;if(De){if(Ee)for(r=te.call(t.ownerDocument);t.firstChild;)r.appendChild(t.firstChild);else r=t;return(me.shadowroot||me.shadowrootmode)&&(r=ne.call(o,r,!0)),r}let h=ke?t.outerHTML:t.innerHTML;return ke&&ge["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&C(G,t.ownerDocument.doctype.name)&&(h="\n"+h),xe&&(h=b(h,se," "),h=b(h,re," "),h=b(h,ae," ")),Y&&Ie?Y.createHTML(h):h},i.setConfig=function(e){tt(e),Le=!0},i.clearConfig=function(){Je=null,Le=!1},i.isValidAttribute=function(e,t,i){Je||tt({});const n=Ye(e),o=Ye(t);return pt(n,o,i)},i.addHook=function(e,t){"function"==typeof t&&(oe[e]=oe[e]||[],m(oe[e],t))},i.removeHook=function(e){if(oe[e])return p(oe[e])},i.removeHooks=function(e){oe[e]&&(oe[e]=[])},i.removeAllHooks=function(){oe={}},i}();Y.version,Y.isSupported;const J=Y.sanitize,X=(Y.setConfig,Y.clearConfig,Y.isValidAttribute,Y.addHook),ee=Y.removeHook;Y.removeHooks,Y.removeAllHooks},4850:(e,t,i)=>{"use strict";i.d(t,{Y:()=>o});var n=i(4669);class o{get event(){return this.emitter.event}constructor(e,t,i){const o=e=>this.emitter.fire(e);this.emitter=new n.Q5({onWillAddFirstListener:()=>e.addEventListener(t,o,i),onDidRemoveLastListener:()=>e.removeEventListener(t,o,i)})}dispose(){this.emitter.dispose()}}},38626:(e,t,i)=>{"use strict";i.d(t,{X:()=>s,Z:()=>n});class n{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=o(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=o(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=o(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=o(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=o(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=o(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=o(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=o(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=o(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=o(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=o(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function o(e){return"number"==typeof e?`${e}px`:e}function s(e){return new n(e)}},48764:(e,t,i)=>{"use strict";i.d(t,{BO:()=>s,IY:()=>o,az:()=>r});var n=i(65321);function o(e,t={}){const i=r(t);return i.textContent=e,i}function s(e,t={}){const i=r(t);return l(i,function(e,t){const i={type:1,children:[]};let n=0,o=i;const s=[],r=new a(e);for(;!r.eos();){let e=r.next();const i="\\"===e&&0!==d(r.peek(),t);if(i&&(e=r.next()),i||0===d(e,t)||e!==r.peek())if("\n"===e)2===o.type&&(o=s.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),s.push(o),o=t}else o.content+=e;else{r.advance(),2===o.type&&(o=s.pop());const i=d(e,t);if(o.type===i||5===o.type&&6===i)o=s.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),o.children.push(e),s.push(o),o=e}}}return 2===o.type&&(o=s.pop()),s.length,i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function r(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class a{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 l(e,t,i,o){let s;if(2===t.type)s=document.createTextNode(t.content||"");else if(3===t.type)s=document.createElement("b");else if(4===t.type)s=document.createElement("i");else if(7===t.type&&o)s=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(n.mu(e,"click",(e=>{i.callback(String(t.index),e)}))),s=e}else 8===t.type?s=document.createElement("br"):1===t.type&&(s=e);s&&e!==s&&e.appendChild(s),s&&Array.isArray(t.children)&&t.children.forEach((e=>{l(s,e,i,o)}))}function d(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}},93911:(e,t,i)=>{"use strict";i.d(t,{C:()=>s});var n=i(65321),o=i(5976);class s{constructor(){this._hooks=new o.SL,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,s,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=s,this._onStopCallback=r;let a=e;try{e.setPointerCapture(t),this._hooks.add((0,o.OF)((()=>{try{e.releasePointerCapture(t)}catch(e){}})))}catch(t){a=n.Jj(e)}this._hooks.add(n.nm(a,n.tw.POINTER_MOVE,(e=>{e.buttons===i?(e.preventDefault(),this._pointerMoveCallback(e)):this.stopMonitoring(!0)}))),this._hooks.add(n.nm(a,n.tw.POINTER_UP,(e=>this.stopMonitoring(!0))))}}},59069:(e,t,i)=>{"use strict";i.d(t,{y:()=>d});var n=i(16268),o=i(22258),s=i(8313),r=i(1432);const a=r.dz?256:2048,l=r.dz?2048:256;class d{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState("AltGraph"),this.keyCode=function(e){if(e.charCode){const t=String.fromCharCode(e.charCode).toUpperCase();return o.kL.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(n.vU)switch(t){case 59:return 85;case 60:if(r.IJ)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(r.dz)return 57}else if(n.Pf){if(r.dz&&93===t)return 57;if(!r.dz&&92===t)return 57}return o.H_[t]||0}(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=a),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=l),t|=e,t}_computeKeyCodeChord(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new s.$M(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}},77352:(e,t,i)=>{"use strict";i.d(t,{ap:()=>L,et:()=>T});var n=i(65321),o=i(70921),s=i(4850),r=i(48764),a=i(59069),l=i(7448),d=i(56811),c=i(17301),h=i(4669),u=i(59365),g=i(21212),p=i(44742),m=i(79579),f=i(5976);let v={};!function(){function e(e,t){t(v)}var t,i;e.amd=!0,t=this,i=function(e){function t(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var s=/[&<>"']/,r=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,d={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return d[e]};function h(e,t){if(t){if(s.test(e))return e.replace(r,c)}else if(a.test(e))return e.replace(l,c);return e}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function g(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var p=/(^|[^\[])\^/g;function m(e,t){e="string"==typeof e?e:e.source,t=t||"";var i={replace:function(t,n){return n=(n=n.source||n).replace(p,"$1"),e=e.replace(t,n),i},getRegex:function(){return new RegExp(e,t)}};return i}var f=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function _(e,t,i){if(e){var n;try{n=decodeURIComponent(g(i)).replace(f,"").toLowerCase()}catch(e){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}t&&!v.test(i)&&(i=function(e,t){b[" "+e]||(w.test(e)?b[" "+e]=e+"/":b[" "+e]=L(e,"/",!0));var i=-1===(e=b[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(y,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(C,"$1")+t:e+t}(t,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(e){return null}return i}var b={},w=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,C=/^([^:]+:\/*[^/]*)[\s\S]*$/,S={exec:function(){}};function x(e){for(var t,i,n=1;n=0&&"\\"===i[o];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>t)i.splice(t);else for(;i.length1;)1&t&&(i+=e),t>>=1,e+=e;return i+e}function E(e,t,i,n){var o=t.href,s=t.title?h(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;var a={type:"link",raw:i,href:o,title:s,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,a}return{type:"image",raw:i,href:o,title:s,text:h(r)}}var I=function(){function t(t){this.options=t||e.defaults}var i=t.prototype;return i.space=function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}},i.code=function(e){var t=this.rules.block.code.exec(e);if(t){var i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:L(i,"\n")}}},i.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var i=t[0],n=function(e,t){var i=e.match(/^(\s+)(?:```)/);if(null===i)return t;var n=i[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}},i.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var i=t[2].trim();if(/#$/.test(i)){var n=L(i,"#");this.options.pedantic?i=n.trim():n&&!/ $/.test(n)||(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:this.lexer.inline(i)}}},i.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},i.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var i=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(i,[]),text:i}}},i.list=function(e){var t=this.rules.block.list.exec(e);if(t){var i,o,s,r,a,l,d,c,h,u,g,p,m=t[1].trim(),f=m.length>1,v={type:"list",raw:"",ordered:f,start:f?+m.slice(0,-1):"",loose:!1,items:[]};m=f?"\\d{1,9}\\"+m.slice(-1):"\\"+m,this.options.pedantic&&(m=f?m:"[*+-]");for(var _=new RegExp("^( {0,3}"+m+")((?:[\t ][^\\n]*)?(?:\\n|$))");e&&(p=!1,t=_.exec(e))&&!this.rules.block.hr.test(e);){if(i=t[0],e=e.substring(i.length),c=t[2].split("\n",1)[0],h=e.split("\n",1)[0],this.options.pedantic?(r=2,g=c.trimLeft()):(r=(r=t[2].search(/[^ ]/))>4?1:r,g=c.slice(r),r+=t[1].length),l=!1,!c&&/^ *$/.test(h)&&(i+=h+"\n",e=e.substring(h.length+1),p=!0),!p)for(var b=new RegExp("^ {0,"+Math.min(3,r-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),w=new RegExp("^ {0,"+Math.min(3,r-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),y=new RegExp("^ {0,"+Math.min(3,r-1)+"}(?:```|~~~)"),C=new RegExp("^ {0,"+Math.min(3,r-1)+"}#");e&&(c=u=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!y.test(c))&&!C.test(c)&&!b.test(c)&&!w.test(e);){if(c.search(/[^ ]/)>=r||!c.trim())g+="\n"+c.slice(r);else{if(l)break;g+="\n"+c}l||c.trim()||(l=!0),i+=u+"\n",e=e.substring(u.length+1)}v.loose||(d?v.loose=!0:/\n *\n *$/.test(i)&&(d=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(g))&&(s="[ ] "!==o[0],g=g.replace(/^\[[ xX]\] +/,"")),v.items.push({type:"list_item",raw:i,task:!!o,checked:s,loose:!1,text:g}),v.raw+=i}v.items[v.items.length-1].raw=i.trimRight(),v.items[v.items.length-1].text=g.trimRight(),v.raw=v.raw.trimRight();var S=v.items.length;for(a=0;a1)return!0;return!1}));!v.loose&&x.length&&k&&(v.loose=!0,v.items[a].loose=!0)}return v}},i.html=function(e){var t=this.rules.block.html.exec(e);if(t){var i={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var n=this.options.sanitizer?this.options.sanitizer(t[0]):h(t[0]);i.type="paragraph",i.text=n,i.tokens=this.lexer.inline(n)}return i}},i.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},i.table=function(e){var t=this.rules.block.table.exec(e);if(t){var i={type:"table",header:k(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=t[0];var n,o,s,r,a=i.align.length;for(n=0;n/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:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):h(t[0]):t[0]}},i.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var i=t[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;var n=L(i.slice(0,-1),"\\");if((i.length-n.length)%2==0)return}else{var o=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var i=e.length,n=0,o=0;o-1){var s=(0===t[0].indexOf("!")?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,s).trim(),t[3]=""}}var r=t[2],a="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);l&&(r=l[1],a=l[3])}else a=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^$/.test(i)?r.slice(1):r.slice(1,-1)),E(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0],this.lexer)}},i.reflink=function(e,t){var i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var n=(i[2]||i[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return E(i,n,i[0],this.lexer)}},i.emStrong=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!i.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\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-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var o=n[1]||n[2]||"";if(!o||o&&(""===i||this.rules.inline.punctuation.exec(i))){var s,r,a=n[0].length-1,l=a,d=0,c="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+a);null!=(n=c.exec(t));)if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(r=s.length,n[3]||n[4])l+=r;else if(!((n[5]||n[6])&&a%3)||(a+r)%3){if(!((l-=r)>0)){if(r=Math.min(r,r+l+d),Math.min(a,r)%2){var h=e.slice(1,a+n.index+r);return{type:"em",raw:e.slice(0,a+n.index+r+1),text:h,tokens:this.lexer.inlineTokens(h)}}var u=e.slice(2,a+n.index+r-1);return{type:"strong",raw:e.slice(0,a+n.index+r+1),text:u,tokens:this.lexer.inlineTokens(u)}}}else d+=r}}},i.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),o=/^ /.test(i)&&/ $/.test(i);return n&&o&&(i=i.substring(1,i.length-1)),i=h(i,!0),{type:"codespan",raw:t[0],text:i}}},i.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},i.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}},i.autolink=function(e,t){var i,n,o=this.rules.inline.autolink.exec(e);if(o)return n="@"===o[2]?"mailto:"+(i=h(this.options.mangle?t(o[1]):o[1])):i=h(o[1]),{type:"link",raw:o[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}},i.url=function(e,t){var i;if(i=this.rules.inline.url.exec(e)){var n,o;if("@"===i[2])o="mailto:"+(n=h(this.options.mangle?t(i[0]):i[0]));else{var s;do{s=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(s!==i[0]);n=h(i[0]),o="www."===i[1]?"http://"+n:n}return{type:"link",raw:i[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}},i.inlineText=function(e,t){var i,n=this.rules.inline.text.exec(e);if(n)return i=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):h(n[0]):n[0]:h(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:i}},t}(),T={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {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|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:S,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};T.def=m(T.def).replace("label",T._label).replace("title",T._title).getRegex(),T.bullet=/(?:[*+-]|\d{1,9}[.)])/,T.listItemStart=m(/^( *)(bull) */).replace("bull",T.bullet).getRegex(),T.list=m(T.list).replace(/bull/g,T.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+T.def.source+")").getRegex(),T._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",T._comment=/|$)/,T.html=m(T.html,"i").replace("comment",T._comment).replace("tag",T._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),T.paragraph=m(T._paragraph).replace("hr",T.hr).replace("heading"," {0,3}#{1,6} ").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",T._tag).getRegex(),T.blockquote=m(T.blockquote).replace("paragraph",T.paragraph).getRegex(),T.normal=x({},T),T.gfm=x({},T.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),T.gfm.table=m(T.gfm.table).replace("hr",T.hr).replace("heading"," {0,3}#{1,6} ").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",T._tag).getRegex(),T.gfm.paragraph=m(T._paragraph).replace("hr",T.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",T.gfm.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",T._tag).getRegex(),T.pedantic=x({},T.normal,{html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",T._comment).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:S,paragraph:m(T.normal._paragraph).replace("hr",T.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",T.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var M={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:S,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:S,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}M._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",M.punctuation=m(M.punctuation).replace(/punctuation/g,M._punctuation).getRegex(),M.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,M.escapedEmSt=/\\\*|\\_/g,M._comment=m(T._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),M.emStrong.lDelim=m(M.emStrong.lDelim).replace(/punct/g,M._punctuation).getRegex(),M.emStrong.rDelimAst=m(M.emStrong.rDelimAst,"g").replace(/punct/g,M._punctuation).getRegex(),M.emStrong.rDelimUnd=m(M.emStrong.rDelimUnd,"g").replace(/punct/g,M._punctuation).getRegex(),M._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,M._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,M._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])?)+(?![-_])/,M.autolink=m(M.autolink).replace("scheme",M._scheme).replace("email",M._email).getRegex(),M._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,M.tag=m(M.tag).replace("comment",M._comment).replace("attribute",M._attribute).getRegex(),M._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,M._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,M._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,M.link=m(M.link).replace("label",M._label).replace("href",M._href).replace("title",M._title).getRegex(),M.reflink=m(M.reflink).replace("label",M._label).replace("ref",T._label).getRegex(),M.nolink=m(M.nolink).replace("ref",T._label).getRegex(),M.reflinkSearch=m(M.reflinkSearch,"g").replace("reflink",M.reflink).replace("nolink",M.nolink).getRegex(),M.normal=x({},M),M.pedantic=x({},M.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",M._label).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",M._label).getRegex()}),M.gfm=x({},M.normal,{escape:m(M.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\0?t[t.length-1].raw+="\n":t.push(i);else if(i=this.tokenizer.code(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?t.push(i):(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.fences(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.heading(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.hr(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.blockquote(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.list(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.html(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.def(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(n.raw+="\n"+i.raw,n.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.table(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.lheading(e))e=e.substring(i.raw.length),t.push(i);else if(o=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,i=e.slice(1),n=void 0;r.options.extensions.startBlock.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}(),this.state.top&&(i=this.tokenizer.paragraph(o)))n=t[t.length-1],s&&"paragraph"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i),s=o.length!==e.length,e=e.substring(i.raw.length);else if(i=this.tokenizer.text(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i);else if(e){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return this.state.top=!0,t},s.inline=function(e,t){return void 0===t&&(t=[]),this.inlineQueue.push({src:e,tokens:t}),t},s.inlineTokens=function(e,t){var i,n,o,s=this;void 0===t&&(t=[]);var r,a,l,d=e;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(c.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(d));)c.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(d=d.slice(0,r.index)+"["+D("a",r[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(d));)d=d.slice(0,r.index)+"["+D("a",r[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.escapedEmSt.exec(d));)d=d.slice(0,r.index)+"++"+d.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(l=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(i=n.call({lexer:s},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)}))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,d,l))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e,A))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e,A))){if(o=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,i=e.slice(1),n=void 0;s.options.extensions.startInline.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}(),i=this.tokenizer.inlineText(o,R))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(l=i.raw.slice(-1)),a=!0,(n=t[t.length-1])&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(e){var h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}throw new Error(h)}}else e=e.substring(i.raw.length),t.push(i);return t},n=i,o=[{key:"rules",get:function(){return{block:T,inline:M}}}],null&&t(n.prototype,null),o&&t(n,o),Object.defineProperty(n,"prototype",{writable:!1}),i}(),O=function(){function t(t){this.options=t||e.defaults}var i=t.prototype;return i.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,n);null!=o&&o!==e&&(i=!0,e=o)}return e=e.replace(/\n$/,"")+"\n",n?'
'+(i?e:h(e,!0))+"
\n":"
"+(i?e:h(e,!0))+"
\n"},i.blockquote=function(e){return"
\n"+e+"
\n"},i.html=function(e){return e},i.heading=function(e,t,i,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},i.hr=function(){return this.options.xhtml?"
\n":"
\n"},i.list=function(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"\n"},i.listitem=function(e){return"
  • "+e+"
  • \n"},i.checkbox=function(e){return" "},i.paragraph=function(e){return"

    "+e+"

    \n"},i.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},i.tablerow=function(e){return"\n"+e+"\n"},i.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"\n"},i.strong=function(e){return""+e+""},i.em=function(e){return""+e+""},i.codespan=function(e){return""+e+""},i.br=function(){return this.options.xhtml?"
    ":"
    "},i.del=function(e){return""+e+""},i.link=function(e,t,i){if(null===(e=_(this.options.sanitize,this.options.baseUrl,e)))return i;var n='"+i+""},i.image=function(e,t,i){if(null===(e=_(this.options.sanitize,this.options.baseUrl,e)))return i;var n=''+i+'":">")},i.text=function(e){return e},t}(),F=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,i){return""+i},t.image=function(e,t,i){return""+i},t.br=function(){return""},e}(),B=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{i=e+"-"+ ++n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i},t.slug=function(e,t){void 0===t&&(t={});var i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)},e}(),W=function(){function t(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new O,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new F,this.slugger=new B}t.parse=function(e,i){return new t(i).parse(e)},t.parseInline=function(e,i){return new t(i).parseInline(e)};var i=t.prototype;return i.parse=function(e,t){void 0===t&&(t=!0);var i,n,o,s,r,a,l,d,c,h,u,p,m,f,v,_,b,w,y,C="",S=e.length;for(i=0;i0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=w+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=w+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:w}):f+=w),f+=this.parse(v.tokens,m),c+=this.renderer.listitem(f,b,_);C+=this.renderer.list(c,u,p);continue;case"html":C+=this.renderer.html(h.text);continue;case"paragraph":C+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(c=h.tokens?this.parseInline(h.tokens):h.text;i+1An error occurred:

    "+h(e.message+"",!0)+"
    ";throw e}try{var l=P.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(H.walkTokens(l,t.walkTokens)).then((function(){return W.parse(l,t)})).catch(a);H.walkTokens(l,t.walkTokens)}return W.parse(l,t)}catch(e){a(e)}}H.options=H.setOptions=function(t){var i;return x(H.defaults,t),i=H.defaults,e.defaults=i,H},H.getDefaults=o,H.defaults=e.defaults,H.use=function(){for(var e=arguments.length,t=new Array(e),i=0;iAn error occurred:

    "+h(e.message+"",!0)+"
    ";throw e}},H.Parser=W,H.parser=W.parse,H.Renderer=O,H.TextRenderer=F,H.Lexer=P,H.lexer=P.lex,H.Tokenizer=I,H.Slugger=B,H.parse=H;var V=H.options,z=H.setOptions,j=H.use,U=H.walkTokens,q=H.parseInline,K=H,$=W.parse,G=P.lex;e.Lexer=P,e.Parser=W,e.Renderer=O,e.Slugger=B,e.TextRenderer=F,e.Tokenizer=I,e.getDefaults=o,e.lexer=G,e.marked=H,e.options=V,e.parse=K,e.parseInline=q,e.parser=$,e.setOptions=z,e.use=j,e.walkTokens=U,Object.defineProperty(e,"__esModule",{value:!0})},e.amd?e(0,i):"object"==typeof exports?i(exports):i((t="undefined"!=typeof globalThis?globalThis:t||self).marked={})}(),v.Lexer||exports.Lexer,v.Parser||exports.Parser,v.Renderer||exports.Renderer,v.Slugger||exports.Slugger,v.TextRenderer||exports.TextRenderer,v.Tokenizer||exports.Tokenizer,v.getDefaults||exports.getDefaults,v.lexer||exports.lexer;var _=v.marked||exports.marked,b=(v.options||exports.options,v.parse||exports.parse,v.parseInline||exports.parseInline,v.parser||exports.parser,v.setOptions||exports.setOptions,v.use||exports.use,v.walkTokens||exports.walkTokens,i(23897)),w=i(66663),y=i(36248),C=i(95935),S=i(97295),x=i(70666);const k=Object.freeze({image:(e,t,i)=>{let n=[],o=[];return e&&(({href:e,dimensions:n}=(0,u.v1)(e)),o.push(`src="${(0,u.d9)(e)}"`)),i&&o.push(`alt="${(0,u.d9)(i)}"`),t&&o.push(`title="${(0,u.d9)(t)}"`),n.length&&(o=o.concat(n)),""},paragraph:e=>`

    ${e}

    `,link:(e,t,i)=>"string"!=typeof e?"":(e===i&&(i=(0,u.oR)(i)),t="string"==typeof t?(0,u.d9)((0,u.oR)(t)):"",`/g,">").replace(/"/g,""").replace(/'/g,"'")}" title="${t||e}" draggable="false">${i}`)});function L(e,t={},i={}){var o,u;const m=new f.SL;let v=!1;const C=(0,r.az)(t),L=function(t){let i;try{i=(0,b.Qc)(decodeURIComponent(t))}catch(e){}return i?(i=(0,y.rs)(i,(t=>e.uris&&e.uris[t]?x.o.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(i))):t},I=function(t,i){const n=e.uris&&e.uris[t];let o=x.o.revive(n);return i?t.startsWith(w.lg.data+":")?t:(o||(o=x.o.parse(t)),w.Gi.uriToBrowserUri(o).toString(!0)):o?x.o.parse(t).toString()===o.toString()?t:(o.query&&(o=o.with({query:L(o.query)})),o.toString()):t},T=new _.Renderer;T.image=k.image,T.link=k.link,T.paragraph=k.paragraph;const M=[],R=[];if(t.codeBlockRendererSync?T.code=(e,i)=>{const n=p.a.nextId(),o=t.codeBlockRendererSync(N(i),e);return R.push([n,o]),`
    ${(0,S.YU)(e)}
    `}:t.codeBlockRenderer&&(T.code=(e,i)=>{const n=p.a.nextId(),o=t.codeBlockRenderer(N(i),e);return M.push(o.then((e=>[n,e]))),`
    ${(0,S.YU)(e)}
    `}),t.actionHandler){const i=function(i){let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{let o=n.dataset.href;o&&(e.baseUri&&(o=D(x.o.from(e.baseUri),o)),t.actionHandler.callback(o,i))}catch(e){(0,c.dL)(e)}finally{i.preventDefault()}},o=t.actionHandler.disposables.add(new s.Y(C,"click")),r=t.actionHandler.disposables.add(new s.Y(C,"auxclick"));t.actionHandler.disposables.add(h.ju.any(o.event,r.event)((e=>{const t=new l.n(n.Jj(C),e);(t.leftButton||t.middleButton)&&i(t)}))),t.actionHandler.disposables.add(n.nm(C,"keydown",(e=>{const t=new a.y(e);(t.equals(10)||t.equals(3))&&i(t)})))}e.supportHtml||(i.sanitizer=t=>(e.isTrusted?t.match(/^(]+>)|(<\/\s*span>)$/):void 0)?t:"",i.sanitize=!0,i.silent=!0),i.renderer=T;let A,O=null!==(o=e.value)&&void 0!==o?o:"";if(O.length>1e5&&(O=`${O.substr(0,1e5)}…`),e.supportThemeIcons&&(O=(0,g.f$)(O)),t.fillInIncompleteTokens){const e={..._.defaults,...i},t=function(e){let t,i;for(t=0;t"string"==typeof e?e:e.outerHTML)).join(""));const B=(new DOMParser).parseFromString(E(e,A),"text/html");if(B.body.querySelectorAll("img").forEach((t=>{const i=t.getAttribute("src");if(i){let n=i;try{e.baseUri&&(n=D(x.o.from(e.baseUri),n))}catch(e){}t.src=I(n,!0)}})),B.body.querySelectorAll("a").forEach((t=>{const i=t.getAttribute("href");if(t.setAttribute("href",""),!i||/^data:|javascript:/i.test(i)||/^command:/i.test(i)&&!e.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(i))t.replaceWith(...t.childNodes);else{let n=I(i,!1);e.baseUri&&(n=D(x.o.from(e.baseUri),i)),t.dataset.href=n}})),C.innerHTML=E(e,B.body.innerHTML),M.length>0)Promise.all(M).then((e=>{var i,o;if(v)return;const s=new Map(e),r=C.querySelectorAll("div[data-code]");for(const e of r){const t=s.get(null!==(i=e.dataset.code)&&void 0!==i?i:"");t&&n.mc(e,t)}null===(o=t.asyncRenderCallback)||void 0===o||o.call(t)}));else if(R.length>0){const e=new Map(R),t=C.querySelectorAll("div[data-code]");for(const i of t){const t=e.get(null!==(u=i.dataset.code)&&void 0!==u?u:"");t&&n.mc(i,t)}}if(t.asyncRenderCallback)for(const e of C.getElementsByTagName("img")){const i=m.add(n.nm(e,"load",(()=>{i.dispose(),t.asyncRenderCallback()})))}return{element:C,dispose:()=>{v=!0,m.dispose()}}}function N(e){if(!e)return"";const t=e.split(/[\s+|:|,|\{|\?]/,1);return t.length?t[0]:e}function D(e,t){return/^\w[\w\d+.-]*:/.test(t)?t:e.path.endsWith("/")?(0,C.i3)(e,t).toString():(0,C.i3)((0,C.XX)(e),t).toString()}function E(e,t){const{config:i,allowedSchemes:s}=function(e){const t=[w.lg.http,w.lg.https,w.lg.mailto,w.lg.data,w.lg.file,w.lg.vscodeFileResource,w.lg.vscodeRemote,w.lg.vscodeRemoteResource];return e.isTrusted&&t.push(w.lg.command),{config:{ALLOWED_TAGS:[...n.sQ],ALLOWED_ATTR:I,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:t}}(e);o.v5("uponSanitizeAttribute",((e,t)=>{var i;if("style"!==t.attrName&&"class"!==t.attrName){if("INPUT"===e.tagName&&"checkbox"===(null===(i=e.attributes.getNamedItem("type"))||void 0===i?void 0:i.value)){if("type"===t.attrName&&"checkbox"===t.attrValue||"disabled"===t.attrName||"checked"===t.attrName)return void(t.keepAttr=!0);t.keepAttr=!1}}else{if("SPAN"===e.tagName){if("style"===t.attrName)return void(t.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(t.attrValue));if("class"===t.attrName)return void(t.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(t.attrValue))}t.keepAttr=!1}})),o.v5("uponSanitizeElement",((e,t)=>{var i,n;"input"===t.tagName&&("checkbox"===(null===(i=e.attributes.getNamedItem("type"))||void 0===i?void 0:i.value)?e.setAttribute("disabled",""):null===(n=e.parentElement)||void 0===n||n.removeChild(e))}));const r=n._F(s);try{return o.Nw(t,{...i,RETURN_TRUSTED_TYPE:!0})}finally{o.ok("uponSanitizeAttribute"),r.dispose()}}const I=["align","autoplay","alt","checked","class","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","src","style","target","title","type","width","start"];function T(e){return"string"==typeof e?e:function(e){var t;let i=null!==(t=e.value)&&void 0!==t?t:"";return i.length>1e5&&(i=`${i.substr(0,1e5)}…`),E({isTrusted:!1},_.parse(i,{renderer:R.value}).replace(/&(#\d+|[a-zA-Z]+);/g,(e=>{var t;return null!==(t=M.get(e))&&void 0!==t?t:e}))).toString()}(e)}const M=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),R=new m.o((()=>{const e=new _.Renderer;return e.code=e=>e,e.blockquote=e=>e,e.html=e=>"",e.heading=(e,t,i)=>e+"\n",e.hr=()=>"",e.list=(e,t)=>e,e.listitem=e=>e+"\n",e.paragraph=e=>e+"\n",e.table=(e,t)=>e+t+"\n",e.tablerow=e=>e,e.tablecell=(e,t)=>e+" ",e.strong=e=>e,e.em=e=>e,e.codespan=e=>e,e.br=()=>"\n",e.del=e=>e,e.image=(e,t,i)=>"",e.text=e=>e,e.link=(e,t,i)=>i,e}));function A(e){let t="";return e.forEach((e=>{t+=e.raw})),t}function P(e){var t,i;for(let n=0;nO(e.raw))))return z(e)}}}function O(e){return!!e.match(/^[^\[]*\]\([^\)]*$/)}function F(e,t){const i=A(e);return _.lexer(i+`\n${t}`)}function B(e){return U(e,"`")}function W(e){return U(e,"_")}function H(e){return U(e,")")}function V(e){return U(e,'")')}function z(e){return U(e,"](about:blank)")}function j(e){return U(e,"__")}function U(e,t){const i=A(Array.isArray(e)?e:[e]);return _.lexer(i+t)[0]}function q(e){const t=A(e),i=t.split("\n");let n,o=!1;for(let e=0;e0){const e=o?i.slice(0,-1).join("\n"):t,s=!!e.match(/\|\s*$/),r=e+(s?"":"|")+`\n|${" --- |".repeat(n)}`;return _.lexer(r)}}},7448:(e,t,i)=>{"use strict";i.d(t,{n:()=>l,q:()=>d});var n=i(16268);const o=new WeakMap;function s(e){if(!e.parent||e.parent===e)return null;try{const t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return null}catch(e){return null}return e.parent}class r{static getSameOriginWindowChain(e){let t=o.get(e);if(!t){t=[],o.set(e,t);let i,n=e;do{i=s(n),i?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=i}while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){var i,n;if(!t||e===t)return{top:0,left:0};let o=0,s=0;const r=this.getSameOriginWindowChain(e);for(const e of r){const r=e.window.deref();if(o+=null!==(i=null==r?void 0:r.scrollY)&&void 0!==i?i:0,s+=null!==(n=null==r?void 0:r.scrollX)&&void 0!==n?n:0,r===t)break;if(!e.iframeElement)break;const a=e.iframeElement.getBoundingClientRect();o+=a.top,s+=a.left}return{top:o,left:s}}}var a=i(1432);class l{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=0===t.button,this.middleButton=1===t.button,this.rightButton=2===t.button,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,"dblclick"===t.type&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,"number"==typeof t.pageX?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const i=r.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class d{constructor(e,t=0,i=0){var o;this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let s=!1;if(n.i7){const e=navigator.userAgent.match(/Chrome\/(\d+)/);s=(e?parseInt(e[1]):123)<=122}if(e){const t=e,i=e,r=(null===(o=e.view)||void 0===o?void 0:o.devicePixelRatio)||1;if(void 0!==t.wheelDeltaY)this.deltaY=s?t.wheelDeltaY/(120*r):t.wheelDeltaY/120;else if(void 0!==i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.vU&&!a.dz?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)n.G6&&a.ED?this.deltaX=-t.wheelDeltaX/120:this.deltaX=s?t.wheelDeltaX/(120*r):t.wheelDeltaX/120;else if(void 0!==i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.vU&&!a.dz?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=s?e.wheelDelta/(120*r):e.wheelDelta/120)}}preventDefault(){var e;null===(e=this.browserEvent)||void 0===e||e.preventDefault()}stopPropagation(){var e;null===(e=this.browserEvent)||void 0===e||e.stopPropagation()}}},50795:(e,t,i)=>{"use strict";var n;i.d(t,{B:()=>n}),function(e){const t={total:0,min:Number.MAX_VALUE,max:0},i={...t},n={...t},o={...t};let s=0;const r={keydown:0,input:0,render:0};function a(){1===r.keydown&&(performance.mark("keydown/end"),r.keydown=2)}function l(){performance.mark("input/start"),r.input=1,h()}function d(){1===r.input&&(performance.mark("input/end"),r.input=2)}function c(){1===r.render&&(performance.mark("render/end"),r.render=2)}function h(){setTimeout(u)}function u(){2===r.keydown&&2===r.input&&2===r.render&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),g("keydown",t),g("input",i),g("render",n),g("inputlatency",o),s++,performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0)}function g(e,t){const i=performance.getEntriesByName(e)[0].duration;t.total+=i,t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}function p(e){return{average:e.total/s,max:e.max,min:e.min}}function m(e){e.total=0,e.min=Number.MAX_VALUE,e.max=0}e.onKeyDown=function(){u(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(a)},e.onBeforeInput=l,e.onInput=function(){0===r.input&&l(),queueMicrotask(d)},e.onKeyUp=function(){u()},e.onSelectionChange=function(){u()},e.onRenderStart=function(){2===r.keydown&&2===r.input&&0===r.render&&(performance.mark("render/start"),r.render=1,queueMicrotask(c),h())},e.getAndClearMeasurements=function(){if(0===s)return;const e={keydown:p(t),input:p(i),render:p(n),total:p(o),sampleCount:s};return m(t),m(i),m(n),m(o),s=0,e}}(n||(n={}))},28731:(e,t,i)=>{"use strict";i.d(t,{T:()=>l});var n=i(65321),o=i(4669),s=i(5976);class r extends s.JT{constructor(e){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(e,!0),this._mediaQueryList=null,this._handleChange(e,!1)}_handleChange(e,t){var i;null===(i=this._mediaQueryList)||void 0===i||i.removeEventListener("change",this._listener),this._mediaQueryList=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),t&&this._onDidChange.fire()}}class a extends s.JT{get value(){return this._value}constructor(e){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio(e);const t=this._register(new r(e));this._register(t.onDidChange((()=>{this._value=this._getPixelRatio(e),this._onDidChange.fire(this._value)})))}_getPixelRatio(e){const t=document.createElement("canvas").getContext("2d");return(e.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}}const l=new class{constructor(){this.mapWindowIdToPixelRatioMonitor=new Map}_getOrCreatePixelRatioMonitor(e){const t=(0,n.ZY)(e);let i=this.mapWindowIdToPixelRatioMonitor.get(t);return i||(i=(0,s.dk)(new a(e)),this.mapWindowIdToPixelRatioMonitor.set(t,i),(0,s.dk)(o.ju.once(n.ey)((({vscodeWindowId:e})=>{e===t&&(null==i||i.dispose(),this.mapWindowIdToPixelRatioMonitor.delete(t))})))),i}getInstance(e){return this._getOrCreatePixelRatioMonitor(e)}}},10553:(e,t,i)=>{"use strict";i.d(t,{o:()=>h,t:()=>n});var n,o=i(65321),s=i(48906),r=i(9488),a=i(49898),l=i(4669),d=i(5976),c=i(91741);!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(n||(n={}));class h extends d.JT{constructor(){super(),this.dispatched=!1,this.targets=new c.S,this.ignoreTargets=new c.S,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(l.ju.runAndSubscribe(o.Xo,(({window:e,disposables:t})=>{t.add(o.nm(e.document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),t.add(o.nm(e.document,"touchend",(t=>this.onTouchEnd(e,t)))),t.add(o.nm(e.document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}),{window:s.Ex,disposables:this._store}))}static addTarget(e){if(!h.isTouchDevice())return d.JT.None;h.INSTANCE||(h.INSTANCE=(0,d.dk)(new h));const t=h.INSTANCE.targets.push(e);return(0,d.OF)(t)}static ignoreTarget(e){if(!h.isTouchDevice())return d.JT.None;h.INSTANCE||(h.INSTANCE=(0,d.dk)(new h));const t=h.INSTANCE.ignoreTargets.push(e);return(0,d.OF)(t)}static isTouchDevice(){return"ontouchstart"in s.Ex||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,o=e.targetTouches.length;i=h.HOLD_DELAY&&Math.abs(l.initialPageX-r.Gb(l.rollingPageX))<30&&Math.abs(l.initialPageY-r.Gb(l.rollingPageY))<30){const e=this.newGestureEvent(n.Contextmenu,l.initialTarget);e.pageX=r.Gb(l.rollingPageX),e.pageY=r.Gb(l.rollingPageY),this.dispatchEvent(e)}else if(1===o){const t=r.Gb(l.rollingPageX),n=r.Gb(l.rollingPageY),o=r.Gb(l.rollingTimestamps)-l.rollingTimestamps[0],s=t-l.rollingPageX[0],a=n-l.rollingPageY[0],d=[...this.targets].filter((e=>l.initialTarget instanceof Node&&e.contains(l.initialTarget)));this.inertia(e,d,i,Math.abs(s)/o,s>0?1:-1,t,Math.abs(a)/o,a>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(n.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===n.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>h.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==n.Change&&e.type!==n.Contextmenu||(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const t of this.ignoreTargets)if(t.contains(e.initialTarget))return;for(const t of this.targets)t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}}inertia(e,t,i,s,r,a,l,d,c){this.handle=o.jL(e,(()=>{const o=Date.now(),u=o-i;let g=0,p=0,m=!0;s+=h.SCROLL_FRICTION*u,l+=h.SCROLL_FRICTION*u,s>0&&(m=!1,g=r*s*u),l>0&&(m=!1,p=d*l*u);const f=this.newGestureEvent(n.Change);f.translationX=g,f.translationY=p,t.forEach((e=>e.dispatchEvent(f))),m||this.inertia(e,t,o,s,r,a+g,l,d,c+p)}))}onTouchMove(e){const t=Date.now();for(let i=0,o=e.changedTouches.length;i3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(o.pageX),s.rollingPageY.push(o.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}h.SCROLL_FRICTION=-.005,h.HOLD_DELAY=700,h.CLEAR_TAP_COUNT_TIME=400,function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);s>3&&r&&Object.defineProperty(t,i,r)}([a.H],h,"isTouchDevice",null)},77514:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(48906),o=i(17301);function s(e,t){var i;const s=globalThis.MonacoEnvironment;if(null==s?void 0:s.createTrustedTypesPolicy)try{return s.createTrustedTypesPolicy(e,t)}catch(e){return void(0,o.dL)(e)}try{return null===(i=n.Ex.trustedTypes)||void 0===i?void 0:i.createPolicy(e,t)}catch(e){return void(0,o.dL)(e)}}},10244:(e,t,i)=>{"use strict";i.d(t,{gU:()=>q,YH:()=>U,Lc:()=>K});var n=i(16268),o=i(23547),s=i(65321),r=i(10553),a=i(17057),l=i(51433),d=i(4850),c=i(59069),h=i(77352),u=i(43799),g=i(9488),p=i(4669),m=i(22258),f=i(5976),v=i(1432),_=i(93379),b=i.n(_),w=i(7795),y=i.n(w),C=i(90569),S=i.n(C),x=i(3565),k=i.n(x),L=i(19216),N=i.n(L),D=i(44589),E=i.n(D),I=i(12675),T={};T.styleTagTransform=E(),T.setAttributes=k(),T.insert=S().bind(null,"head"),T.domAPI=y(),T.insertStyleElement=N(),b()(I.Z,T),I.Z&&I.Z.locals&&I.Z.locals;var M=i(63580);const R=s.$,A="selectOption.entry.template";class P{get templateId(){return A}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=s.R3(e,R(".option-text")),t.detail=s.R3(e,R(".option-detail")),t.decoratorRight=s.R3(e,R(".option-decorator-right")),t}renderElement(e,t,i){const n=i,o=e.text,s=e.detail,r=e.decoratorRight,a=e.isDisabled;n.text.textContent=o,n.detail.textContent=s||"",n.decoratorRight.innerText=r||"",a?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled")}disposeTemplate(e){}}class O extends f.JT{constructor(e,t,i,n,o){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=o||Object.create(null),"number"!=typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=O.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._hover=this._register((0,l.g)((0,a.t)("mouse"),this.selectElement,"")),this._onDidSelect=new p.Q5,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return A}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=s.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=s.R3(this.selectDropDownContainer,R(".select-box-details-pane"));const t=s.R3(this.selectDropDownContainer,R(".select-box-dropdown-container-width-control")),i=s.R3(t,R(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",s.R3(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=s.dS(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(s.nm(this.selectDropDownContainer,s.tw.DRAG_START,(e=>{s.zB.stop(e,!0)})))}registerListeners(){let e;this._register(s.mu(this.selectElement,"change",(e=>{this.selected=e.target.selectedIndex,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this._hover.update(this.options[this.selected].text)}))),this._register(s.nm(this.selectElement,s.tw.CLICK,(e=>{s.zB.stop(e),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(s.nm(this.selectElement,s.tw.MOUSE_DOWN,(e=>{s.zB.stop(e)}))),this._register(s.nm(this.selectElement,"touchstart",(t=>{e=this._isVisible}))),this._register(s.nm(this.selectElement,"touchend",(t=>{s.zB.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(s.nm(this.selectElement,s.tw.KEY_DOWN,(e=>{const t=new c.y(e);let i=!1;v.dz?18!==t.keyCode&&16!==t.keyCode&&10!==t.keyCode&&3!==t.keyCode||(i=!0):(18===t.keyCode&&t.altKey||16===t.keyCode&&t.altKey||10===t.keyCode||3===t.keyCode)&&(i=!0),i&&(this.showSelectDropDown(),s.zB.stop(e,!0))})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){g.fS(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled)),"string"==typeof e.description&&(this._hasDetails=!0)}))),void 0!==t&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){var e;null===(e=this.selectList)||void 0===e||e.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._hover.update(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: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !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: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !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("\n")}styleSelectElement(){var e,t,i;const n=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",o=null!==(t=this.styles.selectForeground)&&void 0!==t?t:"",s=null!==(i=this.styles.selectBorder)&&void 0!==i?i:"";this.selectElement.style.backgroundColor=n,this.selectElement.style.color=o,this.selectElement.style.borderColor=s}styleList(){var e,t;const i=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",n=s.XT(this.styles.selectListBackground,i);this.selectDropDownListContainer.style.backgroundColor=n,this.selectionDetailsPane.style.backgroundColor=n;const o=null!==(t=this.styles.focusBorder)&&void 0!==t?t:"";this.selectDropDownContainer.style.outlineColor=o,this.selectDropDownContainer.style.outlineOffset="-1px",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.innerText="",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"),this.selectElement.classList.remove("synthetic-focus")},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"),this.selectElement.classList.remove("synthetic-focus")},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){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch(e){}}}}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=s.Jj(this.selectElement),i=s.i(this.selectElement),n=s.Jj(this.selectElement).getComputedStyle(this.selectElement),o=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),r=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),a=i.top-O.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,d=this.setWidthControlElement(this.widthControlElement),c=Math.max(d,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=c,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let h=this.selectList.contentHeight;this._hasDetails&&void 0===this._cachedMaxDetailsHeight&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const u=this._hasDetails?this._cachedMaxDetailsHeight:0,g=h+o+u,p=Math.floor((r-o-u)/this.getHeight()),m=Math.floor((a-o-u)/this.getHeight());if(e)return!(i.top+i.height>t.innerHeight-22||i.topp&&this.options.length>p?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),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.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),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.topr&&(h=p*this.getHeight())}else g>a&&(h=m*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+o+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=h+o+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=c,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach(((e,t)=>{const o=e.detail?e.detail.length:0,s=e.decoratorRight?e.decoratorRight.length:0,r=e.text.length+o+s;r>n&&(i=t,n=r)})),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=s.w(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=s.R3(e,R(".select-box-dropdown-list-container")),this.listRenderer=new P,this.selectList=new u.aV("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:e=>{let t=e.text;return e.detail&&(t+=`. ${e.detail}`),e.decoratorRight&&(t+=`. ${e.decoratorRight}`),e.description&&(t+=`. ${e.description}`),t},getWidgetAriaLabel:()=>(0,M.NC)({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>v.dz?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new d.Y(this.selectDropDownListContainer,"keydown")),i=p.ju.chain(t.event,(e=>e.filter((()=>this.selectList.length>0)).map((e=>new c.y(e)))));this._register(p.ju.chain(i,(e=>e.filter((e=>3===e.keyCode))))(this.onEnter,this)),this._register(p.ju.chain(i,(e=>e.filter((e=>2===e.keyCode))))(this.onEnter,this)),this._register(p.ju.chain(i,(e=>e.filter((e=>9===e.keyCode))))(this.onEscape,this)),this._register(p.ju.chain(i,(e=>e.filter((e=>16===e.keyCode))))(this.onUpArrow,this)),this._register(p.ju.chain(i,(e=>e.filter((e=>18===e.keyCode))))(this.onDownArrow,this)),this._register(p.ju.chain(i,(e=>e.filter((e=>12===e.keyCode))))(this.onPageDown,this)),this._register(p.ju.chain(i,(e=>e.filter((e=>11===e.keyCode))))(this.onPageUp,this)),this._register(p.ju.chain(i,(e=>e.filter((e=>14===e.keyCode))))(this.onHome,this)),this._register(p.ju.chain(i,(e=>e.filter((e=>13===e.keyCode))))(this.onEnd,this)),this._register(p.ju.chain(i,(e=>e.filter((e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=85&&e.keyCode<=113))))(this.onCharacter,this)),this._register(s.nm(this.selectList.getHTMLElement(),s.tw.POINTER_UP,(e=>this.onPointerUp(e)))),this._register(this.selectList.onMouseOver((e=>void 0!==e.index&&this.selectList.setFocus([e.index])))),this._register(this.selectList.onDidChangeFocus((e=>this.onListFocus(e)))),this._register(s.nm(this.selectDropDownContainer,s.tw.FOCUS_OUT,(e=>{this._isVisible&&!s.jg(e.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;s.zB.stop(e);const t=e.target;if(!t)return;if(t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),o=i.classList.contains("option-disabled");n>=0&&n{for(let t=0;tthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(s.zB.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){s.zB.stop(e),this.selectList.focusPreviousPage(),setTimeout((()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)}),1)}onHome(e){s.zB.stop(e),this.options.length<2||(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){s.zB.stop(e),this.options.length<2||(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=m.kL.toString(e.keyCode);let i=-1;for(let n=0;n{this._register(s.nm(this.selectElement,e,(e=>{this.selectElement.focus()})))})),this._register(s.mu(this.selectElement,"click",(e=>{s.zB.stop(e,!0)}))),this._register(s.mu(this.selectElement,"change",(e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})}))),this._register(s.mu(this.selectElement,"keydown",(e=>{let t=!1;v.dz?18!==e.keyCode&&16!==e.keyCode&&10!==e.keyCode||(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){this.options&&g.fS(this.options,e)||(this.options=e,this.selectElement.options.length=0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled))}))),void 0!==t&&this.select(t)}select(e){0===this.options.length?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(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new z.Wi)),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(r.o.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,n.vU&&this._register((0,s.nm)(e,s.tw.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(o.g.TEXT,this._action.label)})))),this._register((0,s.nm)(t,r.t.Tap,(e=>this.onClick(e,!0)))),this._register((0,s.nm)(t,s.tw.MOUSE_DOWN,(e=>{i||s.zB.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),v.dz&&this._register((0,s.nm)(t,s.tw.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register((0,s.nm)(t,s.tw.CLICK,(e=>{s.zB.stop(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register((0,s.nm)(t,s.tw.DBLCLICK,(e=>{s.zB.stop(e,!0)}))),[s.tw.MOUSE_UP,s.tw.MOUSE_OUT].forEach((e=>{this._register((0,s.nm)(t,e,(e=>{s.zB.stop(e),t.classList.remove("active")})))}))}onClick(e,t=!1){var i;s.zB.stop(e,!0);const n=j.Jp(this._context)?(null===(i=this.options)||void 0===i?void 0:i.useEventAsContext)?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}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}updateTooltip(){var e,t,i;if(!this.element)return;const n=null!==(e=this.getTooltip())&&void 0!==e?e:"";if(this.updateAriaLabel(),null===(t=this.options.hoverDelegate)||void 0===t?void 0:t.showNativeHover)this.element.title=n;else if(this.customHover)this.customHover.update(n);else{const e=null!==(i=this.options.hoverDelegate)&&void 0!==i?i:(0,a.t)("element");this.customHover=(0,l.g)(e,this.element,n),this._store.add(this.customHover)}}updateAriaLabel(){var e;if(this.element){const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.element.setAttribute("aria-label",t)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class q extends U{constructor(e,t,i){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),j.p_(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){const e=document.createElement("span");e.classList.add("keybinding"),e.textContent=this.options.keybinding,this.element.appendChild(e)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===z.Z0.ID?"presentation":this.options.isMenu?"menuitem":"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.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=M.NC({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),null!=e?e:void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),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()):null===(e=this.label)||void 0===e||e.classList.remove("codicon")}updateEnabled(){var e,t;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),null===(e=this.element)||void 0===e||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),null===(t=this.element)||void 0===t||t.classList.add("disabled"))}updateAriaLabel(){var e;if(this.label){const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.label.setAttribute("aria-label",t)}}updateChecked(){this.label&&(void 0!==this.action.checked?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.removeAttribute("aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class K extends U{constructor(e,t,i,n,o,s,r){super(e,t),this.selectBox=new V(i,n,o,s,r),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(){var e;null===(e=this.selectBox)||void 0===e||e.focus()}blur(){var e;null===(e=this.selectBox)||void 0===e||e.blur()}render(e){this.selectBox.render(e)}}},90317:(e,t,i)=>{"use strict";i.d(t,{o:()=>h});var n=i(65321),o=i(59069),s=i(10244),r=i(17057),a=i(74741),l=i(4669),d=i(5976),c=i(98401);i(75408);class h extends d.JT{constructor(e,t={}){var i,c,h,u,g,p,m;let f,v;switch(super(),this._actionRunnerDisposables=this._register(new d.SL),this.viewItemDisposables=this._register(new d.b2),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new l.Q5),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new l.Q5({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new l.Q5),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new l.Q5),this.onWillRun=this._onWillRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(c=this.options.orientation)&&void 0!==c?c:0,this._triggerKeys={keyDown:null!==(u=null===(h=this.options.triggerKeys)||void 0===h?void 0:h.keyDown)&&void 0!==u&&u,keys:null!==(p=null===(g=this.options.triggerKeys)||void 0===g?void 0:g.keys)&&void 0!==p?p:[3,10]},this._hoverDelegate=null!==(m=t.hoverDelegate)&&void 0!==m?m:this._register((0,r.t)("element",!0)),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new a.Wi,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",this._orientation){case 0:f=[15],v=[17];break;case 1:f=[16],v=[18],this.domNode.className+=" vertical"}this._register(n.nm(this.domNode,n.tw.KEY_DOWN,(e=>{const t=new o.y(e);let i=!0;const n="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;f&&(t.equals(f[0])||t.equals(f[1]))?i=this.focusPrevious():v&&(t.equals(v[0])||t.equals(v[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?i=this.focusFirst():t.equals(13)?i=this.focusLast():t.equals(2)&&n instanceof s.YH&&n.trapsArrowNavigation?i=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:i=!1,i&&(t.preventDefault(),t.stopPropagation())}))),this._register(n.nm(this.domNode,n.tw.KEY_UP,(e=>{const t=new o.y(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026)||t.equals(16)||t.equals(18)||t.equals(15)||t.equals(17))&&this.updateFocusedItem()}))),this.focusTracker=this._register(n.go(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{n.vY()!==this.domNode&&n.jg(n.vY(),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 e=this.viewItems.find((e=>e instanceof s.YH&&e.isEnabled()));e instanceof s.YH&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof s.YH&&e.setFocusable(!1)}))}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){var e,t;for(let i=0;it.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems.forEach((t=>t.actionRunner=e))}getContainer(){return this.domNode}getAction(e){var t;if("number"==typeof e)return null===(t=this.viewItems[e])||void 0===t?void 0:t.action;if(e instanceof HTMLElement){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t{const i=document.createElement("li");let r;i.className="action-item",i.setAttribute("role","presentation");const a={hoverDelegate:this._hoverDelegate,...t};this.options.actionViewItemProvider&&(r=this.options.actionViewItemProvider(e,a)),r||(r=new s.gU(this.context,e,a)),this.options.allowContextMenu||this.viewItemDisposables.set(r,n.nm(i,n.tw.CONTEXT_MENU,(e=>{n.zB.stop(e,!0)}))),r.actionRunner=this._actionRunner,r.setActionContext(this.context),r.render(i),this.focusable&&r instanceof s.YH&&0===this.viewItems.length&&r.setFocusable(!0),null===o||o<0||o>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(r)):(this.actionsList.insertBefore(i,this.actionsList.children[o]),this.viewItems.splice(o,0,r),o++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,d.B9)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),n.PO(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return 0===this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),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){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===a.Z0.ID));return this.updateFocus(),!0}focusPrevious(e){if(void 0===this.focusedItem)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===a.Z0.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n,o;void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&(null===(n=this.viewItems[this.previouslyFocusedItem])||void 0===n||n.blur());const s=void 0!==this.focusedItem?this.viewItems[this.focusedItem]:void 0;if(s){let n=!0;c.mf(s.focus)||(n=!1),this.options.focusOnlyEnabledItems&&c.mf(s.isEnabled)&&!s.isEnabled()&&(n=!1),s.action.id===a.Z0.ID&&(n=!1),n?(i||this.previouslyFocusedItem!==this.focusedItem)&&(s.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),n&&(null===(o=s.showHover)||void 0===o||o.call(s))}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof s.YH){const i=null===t._context||void 0===t._context?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=(0,d.B9)(this.viewItems),this.getContainer().remove(),super.dispose()}}},56346:(e,t,i)=>{"use strict";i.d(t,{Z9:()=>k,wW:()=>x,i7:()=>L});var n=i(65321),o=i(93379),s=i.n(o),r=i(7795),a=i.n(r),l=i(90569),d=i.n(l),c=i(3565),h=i.n(c),u=i(19216),g=i.n(u),p=i(44589),m=i.n(p),f=i(93),v={};v.styleTagTransform=m(),v.setAttributes=h(),v.insert=d().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=g(),s()(f.Z,v),f.Z&&f.Z.locals&&f.Z.locals;const _=2e4;let b,w,y,C,S;function x(e){b=document.createElement("div"),b.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),b.appendChild(e),e};w=t(),y=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),b.appendChild(e),e};C=i(),S=i(),e.appendChild(b)}function k(e){b&&(w.textContent!==e?(n.PO(y),N(w,e)):(n.PO(w),N(y,e)))}function L(e){b&&(C.textContent!==e?(n.PO(S),N(C,e)):(n.PO(C),N(S,e)))}function N(e,t){n.PO(e),t.length>_&&(t=t.substr(0,_)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},32052:(e,t,i)=>{"use strict";i.d(t,{z:()=>I});var n=i(65321),o=i(70921),s=i(59069),r=i(77352),a=i(10553),l=i(17057),d=i(51433),c=i(56811),h=i(41264),u=i(4669),g=i(59365),p=i(5976),m=i(25670),f=i(93379),v=i.n(f),_=i(7795),b=i.n(_),w=i(90569),y=i.n(w),C=i(3565),S=i.n(C),x=i(19216),k=i.n(x),L=i(44589),N=i.n(L),D=i(72013),E={};E.styleTagTransform=N(),E.setAttributes=S(),E.insert=y().bind(null,"head"),E.domAPI=b(),E.insertStyleElement=k(),v()(D.Z,E),D.Z&&D.Z.locals&&D.Z.locals,h.Il.white.toString(),h.Il.white.toString();class I extends p.JT{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new u.Q5),this._onDidEscape=this._register(new u.Q5),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);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,o=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=o||"",this._element.style.backgroundColor=i||"",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")),"string"==typeof t.ariaLabel&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this._register(a.o.addTarget(this._element)),[n.tw.CLICK,a.t.Tap].forEach((e=>{this._register((0,n.nm)(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):n.zB.stop(e)})))})),this._register((0,n.nm)(this._element,n.tw.KEY_DOWN,(e=>{const t=new s.y(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._onDidEscape.fire(e),this._element.blur(),i=!0),i&&n.zB.stop(t,!0)}))),this._register((0,n.nm)(this._element,n.tw.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.updateBackground(!0)}))),this._register((0,n.nm)(this._element,n.tw.MOUSE_OUT,(e=>{this.updateBackground(!1)}))),this.focusTracker=this._register((0,n.go)(this._element)),this._register(this.focusTracker.onDidFocus((()=>{this.enabled&&this.updateBackground(!0)}))),this._register(this.focusTracker.onDidBlur((()=>{this.enabled&&this.updateBackground(!1)})))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let i of(0,c.T)(e))if("string"==typeof i){if(i=i.trim(),""===i)continue;const e=document.createElement("span");e.textContent=i,t.push(e)}else t.push(i);return t}updateBackground(e){let t;t=this.options.secondary?e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){var t;if(this._label===e)return;if((0,g.Fr)(this._label)&&(0,g.Fr)(e)&&(0,g.g_)(this._label,e))return;this._element.classList.add("monaco-text-button");const i=this.options.supportShortLabel?this._labelElement:this._element;if((0,g.Fr)(e)){const s=(0,r.ap)(e,{inline:!0});s.dispose();const a=null===(t=s.element.querySelector("p"))||void 0===t?void 0:t.innerHTML;if(a){const e=(0,o.Nw)(a,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});i.innerHTML=e}else(0,n.mc)(i)}else this.options.supportIcons?(0,n.mc)(i,...this.getContentElements(e)):i.textContent=e;let s="";"string"==typeof this.options.title?s=this.options.title:this.options.title&&(s=(0,r.et)(e)),this._hover?this._hover.update(s):this._hover=this._register((0,d.g)((0,l.t)("mouse"),this._element,s)),"string"==typeof this.options.ariaLabel?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",this._element.title),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...m.k.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")}}},89899:(e,t,i)=>{"use strict";var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),c=i.n(d),h=i(19216),u=i.n(h),g=i(44589),p=i.n(g),m=i(50058),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var v=i(24081),_={};_.styleTagTransform=p(),_.setAttributes=c(),_.insert=l().bind(null,"head"),_.domAPI=r(),_.insertStyleElement=u(),o()(v.Z,_),v.Z&&v.Z.locals&&v.Z.locals},89162:(e,t,i)=>{"use strict";i.d(t,{Z:()=>b});var n=i(65321),o=i(97295),s=i(93379),r=i.n(s),a=i(7795),l=i.n(a),d=i(90569),c=i.n(d),h=i(3565),u=i.n(h),g=i(19216),p=i.n(g),m=i(44589),f=i.n(m),v=i(90477),_={};_.styleTagTransform=f(),_.setAttributes=u(),_.insert=c().bind(null,"head"),_.domAPI=l(),_.insertStyleElement=p(),r()(v.Z,_),v.Z&&v.Z.locals&&v.Z.locals;class b{constructor(e,t,i){this.options=t,this.styles=i,this.count=0,this.element=(0,n.R3)(e,(0,n.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){var e,t;this.element.textContent=(0,o.WU)(this.countFormat,this.count),this.element.title=(0,o.WU)(this.titleFormat,this.count),this.element.style.backgroundColor=null!==(e=this.styles.badgeBackground)&&void 0!==e?e:"",this.element.style.color=null!==(t=this.styles.badgeForeground)&&void 0!==t?t:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}},98324:(e,t,i)=>{"use strict";i.d(t,{C:()=>N});var n=i(65321),o=i(10244),s=i(59069),r=i(10553),a=i(74741),l=i(4669),d=i(93379),c=i.n(d),h=i(7795),u=i.n(h),g=i(90569),p=i.n(g),m=i(3565),f=i.n(m),v=i(19216),_=i.n(v),b=i(44589),w=i.n(b),y=i(25035),C={};C.styleTagTransform=w(),C.setAttributes=f(),C.insert=p().bind(null,"head"),C.domAPI=u(),C.insertStyleElement=_(),c()(y.Z,C),y.Z&&y.Z.locals&&y.Z.locals;class S extends a.Wi{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new l.Q5),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,n.R3)(e,(0,n.$)(".monaco-dropdown")),this._label=(0,n.R3)(this._element,(0,n.$)(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const e of[n.tw.CLICK,n.tw.MOUSE_DOWN,r.t.Tap])this._register((0,n.nm)(this.element,e,(e=>n.zB.stop(e,!0))));for(const e of[n.tw.MOUSE_DOWN,r.t.Tap])this._register((0,n.nm)(this._label,e,(e=>{(0,n.N5)(e)&&(e.detail>1||0!==e.button)||(this.visible?this.hide():this.show())})));this._register((0,n.nm)(this._label,n.tw.KEY_UP,(e=>{const t=new s.y(e);(t.equals(3)||t.equals(10))&&(n.zB.stop(e,!0),this.visible?this.hide():this.show())})));const o=i(this._label);o&&this._register(o),this._register(r.o.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 x extends S{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")}}var k=i(51433),L=i(17057);class N extends o.YH{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new l.Q5),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=(0,n.R3)(e,(0,n.$)("a.action-label"));let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this._action.label&&this._register((0,k.g)((0,L.t)("mouse"),this.element,this._action.label)),this.element.ariaLabel=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new x(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return e.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),null!=e?e:void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;null===(e=this.dropdownMenu)||void 0===e||e.show()}updateEnabled(){var e,t;const i=!this.action.enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",i),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",i)}}},3070:(e,t,i)=>{"use strict";i.d(t,{V:()=>h});var n=i(65321),o=i(51307),s=i(44299),r=i(93794),a=i(4669),l=(i(30340),i(63580)),d=i(5976);const c=l.NC("defaultLabel","input");class h extends r.${constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new d.XK),this.additionalToggles=[],this._onDidOptionChange=this._register(new a.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new a.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new a.Q5),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new a.Q5),this._onKeyUp=this._register(new a.Q5),this._onCaseSensitiveKeyDown=this._register(new a.Q5),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new a.Q5),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||c,this.showCommonFindToggles=!!i.showCommonFindToggles;const r=i.appendCaseSensitiveLabel||"",l=i.appendWholeWordsLabel||"",h=i.appendRegexLabel||"",u=i.history||[],g=!!i.flexibleHeight,p=!!i.flexibleWidth,m=i.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new s.pG(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:u,showHistoryHint:i.showHistoryHint,flexibleHeight:g,flexibleWidth:p,flexibleMaxHeight:m,inputBoxStyles:i.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new o.eH({appendTitle:h,isChecked:!1,...i.toggleStyles})),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new o.Qx({appendTitle:l,isChecked:!1,...i.toggleStyles})),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new o.rk({appendTitle:r,isChecked:!1,...i.toggleStyles})),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)})));const e=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(t=>{if(t.equals(15)||t.equals(17)||t.equals(9)){const i=e.indexOf(this.domNode.ownerDocument.activeElement);if(i>=0){let o=-1;t.equals(17)?o=(i+1)%e.length:t.equals(15)&&(o=0===i?e.length-1:i-1),t.equals(9)?(e[i].blur(),this.inputBox.focus()):o>=0&&e[o].focus(),n.zB.stop(t,!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(null==i?void 0:i.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),null==e||e.appendChild(this.domNode),this._register(n.nm(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(n.nm(this.inputBox.inputElement,"compositionend",(e=>{this.imeSessionInProgress=!1,this._onInput.fire()}))),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,t,i;this.domNode.classList.remove("disabled"),this.inputBox.enable(),null===(e=this.regex)||void 0===e||e.enable(),null===(t=this.wholeWords)||void 0===t||t.enable(),null===(i=this.caseSensitive)||void 0===i||i.enable();for(const e of this.additionalToggles)e.enable()}disable(){var e,t,i;this.domNode.classList.add("disabled"),this.inputBox.disable(),null===(e=this.regex)||void 0===e||e.disable(),null===(t=this.wholeWords)||void 0===t||t.disable(),null===(i=this.caseSensitive)||void 0===i||i.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 e of this.additionalToggles)e.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new d.SL;for(const t of null!=e?e:[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()}))),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var t,i,n,o,s,r;this.inputBox.paddingRight=e?0:(null!==(i=null===(t=this.caseSensitive)||void 0===t?void 0:t.width())&&void 0!==i?i:0)+(null!==(o=null===(n=this.wholeWords)||void 0===n?void 0:n.width())&&void 0!==o?o:0)+(null!==(r=null===(s=this.regex)||void 0===s?void 0:s.width())&&void 0!==r?r:0)+this.additionalToggles.reduce(((e,t)=>e+t.width()),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e,t;return null!==(t=null===(e=this.caseSensitive)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e,t;return null!==(t=null===(e=this.wholeWords)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e,t;return null!==(t=null===(e=this.regex)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;null===(e=this.caseSensitive)||void 0===e||e.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()}}},51307:(e,t,i)=>{"use strict";i.d(t,{Qx:()=>c,eH:()=>h,rk:()=>d});var n=i(98892),o=i(73046),s=i(63580);const r=s.NC("caseDescription","Match Case"),a=s.NC("wordsDescription","Match Whole Word"),l=s.NC("regexDescription","Use Regular Expression");class d extends n.Z{constructor(e){super({icon:o.l.caseSensitive,title:r+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class c extends n.Z{constructor(e){super({icon:o.l.wholeWord,title:a+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class h extends n.Z{constructor(e){super({icon:o.l.regex,title:l+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}},34650:(e,t,i)=>{"use strict";i.d(t,{q:()=>r});var n=i(65321),o=i(56811),s=i(36248);class r{constructor(e,t){var i;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=null!==(i=null==t?void 0:t.supportIcons)&&void 0!==i&&i,this.domNode=n.R3(e,n.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=r.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&s.fS(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n="\r\n"===e?-1:0,o+=i;for(const e of t)e.end<=o||(e.start>=o&&(e.start+=n),e.end>=o&&(e.end+=n));return i+=n,"⏎"}))}}},17057:(e,t,i)=>{"use strict";i.d(t,{r:()=>a,t:()=>l});var n=i(79579);let o=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}});const s=new n.o((()=>o("mouse",!1))),r=new n.o((()=>o("element",!1)));function a(e){o=e}function l(e,t){return t?o(e,!0):"element"===e?r.value:s.value}},82246:(e,t,i)=>{"use strict";i.d(t,{Sr:()=>x,c8:()=>S,uX:()=>k});var n=i(65321),o=i(59069),s=i(64117),r=i(5976),a=i(93379),l=i.n(a),d=i(7795),c=i.n(d),h=i(90569),u=i.n(h),g=i(3565),p=i.n(g),m=i(19216),f=i.n(m),v=i(44589),_=i.n(v),b=i(93039),w={};w.styleTagTransform=_(),w.setAttributes=p(),w.insert=u().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=f(),l()(b.Z,w),b.Z&&b.Z.locals&&b.Z.locals;var y=i(63580);const C=n.$;class S extends r.JT{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new s.s$(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class x extends r.JT{static render(e,t,i){return new x(e,t,i)}constructor(e,t,i){super(),this.actionContainer=n.R3(e,C("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=n.R3(this.actionContainer,C("a.action")),this.action.setAttribute("role","button"),t.iconClass&&n.R3(this.action,C(`span.icon.${t.iconClass}`)),n.R3(this.action,C("span")).textContent=i?`${t.label} (${i})`:t.label,this._register(n.nm(this.actionContainer,n.tw.CLICK,(e=>{e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer)}))),this._register(n.nm(this.actionContainer,n.tw.KEY_DOWN,(e=>{const i=new o.y(e);(i.equals(3)||i.equals(10))&&(e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer))}))),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function k(e,t){return e&&t?(0,y.NC)("acessibleViewHint","Inspect this in the accessible view with {0}.",t):e?(0,y.NC)("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}},32107:(e,t,i)=>{"use strict";i.d(t,{g:()=>k});var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),c=i.n(d),h=i(19216),u=i.n(h),g=i(44589),p=i.n(g),m=i(94269),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var v=i(65321),_=i(34650),b=i(51433),w=i(5976),y=i(36248),C=i(61134),S=i(17057);class x{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 className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class k extends w.JT{constructor(e,t){var i;super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new x(v.R3(e,v.$(".monaco-icon-label")))),this.labelContainer=v.R3(this.domNode.element,v.$(".monaco-icon-label-container")),this.nameContainer=v.R3(this.labelContainer,v.$("span.monaco-icon-name-container")),(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new N(this.nameContainer,!!t.supportIcons):this.nameNode=new L(this.nameContainer),this.hoverDelegate=null!==(i=null==t?void 0:t.hoverDelegate)&&void 0!==i?i:(0,S.t)("mouse")}get element(){return this.domNode.element}setLabel(e,t,i){var n;const o=["monaco-icon-label"],s=["monaco-icon-label-container"];let r="";if(i&&(i.extraClasses&&o.push(...i.extraClasses),i.italic&&o.push("italic"),i.strikethrough&&o.push("strikethrough"),i.disabledCommand&&s.push("disabled"),i.title&&("string"==typeof i.title?r+=i.title:r+=e)),this.domNode.className=o.join(" "),this.domNode.element.setAttribute("aria-label",r),this.labelContainer.className=s.join(" "),this.setupHover((null==i?void 0:i.descriptionTitle)?this.labelContainer:this.element,null==i?void 0:i.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const e=this.getOrCreateDescriptionNode();e instanceof _.q?(e.set(t||"",i?i.descriptionMatches:void 0,void 0,null==i?void 0:i.labelEscapeNewLines),this.setupHover(e.element,null==i?void 0:i.descriptionTitle)):(e.textContent=t&&(null==i?void 0:i.labelEscapeNewLines)?_.q.escapeNewLines(t,[]):t||"",this.setupHover(e.element,(null==i?void 0:i.descriptionTitle)||""),e.empty=!t)}((null==i?void 0:i.suffix)||this.suffixNode)&&(this.getOrCreateSuffixNode().textContent=null!==(n=null==i?void 0:i.suffix)&&void 0!==n?n:"")}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate.showNativeHover)(0,b.O)(e,t);else{const i=(0,b.g)(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new x(v.e4(this.nameContainer,v.$("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new x(v.R3(e.element,v.$("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const t=this._register(new x(v.R3(this.labelContainer,v.$("span.monaco-icon-description-container"))));(null===(e=this.creationOptions)||void 0===e?void 0:e.supportDescriptionHighlights)?this.descriptionNode=new _.q(v.R3(t.element,v.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new x(v.R3(t.element,v.$("span.label-description"))))}return this.descriptionNode}}class L{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,y.fS)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=v.R3(this.container,v.$("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const o={start:n,end:n+e.length},s=i.map((e=>C.e.intersect(o,e))).filter((e=>!C.e.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=o.end+t.length,s}))}(e,i,null==t?void 0:t.matches);for(let o=0;o{"use strict";i.d(t,{O:()=>h,g:()=>g});var n=i(65321),o=i(15393),s=i(71050),r=i(59365),a=i(21212),l=i(5976),d=i(98401),c=i(63580);function h(e,t){(0,d.HD)(t)?e.title=(0,a.x$)(t):(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}class u{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}async update(e,t,i){var n;if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let o;if(void 0===e||(0,d.HD)(e)||e instanceof HTMLElement)o=e;else if((0,d.mf)(e.markdown)){this._hoverWidget||this.show((0,c.NC)("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new s.A;const i=this._cancellationTokenSource.token;if(o=await e.markdown(i),void 0===o&&(o=e.markdownNotSupportedFallback),this.isDisposed||i.isCancellationRequested)return}else o=null!==(n=e.markdown)&&void 0!==n?n:e.markdownNotSupportedFallback;this.show(o,t,i)}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const o={content:e,target:this.target,appearance:{showPointer:"element"===this.hoverDelegate.placement,skipFadeInAnimation:!this.fadeInAnimation||!!n},position:{hoverPosition:2},...i};this._hoverWidget=this.hoverDelegate.showHover(o,t)}null==n||n.dispose()}hasContent(e){return!(!e||(0,r.Fr)(e)&&!e.value)}get isDisposed(){var e;return null===(e=this._hoverWidget)||void 0===e?void 0:e.isDisposed}dispose(){var e,t;null===(e=this._hoverWidget)||void 0===e||e.dispose(),null===(t=this._cancellationTokenSource)||void 0===t||t.dispose(!0),this._cancellationTokenSource=void 0}}function g(e,t,i,s){let r,a;const d=(t,i)=>{var n;const o=void 0!==a;t&&(null==a||a.dispose(),a=void 0),i&&(null==r||r.dispose(),r=void 0),o&&(null===(n=e.onDidHideHover)||void 0===n||n.call(e),a=void 0)},c=(n,r,l)=>new o._F((async()=>{a&&!a.isDisposed||(a=new u(e,l||t,n>0),await a.update("function"==typeof i?i():i,r,s))}),n);let h=!1;const g=n.nm(t,n.tw.MOUSE_DOWN,(()=>{h=!0,d(!0,!0)}),!0),p=n.nm(t,n.tw.MOUSE_UP,(()=>{h=!1}),!0),m=n.nm(t,n.tw.MOUSE_LEAVE,(e=>{h=!1,d(!1,e.fromElement===t)}),!0),f=n.nm(t,n.tw.MOUSE_OVER,(()=>{if(r)return;const i=new l.SL,o={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>{o.x=e.x+10,e.target instanceof HTMLElement&&e.target.classList.contains("action-label")&&d(!0,!0)};i.add(n.nm(t,n.tw.MOUSE_MOVE,e,!0))}i.add(c(e.delay,!1,o)),r=i}),!0),v=n.nm(t,n.tw.FOCUS,(()=>{if(h||r)return;const i={targetElements:[t],dispose:()=>{}},o=new l.SL;o.add(n.nm(t,n.tw.BLUR,(()=>d(!0,!0)),!0)),o.add(c(e.delay,!1,i)),r=o}),!0);return{show:e=>{d(!1,!0),c(0,e)},hide:()=>{d(!0,!0)},update:async(e,t)=>{i=e,await(null==a?void 0:a.update(i,void 0,t))},dispose:()=>{f.dispose(),m.dispose(),g.dispose(),p.dispose(),v.dispose(),d(!0,!0)}}}},56811:(e,t,i)=>{"use strict";i.d(t,{T:()=>r,h:()=>a});var n=i(65321),o=i(25670);const s=new RegExp(`(\\\\)?\\$\\((${o.k.iconNameExpression}(?:${o.k.iconModifierExpression})?)\\)`,"g");function r(e){const t=new Array;let i,n=0,o=0;for(;null!==(i=s.exec(e));){o=i.index||0,n{"use strict";i.d(t,{pG:()=>M,g4:()=>I});var n=i(65321),o=i(4850),s=i(48764),r=i(90317),a=i(56346),l=i(64117),d=i(93794),c=i(4669);class h{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 u{constructor(e=[],t=10){this._initialize(e),this._limit=t,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 0!==this._currentPosition()?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 null===this._navigator.current()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new h(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}var g=i(36248),p=i(93379),m=i.n(p),f=i(7795),v=i.n(f),_=i(90569),b=i.n(_),w=i(3565),y=i.n(w),C=i(19216),S=i.n(C),x=i(44589),k=i.n(x),L=i(41188),N={};N.styleTagTransform=k(),N.setAttributes=y(),N.insert=b().bind(null,"head"),N.domAPI=v(),N.insertStyleElement=S(),m()(L.Z,N),L.Z&&L.Z.locals&&L.Z.locals;var D=i(63580);const E=n.$,I={inputBackground:"#3C3C3C",inputForeground:"#CCCCCC",inputValidationInfoBorder:"#55AAFF",inputValidationInfoBackground:"#063B49",inputValidationWarningBorder:"#B89500",inputValidationWarningBackground:"#352A05",inputValidationErrorBorder:"#BE1100",inputValidationErrorBackground:"#5A1D1D",inputBorder:void 0,inputValidationErrorForeground:void 0,inputValidationInfoForeground:void 0,inputValidationWarningForeground:void 0};class T extends d.${constructor(e,t,i){var s;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new c.Q5),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new c.Q5),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(s=this.options.tooltip)&&void 0!==s?s:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=n.R3(e,E(".monaco-inputbox.idle"));const a=this.options.flexibleHeight?"textarea":"input",d=n.R3(this.element,E(".ibwrapper"));if(this.input=n.R3(d,E(a+".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="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=n.R3(d,E("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new l.NB(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),n.R3(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new o.Y(e.ownerDocument,"selectionchange")),i=c.ju.filter(t.event,(()=>{const t=e.ownerDocument.getSelection();return(null==t?void 0:t.anchorNode)===d}));this._register(i(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 r.o(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}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.input.title=e}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"number"==typeof this.cachedHeight?this.cachedHeight:n.wn(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return n.H9(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}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("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!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("open"===this.state&&(0,g.fS)(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 ${n.XT(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())),null==e?void 0: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=n.w(this.element)+"px";let i;this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:i=>{var o,r;if(!this.message)return null;e=n.R3(i,E(".monaco-inputbox-container")),t();const a={inline:!0,className:"monaco-inputbox-message"},l=this.message.formatContent?(0,s.BO)(this.message.content,a):(0,s.IY)(this.message.content,a);l.classList.add(this.classForType(this.message.type));const d=this.stylesForType(this.message.type);return l.style.backgroundColor=null!==(o=d.background)&&void 0!==o?o:"",l.style.color=null!==(r=d.foreground)&&void 0!==r?r:"",l.style.border=d.border?`1px solid ${d.border}`:"",n.R3(e,l),null},onHide:()=>{this.state="closed"},layout:t}),i=3===this.message.type?D.NC("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?D.NC("alertWarningMessage","Warning: {0}",this.message.content):D.NC("alertInfoMessage","Info: {0}",this.message.content),a.Z9(i),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}applyStyles(){var e,t,i;const o=this.options.inputBoxStyles,s=null!==(e=o.inputBackground)&&void 0!==e?e:"",r=null!==(t=o.inputForeground)&&void 0!==t?t:"",a=null!==(i=o.inputBorder)&&void 0!==i?i:"";this.element.style.backgroundColor=s,this.element.style.color=r,this.input.style.backgroundColor="inherit",this.input.style.color=r,this.element.style.border=`1px solid ${n.XT(a,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=n.wn(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))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,o=t.value;null!==i&&null!==n&&(this.value=o.substr(0,i)+e+o.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,null===(e=this.actionbar)||void 0===e||e.dispose(),super.dispose()}}class M extends T{constructor(e,t,i){const o=D.NC({key:"history.inputbox.hint.suffix.noparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field ends in a closing parenthesis ")", for example "Filter (e.g. text, !exclude)". The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," or {0} for history","⇅"),s=D.NC({key:"history.inputbox.hint.suffix.inparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field does NOT end in a closing parenthesis (eg. "Find"). The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," ({0} for history)","⇅");super(e,t,i),this._onDidFocus=this._register(new c.Q5),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new c.Q5),this.onDidBlur=this._onDidBlur.event,this.history=new u(i.history,100);const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(o)&&!this.placeholder.endsWith(s)&&this.history.getHistory().length){const e=this.placeholder.endsWith(")")?o:s,t=this.placeholder+e;i.showPlaceholderOnFocus&&!n.H9(this.input)?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver(((e,t)=>{e.forEach((e=>{e.target.textContent||r()}))})),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,(()=>r())),this.onblur(this.input,(()=>{const e=e=>{if(this.placeholder.endsWith(e)){const t=this.placeholder.slice(0,this.placeholder.length-e.length);return i.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}return!1};e(s)||e(o)}))}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=null!=e?e:"",a.i7(this.value?this.value:D.NC("clearedInput","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,a.i7(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()}}},12983:(e,t,i)=>{"use strict";i.d(t,{e:()=>S,F:()=>C});var n=i(65321),o=i(8030),s=i(36248),r=i(93379),a=i.n(r),l=i(7795),d=i.n(l),c=i(90569),h=i.n(c),u=i(3565),g=i.n(u),p=i(19216),m=i.n(p),f=i(44589),v=i.n(f),_=i(72298),b={};b.styleTagTransform=v(),b.setAttributes=g(),b.insert=h().bind(null,"head"),b.domAPI=d(),b.insertStyleElement=m(),a()(_.Z,b),_.Z&&_.Z.locals&&_.Z.locals;var w=i(63580);const y=n.$,C={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class S{constructor(e,t,i){this.os=t,this.keyElements=new Set,this.options=i||Object.create(null);const o=this.options.keybindingLabelForeground;this.domNode=n.R3(e,y(".monaco-keybinding")),o&&(this.domNode.style.color=o),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&S.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){var e;if(this.clear(),this.keybinding){const t=this.keybinding.getChords();t[0]&&this.renderChord(this.domNode,t[0],this.matches?this.matches.firstPart:null);for(let e=1;e{"use strict";i.d(t,{kX:()=>x,Bv:()=>D});var n=i(23547),o=i(65321),s=i(4850),r=i(10553),a=i(64117),l=i(9488),d=i(15393),c=i(49898),h=i(4669),u=i(5976),g=i(61134),p=i(76633);function m(e,t){const i=[];for(const n of t){if(e.start>=n.range.end)continue;if(e.end({range:f(e.range,n),size:e.size}))),r=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(const n of e){const e=n.range.start,o=n.range.end,s=n.size;i&&s===i.size?i.range.end=o:(i={range:{start:e,end:o},size:s},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(o,r,s),this._size=this._paddingTop+this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.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}}var b=i(17301),w=i(59870),y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};const C={CurrentDragAndDropData:void 0},S={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class x{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class k{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class L{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;ti,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class D{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 e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,o.FK)(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=""}}constructor(e,t,i,n=S){var s,l,c,g,m,f,v,b,w,y,C,x,k;if(this.virtualDelegate=t,this.domId="list_id_"+ ++D.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new d.vp(50),this.splicing=!1,this.dragOverAnimationStopDisposable=u.JT.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=u.JT.None,this.onDragLeaveTimeout=u.JT.None,this.disposables=new u.SL,this._onDidChangeContentHeight=new h.Q5,this._onDidChangeContentWidth=new h.Q5,this.onDidChangeContentHeight=h.ju.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(null!==(s=n.paddingTop)&&void 0!==s?s:0);for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new _(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","boolean"!=typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=null!==(l=n.horizontalScrolling)&&void 0!==l?l:S.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=void 0===n.paddingBottom?0:n.paddingBottom,this.accessibilityProvider=new N(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(null!==(c=n.transformOptimization)&&void 0!==c?c:S.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(r.o.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new p.Rm({forceIntegerValues:!0,smoothScrollDuration:null!==(g=n.smoothScrolling)&&void 0!==g&&g?125:0,scheduleAtNextAnimationFrame:e=>(0,o.jL)((0,o.Jj)(this.domNode),e)})),this.scrollableElement=this.disposables.add(new a.$Z(this.rowsContainer,{alwaysConsumeMouseWheel:null!==(m=n.alwaysConsumeMouseWheel)&&void 0!==m?m:S.alwaysConsumeMouseWheel,horizontal:1,vertical:null!==(f=n.verticalScrollMode)&&void 0!==f?f:S.verticalScrollMode,useShadows:null!==(v=n.useShadows)&&void 0!==v?v:S.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((0,o.nm)(this.rowsContainer,r.t.Change,(e=>this.onTouchChange(e)))),this.disposables.add((0,o.nm)(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add((0,o.nm)(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add((0,o.nm)(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add((0,o.nm)(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add((0,o.nm)(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=null!==(b=n.setRowLineHeight)&&void 0!==b?b:S.setRowLineHeight,this.setRowHeight=null!==(w=n.setRowHeight)&&void 0!==w?w:S.setRowHeight,this.supportDynamicHeights=null!==(y=n.supportDynamicHeights)&&void 0!==y?y:S.supportDynamicHeights,this.dnd=null!==(C=n.dnd)&&void 0!==C?C:this.disposables.add(S.dnd),this.layout(null===(x=n.initialSize)||void 0===x?void 0:x.height,null===(k=n.initialSize)||void 0===k?void 0:k.width)}updateOptions(e){let t;if(void 0!==e.paddingBottom&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.scrollByPage&&(t={...null!=t?t:{},scrollByPage:e.scrollByPage}),void 0!==e.mouseWheelScrollSensitivity&&(t={...null!=t?t:{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&(t={...null!=t?t:{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),void 0!==e.paddingTop&&e.paddingTop!==this.rangeMap.paddingTop){const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(t,Math.max(0,this.lastRenderTop+i),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 v(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),o={start:e,end:e+t},s=g.e.intersect(n,o),r=new Map;for(let e=s.end-1;e>=s.start;e--){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){let i=r.get(t.templateId);i||(i=[],r.set(t.templateId,i));const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),i.push(t.row)}t.row=null,t.stale=!0}const a={start:e+t,end:this.items.length},l=g.e.intersect(a,n),d=g.e.relativeComplement(a,n),c=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:u.JT.None,checkedDisposable:u.JT.None,stale:!1})));let h;0===e&&t>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,c),h=this.items,this.items=c):(this.rangeMap.splice(e,t,c),h=this.items.splice(e,t,...c));const p=i.length-t,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),v=f(l,p),_=g.e.intersect(m,v);for(let e=_.start;e<_.end;e++)this.updateItemInDOM(this.items[e],e);const b=g.e.relativeComplement(v,m);for(const e of b)for(let t=e.start;tf(e,p))),y=[{start:e,end:e+i.length},...w].map((e=>g.e.intersect(m,e))).reverse();for(const e of y)for(let t=e.end-1;t>=e.start;t--){const e=this.items[t],i=r.get(e.templateId),n=null==i?void 0:i.pop();this.insertItemInDOM(t,n)}for(const e of r.values())for(const t of e)this.cache.release(t);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),h.map((e=>e.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,o.jL)((0,o.Jj)(this.domNode),(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?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.getRenderRange(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:"number"==typeof e?e:(0,o.If)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:(0,o.FK)(this.domNode)})}render(e,t,i,n,o,s=!1){const r=this.getRenderRange(t,i),a=g.e.relativeComplement(r,e).reverse(),l=g.e.relativeComplement(e,r);if(s){const t=g.e.intersect(e,r);for(let e=t.start;e{for(const e of l)for(let t=e.start;t=e.start;t--)this.insertItemInDOM(t)})),void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==o&&(this.rowsContainer.style.width=`${Math.max(o,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t){var i,n,s;const r=this.items[e];if(!r.row)if(t)r.row=t,r.stale=!0;else{const e=this.cache.alloc(r.templateId);r.row=e.row,r.stale||(r.stale=e.isReusingConnectedDomNode)}const a=this.accessibilityProvider.getRole(r.element)||"listitem";r.row.domNode.setAttribute("role",a);const l=this.accessibilityProvider.isChecked(r.element);if("boolean"==typeof l)r.row.domNode.setAttribute("aria-checked",String(!!l));else if(l){const e=e=>r.row.domNode.setAttribute("aria-checked",String(!!e));e(l.value),r.checkedDisposable=l.onDidChange(e)}if(r.stale||!r.row.domNode.parentElement){const t=null!==(s=null===(n=null===(i=this.items.at(e+1))||void 0===i?void 0:i.row)||void 0===n?void 0:n.domNode)&&void 0!==s?s:null;this.rowsContainer.insertBefore(r.row.domNode,t),r.stale=!1}this.updateItemInDOM(r,e);const d=this.renderers.get(r.templateId);if(!d)throw new Error(`No renderer found for template id ${r.templateId}`);null==d||d.renderElement(r.element,e,r.row.templateData,r.size);const c=this.dnd.getDragURI(r.element);r.dragStartDisposable.dispose(),r.row.domNode.draggable=!!c,c&&(r.dragStartDisposable=(0,o.nm)(r.row.domNode,"dragstart",(e=>this.onDragStart(r.element,c,e)))),this.horizontalScrolling&&(this.measureItemWidth(r),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=(0,o.FK)(e.row.domNode);const t=(0,o.Jj)(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){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.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 h.ju.map(this.disposables.add(new s.Y(this.domNode,"click")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseDblClick(){return h.ju.map(this.disposables.add(new s.Y(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseMiddleClick(){return h.ju.filter(h.ju.map(this.disposables.add(new s.Y(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e)),this.disposables),(e=>1===e.browserEvent.button),this.disposables)}get onMouseDown(){return h.ju.map(this.disposables.add(new s.Y(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOver(){return h.ju.map(this.disposables.add(new s.Y(this.domNode,"mouseover")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOut(){return h.ju.map(this.disposables.add(new s.Y(this.domNode,"mouseout")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onContextMenu(){return h.ju.any(h.ju.map(this.disposables.add(new s.Y(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e)),this.disposables),h.ju.map(this.disposables.add(new s.Y(this.domNode,r.t.Contextmenu)).event,(e=>this.toGestureEvent(e)),this.disposables))}get onTouchStart(){return h.ju.map(this.disposables.add(new s.Y(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)),this.disposables)}get onTap(){return h.ju.map(this.disposables.add(new s.Y(this.rowsContainer,r.t.Tap)).event,(e=>this.toGestureEvent(e)),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element,sector:this.getTargetSector(e,t)}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),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){var s,r;if(!i.dataTransfer)return;const a=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(n.g.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(a,i)),void 0===e&&(e=String(a.length));const t=(0,o.$)(".monaco-drag-image");t.textContent=e;const n=(e=>{for(;e&&!e.classList.contains("monaco-workbench");)e=e.parentElement;return e||this.domNode.ownerDocument})(this.domNode);n.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>n.removeChild(t)),0)}this.domNode.classList.add("dragging"),this.currentDragData=new x(a),C.CurrentDragAndDropData=new k(a),null===(r=(s=this.dnd).onDragStart)||void 0===r||r.call(s,this.currentDragData,i)}onDragOver(e){var t,i;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),C.CurrentDragAndDropData&&"vscode-ui"===C.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(C.CurrentDragAndDropData)this.currentDragData=C.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new L}const n=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop="boolean"==typeof n?n:n.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let o;e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof n&&0===(null===(t=n.effect)||void 0===t?void 0:t.type)?"copy":"move",o="boolean"!=typeof n&&n.feedback?n.feedback:void 0===e.index?[-1]:[e.index],o=(0,l.EB)(o).filter((e=>e>=-1&&ee-t)),o=-1===o[0]?[-1]:o;let s="boolean"!=typeof n&&n.effect&&n.effect.position?n.effect.position:"drop-target";if(r=this.currentDragFeedback,a=o,(Array.isArray(r)&&Array.isArray(a)?(0,l.fS)(r,a):r===a)&&this.currentDragFeedbackPosition===s)return!0;var r,a;if(this.currentDragFeedback=o,this.currentDragFeedbackPosition=s,this.currentDragFeedbackDisposable.dispose(),-1===o[0])this.domNode.classList.add(s),this.rowsContainer.classList.add(s),this.currentDragFeedbackDisposable=(0,u.OF)((()=>{this.domNode.classList.remove(s),this.rowsContainer.classList.remove(s)}));else{if(o.length>1&&"drop-target"!==s)throw new Error("Can't use multiple feedbacks with position different than 'over'");"drop-target-after"===s&&o[0]{var e;for(const t of o){const i=this.items[t];i.dropTarget=!1,null===(e=i.row)||void 0===e||e.domNode.classList.remove(s)}}))}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,d.Vg)((()=>this.clearDragOverFeedback()),100,this.disposables),this.currentDragData&&(null===(i=(t=this.dnd).onDragLeave)||void 0===i||i.call(t,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,C.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){var t,i;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,C.CurrentDragAndDropData=void 0,null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=u.JT.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=(0,o.xQ)(this.domNode).top;this.dragOverAnimationDisposable=(0,o.jt)((0,o.Jj)(this.domNode),this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,d.Vg)((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)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(void 0===t)return;const i=e.offsetY/this.items[t].size,n=Math.floor(i/.25);return(0,w.uZ)(n,0,3)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let o,s;e===this.elementTop(n.start)?(o=n.start,s=0):n.end-n.start>1&&(o=n.start+1,s=this.elementTop(o)-e);let r=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e=e.start;t--)this.insertItemInDOM(t);for(let e=a.start;e{"use strict";i.d(t,{wD:()=>q,aV:()=>X,sx:()=>U,AA:()=>w,dk:()=>R,iK:()=>O,cK:()=>E,$B:()=>M,hD:()=>T,wn:()=>z,Zo:()=>V,xf:()=>P,Et:()=>A,uZ:()=>K});var n=i(65321),o=i(4850),s=i(59069),r=i(10553),a=i(56346);class l{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}var d=i(9488),c=i(15393),h=i(41264),u=i(49898),g=i(4669),p=i(13707),m=i(5976),f=i(59870),v=i(1432),_=i(98401);i(33164);class b extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var w,y,C=i(25707),S=i(7448),x=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};class k{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((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const o of this.renderedElements)o.index=e+t&&n.push({index:o.index+i-t,templateData:o.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((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class L{get name(){return this._trait}get renderer(){return new k(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new g.Q5,this.onChange=this._onChange.event}splice(e,t,i){const n=i.length-t,o=e+t,s=[];let r=0;for(;r=o;)s.push(this.sortedIndexes[r++]+n);this.renderer.splice(e,t,i.length),this._set(s,s)}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(Z),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const s=G(o,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return(0,d.ry)(this.sortedIndexes,e,Z)>=0}dispose(){(0,m.B9)(this._onChange)}}x([u.H],L.prototype,"renderer",null);class N extends L{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 D{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((e=>this.identityProvider.getId(this.view.element(e)).toString()));if(0===n.length)return this.trait.splice(e,t,new Array(i.length).fill(!1));const o=new Set(n),s=i.map((e=>o.has(this.identityProvider.getId(e).toString())));this.trait.splice(e,t,s)}}function E(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function I(e,t){return!!e.classList.contains(t)||!e.classList.contains("monaco-list")&&!!e.parentElement&&I(e.parentElement,t)}function T(e){return I(e,"monaco-editor")}function M(e){return I(e,"monaco-custom-toggle")}function R(e){return I(e,"action-item")}function A(e){return I(e,"monaco-tree-sticky-row")}function P(e){return e.classList.contains("monaco-tree-sticky-container")}function O(e){return!!("A"===e.tagName&&e.classList.contains("monaco-button")||"DIV"===e.tagName&&e.classList.contains("monaco-button-dropdown"))||!e.classList.contains("monaco-list")&&!!e.parentElement&&O(e.parentElement)}class F{get onKeyDown(){return g.ju.chain(this.disposables.add(new o.Y(this.view.domNode,"keydown")).event,(e=>e.filter((e=>!E(e.target))).map((e=>new s.y(e)))))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new m.SL,this.multipleSelectionDisposables=new m.SL,this.multipleSelectionSupport=i.multipleSelectionSupport,this.disposables.add(this.onKeyDown((e=>{switch(e.keyCode){case 3:return this.onEnter(e);case 16:return this.onUpArrow(e);case 18:return this.onDownArrow(e);case 11:return this.onPageUpArrow(e);case 12:return this.onPageDownArrow(e);case 9:return this.onEscape(e);case 31:this.multipleSelectionSupport&&(v.dz?e.metaKey:e.ctrlKey)&&this.onCtrlA(e)}})))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(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(),this.list.setSelection((0,d.w6)(this.list.length),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()}}x([u.H],F.prototype,"onKeyDown",null),function(e){e[e.Automatic=0]="Automatic",e[e.Trigger=1]="Trigger"}(w||(w={})),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(y||(y={}));const B=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=98&&e.keyCode<=107||e.keyCode>=85&&e.keyCode<=95)}};class W{constructor(e,t,i,n,o){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=o,this.enabled=!1,this.state=y.Idle,this.mode=w.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new m.SL,this.disposables=new m.SL,this.updateOptions(e.options)}updateOptions(e){var t,i;null===(t=e.typeNavigationEnabled)||void 0===t||t?this.enable():this.disable(),this.mode=null!==(i=e.typeNavigationMode)&&void 0!==i?i:w.Automatic}enable(){if(this.enabled)return;let e=!1;const t=g.ju.chain(this.enabledDisposables.add(new o.Y(this.view.domNode,"keydown")).event,(t=>t.filter((e=>!E(e.target))).filter((()=>this.mode===w.Automatic||this.triggered)).map((e=>new s.y(e))).filter((t=>e||this.keyboardNavigationEventFilter(t))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>n.zB.stop(e,!0))).map((e=>e.browserEvent.key)))),i=g.ju.debounce(t,(()=>null),800,void 0,void 0,void 0,this.enabledDisposables);g.ju.reduce(g.ju.any(t,i),((e,t)=>null===t?null:(e||"")+t),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(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&(0,a.Z9)(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=y.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===y.Idle?1:0;this.state=y.Typing;for(let t=0;t1&&1===t.length)return this.previouslyFocused=i,this.list.setFocus([o]),void this.list.reveal(o)}}else if(void 0===r||(0,p.Ji)(e,r))return this.previouslyFocused=i,this.list.setFocus([o]),void this.list.reveal(o)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class H{constructor(e,t){this.list=e,this.view=t,this.disposables=new m.SL;const i=g.ju.chain(this.disposables.add(new o.Y(t.domNode,"keydown")).event,(e=>e.filter((e=>!E(e.target))).map((e=>new s.y(e)))));g.ju.chain(i,(e=>e.filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)))))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const o=i.querySelector("[tabIndex]");if(!(o&&o instanceof HTMLElement&&-1!==o.tabIndex))return;const s=(0,n.Jj)(o).getComputedStyle(o);"hidden"!==s.visibility&&"none"!==s.display&&(e.preventDefault(),e.stopPropagation(),o.focus())}dispose(){this.disposables.dispose()}}function V(e){return v.dz?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function z(e){return e.browserEvent.shiftKey}const j={isSelectionSingleChangeEvent:V,isSelectionRangeChangeEvent:z};class U{constructor(e){this.list=e,this.disposables=new m.SL,this._onPointer=new g.Q5,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||j),this.mouseSupport=void 0===e.options.mouseSupport||!!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(r.o.addTarget(e.getHTMLElement()))),g.ju.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||j))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){T(e.browserEvent.target)||(0,n.vY)()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(E(e.browserEvent.target)||T(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(E(e.browserEvent.target)||T(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),i=e.browserEvent,(0,n.N5)(i)&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if(E(e.browserEvent.target)||T(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;if(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)){if(void 0===i){const e=this.list.getFocus()[0];i=null!=e?e:t,this.list.setAnchor(i)}const n=Math.min(i,t),o=Math.max(i,t),s=(0,d.w6)(n,o+1),r=this.list.getSelection(),a=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let o=i-1;for(;o>=0&&e[o]===t-(i-o);)n.push(e[o--]);for(n.reverse(),o=i;o=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class q{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){var t,i;const o=this.selectorSuffix&&`.${this.selectorSuffix}`,s=[];e.listBackground&&s.push(`.monaco-list${o} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(s.push(`.monaco-list${o}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),s.push(`.monaco-list${o}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&s.push(`.monaco-list${o}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(s.push(`.monaco-list${o}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),s.push(`.monaco-list${o}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&s.push(`.monaco-list${o}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&s.push(`.monaco-list${o}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${o}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${o}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(s.push(`.monaco-list${o} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),s.push(`.monaco-list${o} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&s.push(`.monaco-list${o} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(s.push(`.monaco-list${o} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),s.push(`.monaco-list${o} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(s.push(`.monaco-list${o} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),s.push(`.monaco-list${o} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&s.push(`.monaco-list${o} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&s.push(`.monaco-list${o}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&s.push(`.monaco-list${o}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const r=(0,n.XT)(e.listFocusAndSelectionOutline,(0,n.XT)(e.listSelectionOutline,null!==(t=e.listFocusOutline)&&void 0!==t?t:""));r&&s.push(`.monaco-list${o}:focus .monaco-list-row.focused.selected { outline: 1px solid ${r}; outline-offset: -1px;}`),e.listFocusOutline&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${o}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${o}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`);const a=(0,n.XT)(e.listSelectionOutline,null!==(i=e.listInactiveFocusOutline)&&void 0!==i?i:"");a&&s.push(`.monaco-list${o} .monaco-list-row.focused.selected { outline: 1px dotted ${a}; outline-offset: -1px; }`),e.listSelectionOutline&&s.push(`.monaco-list${o} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&s.push(`.monaco-list${o} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&s.push(`.monaco-list${o} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&s.push(`\n\t\t\t\t.monaco-list${o}.drop-target,\n\t\t\t\t.monaco-list${o} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${o} .monaco-list-row.drop-target { background-color: ${e.listDropOverBackground} !important; color: inherit !important; }\n\t\t\t`),e.listDropBetweenBackground&&(s.push(`\n\t\t\t.monaco-list${o} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before,\n\t\t\t.monaco-list${o} .monaco-list-row.drop-target-before::before {\n\t\t\t\tcontent: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px;\n\t\t\t\tbackground-color: ${e.listDropBetweenBackground};\n\t\t\t}`),s.push(`\n\t\t\t.monaco-list${o} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after,\n\t\t\t.monaco-list${o} .monaco-list-row.drop-target-after::after {\n\t\t\t\tcontent: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px;\n\t\t\t\tbackground-color: ${e.listDropBetweenBackground};\n\t\t\t}`)),e.tableColumnsBorder&&s.push(`\n\t\t\t\t.monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t}\n\t\t\t`),e.tableOddRowsBackgroundColor&&s.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${e.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=s.join("\n")}}const K={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:h.Il.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:h.Il.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:h.Il.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},$={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){},dispose(){}}};function G(e,t){const i=[];let n=0,o=0;for(;n=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){i.push(e[n]),n++,o++;continue}e[n]e-t;class Q{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 o=0;for(const s of this.renderers)s.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){var o;let s=0;for(const r of this.renderers)null===(o=r.disposeElement)||void 0===o||o.call(r,e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class Y{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?i.setAttribute("aria-level",`${o}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class J{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){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,e,t)}onDragOver(e,t,i,n,o){return this.dnd.onDragOver(e,t,i,n,o)}onDragLeave(e,t,i,n){var o,s;null===(s=(o=this.dnd).onDragLeave)||void 0===s||s.call(o,e,t,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}drop(e,t,i,n,o){this.dnd.drop(e,t,i,n,o)}dispose(){this.dnd.dispose()}}class X{get onDidChangeFocus(){return g.ju.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)),this.disposables)}get onDidChangeSelection(){return g.ju.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=g.ju.chain(this.disposables.add(new o.Y(this.view.domNode,"keydown")).event,(t=>t.map((e=>new s.y(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map((e=>n.zB.stop(e,!0))).filter((()=>!1)))),i=g.ju.chain(this.disposables.add(new o.Y(this.view.domNode,"keyup")).event,(t=>t.forEach((()=>e=!1)).map((e=>new s.y(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map((e=>n.zB.stop(e,!0))).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})))),r=g.ju.chain(this.view.onContextMenu,(t=>t.filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:new S.n((0,n.Jj)(this.view.domNode),i),browserEvent:i})))));return g.ju.any(t,i,r)}get onKeyDown(){return this.disposables.add(new o.Y(this.view.domNode,"keydown")).event}get onDidFocus(){return g.ju.signal(this.disposables.add(new o.Y(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return g.ju.signal(this.disposables.add(new o.Y(this.view.domNode,"blur",!0)).event)}constructor(e,t,i,o,s=$){var r,a,d,c;this.user=e,this._options=s,this.focus=new L("focused"),this.anchor=new L("anchor"),this.eventBufferer=new g.E7,this._ariaLabel="",this.disposables=new m.SL,this._onDidDispose=new g.Q5,this.onDidDispose=this._onDidDispose.event;const h=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(r=this._options.accessibilityProvider)||void 0===r?void 0:r.getWidgetRole():"list";this.selection=new N("listbox"!==h);const u=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(u.push(new Y(this.accessibilityProvider)),null===(d=(a=this.accessibilityProvider).onDidChangeActiveDescendant)||void 0===d||d.call(a,this.onDidChangeActiveDescendant,this,this.disposables)),o=o.map((e=>new Q(e.templateId,[...u,e])));const p={...s,dnd:s.dnd&&new J(this,s.dnd)};if(this.view=this.createListView(t,i,o,p),this.view.domNode.setAttribute("role",h),s.styleController)this.styleController=s.styleController(this.view.domId);else{const e=(0,n.dS)(this.view.domNode);this.styleController=new q(e,this.view.domId)}if(this.spliceable=new l([new D(this.focus,this.view,s.identityProvider),new D(this.selection,this.view,s.identityProvider),new D(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 H(this,this.view)),("boolean"!=typeof s.keyboardSupport||s.keyboardSupport)&&(this.keyboardController=new F(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const e=s.keyboardNavigationDelegate||B;this.typeNavigationController=new W(this,this.view,s.keyboardNavigationLabelProvider,null!==(c=s.keyboardNavigationEventFilter)&&void 0!==c?c:()=>!0,e),this.disposables.add(this.typeNavigationController)}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&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new C.Bv(e,t,i,n)}createMouseController(e){return new U(this)}updateOptions(e={}){var t,i;this._options={...this._options,...e},null===(t=this.typeNavigationController)||void 0===t||t.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),null===(i=this.keyboardController)||void 0===i||i.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new b(this.user,`Invalid start index: ${e}`);if(t<0)throw new b(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||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 t of e)if(t<0||t>=this.length)throw new b(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return(0,d.Xh)(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new b(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findNextIndex(o.length>0?o[0]+e:0,t,n);s>-1&&this.setFocus([s],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);s>-1&&this.setFocus([s],i)}async focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.getFocus()[0];if(n!==i&&(void 0===n||i>n)){const o=this.findPreviousIndex(i,!1,t);o>-1&&n!==o?this.setFocus([o],e):this.setFocus([i],e)}else{const o=this.view.getScrollTop();let s=o+this.view.renderHeight;i>n&&(s-=this.view.elementHeight(i)),this.view.setScrollTop(s),this.view.getScrollTop()!==o&&(this.setFocus([]),await(0,c.Vs)(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,i=(()=>0)){let n;const o=i(),s=this.view.getScrollTop()+o;n=0===s?this.view.indexAt(s):this.view.indexAfter(s-1);const r=this.getFocus()[0];if(r!==n&&(void 0===r||r>=n)){const i=this.findNextIndex(n,!1,t);i>-1&&r!==i?this.setFocus([i],e):this.setFocus([n],e)}else{const n=s;this.view.setScrollTop(s-this.view.renderHeight-o),this.view.getScrollTop()+i()!==n&&(this.setFocus([]),await(0,c.Vs)(0),await this.focusPreviousPage(e,t,i))}}focusLast(e,t){if(0===this.length)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(0===this.length)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%=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 b(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),o=this.view.elementTop(e),s=this.view.elementHeight(e);if((0,_.hj)(t)){const e=s-this.view.renderHeight+i;this.view.setScrollTop(e*(0,f.uZ)(t,0,1)+o-i)}else{const e=o+s,t=n+this.view.renderHeight;o=t||(o=t&&s>=this.view.renderHeight?this.view.setScrollTop(o-i):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if(ni+this.view.renderHeight)return null;const s=o-this.view.renderHeight+t;return Math.abs((i+t-n)/s)}isDOMFocused(){return(0,n.H9)(this.view.domNode)}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((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}x([u.H],X.prototype,"onDidChangeFocus",null),x([u.H],X.prototype,"onDidChangeSelection",null),x([u.H],X.prototype,"onContextMenu",null),x([u.H],X.prototype,"onKeyDown",null),x([u.H],X.prototype,"onDidFocus",null),x([u.H],X.prototype,"onDidBlur",null)},17735:(e,t,i)=>{"use strict";i.d(t,{f:()=>a});var n=i(65321),o=i(63841),s=i(4669),r=i(5976);class a{constructor(){let e;this._onDidWillResize=new s.Q5,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new s.Q5,this.onDidResize=this._onDidResize.event,this._sashListener=new r.SL,this._size=new n.Ro(0,0),this._minSize=new n.Ro(0,0),this._maxSize=new n.Ro(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new o.g(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new o.g(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new o.g(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:o.l.North}),this._southSash=new o.g(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:o.l.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(s.ju.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)}))),this._sashListener.add(s.ju.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(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(s.ju.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(s.ju.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{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:o}=this._minSize,{height:s,width:r}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(o,Math.min(r,t));const a=new n.Ro(t,e);n.Ro.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,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}}},63841:(e,t,i)=>{"use strict";i.d(t,{l:()=>k,g:()=>R});var n=i(65321),o=i(4850),s=i(10553),r=i(15393),a=i(49898),l=i(4669),d=i(5976),c=i(1432),h=i(93379),u=i.n(h),g=i(7795),p=i.n(g),m=i(90569),f=i.n(m),v=i(3565),_=i.n(v),b=i(19216),w=i.n(b),y=i(44589),C=i.n(y),S=i(91629),x={};x.styleTagTransform=C(),x.setAttributes=_(),x.insert=f().bind(null,"head"),x.domAPI=p(),x.insertStyleElement=w(),u()(S.Z,x),S.Z&&S.Z.locals&&S.Z.locals;var k,L=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(k||(k={}));const N=new l.Q5,D=new l.Q5;class E{constructor(e){this.el=e,this.disposables=new d.SL}get onPointerMove(){return this.disposables.add(new o.Y((0,n.Jj)(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new o.Y((0,n.Jj)(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}L([a.H],E.prototype,"onPointerMove",null),L([a.H],E.prototype,"onPointerUp",null);class I{get onPointerMove(){return this.disposables.add(new o.Y(this.el,s.t.Change)).event}get onPointerUp(){return this.disposables.add(new o.Y(this.el,s.t.End)).event}constructor(e){this.el=e,this.disposables=new d.SL}dispose(){this.disposables.dispose()}}L([a.H],I.prototype,"onPointerMove",null),L([a.H],I.prototype,"onPointerUp",null);class T{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}L([a.H],T.prototype,"onPointerMove",null),L([a.H],T.prototype,"onPointerUp",null);const M="pointer-events-disabled";class R extends d.JT{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",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,n.R3)(this.el,(0,n.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,d.OF)((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new o.Y(this._orthogonalStartDragHandle,"mouseenter")).event((()=>R.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new o.Y(this._orthogonalStartDragHandle,"mouseleave")).event((()=>R.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};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=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,n.R3)(this.el,(0,n.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,d.OF)((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new o.Y(this._orthogonalEndDragHandle,"mouseenter")).event((()=>R.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new o.Y(this._orthogonalEndDragHandle,"mouseleave")).event((()=>R.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new r.vp(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new l.Q5),this._onDidStart=this._register(new l.Q5),this._onDidChange=this._register(new l.Q5),this._onDidReset=this._register(new l.Q5),this._onDidEnd=this._register(new l.Q5),this.orthogonalStartSashDisposables=this._register(new d.SL),this.orthogonalStartDragHandleDisposables=this._register(new d.SL),this.orthogonalEndSashDisposables=this._register(new d.SL),this.orthogonalEndDragHandleDisposables=this._register(new d.SL),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=(0,n.R3)(e,(0,n.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),c.dz&&this.el.classList.add("mac");const a=this._register(new o.Y(this.el,"mousedown")).event;this._register(a((t=>this.onPointerStart(t,new E(e))),this));const h=this._register(new o.Y(this.el,"dblclick")).event;this._register(h(this.onPointerDoublePress,this));const u=this._register(new o.Y(this.el,"mouseenter")).event;this._register(u((()=>R.onMouseEnter(this))));const g=this._register(new o.Y(this.el,"mouseleave")).event;this._register(g((()=>R.onMouseLeave(this)))),this._register(s.o.addTarget(this.el));const p=this._register(new o.Y(this.el,s.t.Start)).event;this._register(p((e=>this.onPointerStart(e,new I(this.el))),this));const m=this._register(new o.Y(this.el,s.t.Tap)).event;let f;this._register(m((e=>{if(f)return clearTimeout(f),f=void 0,void this.onPointerDoublePress(e);clearTimeout(f),f=setTimeout((()=>f=void 0),250)}),this)),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(N.event((e=>{this.size=e,this.layout()})))),this._register(D.event((e=>this.hoverDelay=e))),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(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",!1),this.layout()}onPointerStart(e,t){n.zB.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new T(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new T(t))),!this.state)return;const o=this.el.ownerDocument.getElementsByTagName("iframe");for(const e of o)e.classList.add(M);const s=e.pageX,r=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const h=(0,n.dS)(this.el),u=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":c.dz?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":c.dz?"col-resize":"ew-resize",h.textContent=`* { cursor: ${e} !important; }`},g=new d.SL;u(),i||this.onDidEnablementChange.event(u,null,g),t.onPointerMove((e=>{n.zB.stop(e,!1);const t={startX:s,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:a};this._onDidChange.fire(t)}),null,g),t.onPointerUp((e=>{n.zB.stop(e,!1),this.el.removeChild(h),this.el.classList.remove("active"),this._onDidEnd.fire(),g.dispose();for(const e of o)e.classList.remove(M)}),null,g),g.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&&R.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&R.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){R.onMouseLeave(this)}layout(){if(0===this.orientation){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){var t;const i=null!==(t=e.initialTarget)&&void 0!==t?t:e.target;if(i&&i instanceof HTMLElement)return i.classList.contains("orthogonal-drag-handle")?i.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},64117:(e,t,i)=>{"use strict";i.d(t,{s$:()=>V,Io:()=>F,NB:()=>W,$Z:()=>H});var n=i(16268),o=i(65321),s=i(38626),r=i(7448),a=i(93911),l=i(93794),d=i(15393),c=i(25670);class h extends l.${constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...c.k.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new a.C),this._register(o.mu(this.bgDomNode,o.tw.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._register(o.mu(this.domNode,o.tw.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._pointerdownRepeatTimer=this._register(new o.ne),this._pointerdownScheduleRepeatTimer=this._register(new d._F)}_arrowPointerDown(e){e.target&&e.target instanceof Element&&(this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet((()=>{this._pointerdownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24,o.Jj(e))}),200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{}),(()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()})),e.preventDefault())}}var u=i(5976);class g extends u.JT{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new d._F)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{var e;null===(e=this._domNode)||void 0===e||e.setClassName(this._visibleClassName)}),0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,null===(t=this._domNode)||void 0===t||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}var p=i(1432);class m extends l.${constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new g(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new a.C),this._shouldRender=!0,this.domNode=(0,s.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(o.nm(this.domNode.domNode,o.tw.POINTER_DOWN,(e=>this._domNodePointerDown(e))))}_createArrow(e){const t=this._register(new h(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=(0,s.X)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(o.nm(this.slider.domNode,o.tw.POINTER_DOWN,(e=>{0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}))),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderPointerPosition(e);i<=o&&o<=n?0===e.button&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.offsetX&&"number"==typeof e.offsetY)t=e.offsetX,i=e.offsetY;else{const n=o.i(this.domNode.domNode);t=e.pageX-n.left,i=e.pageY-n.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{const o=this._sliderOrthogonalPointerPosition(e),s=Math.abs(o-i);if(p.ED&&s>140)return void this._setDesiredScrollPositionNow(n.getScrollPosition());const r=this._sliderPointerPosition(e)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(r))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}var f=i(51203),v=i(73046);class _ extends m{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new f.M(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,n.width,n.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){const e=(t.arrowSize-11)/2,i=(t.horizontalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:v.l.scrollbarButtonLeft,top:i,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,1,0))}),this._createArrow({className:"scra",icon:v.l.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class b extends m{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new f.M(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-11)/2,i=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:v.l.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,0,1))}),this._createArrow({className:"scra",icon:v.l.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}var w=i(4669),y=i(76633),C=i(93379),S=i.n(C),x=i(7795),k=i.n(x),L=i(90569),N=i.n(L),D=i(3565),E=i.n(D),I=i(19216),T=i.n(I),M=i(44589),R=i.n(M),A=i(7198),P={};P.styleTagTransform=R(),P.setAttributes=E(),P.insert=N().bind(null,"head"),P.domAPI=k(),P.insertStyleElement=T(),S()(A.Z,P),A.Z&&A.Z.locals&&A.Z.locals;class O{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class F{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){const o=n===this._front?e:Math.pow(2,-i);if(e-=o,t+=this._memory[n].score*o,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}acceptStandardWheelEvent(e){if(n.i7){const t=o.Jj(e.browserEvent),i=(0,n.ie)(t);this.accept(Date.now(),e.deltaX*i,e.deltaY*i)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,i){const n=new O(e,t,i);n.score=this._computeScore(n),-1===this._front&&-1===this._rear?(this._memory[0]=n,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return-1===this._front&&-1===this._rear||this._memory[this._rear],this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}F.INSTANCE=new F;class B extends l.${get options(){return this._options}constructor(e,t,i){super(),this._onScroll=this._register(new w.Q5),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new w.Q5),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,p.dz&&(t.className+=" mac"),t}(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new b(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new _(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,s.X)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,s.X)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,s.X)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onmouseleave(this._listenOnDomNode,(e=>this._onMouseLeave(e))),this._hideTimeout=this._register(new d._F),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,u.B9)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,p.dz&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new r.q(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,u.B9)(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new r.q(e))};this._mouseWheelToDispose.push(o.nm(this._listenOnDomNode,o.tw.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){var t;if(null===(t=e.browserEvent)||void 0===t?void 0:t.defaultPrevented)return;const i=F.INSTANCE;i.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let t=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&o+t===0?o=t=0:Math.abs(t)>=Math.abs(o)?o=0:t=0),this._options.flipAxes&&([t,o]=[o,t]);const s=!p.dz&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||o||(o=t,t=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,t*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(t){const e=50*t,i=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,i)}if(o){const e=50*o,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}a=this._scrollable.validateScrollPosition(a),(r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&i.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),n=!0)}let o=n;!o&&this._options.alwaysConsumeMouseWheel&&(o=!0),!o&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(o=!0),o&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",o=t?" top":"",s=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class W extends B{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new y.Rm({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>o.jL(o.Jj(e),t)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class H extends B{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class V extends B{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new y.Rm({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>o.jL(o.Jj(e),t)});super(e,t,i),this._register(i),this._element=e,this._register(this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)}))),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}},51203:(e,t,i)=>{"use strict";i.d(t,{M:()=>n});class n{constructor(e,t,i,n,o,s){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=o,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new n(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,o){const s=Math.max(0,i-e),r=Math.max(0,s-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*r/n))),d=(r-l)/(n-i),c=o*d;return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:d,computedSliderPosition:Math.round(c)}}_refreshComputedValues(){const e=n._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return t{"use strict";i.d(t,{M:()=>R,z:()=>A});var n=i(65321),o=i(4850),s=i(63841),r=i(64117),a=i(9488),l=i(41264),d=i(4669),c=i(5976),h=i(59870),u=i(76633),g=i(98401),p=i(93379),m=i.n(p),f=i(7795),v=i.n(f),_=i(90569),b=i.n(_),w=i(3565),y=i.n(w),C=i(19216),S=i.n(C),x=i(44589),k=i.n(x),L=i(82470),N={};N.styleTagTransform=k(),N.setAttributes=y(),N.insert=b().bind(null,"head"),N.domAPI=v(),N.insertStyleElement=S(),m()(L.Z,N),L.Z&&L.Z.locals&&L.Z.locals;const D={separatorBorder:l.Il.transparent};class E{set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){var i,n;if(e!==this.visible){e?(this.size=(0,h.uZ)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e);try{null===(n=(i=this.view).setVisible)||void 0===n||n.call(i,e)}catch(e){console.error("Splitview: Failed to set visible view"),console.error(e)}}}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(){var e;return null===(e=this.view.proportionalLayout)||void 0===e||e}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,"number"==typeof i?(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(e){console.error("Splitview: Failed to layout view"),console.error(e)}}dispose(){this.disposable.dispose()}}class I extends E{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class T extends E{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var M,R;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(M||(M={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Auto=function(e){return{type:"auto",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(R||(R={}));class A extends c.JT{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={}){var i,s,a,l,c;super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=M.Idle,this._onDidSashChange=this._register(new d.Q5),this._onDidSashReset=this._register(new d.Q5),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=null!==(i=t.orientation)&&void 0!==i?i:0,this.inverseAltBehavior=null!==(s=t.inverseAltBehavior)&&void 0!==s&&s,this.proportionalLayout=null===(a=t.proportionalLayout)||void 0===a||a,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=(0,n.R3)(this.el,(0,n.$)(".sash-container")),this.viewContainer=(0,n.$)(".split-view-container"),this.scrollable=this._register(new u.Rm({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:e=>(0,n.jL)((0,n.Jj)(this.el),e)})),this.scrollableElement=this._register(new r.$Z(this.viewContainer,{vertical:0===this.orientation?null!==(l=t.scrollbarVisibility)&&void 0!==l?l:1:2,horizontal:1===this.orientation?null!==(c=t.scrollbarVisibility)&&void 0!==c?c:1:2},this.scrollable));const h=this._register(new o.Y(this.viewContainer,"scroll")).event;this._register(h((e=>{const t=this.scrollableElement.getScrollPosition(),i=Math.abs(this.viewContainer.scrollLeft-t.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,n=Math.abs(this.viewContainer.scrollTop-t.scrollTop)<=1?void 0:this.viewContainer.scrollTop;void 0===i&&void 0===n||this.scrollableElement.setScrollPosition({scrollLeft:i,scrollTop:n})}))),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{e.scrollTopChanged&&(this.viewContainer.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this.viewContainer.scrollLeft=e.scrollLeft)}))),(0,n.R3)(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||D),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=g.o8(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this._contentSize=this.viewItems.reduce(((e,t)=>e+t.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 t=0;for(let i=0;i0&&(n.size=(0,h.uZ)(Math.round(o*e/t),n.minimumSize,n.maximumSize))}}else{const t=(0,a.w6)(this.viewItems.length),n=t.filter((e=>1===this.viewItems[e].priority)),o=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,o)}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 e of this.viewItems)e.enabled=!1;const o=this.sashItems.findIndex((t=>t.sash===e)),s=(0,c.F8)((0,n.nm)(this.el.ownerDocument.body,"keydown",(e=>r(this.sashDragState.current,e.altKey))),(0,n.nm)(this.el.ownerDocument.body,"keyup",(()=>r(this.sashDragState.current,!1)))),r=(e,t)=>{const i=this.viewItems.map((e=>e.size));let n,r,l=Number.NEGATIVE_INFINITY,d=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t)if(o===this.sashItems.length-1){const e=this.viewItems[o];l=(e.minimumSize-e.size)/2,d=(e.maximumSize-e.size)/2}else{const e=this.viewItems[o+1];l=(e.size-e.maximumSize)/2,d=(e.size-e.minimumSize)/2}if(!t){const e=(0,a.w6)(o,-1),t=(0,a.w6)(o+1,this.viewItems.length),s=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),l=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),d=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),c=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),h=Math.max(s,c),u=Math.min(d,l),g=this.findFirstSnapIndex(e),p=this.findFirstSnapIndex(t);if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);n={index:g,limitDelta:e.visible?h-t:h+t,size:e.size}}if("number"==typeof p){const e=this.viewItems[p],t=Math.floor(e.viewMinimumSize/2);r={index:p,limitDelta:e.visible?u+t:u-t,size:e.size}}}this.sashDragState={start:e,current:e,index:o,sizes:i,minDelta:l,maxDelta:d,alt:t,snapBefore:n,snapAfter:r,disposable:s}};r(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:o,minDelta:s,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const d=e-i,c=this.resize(t,d,n,void 0,void 0,s,r,a,l);if(o){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,o=this.viewItems[n],s=o.size-o.maximumSize,r=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-c,i,void 0,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=(0,h.uZ)(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!==M.Idle)throw new Error("Cant modify splitview");this.state=M.Busy;try{const i=(0,a.w6)(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],o=i.filter((e=>2===this.viewItems[e].priority)),s=this.viewItems[e];t=Math.round(t),t=(0,h.uZ)(t,s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(n,o)}finally{this.state=M.Idle}}}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=(0,h.uZ)(i,t.minimumSize,t.maximumSize);const n=(0,a.w6)(this.viewItems.length),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));this.relayout(o,s)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,o){if(this.state!==M.Idle)throw new Error("Cant modify splitview");this.state=M.Busy;try{const r=(0,n.$)(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(i));const l=e.onDidChange((e=>this.onViewChange(p,e))),h=(0,c.OF)((()=>this.viewContainer.removeChild(r))),u=(0,c.F8)(l,h);let g;"number"==typeof t?g=t:("auto"===t.type&&(t=this.areViewsDistributed()?{type:"distribute"}:{type:"split",index:t.index}),g="split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize);const p=0===this.orientation?new I(r,e,g,u):new T(r,e,g,u);if(this.viewItems.splice(i,0,p),this.viewItems.length>1){const e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},t=0===this.orientation?new s.g(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},{...e,orientation:1}):new s.g(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},{...e,orientation:0}),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),o=d.ju.map(t.onDidStart,n)(this.onSashStart,this),r=d.ju.map(t.onDidChange,n)(this.onSashChange,this),l=d.ju.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),h=l(this.onSashEnd,this),u=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=(0,a.w6)(e,-1),n=(0,a.w6)(e+1,this.viewItems.length),o=this.findFirstSnapIndex(i),s=this.findFirstSnapIndex(n);("number"!=typeof o||this.viewItems[o].visible)&&("number"!=typeof s||this.viewItems[s].visible)&&this._onDidSashReset.fire(e)})),g=(0,c.F8)(o,r,h,u,t),p={sash:t,disposable:g};this.sashItems.splice(i-1,0,p)}let m;r.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(m=[t.index]),o||this.relayout([i],m),o||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}finally{this.state=M.Idle}}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.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((e=>e.size)),n,o,s=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,l,d){if(e<0||e>=this.viewItems.length)return 0;const c=(0,a.w6)(e,-1),u=(0,a.w6)(e+1,this.viewItems.length);if(o)for(const e of o)(0,a.zI)(c,e),(0,a.zI)(u,e);if(n)for(const e of n)(0,a.al)(c,e),(0,a.al)(u,e);const g=c.map((e=>this.viewItems[e])),p=c.map((e=>i[e])),m=u.map((e=>this.viewItems[e])),f=u.map((e=>i[e])),v=c.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),_=c.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),b=0===u.length?Number.POSITIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),w=0===u.length?Number.NEGATIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),y=Math.max(v,w,s),C=Math.min(b,_,r);let S=!1;if(l){const e=this.viewItems[l.index],i=t>=l.limitDelta;S=i!==e.visible,e.setVisible(i,l.size)}if(!S&&d){const e=this.viewItems[d.index],i=te+t.size),0);let i=this.size-t;const n=(0,a.w6)(this.viewItems.length-1,-1),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));for(const e of s)(0,a.zI)(n,e);for(const e of o)(0,a.al)(n,e);"number"==typeof e&&(0,a.al)(n,e);for(let e=0;0!==i&&ee+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?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((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const o=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const s=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let r=0;for(let e=0;e0||this.startSnappingEnabled)?n.state=1:h&&t[e]&&(r0)return;if(!e.visible&&e.snap)return t}}areViewsDistributed(){let e,t;for(const i of this.viewItems)if(e=void 0===e?i.size:Math.min(e,i.size),t=void 0===t?i.size:Math.max(t,i.size),t-e>2)return!1;return!0}dispose(){var e;null===(e=this.sashDragState)||void 0===e||e.disposable.dispose(),(0,c.B9)(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[],super.dispose()}}},98892:(e,t,i)=>{"use strict";i.d(t,{Z:()=>S,D:()=>C});var n=i(93794),o=i(25670),s=i(4669),r=i(93379),a=i.n(r),l=i(7795),d=i.n(l),c=i(90569),h=i.n(c),u=i(3565),g=i.n(u),p=i(19216),m=i.n(p),f=i(44589),v=i.n(f),_=i(16310),b={};b.styleTagTransform=v(),b.setAttributes=g(),b.insert=h().bind(null,"head"),b.domAPI=d(),b.insertStyleElement=m(),a()(_.Z,b),_.Z&&_.Z.locals&&_.Z.locals;var w=i(51433),y=i(17057);const C={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class S extends n.${constructor(e){super(),this._onChange=this._register(new s.Q5),this.onChange=this._onChange.event,this._onKeyDown=this._register(new s.Q5),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...o.k.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register((0,w.g)((0,y.t)("mouse"),this.domNode,this._opts.title)),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.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,(e=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault())})),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),e.preventDefault(),void e.stopPropagation();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}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()}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))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}},93794:(e,t,i)=>{"use strict";i.d(t,{$:()=>l});var n=i(65321),o=i(59069),s=i(7448),r=i(10553),a=i(5976);class l extends a.JT{onclick(e,t){this._register(n.nm(e,n.tw.CLICK,(i=>t(new s.n(n.Jj(e),i)))))}onmousedown(e,t){this._register(n.nm(e,n.tw.MOUSE_DOWN,(i=>t(new s.n(n.Jj(e),i)))))}onmouseover(e,t){this._register(n.nm(e,n.tw.MOUSE_OVER,(i=>t(new s.n(n.Jj(e),i)))))}onmouseleave(e,t){this._register(n.nm(e,n.tw.MOUSE_LEAVE,(i=>t(new s.n(n.Jj(e),i)))))}onkeydown(e,t){this._register(n.nm(e,n.tw.KEY_DOWN,(e=>t(new o.y(e)))))}onkeyup(e,t){this._register(n.nm(e,n.tw.KEY_UP,(e=>t(new o.y(e)))))}oninput(e,t){this._register(n.nm(e,n.tw.INPUT,t))}onblur(e,t){this._register(n.nm(e,n.tw.BLUR,t))}onfocus(e,t){this._register(n.nm(e,n.tw.FOCUS,t))}ignoreGesture(e){return r.o.ignoreTarget(e)}}},48906:(e,t,i)=>{"use strict";function n(e,t){const i=e;"number"!=typeof i.vscodeWindowId&&Object.defineProperty(i,"vscodeWindowId",{get:()=>t})}i.d(t,{Ex:()=>o,HA:()=>n,vO:()=>s});const o=window,s=o},74741:(e,t,i)=>{"use strict";i.d(t,{Wi:()=>a,Z0:()=>l,aU:()=>r,eZ:()=>c,wY:()=>d,xw:()=>h});var n=i(4669),o=i(5976),s=i(63580);class r extends o.JT{constructor(e,t="",i="",o=!0,s){super(),this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=o,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,t){this._actionCallback&&await this._actionCallback(e)}}class a extends o.JT{constructor(){super(...arguments),this._onWillRun=this._register(new n.Q5),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new n.Q5),this.onDidRun=this._onDidRun.event}async run(e,t){if(!e.enabled)return;let i;this._onWillRun.fire({action:e});try{await this.runAction(e,t)}catch(e){i=e}this._onDidRun.fire({action:e,error:i})}async runAction(e,t){await e.run(t)}}class l{constructor(){this.id=l.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(const i of e)i.length&&(t=t.length?[...t,new l,...i]:i);return t}async run(){}}l.ID="vs.actions.separator";class d{get actions(){return this._actions}constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=n,this._actions=i}async run(){}}class c extends r{constructor(){super(c.ID,s.NC("submenu.empty","(empty)"),void 0,!1)}}function h(e){var t;return{id:e.id,label:e.label,class:e.class,enabled:null===(t=e.enabled)||void 0===t||t,checked:e.checked,run:async(...t)=>e.run(...t),tooltip:e.label}}c.ID="vs.actions.empty"},9488:(e,t,i)=>{"use strict";function n(e,t=0){return e[e.length-(1+t)]}function o(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function s(e,t,i=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n0))return n;r=n-1}}return-(s+1)}(e.length)}function l(e,t,i){if((e|=0)>=t.length)throw new TypeError("invalid index");const n=t[Math.floor(t.length*Math.random())],o=[],s=[],r=[];for(const e of t){const t=i(e,n);t<0?o.push(e):t>0?s.push(e):r.push(e)}return e!!e))}function p(e){let t=0;for(let i=0;i0}function v(e,t=(e=>e)){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function _(e,t){return e.length>0?e[0]:t}function b(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let e=i;et;e--)n.push(e);return n}function w(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)}function y(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function C(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function S(e,t){for(const i of t)e.push(i)}function x(e){return Array.isArray(e)?e:[e]}function k(e,t,i,n){const o=L(e,t);let s=e.splice(o,i);return void 0===s&&(s=[]),function(e,t,i){const n=L(e,t),o=e.length,s=i.length;e.length=o+s;for(let t=o-1;t>=n;t--)e[t+s]=e[t];for(let t=0;tt(e(i),e(n))}function E(...e){return(t,i)=>{for(const n of e){const e=n(t,i);if(!N.isNeitherLessOrGreaterThan(e))return e}return N.neitherLessOrGreaterThan}}i.d(t,{BV:()=>M,EB:()=>v,Gb:()=>n,H9:()=>R,HW:()=>l,JH:()=>o,KO:()=>u,LS:()=>r,Of:()=>f,Rs:()=>p,W$:()=>A,XY:()=>m,Xh:()=>_,Zv:()=>w,_2:()=>x,al:()=>C,db:()=>k,fS:()=>s,f_:()=>E,fv:()=>I,kX:()=>g,mw:()=>c,nW:()=>T,ry:()=>a,tT:()=>D,vA:()=>S,vM:()=>d,w6:()=>b,zI:()=>y,zy:()=>h}),function(e){e.isLessThan=function(e){return e<0},e.isLessThanOrEqual=function(e){return e<=0},e.isGreaterThan=function(e){return e>0},e.isNeitherLessOrGreaterThan=function(e){return 0===e},e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(N||(N={}));const I=(e,t)=>e-t,T=(e,t)=>I(e?1:0,t?1:0);function M(e){return(t,i)=>-e(t,i)}class R{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class A{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new A((t=>this.iterate((i=>!e(i)||t(i)))))}map(e){return new A((t=>this.iterate((i=>t(e(i))))))}findLast(e){let t;return this.iterate((i=>(e(i)&&(t=i),!0))),t}findLastMaxBy(e){let t,i=!0;return this.iterate((n=>((i||N.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0))),t}}A.empty=new A((e=>{}))},35534:(e,t,i)=>{"use strict";function n(e,t,i){const n=function(e,t,i=e.length-1){for(let n=i;n>=0;n--)if(t(e[n]))return n;return-1}(e,t);if(-1!==n)return e[n]}function o(e,t){const i=s(e,t);return-1===i?void 0:e[i]}function s(e,t,i=0,n=e.length){let o=i,s=n;for(;og,J_:()=>a,Jw:()=>s,Ph:()=>h,b1:()=>l,cn:()=>r,dF:()=>n,dI:()=>d,jV:()=>c,tQ:()=>u,ti:()=>o});class l{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(l.assertInvariants){if(this._prevFindLastPredicate)for(const t of this._array)if(this._prevFindLastPredicate(t)&&!e(t))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.");this._prevFindLastPredicate=e}const t=s(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,-1===t?void 0:this._array[t]}}function d(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n0&&(i=o)}return i}function c(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n=0&&(i=o)}return i}function h(e,t){return d(e,((e,i)=>-t(e,i)))}function u(e,t){if(0===e.length)return-1;let i=0;for(let n=1;n0&&(i=n);return i}function g(e,t){for(const i of e){const e=t(i);if(void 0!==e)return e}}l.assertInvariants=!1},35146:(e,t,i)=>{"use strict";i.d(t,{DM:()=>l,eZ:()=>a,ok:()=>o,vE:()=>s,wN:()=>r});var n=i(17301);function o(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function s(e,t="Unreachable"){throw new Error(t)}function r(e){e||(0,n.dL)(new n.he("Soft Assertion Failed"))}function a(e){e()||(e(),(0,n.dL)(new n.he("Assertion Failed")))}function l(e,t){let i=0;for(;i{"use strict";i.d(t,{Aq:()=>N,CR:()=>k,J8:()=>d,PG:()=>c,Ps:()=>v,R5:()=>x,Vg:()=>f,Vs:()=>m,_F:()=>_,eP:()=>h,hF:()=>S,jT:()=>L,jg:()=>y,pY:()=>w,rH:()=>p,vp:()=>g,y5:()=>C,zS:()=>E,zh:()=>b});var n=i(71050),o=i(17301),s=i(4669),r=i(5976),a=i(1432),l=i(5635);function d(e){return!!e&&"function"==typeof e.then}function c(e){const t=new n.A,i=e(t.token),s=new Promise(((e,n)=>{const s=t.token.onCancellationRequested((()=>{s.dispose(),n(new o.FU)}));Promise.resolve(i).then((i=>{s.dispose(),t.dispose(),e(i)}),(e=>{s.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel(),t.dispose()}then(e,t){return s.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return s.finally(e)}}}function h(e,t,i){return new Promise(((n,o)=>{const s=t.onCancellationRequested((()=>{s.dispose(),n(i)}));e.then(n,o).finally((()=>s.dispose()))}))}class u{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{if(this.queuedPromise=null,this.isDisposed)return;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}dispose(){this.isDisposed=!0}}class g{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})));const i=()=>{var e;this.deferred=null,null===(e=this.doResolve)||void 0===e||e.call(this,null)};return this.deferred=t===l.n?(e=>{let t=!0;return queueMicrotask((()=>{t&&(t=!1,e())})),{isTriggered:()=>t,dispose:()=>{t=!1}}})(i):((e,t)=>{let i=!0;const n=setTimeout((()=>{i=!1,t()}),e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}})(t,i),this.completionPromise}isTriggered(){var e;return!!(null===(e=this.deferred)||void 0===e?void 0:e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&(null===(e=this.doReject)||void 0===e||e.call(this,new o.FU),this.completionPromise=null)}cancelTimeout(){var e;null===(e=this.deferred)||void 0===e||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class p{constructor(e){this.delayer=new g(e),this.throttler=new u}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function m(e,t){return t?new Promise(((i,n)=>{const s=setTimeout((()=>{r.dispose(),i()}),e),r=t.onCancellationRequested((()=>{clearTimeout(s),r.dispose(),n(new o.FU)}))})):c((t=>m(e,t)))}function f(e,t=0,i){const n=setTimeout((()=>{e(),i&&o.dispose()}),t),o=(0,r.OF)((()=>{clearTimeout(n),null==i||i.deleteAndLeak(o)}));return null==i||i.add(o),o}function v(e,t=(e=>!!e),i=null){let n=0;const o=e.length,s=()=>{if(n>=o)return Promise.resolve(i);const r=e[n++];return Promise.resolve(r()).then((e=>t(e)?Promise.resolve(e):s()))};return s()}class _{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class b{constructor(){this.disposable=void 0}cancel(){var e;null===(e=this.disposable)||void 0===e||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){this.cancel();const n=i.setInterval((()=>{e()}),t);this.disposable=(0,r.OF)((()=>{i.clearInterval(n),this.disposable=void 0}))}dispose(){this.cancel()}}class w{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}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-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;null===(e=this.runner)||void 0===e||e.call(this)}}let y,C;C="function"!=typeof globalThis.requestIdleCallback||"function"!=typeof globalThis.cancelIdleCallback?(e,t)=>{(0,a.fn)((()=>{if(i)return;const e=Date.now()+15,n={didTimeout:!0,timeRemaining:()=>Math.max(0,e-Date.now())};t(Object.freeze(n))}));let i=!1;return{dispose(){i||(i=!0)}}}:(e,t,i)=>{const n=e.requestIdleCallback(t,"number"==typeof i?{timeout:i}:void 0);let o=!1;return{dispose(){o||(o=!0,e.cancelIdleCallback(n))}}},y=e=>C(globalThis,e);class S{constructor(e,t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=C(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 x extends S{constructor(e){super(globalThis,e)}}class k{get isRejected(){var e;return 1===(null===(e=this.outcome)||void 0===e?void 0:e.outcome)}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}complete(e){return new Promise((t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()}))}error(e){return new Promise((t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()}))}cancel(){return this.error(new o.FU)}}var L;!function(e){e.settled=async function(e){let t;const i=await Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i},e.withAsyncBody=function(e){return new Promise((async(t,i)=>{try{await e(t,i)}catch(e){i(e)}}))}}(L||(L={}));class N{static fromArray(e){return new N((t=>{t.emitMany(e)}))}static fromPromise(e){return new N((async t=>{t.emitMany(await e)}))}static fromPromises(e){return new N((async t=>{await Promise.all(e.map((async e=>t.emitOne(await e))))}))}static merge(e){return new N((async t=>{await Promise.all(e.map((async e=>{for await(const i of e)t.emitOne(i)})))}))}constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new s.Q5,queueMicrotask((async()=>{const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(e{for await(const n of e)i.emitOne(t(n))}))}map(e){return N.map(this,e)}static filter(e,t){return new N((async i=>{for await(const n of e)t(n)&&i.emitOne(n)}))}filter(e){return N.filter(this,e)}static coalesce(e){return N.filter(e,(e=>!!e))}coalesce(){return N.coalesce(this)}static async toPromise(e){const t=[];for await(const i of e)t.push(i);return t}toPromise(){return N.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}N.EMPTY=N.fromArray([]);class D extends N{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function E(e){const t=new n.A,i=e(t.token);return new D(t,(async e=>{const n=t.token.onCancellationRequested((()=>{n.dispose(),t.dispose(),e.reject(new o.FU)}));try{for await(const n of i){if(t.token.isCancellationRequested)return;e.emitOne(n)}n.dispose(),t.dispose()}catch(i){n.dispose(),t.dispose(),e.reject(i)}}))}},53060:(e,t,i)=>{"use strict";i.d(t,{Ag:()=>d,Cg:()=>u,KN:()=>r,Q$:()=>h,T4:()=>c,mP:()=>a,oq:()=>l});var n=i(79579);const o="undefined"!=typeof Buffer;let s;new n.o((()=>new Uint8Array(256)));class r{static wrap(e){return o&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new r(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return o?this.buffer.toString():(s||(s=new TextDecoder),s.decode(this.buffer))}}function a(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function l(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function d(e,t){return e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3]}function c(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function h(e,t){return e[t]}function u(e,t,i){e[i]=t}},701:(e,t,i)=>{"use strict";i.d(t,{b:()=>o,t:()=>n});class n{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.fn(e)),this.lastCache}}class o{get cachedValues(){return this._map}constructor(e){this.fn=e,this._map=new Map}get(e){if(this._map.has(e))return this._map.get(e);const t=this.fn(e);return this._map.set(e,t),t}}},71050:(e,t,i)=>{"use strict";i.d(t,{A:()=>a,T:()=>s});var n=i(4669);const o=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var s;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof r||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.ju.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o})}(s||(s={}));class r{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?o:(this._emitter||(this._emitter=new n.Q5),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{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 r),this._token}cancel(){this._token?this._token instanceof r&&this._token.cancel():this._token=s.Cancelled}dispose(e=!1){var t;e&&this.cancel(),null===(t=this._parentListener)||void 0===t||t.dispose(),this._token?this._token instanceof r&&this._token.dispose():this._token=s.None}}},73046:(e,t,i)=>{"use strict";i.d(t,{l:()=>a,u:()=>r});var n=i(98401);const o=Object.create(null);function s(e,t){if((0,n.HD)(t)){const i=o[t];if(void 0===i)throw new Error(`${e} references an unknown codicon: ${t}`);t=i}return o[e]=t,{id:e}}function r(){return o}const a={add:s("add",6e4),plus:s("plus",6e4),gistNew:s("gist-new",6e4),repoCreate:s("repo-create",6e4),lightbulb:s("lightbulb",60001),lightBulb:s("light-bulb",60001),repo:s("repo",60002),repoDelete:s("repo-delete",60002),gistFork:s("gist-fork",60003),repoForked:s("repo-forked",60003),gitPullRequest:s("git-pull-request",60004),gitPullRequestAbandoned:s("git-pull-request-abandoned",60004),recordKeys:s("record-keys",60005),keyboard:s("keyboard",60005),tag:s("tag",60006),tagAdd:s("tag-add",60006),tagRemove:s("tag-remove",60006),gitPullRequestLabel:s("git-pull-request-label",60006),person:s("person",60007),personFollow:s("person-follow",60007),personOutline:s("person-outline",60007),personFilled:s("person-filled",60007),gitBranch:s("git-branch",60008),gitBranchCreate:s("git-branch-create",60008),gitBranchDelete:s("git-branch-delete",60008),sourceControl:s("source-control",60008),mirror:s("mirror",60009),mirrorPublic:s("mirror-public",60009),star:s("star",60010),starAdd:s("star-add",60010),starDelete:s("star-delete",60010),starEmpty:s("star-empty",60010),comment:s("comment",60011),commentAdd:s("comment-add",60011),alert:s("alert",60012),warning:s("warning",60012),search:s("search",60013),searchSave:s("search-save",60013),logOut:s("log-out",60014),signOut:s("sign-out",60014),logIn:s("log-in",60015),signIn:s("sign-in",60015),eye:s("eye",60016),eyeUnwatch:s("eye-unwatch",60016),eyeWatch:s("eye-watch",60016),circleFilled:s("circle-filled",60017),primitiveDot:s("primitive-dot",60017),closeDirty:s("close-dirty",60017),debugBreakpoint:s("debug-breakpoint",60017),debugBreakpointDisabled:s("debug-breakpoint-disabled",60017),debugBreakpointPending:s("debug-breakpoint-pending",60377),debugHint:s("debug-hint",60017),primitiveSquare:s("primitive-square",60018),edit:s("edit",60019),pencil:s("pencil",60019),info:s("info",60020),issueOpened:s("issue-opened",60020),gistPrivate:s("gist-private",60021),gitForkPrivate:s("git-fork-private",60021),lock:s("lock",60021),mirrorPrivate:s("mirror-private",60021),close:s("close",60022),removeClose:s("remove-close",60022),x:s("x",60022),repoSync:s("repo-sync",60023),sync:s("sync",60023),clone:s("clone",60024),desktopDownload:s("desktop-download",60024),beaker:s("beaker",60025),microscope:s("microscope",60025),vm:s("vm",60026),deviceDesktop:s("device-desktop",60026),file:s("file",60027),fileText:s("file-text",60027),more:s("more",60028),ellipsis:s("ellipsis",60028),kebabHorizontal:s("kebab-horizontal",60028),mailReply:s("mail-reply",60029),reply:s("reply",60029),organization:s("organization",60030),organizationFilled:s("organization-filled",60030),organizationOutline:s("organization-outline",60030),newFile:s("new-file",60031),fileAdd:s("file-add",60031),newFolder:s("new-folder",60032),fileDirectoryCreate:s("file-directory-create",60032),trash:s("trash",60033),trashcan:s("trashcan",60033),history:s("history",60034),clock:s("clock",60034),folder:s("folder",60035),fileDirectory:s("file-directory",60035),symbolFolder:s("symbol-folder",60035),logoGithub:s("logo-github",60036),markGithub:s("mark-github",60036),github:s("github",60036),terminal:s("terminal",60037),console:s("console",60037),repl:s("repl",60037),zap:s("zap",60038),symbolEvent:s("symbol-event",60038),error:s("error",60039),stop:s("stop",60039),variable:s("variable",60040),symbolVariable:s("symbol-variable",60040),array:s("array",60042),symbolArray:s("symbol-array",60042),symbolModule:s("symbol-module",60043),symbolPackage:s("symbol-package",60043),symbolNamespace:s("symbol-namespace",60043),symbolObject:s("symbol-object",60043),symbolMethod:s("symbol-method",60044),symbolFunction:s("symbol-function",60044),symbolConstructor:s("symbol-constructor",60044),symbolBoolean:s("symbol-boolean",60047),symbolNull:s("symbol-null",60047),symbolNumeric:s("symbol-numeric",60048),symbolNumber:s("symbol-number",60048),symbolStructure:s("symbol-structure",60049),symbolStruct:s("symbol-struct",60049),symbolParameter:s("symbol-parameter",60050),symbolTypeParameter:s("symbol-type-parameter",60050),symbolKey:s("symbol-key",60051),symbolText:s("symbol-text",60051),symbolReference:s("symbol-reference",60052),goToFile:s("go-to-file",60052),symbolEnum:s("symbol-enum",60053),symbolValue:s("symbol-value",60053),symbolRuler:s("symbol-ruler",60054),symbolUnit:s("symbol-unit",60054),activateBreakpoints:s("activate-breakpoints",60055),archive:s("archive",60056),arrowBoth:s("arrow-both",60057),arrowDown:s("arrow-down",60058),arrowLeft:s("arrow-left",60059),arrowRight:s("arrow-right",60060),arrowSmallDown:s("arrow-small-down",60061),arrowSmallLeft:s("arrow-small-left",60062),arrowSmallRight:s("arrow-small-right",60063),arrowSmallUp:s("arrow-small-up",60064),arrowUp:s("arrow-up",60065),bell:s("bell",60066),bold:s("bold",60067),book:s("book",60068),bookmark:s("bookmark",60069),debugBreakpointConditionalUnverified:s("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:s("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:s("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:s("debug-breakpoint-data-unverified",60072),debugBreakpointData:s("debug-breakpoint-data",60073),debugBreakpointDataDisabled:s("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:s("debug-breakpoint-log-unverified",60074),debugBreakpointLog:s("debug-breakpoint-log",60075),debugBreakpointLogDisabled:s("debug-breakpoint-log-disabled",60075),briefcase:s("briefcase",60076),broadcast:s("broadcast",60077),browser:s("browser",60078),bug:s("bug",60079),calendar:s("calendar",60080),caseSensitive:s("case-sensitive",60081),check:s("check",60082),checklist:s("checklist",60083),chevronDown:s("chevron-down",60084),dropDownButton:s("drop-down-button",60084),chevronLeft:s("chevron-left",60085),chevronRight:s("chevron-right",60086),chevronUp:s("chevron-up",60087),chromeClose:s("chrome-close",60088),chromeMaximize:s("chrome-maximize",60089),chromeMinimize:s("chrome-minimize",60090),chromeRestore:s("chrome-restore",60091),circle:s("circle",60092),circleOutline:s("circle-outline",60092),debugBreakpointUnverified:s("debug-breakpoint-unverified",60092),circleSlash:s("circle-slash",60093),circuitBoard:s("circuit-board",60094),clearAll:s("clear-all",60095),clippy:s("clippy",60096),closeAll:s("close-all",60097),cloudDownload:s("cloud-download",60098),cloudUpload:s("cloud-upload",60099),code:s("code",60100),collapseAll:s("collapse-all",60101),colorMode:s("color-mode",60102),commentDiscussion:s("comment-discussion",60103),compareChanges:s("compare-changes",60157),creditCard:s("credit-card",60105),dash:s("dash",60108),dashboard:s("dashboard",60109),database:s("database",60110),debugContinue:s("debug-continue",60111),debugDisconnect:s("debug-disconnect",60112),debugPause:s("debug-pause",60113),debugRestart:s("debug-restart",60114),debugStart:s("debug-start",60115),debugStepInto:s("debug-step-into",60116),debugStepOut:s("debug-step-out",60117),debugStepOver:s("debug-step-over",60118),debugStop:s("debug-stop",60119),debug:s("debug",60120),deviceCameraVideo:s("device-camera-video",60121),deviceCamera:s("device-camera",60122),deviceMobile:s("device-mobile",60123),diffAdded:s("diff-added",60124),diffIgnored:s("diff-ignored",60125),diffModified:s("diff-modified",60126),diffRemoved:s("diff-removed",60127),diffRenamed:s("diff-renamed",60128),diff:s("diff",60129),discard:s("discard",60130),editorLayout:s("editor-layout",60131),emptyWindow:s("empty-window",60132),exclude:s("exclude",60133),extensions:s("extensions",60134),eyeClosed:s("eye-closed",60135),fileBinary:s("file-binary",60136),fileCode:s("file-code",60137),fileMedia:s("file-media",60138),filePdf:s("file-pdf",60139),fileSubmodule:s("file-submodule",60140),fileSymlinkDirectory:s("file-symlink-directory",60141),fileSymlinkFile:s("file-symlink-file",60142),fileZip:s("file-zip",60143),files:s("files",60144),filter:s("filter",60145),flame:s("flame",60146),foldDown:s("fold-down",60147),foldUp:s("fold-up",60148),fold:s("fold",60149),folderActive:s("folder-active",60150),folderOpened:s("folder-opened",60151),gear:s("gear",60152),gift:s("gift",60153),gistSecret:s("gist-secret",60154),gist:s("gist",60155),gitCommit:s("git-commit",60156),gitCompare:s("git-compare",60157),gitMerge:s("git-merge",60158),githubAction:s("github-action",60159),githubAlt:s("github-alt",60160),globe:s("globe",60161),grabber:s("grabber",60162),graph:s("graph",60163),gripper:s("gripper",60164),heart:s("heart",60165),home:s("home",60166),horizontalRule:s("horizontal-rule",60167),hubot:s("hubot",60168),inbox:s("inbox",60169),issueClosed:s("issue-closed",60324),issueReopened:s("issue-reopened",60171),issues:s("issues",60172),italic:s("italic",60173),jersey:s("jersey",60174),json:s("json",60175),bracket:s("bracket",60175),kebabVertical:s("kebab-vertical",60176),key:s("key",60177),law:s("law",60178),lightbulbAutofix:s("lightbulb-autofix",60179),linkExternal:s("link-external",60180),link:s("link",60181),listOrdered:s("list-ordered",60182),listUnordered:s("list-unordered",60183),liveShare:s("live-share",60184),loading:s("loading",60185),location:s("location",60186),mailRead:s("mail-read",60187),mail:s("mail",60188),markdown:s("markdown",60189),megaphone:s("megaphone",60190),mention:s("mention",60191),milestone:s("milestone",60192),gitPullRequestMilestone:s("git-pull-request-milestone",60192),mortarBoard:s("mortar-board",60193),move:s("move",60194),multipleWindows:s("multiple-windows",60195),mute:s("mute",60196),noNewline:s("no-newline",60197),note:s("note",60198),octoface:s("octoface",60199),openPreview:s("open-preview",60200),package:s("package",60201),paintcan:s("paintcan",60202),pin:s("pin",60203),play:s("play",60204),run:s("run",60204),plug:s("plug",60205),preserveCase:s("preserve-case",60206),preview:s("preview",60207),project:s("project",60208),pulse:s("pulse",60209),question:s("question",60210),quote:s("quote",60211),radioTower:s("radio-tower",60212),reactions:s("reactions",60213),references:s("references",60214),refresh:s("refresh",60215),regex:s("regex",60216),remoteExplorer:s("remote-explorer",60217),remote:s("remote",60218),remove:s("remove",60219),replaceAll:s("replace-all",60220),replace:s("replace",60221),repoClone:s("repo-clone",60222),repoForcePush:s("repo-force-push",60223),repoPull:s("repo-pull",60224),repoPush:s("repo-push",60225),report:s("report",60226),requestChanges:s("request-changes",60227),rocket:s("rocket",60228),rootFolderOpened:s("root-folder-opened",60229),rootFolder:s("root-folder",60230),rss:s("rss",60231),ruby:s("ruby",60232),saveAll:s("save-all",60233),saveAs:s("save-as",60234),save:s("save",60235),screenFull:s("screen-full",60236),screenNormal:s("screen-normal",60237),searchStop:s("search-stop",60238),server:s("server",60240),settingsGear:s("settings-gear",60241),settings:s("settings",60242),shield:s("shield",60243),smiley:s("smiley",60244),sortPrecedence:s("sort-precedence",60245),splitHorizontal:s("split-horizontal",60246),splitVertical:s("split-vertical",60247),squirrel:s("squirrel",60248),starFull:s("star-full",60249),starHalf:s("star-half",60250),symbolClass:s("symbol-class",60251),symbolColor:s("symbol-color",60252),symbolCustomColor:s("symbol-customcolor",60252),symbolConstant:s("symbol-constant",60253),symbolEnumMember:s("symbol-enum-member",60254),symbolField:s("symbol-field",60255),symbolFile:s("symbol-file",60256),symbolInterface:s("symbol-interface",60257),symbolKeyword:s("symbol-keyword",60258),symbolMisc:s("symbol-misc",60259),symbolOperator:s("symbol-operator",60260),symbolProperty:s("symbol-property",60261),wrench:s("wrench",60261),wrenchSubaction:s("wrench-subaction",60261),symbolSnippet:s("symbol-snippet",60262),tasklist:s("tasklist",60263),telescope:s("telescope",60264),textSize:s("text-size",60265),threeBars:s("three-bars",60266),thumbsdown:s("thumbsdown",60267),thumbsup:s("thumbsup",60268),tools:s("tools",60269),triangleDown:s("triangle-down",60270),triangleLeft:s("triangle-left",60271),triangleRight:s("triangle-right",60272),triangleUp:s("triangle-up",60273),twitter:s("twitter",60274),unfold:s("unfold",60275),unlock:s("unlock",60276),unmute:s("unmute",60277),unverified:s("unverified",60278),verified:s("verified",60279),versions:s("versions",60280),vmActive:s("vm-active",60281),vmOutline:s("vm-outline",60282),vmRunning:s("vm-running",60283),watch:s("watch",60284),whitespace:s("whitespace",60285),wholeWord:s("whole-word",60286),window:s("window",60287),wordWrap:s("word-wrap",60288),zoomIn:s("zoom-in",60289),zoomOut:s("zoom-out",60290),listFilter:s("list-filter",60291),listFlat:s("list-flat",60292),listSelection:s("list-selection",60293),selection:s("selection",60293),listTree:s("list-tree",60294),debugBreakpointFunctionUnverified:s("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:s("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:s("debug-breakpoint-function-disabled",60296),debugStackframeActive:s("debug-stackframe-active",60297),circleSmallFilled:s("circle-small-filled",60298),debugStackframeDot:s("debug-stackframe-dot",60298),debugStackframe:s("debug-stackframe",60299),debugStackframeFocused:s("debug-stackframe-focused",60299),debugBreakpointUnsupported:s("debug-breakpoint-unsupported",60300),symbolString:s("symbol-string",60301),debugReverseContinue:s("debug-reverse-continue",60302),debugStepBack:s("debug-step-back",60303),debugRestartFrame:s("debug-restart-frame",60304),callIncoming:s("call-incoming",60306),callOutgoing:s("call-outgoing",60307),menu:s("menu",60308),expandAll:s("expand-all",60309),feedback:s("feedback",60310),gitPullRequestReviewer:s("git-pull-request-reviewer",60310),groupByRefType:s("group-by-ref-type",60311),ungroupByRefType:s("ungroup-by-ref-type",60312),account:s("account",60313),gitPullRequestAssignee:s("git-pull-request-assignee",60313),bellDot:s("bell-dot",60314),debugConsole:s("debug-console",60315),library:s("library",60316),output:s("output",60317),runAll:s("run-all",60318),syncIgnored:s("sync-ignored",60319),pinned:s("pinned",60320),githubInverted:s("github-inverted",60321),debugAlt:s("debug-alt",60305),serverProcess:s("server-process",60322),serverEnvironment:s("server-environment",60323),pass:s("pass",60324),stopCircle:s("stop-circle",60325),playCircle:s("play-circle",60326),record:s("record",60327),debugAltSmall:s("debug-alt-small",60328),vmConnect:s("vm-connect",60329),cloud:s("cloud",60330),merge:s("merge",60331),exportIcon:s("export",60332),graphLeft:s("graph-left",60333),magnet:s("magnet",60334),notebook:s("notebook",60335),redo:s("redo",60336),checkAll:s("check-all",60337),pinnedDirty:s("pinned-dirty",60338),passFilled:s("pass-filled",60339),circleLargeFilled:s("circle-large-filled",60340),circleLarge:s("circle-large",60341),circleLargeOutline:s("circle-large-outline",60341),combine:s("combine",60342),gather:s("gather",60342),table:s("table",60343),variableGroup:s("variable-group",60344),typeHierarchy:s("type-hierarchy",60345),typeHierarchySub:s("type-hierarchy-sub",60346),typeHierarchySuper:s("type-hierarchy-super",60347),gitPullRequestCreate:s("git-pull-request-create",60348),runAbove:s("run-above",60349),runBelow:s("run-below",60350),notebookTemplate:s("notebook-template",60351),debugRerun:s("debug-rerun",60352),workspaceTrusted:s("workspace-trusted",60353),workspaceUntrusted:s("workspace-untrusted",60354),workspaceUnspecified:s("workspace-unspecified",60355),terminalCmd:s("terminal-cmd",60356),terminalDebian:s("terminal-debian",60357),terminalLinux:s("terminal-linux",60358),terminalPowershell:s("terminal-powershell",60359),terminalTmux:s("terminal-tmux",60360),terminalUbuntu:s("terminal-ubuntu",60361),terminalBash:s("terminal-bash",60362),arrowSwap:s("arrow-swap",60363),copy:s("copy",60364),personAdd:s("person-add",60365),filterFilled:s("filter-filled",60366),wand:s("wand",60367),debugLineByLine:s("debug-line-by-line",60368),inspect:s("inspect",60369),layers:s("layers",60370),layersDot:s("layers-dot",60371),layersActive:s("layers-active",60372),compass:s("compass",60373),compassDot:s("compass-dot",60374),compassActive:s("compass-active",60375),azure:s("azure",60376),issueDraft:s("issue-draft",60377),gitPullRequestClosed:s("git-pull-request-closed",60378),gitPullRequestDraft:s("git-pull-request-draft",60379),debugAll:s("debug-all",60380),debugCoverage:s("debug-coverage",60381),runErrors:s("run-errors",60382),folderLibrary:s("folder-library",60383),debugContinueSmall:s("debug-continue-small",60384),beakerStop:s("beaker-stop",60385),graphLine:s("graph-line",60386),graphScatter:s("graph-scatter",60387),pieChart:s("pie-chart",60388),bracketDot:s("bracket-dot",60389),bracketError:s("bracket-error",60390),lockSmall:s("lock-small",60391),azureDevops:s("azure-devops",60392),verifiedFilled:s("verified-filled",60393),newLine:s("newline",60394),layout:s("layout",60395),layoutActivitybarLeft:s("layout-activitybar-left",60396),layoutActivitybarRight:s("layout-activitybar-right",60397),layoutPanelLeft:s("layout-panel-left",60398),layoutPanelCenter:s("layout-panel-center",60399),layoutPanelJustify:s("layout-panel-justify",60400),layoutPanelRight:s("layout-panel-right",60401),layoutPanel:s("layout-panel",60402),layoutSidebarLeft:s("layout-sidebar-left",60403),layoutSidebarRight:s("layout-sidebar-right",60404),layoutStatusbar:s("layout-statusbar",60405),layoutMenubar:s("layout-menubar",60406),layoutCentered:s("layout-centered",60407),layoutSidebarRightOff:s("layout-sidebar-right-off",60416),layoutPanelOff:s("layout-panel-off",60417),layoutSidebarLeftOff:s("layout-sidebar-left-off",60418),target:s("target",60408),indent:s("indent",60409),recordSmall:s("record-small",60410),errorSmall:s("error-small",60411),arrowCircleDown:s("arrow-circle-down",60412),arrowCircleLeft:s("arrow-circle-left",60413),arrowCircleRight:s("arrow-circle-right",60414),arrowCircleUp:s("arrow-circle-up",60415),heartFilled:s("heart-filled",60420),map:s("map",60421),mapFilled:s("map-filled",60422),circleSmall:s("circle-small",60423),bellSlash:s("bell-slash",60424),bellSlashDot:s("bell-slash-dot",60425),commentUnresolved:s("comment-unresolved",60426),gitPullRequestGoToChanges:s("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:s("git-pull-request-new-changes",60428),searchFuzzy:s("search-fuzzy",60429),commentDraft:s("comment-draft",60430),send:s("send",60431),sparkle:s("sparkle",60432),insert:s("insert",60433),mic:s("mic",60434),thumbsDownFilled:s("thumbsdown-filled",60435),thumbsUpFilled:s("thumbsup-filled",60436),coffee:s("coffee",60437),snake:s("snake",60438),game:s("game",60439),vr:s("vr",60440),chip:s("chip",60441),piano:s("piano",60442),music:s("music",60443),micFilled:s("mic-filled",60444),gitFetch:s("git-fetch",60445),copilot:s("copilot",60446),lightbulbSparkle:s("lightbulb-sparkle",60447),lightbulbSparkleAutofix:s("lightbulb-sparkle-autofix",60447),robot:s("robot",60448),sparkleFilled:s("sparkle-filled",60449),diffSingle:s("diff-single",60450),diffMultiple:s("diff-multiple",60451),surroundWith:s("surround-with",60452),gitStash:s("git-stash",60454),gitStashApply:s("git-stash-apply",60455),gitStashPop:s("git-stash-pop",60456),runAllCoverage:s("run-all-coverage",60461),runCoverage:s("run-all-coverage",60460),coverage:s("coverage",60462),githubProject:s("github-project",60463),dialogError:s("dialog-error","error"),dialogWarning:s("dialog-warning","warning"),dialogInfo:s("dialog-info","info"),dialogClose:s("dialog-close","close"),treeItemExpanded:s("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:s("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:s("tree-filter-on-type-off","list-selection"),treeFilterClear:s("tree-filter-clear","close"),treeItemLoading:s("tree-item-loading","loading"),menuSelection:s("menu-selection","check"),menuSubmenu:s("menu-submenu","chevron-right"),menuBarMore:s("menubar-more","more"),scrollbarButtonLeft:s("scrollbar-button-left","triangle-left"),scrollbarButtonRight:s("scrollbar-button-right","triangle-right"),scrollbarButtonUp:s("scrollbar-button-up","triangle-up"),scrollbarButtonDown:s("scrollbar-button-down","triangle-down"),toolBarMore:s("toolbar-more","more"),quickInputBack:s("quick-input-back","arrow-left")}},6626:(e,t,i)=>{"use strict";function n(e,t){const i=[],n=[];for(const n of e)t.has(n)||i.push(n);for(const i of t)e.has(i)||n.push(i);return{removed:i,added:n}}function o(e,t){const i=new Set;for(const n of t)e.has(n)&&i.add(n);return i}i.d(t,{j:()=>o,q:()=>n})},41264:(e,t,i)=>{"use strict";function n(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,{Il:()=>a,Oz:()=>s,VS:()=>o,tx:()=>r});class o{constructor(e,t,i,o=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class s{constructor(e,t,i,o){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,d=0;const c=(a+r)/2,h=r-a;if(h>0){switch(d=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),r){case t:l=(i-n)/h+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:r}=e;let a,l,d;if(0===i)a=l=d=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;a=s._hue2rgb(o,e,t+1/3),l=s._hue2rgb(o,e,t),d=s._hue2rgb(o,e,t-1/3)}return new o(Math.round(255*a),Math.round(255*l),Math.round(255*d),r)}}class r{constructor(e,t,i,o){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=Math.max(t,i,n),s=o-Math.min(t,i,n),a=0===o?0:s/o;let l;return l=0===s?0:o===t?((i-n)/s%6+6)%6:o===i?(n-t)/s+2:(t-i)/s+4,new r(Math.round(60*l),a,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:s}=e,r=n*i,a=r*(1-Math.abs(t/60%2-1)),l=n-r;let[d,c,h]=[0,0,0];return t<60?(d=r,c=a):t<120?(d=a,c=r):t<180?(c=r,h=a):t<240?(c=a,h=r):t<300?(d=a,h=r):t<=360&&(d=r,h=a),d=Math.round(255*(d+l)),c=Math.round(255*(c+l)),h=Math.round(255*(h+l)),new o(d,c,h,s)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:s.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:r.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof o)this.rgba=e;else if(e instanceof s)this._hsla=e,this.rgba=s.toRGBA(e);else{if(!(e instanceof r))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=r.toRGBA(e)}}equals(e){return!!e&&o.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&r.equals(this.hsva,e.hsva)}getRelativeLuminance(){return n(.2126*a._relativeLuminanceForComponent(this.rgba.r)+.7152*a._relativeLuminanceForComponent(this.rgba.g)+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance(){"use strict";i.d(t,{Hl:()=>l,Ix:()=>a,SN:()=>c,Z0:()=>u,ZO:()=>r});var n=i(9488),o=i(53725),s=i(98e3);function r(e){return{asString:async()=>e,asFile:()=>{},value:"string"==typeof e?e:void 0}}function a(e,t,i){const n={id:(0,s.R)(),name:e,uri:t,data:i};return{asString:async()=>"",asFile:()=>n,value:void 0}}class l{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return o.$.some(this,(([e,t])=>t.asFile()))&&t.push("files"),h(d(e),t)}get(e){var t;return null===(t=this._entries.get(this.toKey(e)))||void 0===t?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return d(e)}}function d(e){return e.toLowerCase()}function c(e,t){return h(d(e),t.map(d))}function h(e,t){if("*/*"===e)return t.length>0;if(t.includes(e))return!0;const i=e.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!i)return!1;const[n,o,s]=i;return"*"===s&&t.some((e=>e.startsWith(o+"/")))}const u=Object.freeze({create:e=>(0,n.EB)(e.map((e=>e.toString()))).join("\r\n"),split:e=>e.split("\r\n"),parse:e=>u.split(e).filter((e=>!e.startsWith("#")))})},49898:(e,t,i)=>{"use strict";function n(e,t,i){let n=null,o=null;if("function"==typeof i.value?(n="value",o=i.value,0!==o.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",o=i.get),!o)throw new Error("not supported");const s=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[s]}}i.d(t,{H:()=>n})},2484:(e,t,i)=>{"use strict";i.d(t,{Hs:()=>c,a$:()=>r});class n{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var o=i(89954);class s{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new n(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,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),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 c{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,o,s]=c._getElements(e),[r,a,l]=c._getElements(t);this._hasStrings=s&&l,this._originalStringElements=n,this._originalElementsOrHash=o,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(c._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i=e&&o>=i&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||i>o){let s;return i<=o?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new n(e,0,i,o-i+1)]):e<=t?(a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[new n(e,t-e+1,i,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const r=[0],l=[0],d=this.ComputeRecursionPoint(e,t,i,o,r,l,s),c=r[0],h=l[0];if(null!==d)return d;if(!s[0]){const r=this.ComputeDiffRecursive(e,c,i,h,s);let a=[];return a=s[0]?[new n(c+1,t-(c+1)+1,h+1,o-(h+1)+1)]:this.ComputeDiffRecursive(c+1,t,h+1,o,s),this.ConcatenateChanges(r,a)}return[new n(e,t-e+1,i,o-i+1)]}WALKTRACE(e,t,i,o,s,r,a,l,c,h,u,g,p,m,f,v,_,b){let w=null,y=null,C=new d,S=t,x=i,k=p[0]-v[0]-o,L=-1073741824,N=this.m_forwardHistory.length-1;do{const t=k+e;t===S||t=0&&(e=(c=this.m_forwardHistory[N])[0],S=1,x=c.length-1)}while(--N>=-1);if(w=C.getReverseChanges(),b[0]){let e=p[0]+1,t=v[0]+1;if(null!==w&&w.length>0){const i=w[w.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}y=[new n(e,g-e+1,t,f-t+1)]}else{C=new d,S=r,x=a,k=p[0]-v[0]-l,L=1073741824,N=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=k+s;e===S||e=h[e+1]?(m=(u=h[e+1]-1)-k-l,u>L&&C.MarkNextChange(),L=u+1,C.AddOriginalElement(u+1,m+1),k=e+1-s):(m=(u=h[e-1])-k-l,u>L&&C.MarkNextChange(),L=u,C.AddModifiedElement(u+1,m+1),k=e-1-s),N>=0&&(s=(h=this.m_reverseHistory[N])[0],S=1,x=h.length-1)}while(--N>=-1);y=C.getChanges()}return this.ConcatenateChanges(w,y)}ComputeRecursionPoint(e,t,i,o,s,r,a){let d=0,c=0,h=0,u=0,g=0,p=0;e--,i--,s[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(o-i),f=m+1,v=new Int32Array(f),_=new Int32Array(f),b=o-i,w=t-e,y=e-i,C=t-o,S=(w-b)%2==0;v[b]=e,_[w]=t,a[0]=!1;for(let x=1;x<=m/2+1;x++){let m=0,k=0;h=this.ClipDiagonalBound(b-x,x,b,f),u=this.ClipDiagonalBound(b+x,x,b,f);for(let e=h;e<=u;e+=2){d=e===h||em+k&&(m=d,k=c),!S&&Math.abs(e-w)<=x-1&&d>=_[e])return s[0]=d,r[0]=c,i<=_[e]&&x<=1448?this.WALKTRACE(b,h,u,y,w,g,p,C,v,_,d,t,s,c,o,r,S,a):null}const L=(m-e+(k-i)-x)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(m,L))return a[0]=!0,s[0]=m,r[0]=k,L>0&&x<=1448?this.WALKTRACE(b,h,u,y,w,g,p,C,v,_,d,t,s,c,o,r,S,a):(e++,i++,[new n(e,t-e+1,i,o-i+1)]);g=this.ClipDiagonalBound(w-x,x,w,f),p=this.ClipDiagonalBound(w+x,x,w,f);for(let n=g;n<=p;n+=2){d=n===g||n=_[n+1]?_[n+1]-1:_[n-1],c=d-(n-w)-C;const l=d;for(;d>e&&c>i&&this.ElementsAreEqual(d,c);)d--,c--;if(_[n]=d,S&&Math.abs(n-b)<=x&&d<=v[n])return s[0]=d,r[0]=c,l>=v[n]&&x<=1448?this.WALKTRACE(b,h,u,y,w,g,p,C,v,_,d,t,s,c,o,r,S,a):null}if(x<=1447){let e=new Int32Array(u-h+2);e[0]=b-h+1,l.Copy2(v,h,e,1,u-h+1),this.m_forwardHistory.push(e),e=new Int32Array(p-g+2),e[0]=w-g+1,l.Copy2(_,g,e,1,p-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,h,u,y,w,g,p,C,v,_,d,t,s,c,o,r,S,a)}PrettifyChanges(e){for(let t=0;t0,r=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,o=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,o=i.modifiedStart+i.modifiedLength}const s=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,d=i.modifiedStart-e;if(tl&&(l=c,a=e)}i.originalStart-=a,i.modifiedStart-=a;const d=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],d)&&(e[t-1]=d[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t0&&i>a&&(a=i,l=t,d=e)}return a>0?[l,d]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let o=0;o=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){const i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return l.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],l.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return l.Copy(e,0,i,0,e.length),l.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const o=e.originalStart;let s=e.originalLength;const r=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n(o,s,r,a),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e{"use strict";i.d(t,{B8:()=>g,Cp:()=>s,F0:()=>c,FU:()=>d,L6:()=>u,b1:()=>h,dL:()=>o,he:()=>m,n2:()=>l,ri:()=>r});const n=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(p.isErrorNoTelemetry(e))throw new p(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function o(e){l(e)||n.onUnexpectedError(e)}function s(e){l(e)||n.onUnexpectedExternalError(e)}function r(e){if(e instanceof Error){const{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack,noTelemetry:p.isErrorNoTelemetry(e)}}return e}const a="Canceled";function l(e){return e instanceof d||e instanceof Error&&e.name===a&&e.message===a}class d extends Error{constructor(){super(a),this.name=this.message}}function c(){const e=new Error(a);return e.name=e.message,e}function h(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function u(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class g extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class p extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof p)return e;const t=new p;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class m extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,m.prototype)}}},4669:(e,t,i)=>{"use strict";i.d(t,{D0:()=>v,E7:()=>w,K3:()=>f,Q5:()=>g,SZ:()=>_,Sp:()=>p,ZD:()=>y,ju:()=>n,z5:()=>b});var n,o=i(17301),s=i(88289),r=i(5976),a=i(91741),l=i(84013);!function(e){function t(e){return(t,i=null,n)=>{let o,s=!1;return o=e((e=>{if(!s)return o?o.dispose():s=!0,t.call(i,e)}),null,n),s&&o.dispose(),o}}function i(e,t,i){return o(((i,n=null,o)=>e((e=>i.call(n,t(e))),null,o)),i)}function n(e,t,i){return o(((i,n=null,o)=>e((e=>t(e)&&i.call(n,e)),null,o)),i)}function o(e,t){let i;const n=new g({onWillAddFirstListener(){i=e(n.fire,n)},onDidRemoveLastListener(){null==i||i.dispose()}});return null==t||t.add(n),n.event}function s(e,t,i=100,n=!1,o=!1,s,r){let a,l,d,c,h=0;const u=new g({leakWarningThreshold:s,onWillAddFirstListener(){a=e((e=>{h++,l=t(l,e),n&&!d&&(u.fire(l),l=void 0),c=()=>{const e=l;l=void 0,d=void 0,(!n||h>1)&&u.fire(e),h=0},"number"==typeof i?(clearTimeout(d),d=setTimeout(c,i)):void 0===d&&(d=0,queueMicrotask(c))}))},onWillRemoveListener(){o&&h>0&&(null==c||c())},onDidRemoveLastListener(){c=void 0,a.dispose()}});return null==r||r.add(u),u.event}e.None=()=>r.JT.None,e.defer=function(e,t){return s(e,(()=>{}),0,void 0,!0,void 0,t)},e.once=t,e.map=i,e.forEach=function(e,t,i){return o(((i,n=null,o)=>e((e=>{t(e),i.call(n,e)}),null,o)),i)},e.filter=n,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>{return o=(0,r.F8)(...e.map((e=>e((e=>t.call(i,e)))))),(s=n)instanceof Array?s.push(o):s&&s.add(o),o;var o,s}},e.reduce=function(e,t,n,o){let s=n;return i(e,(e=>(s=t(s,e),s)),o)},e.debounce=s,e.accumulate=function(t,i=0,n){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),i,void 0,!0,void 0,n)},e.latch=function(e,t=((e,t)=>e===t),i){let o,s=!0;return n(e,(e=>{const i=s||!t(e,o);return s=!1,o=e,i}),i)},e.split=function(t,i,n){return[e.filter(t,i,n),e.filter(t,(e=>!i(e)),n)]},e.buffer=function(e,t=!1,i=[],n){let o=i.slice(),s=e((e=>{o?o.push(e):a.fire(e)}));n&&n.add(s);const r=()=>{null==o||o.forEach((e=>a.fire(e))),o=null},a=new g({onWillAddFirstListener(){s||(s=e((e=>a.fire(e))),n&&n.add(s))},onDidAddFirstListener(){o&&(t?setTimeout(r):r())},onDidRemoveLastListener(){s&&s.dispose(),s=null}});return n&&n.add(a),a.event},e.chain=function(e,t){return(i,n,o)=>{const s=t(new l);return e((function(e){const t=s.evaluate(e);t!==a&&i.call(n,t)}),void 0,o)}};const a=Symbol("HaltChainable");class l{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:a)),this}reduce(e,t){let i=t;return this.steps.push((t=>(i=e(i,t),i))),this}latch(e=((e,t)=>e===t)){let t,i=!0;return this.steps.push((n=>{const o=i||!e(n,t);return i=!1,t=n,o?n:a})),this}evaluate(e){for(const t of this.steps)if((e=t(e))===a)break;return e}}e.fromNodeEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new g({onWillAddFirstListener:()=>e.on(t,n),onDidRemoveLastListener:()=>e.removeListener(t,n)});return o.event},e.fromDOMEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new g({onWillAddFirstListener:()=>e.addEventListener(t,n),onDidRemoveLastListener:()=>e.removeEventListener(t,n)});return o.event},e.toPromise=function(e){return new Promise((i=>t(e)(i)))},e.fromPromise=function(e){const t=new g;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event},e.runAndSubscribe=function(e,t,i){return t(i),e((e=>t(e)))};class d{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;const i={onWillAddFirstListener:()=>{e.addObserver(this)},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new g(i),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}e.fromObservable=function(e,t){return new d(e,t).emitter.event},e.fromObservableLight=function(e){return(t,i,n)=>{let o=0,s=!1;const a={beginUpdate(){o++},endUpdate(){o--,0===o&&(e.reportChanges(),s&&(s=!1,t.call(i)))},handlePossibleChange(){},handleChange(){s=!0}};e.addObserver(a),e.reportChanges();const l={dispose(){e.removeObserver(a)}};return n instanceof r.SL?n.add(l):Array.isArray(n)&&n.push(l),l}}}(n||(n={}));class d{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${d._idPool++}`,d.all.add(this)}start(e){this._stopWatch=new l.G,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}}}d.all=new Set,d._idPool=0;class c{constructor(e,t=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=t,this._warnCountdown=0}dispose(){var e;null===(e=this._stacks)||void 0===e||e.clear()}check(e,t){const i=this.threshold;if(i<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}}class h{static create(){var e;return new h(null!==(e=(new Error).stack)&&void 0!==e?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split("\n").slice(2).join("\n"))}}class u{constructor(e){this.value=e}}class g{constructor(e){var t,i,n,o,s;this._size=0,this._options=e,this._leakageMon=(null===(t=this._options)||void 0===t?void 0:t.leakWarningThreshold)?new c(null!==(n=null===(i=this._options)||void 0===i?void 0:i.leakWarningThreshold)&&void 0!==n?n:-1):void 0,this._perfMon=(null===(o=this._options)||void 0===o?void 0:o._profName)?new d(this._options._profName):void 0,this._deliveryQueue=null===(s=this._options)||void 0===s?void 0:s.deliveryQueue}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,(null===(e=this._deliveryQueue)||void 0===e?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),null===(i=null===(t=this._options)||void 0===t?void 0:t.onDidRemoveLastListener)||void 0===i||i.call(t),null===(n=this._leakageMon)||void 0===n||n.dispose())}get event(){var e;return null!==(e=this._event)&&void 0!==e||(this._event=(e,t,i)=>{var n,o,s,a,l;if(this._leakageMon&&this._size>3*this._leakageMon.threshold)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),r.JT.None;if(this._disposed)return r.JT.None;t&&(e=e.bind(t));const d=new u(e);let c;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(d.stack=h.create(),c=this._leakageMon.check(d.stack,this._size+1)),this._listeners?this._listeners instanceof u?(null!==(l=this._deliveryQueue)&&void 0!==l||(this._deliveryQueue=new m),this._listeners=[this._listeners,d]):this._listeners.push(d):(null===(o=null===(n=this._options)||void 0===n?void 0:n.onWillAddFirstListener)||void 0===o||o.call(n,this),this._listeners=d,null===(a=null===(s=this._options)||void 0===s?void 0:s.onDidAddFirstListener)||void 0===a||a.call(s,this)),this._size++;const g=(0,r.OF)((()=>{null==c||c(),this._removeListener(d)}));return i instanceof r.SL?i.add(g):Array.isArray(i)&&i.push(g),g}),this._event}_removeListener(e){var t,i,n,o;if(null===(i=null===(t=this._options)||void 0===t?void 0:t.onWillRemoveListener)||void 0===i||i.call(t,this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,null===(o=null===(n=this._options)||void 0===n?void 0:n.onDidRemoveLastListener)||void 0===o||o.call(n,this),void(this._size=0);const s=this._listeners,r=s.indexOf(e);if(-1===r)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--,s[r]=void 0;const a=this._deliveryQueue.current===this;if(2*this._size<=s.length){let e=0;for(let t=0;t0}}const p=()=>new m;class m{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class f extends g{constructor(e){super(e),this._isPaused=0,this._eventQueue=new a.S,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)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&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class v extends f{constructor(e){var t;super(e),this._delay=null!==(t=e.delay)&&void 0!==t?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class _ extends g{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=null==e?void 0:e.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),1===this._queuedEvents.length&&queueMicrotask((()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach((e=>super.fire(e))),this._queuedEvents=[]})))}}class b{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new g({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),(0,r.OF)((0,s.M)((()=>{this.hasListeners&&this.unhook(t);const e=this.events.indexOf(t);this.events.splice(e,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((e=>this.emitter.fire(e)))}unhook(e){var t;null===(t=e.listener)||void 0===t||t.dispose(),e.listener=null}dispose(){var e;this.emitter.dispose();for(const t of this.events)null===(e=t.listener)||void 0===e||e.dispose();this.events=[]}}class w{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e((e=>{const n=this.buffers[this.buffers.length-1];n?n.push((()=>t.call(i,e))):t.call(i,e)}),void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach((e=>e())),i}}class y{constructor(){this.listening=!1,this.inputEvent=n.None,this.inputEventListener=r.JT.None,this.emitter=new g({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()}}},15527:(e,t,i)=>{"use strict";i.d(t,{KM:()=>c,ej:()=>a,fn:()=>l,oP:()=>u,yj:()=>d});var n=i(82663),o=i(1432),s=i(97295);function r(e){return 47===e||92===e}function a(e){return e.replace(/[\\/]/g,n.KR.sep)}function l(e){return-1===e.indexOf("/")&&(e=a(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function d(e,t=n.KR.sep){if(!e)return"";const i=e.length,o=e.charCodeAt(0);if(r(o)){if(r(e.charCodeAt(1))&&!r(e.charCodeAt(2))){let n=3;const o=n;for(;ne.length)return!1;if(i){if(!(0,s.ok)(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===o&&i--,e.charAt(i)===o}return t.charAt(t.length-1)!==o&&(t+=o),0===e.indexOf(t)}function h(e){return e>=65&&e<=90||e>=97&&e<=122}function u(e,t=o.ED){return!!t&&h(e.charCodeAt(0))&&58===e.charCodeAt(1)}},13707:(e,t,i)=>{"use strict";i.d(t,{CL:()=>te,mX:()=>ie,jB:()=>H,mB:()=>V,EW:()=>ne,l7:()=>se,ir:()=>m,Oh:()=>B,XU:()=>W,Ji:()=>g,Sy:()=>f,KZ:()=>M,or:()=>u});var n=i(43702);let o=0;const s=new Uint32Array(10);function r(e,t,i){var n;e>=i&&e>8&&(s[o++]=n>>8&255),n>>16&&(s[o++]=n>>16&255)))}const a=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),l=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),d=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]),c=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]);var h=i(97295);function u(...e){return function(t,i){for(let n=0,o=e.length;n0?[{start:0,end:t.length}]:[]:null}function m(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function f(e,t){return v(e.toLowerCase(),t.toLowerCase(),0,0)}function v(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let o=null;return(o=v(e,t,i+1,n+1))?D({start:n,end:n+1},o):null}return v(e,t,i,n+1)}function _(e){return 97<=e&&e<=122}function b(e){return 65<=e&&e<=90}function w(e){return 48<=e&&e<=57}function y(e){return 32===e||9===e||10===e||13===e}const C=new Set;function S(e){return y(e)||C.has(e)}function x(e,t){return e===t||S(e)&&S(t)}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>C.add(e.charCodeAt(0))));const k=new Map;function L(e){if(k.has(e))return k.get(e);let t;const i=function(e){const t=function(e){if(o=0,r(e,a,4352),o>0)return s.subarray(0,o);if(r(e,l,4449),o>0)return s.subarray(0,o);if(r(e,d,4520),o>0)return s.subarray(0,o);if(r(e,c,12593),o)return s.subarray(0,o);if(e>=44032&&e<=55203){const t=e-44032,i=t%588,n=Math.floor(t/588),h=Math.floor(i/28),u=i%28-1;if(n=0&&(u0)return s.subarray(0,o)}}(e);if(t&&t.length>0)return new Uint32Array(t)}(e);return i&&(t=i),k.set(e,t),t}function N(e){return _(e)||b(e)||w(e)}function D(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function E(e,t){for(let i=t;i0&&!N(e.charCodeAt(i-1)))return i}return e.length}function I(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let o=null,s=n+1;for(o=I(e,t,i+1,n+1);!o&&(s=E(t,s))60&&(t=t.substring(0,60));const i=function(e){let t=0,i=0,n=0,o=0,s=0;for(let r=0;r.2&&t<.8&&n>.6&&o<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,o=0;for(e=e.toLowerCase();o0&&S(e.charCodeAt(i-1)))return i;return e.length}const P=u(g,T,m),O=u(g,T,f),F=new n.z6(1e4);function B(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=F.get(e);n||(n=new RegExp(h.un(e),"i"),F.set(e,n));const o=n.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:i?O(e,t):P(e,t)}function W(e,t){const i=ne(e,e.toLowerCase(),0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?V(i):null}function H(e,t,i,n,o,s){const r=Math.min(13,e.length);for(;i1;n--){const o=e[n]+i,s=t[t.length-1];s&&s.end===o?s.end=o+1:t.push({start:o,end:o+1})}return t}const z=128;function j(){const e=[],t=[];for(let e=0;e<=z;e++)t[e]=0;for(let i=0;i<=z;i++)e.push(t.slice(0));return e}function U(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const q=U(2*z),K=U(2*z),$=j(),G=j(),Z=j(),Q=!1;function Y(e,t,i,n,o){function s(e,t,i=" "){for(;e.lengths(e,3))).join("|")}\n`;for(let n=0;n<=i;n++)r+=0===n?" |":`${t[n-1]}|`,r+=e[n].slice(0,o+1).map((e=>s(e.toString(),3))).join("|")+"\n";return r}function J(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){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!!h.C8(i)}}function X(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function ee(e,t,i){return t[e]!==i[e]}var te;!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(te||(te={}));class ie{constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}}function ne(e,t,i,n,o,s,r=ie.default){const a=e.length>z?z:e.length,l=n.length>z?z:n.length;if(i>=a||s>=l||a-i>l-s)return;if(!function(e,t,i,n,o,s,r=!1){for(;t=i&&a>=n;)o[r]===s[a]&&(K[r]=a,r--),a--}(a,l,i,s,t,o);let d=1,c=1,h=i,u=s;const g=[!1];for(d=1,h=i;hr,_=v?G[d][c-1]+($[d][c-1]>0?-5:0):0,b=u>r+1&&$[d][c-1]>0,w=b?G[d][c-2]+($[d][c-2]>0?-5:0):0;if(b&&(!v||w>=_)&&(!m||w>=f))G[d][c]=w,Z[d][c]=3,$[d][c]=0;else if(v&&(!m||_>=f))G[d][c]=_,Z[d][c]=2,$[d][c]=0;else{if(!m)throw new Error("not possible");G[d][c]=f,Z[d][c]=1,$[d][c]=$[d-1][c-1]+1}}}if(Q&&function(e,t,i,n){e=e.substr(t),i=i.substr(n),console.log(Y(G,e,e.length,i,i.length)),console.log(Y(Z,e,e.length,i,i.length)),console.log(Y($,e,e.length,i,i.length))}(e,i,n,s),!g[0]&&!r.firstMatchCanBeWeak)return;d--,c--;const p=[G[d][c],s];let m=0,f=0;for(;d>=1;){let e=c;do{const t=Z[d][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);m>1&&t[i+d-1]===o[s+c-1]&&!ee(e+s-1,n,o)&&m+1>$[d][e]&&(e=c),e===c?m++:m=1,f||(f=e),d--,c=e-1,p.push(c)}l===a&&r.boostFullMatch&&(p[0]+=2);const v=f-a;return p[0]-=v,p}function oe(e,t,i,n,o,s,r,a,l,d,c){if(t[i]!==s[r])return Number.MIN_SAFE_INTEGER;let h=1,u=!1;return r===i-n?h=e[i]===o[r]?7:5:!ee(r,o,s)||0!==r&&ee(r-1,o,s)?!J(s,r)||0!==r&&J(s,r-1)?(J(s,r-1)||X(s,r-1))&&(h=5,u=!0):h=5:(h=e[i]===o[r]?7:5,u=!0),h>1&&i===n&&(c[0]=!0),u||(u=ee(r,o,s)||J(s,r-1)||X(s,r-1)),i===n?r>l&&(h-=u?3:5):h+=d?u?2:0:u?0:1,r+1===a&&(h-=u?3:5),h}function se(e,t,i,n,o,s,r){return function(e,t,i,n,o,s,r,a){let l=ne(e,t,i,n,o,s,a);if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;rl[0])&&(l=e))}}}return l}(e,t,i,n,o,s,0,r)}function re(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}ie.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}},88289:(e,t,i)=>{"use strict";function n(e,t){const i=this;let n,o=!1;return function(){if(o)return n;if(o=!0,t)try{n=e.apply(i,arguments)}finally{t()}else n=e.apply(i,arguments);return n}}i.d(t,{M:()=>n})},14118:(e,t,i)=>{"use strict";i.d(t,{EQ:()=>E,Qc:()=>I});var n=i(15393),o=i(15527),s=i(43702),r=i(82663),a=i(1432),l=i(97295);const d="**",c="/",h="[/\\\\]",u="[^/\\\\]",g=/\//g;function p(e,t){switch(e){case 0:return"";case 1:return`${u}*?`;default:return`(?:${h}|${u}+${h}${t?`|${h}${u}+`:""})*?`}}function m(e,t){if(!e)return[];const i=[];let n=!1,o=!1,s="";for(const r of e){switch(r){case t:if(!n&&!o){i.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1}s+=r}return s&&i.push(s),i}function f(e){if(!e)return"";let t="";const i=m(e,c);if(i.every((e=>e===d)))t=".*";else{let e=!1;i.forEach(((n,o)=>{if(n===d){if(e)return;t+=p(2,o===i.length-1)}else{let e=!1,s="",r=!1,a="";for(const i of n)if("}"!==i&&e)s+=i;else if(!r||"]"===i&&a)switch(i){case"{":e=!0;continue;case"[":r=!0;continue;case"}":{const i=`(?:${m(s,",").map((e=>f(e))).join("|")})`;t+=i,e=!1,s="";break}case"]":t+="["+a+"]",r=!1,a="";break;case"?":t+=u;continue;case"*":t+=p(1);continue;default:t+=(0,l.ec)(i)}else{let e;e="-"===i?i:"^"!==i&&"!"!==i||a?i===c?"":(0,l.ec)(i):"^",a+=e}oL(e,t))).filter((e=>e!==k)),e),n=i.length;if(!n)return k;if(1===n)return i[0];const o=function(t,n){for(let o=0,s=i.length;o!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return r.length&&(o.allPaths=r),o}(i,t):(s=y.exec(N(i,t)))?D(s[1].substr(1),i,!0):(s=C.exec(N(i,t)))?D(s[1],i,!1):function(e){try{const t=new RegExp(`^${f(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(e){return k}}(i),S.set(n,d)),function(e,t){if("string"==typeof t)return e;const i=function(i,n){return(0,o.KM)(i,t.base,!a.IJ)?e((0,l.j3)(i.substr(t.base.length),r.ir),n):null};return i.allBasenames=e.allBasenames,i.allPaths=e.allPaths,i.basenames=e.basenames,i.patterns=e.patterns,i}(d,e)}function N(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function D(e,t,i){const n=r.ir===r.KR.sep,o=n?e:e.replace(g,r.ir),s=r.ir+o,a=r.KR.sep+e;let l;return l=i?function(i,r){return"string"!=typeof i||i!==o&&!i.endsWith(s)&&(n||i!==e&&!i.endsWith(a))?null:t}:function(i,s){return"string"!=typeof i||i!==o&&(n||i!==e)?null:t},l.allPaths=[(i?"*/":"./")+e],l}function E(e,t,i){return!(!e||"string"!=typeof t)&&I(e)(t,void 0,i)}function I(e,t={}){if(!e)return x;if("string"==typeof e||function(e){const t=e;return!!t&&("string"==typeof t.base&&"string"==typeof t.pattern)}(e)){const i=L(e,t);if(i===k)return x;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const i=T(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return k;const o=L(e,i);if(o===k)return k;if("boolean"==typeof t)return o;if(t){const i=t.when;if("string"==typeof i){const t=(t,s,r,a)=>{if(!a||!o(t,s))return null;const l=a(i.replace("$(basename)",(()=>r)));return(0,n.J8)(l)?l.then((t=>t?e:null)):l?e:null};return t.requiresSiblings=!0,t}}return o}(i,e[i],t))).filter((e=>e!==k))),o=i.length;if(!o)return k;if(!i.some((e=>!!e.requiresSiblings))){if(1===o)return i[0];const e=function(e,t){let o;for(let s=0,r=i.length;s{for(const e of o){const t=await e;if("string"==typeof t)return t}return null})():null},t=i.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const s=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(e.allPaths=s),e}const s=function(e,t,o){let s,a;for(let l=0,d=i.length;l{for(const e of a){const t=await e;if("string"==typeof t)return t}return null})():null},a=i.find((e=>!!e.allBasenames));a&&(s.allBasenames=a.allBasenames);const l=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(s.allPaths=l),s}(e,t)}function T(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let o;if(t){o=[];for(let e=0,i=n.length;e{const i=t.patterns;return i?e.concat(i):e}),[]);const s=function(e,t){if("string"!=typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?o[i]:null};s.basenames=n,s.patterns=o,s.allBasenames=n;const r=e.filter((e=>!e.basenames));return r.push(s),r}},89954:(e,t,i)=>{"use strict";i.d(t,{Cv:()=>a,SP:()=>s,vp:()=>o,yP:()=>h});var n=i(97295);function o(e){return s(e,0)}function s(e,t){switch(typeof e){case"object":return null===e?r(349,t):Array.isArray(e)?(i=e,n=r(104579,n=t),i.reduce(((e,t)=>s(t,e)),n)):function(e,t){return t=r(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=a(i,t),s(e[i],t))),t)}(e,t);case"string":return a(e,t);case"boolean":return function(e,t){return r(e?433:863,t)}(e,t);case"number":return r(e,t);case"undefined":return r(937,t);default:return r(617,t)}var i,n}function r(e,t){return(t<<5)-t+e|0}function a(e,t){t=r(149417,t);for(let i=0,n=e.length;i>>n)>>>0}function d(e,t=0,i=e.byteLength,n=0){for(let o=0;oe.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length>>0).toString(16),t/4)}class h{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 t=e.length;if(0===t)return;const i=this._buff;let o,s,r=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(o=a,s=-1,a=0):(o=e.charCodeAt(0),s=0);;){let l=o;if(n.ZG(o)){if(!(s+1>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}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()),c(this._h0)+c(this._h1)+c(this._h2)+c(this._h3)+c(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,d(this._buff,this._buffLen),this._buffLen>56&&(this._step(),d(this._buff));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=h._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,l(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,o,s=this._h0,r=this._h1,a=this._h2,d=this._h3,c=this._h4;for(let t=0;t<80;t++)t<20?(i=r&a|~r&d,n=1518500249):t<40?(i=r^a^d,n=1859775393):t<60?(i=r&a|r&d|a&d,n=2400959708):(i=r^a^d,n=3395469782),o=l(s,5)+i+c+n+e.getUint32(4*t,!1)&4294967295,c=d,d=a,a=l(r,30),r=s,s=o;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+d&4294967295,this._h4=this._h4+c&4294967295}}h._bigBlock32=new DataView(new ArrayBuffer(320))},59365:(e,t,i)=>{"use strict";i.d(t,{CP:()=>d,Fr:()=>c,W5:()=>l,d9:()=>u,g_:()=>h,oR:()=>g,v1:()=>p});var n=i(17301),o=i(21212),s=i(95935),r=i(97295),a=i(70666);class l{constructor(e="",t=!1){var i,o,s;if(this.value=e,"string"!=typeof this.value)throw(0,n.b1)("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=null!==(i=t.isTrusted)&&void 0!==i?i:void 0,this.supportThemeIcons=null!==(o=t.supportThemeIcons)&&void 0!==o&&o,this.supportHtml=null!==(s=t.supportHtml)&&void 0!==s&&s)}appendText(e,t=0){var i;return this.value+=(i=this.supportThemeIcons?(0,o.Qo)(e):e,i.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")).replace(/([ \t]+)/g,((e,t)=>" ".repeat(t.length))).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=`\n${function(e,t){var i,n;const o=null!==(n=null===(i=e.match(/^`+/gm))||void 0===i?void 0:i.reduce(((e,t)=>e.length>t.length?e:t)).length)&&void 0!==n?n:0,s=o>=3?o+1:3;return[`${"`".repeat(s)}${t}`,e,`${"`".repeat(s)}`].join("\n")}(t,e)}\n`,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((0,r.ec)(t),"g");return e.replace(i,((t,i)=>"\\"!==e.charAt(i-1)?`\\${t}`:t))}}function d(e){return c(e)?!e.value:!Array.isArray(e)||e.every(d)}function c(e){return e instanceof l||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&"object"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function h(e,t){return e===t||!(!e||!t)&&e.value===t.value&&e.isTrusted===t.isTrusted&&e.supportThemeIcons===t.supportThemeIcons&&e.supportHtml===t.supportHtml&&(e.baseUri===t.baseUri||!!e.baseUri&&!!t.baseUri&&(0,s.Xy)(a.o.from(e.baseUri),a.o.from(t.baseUri)))}function u(e){return e.replace(/"/g,""")}function g(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1"):e}function p(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),o=e?e[1]:"",s=i?i[1]:"",r=isFinite(parseInt(s)),a=isFinite(parseInt(o));r&&t.push(`width="${s}"`),a&&t.push(`height="${o}"`)}return{href:e,dimensions:t}}},21212:(e,t,i)=>{"use strict";i.d(t,{Gt:()=>v,Ho:()=>f,JL:()=>p,Qo:()=>d,f$:()=>h,x$:()=>g});var n=i(13707),o=i(97295),s=i(25670);const r="$(",a=new RegExp(`\\$\\(${s.k.iconNameExpression}(?:${s.k.iconModifierExpression})?\\)`,"g"),l=new RegExp(`(\\\\)?${a.source}`,"g");function d(e){return e.replace(l,((e,t)=>t?e:`\\${e}`))}const c=new RegExp(`\\\\${a.source}`,"g");function h(e){return e.replace(c,(e=>`\\${e}`))}const u=new RegExp(`(\\s)?(\\\\)?${a.source}(\\s)?`,"g");function g(e){return-1===e.indexOf(r)?e:e.replace(u,((e,t,i,n)=>i?e:t||n||""))}function p(e){return e?e.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():""}const m=new RegExp(`\\$\\(${s.k.iconNameCharacter}+\\)`,"g");function f(e){m.lastIndex=0;let t="";const i=[];let n=0;for(;;){const o=m.lastIndex,s=m.exec(e),r=e.substring(o,null==s?void 0:s.index);if(r.length>0){t+=r;for(let e=0;e{"use strict";i.d(t,{R:()=>n,a:()=>o});class n{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const o=new n("id#")},77173:(e,t,i)=>{"use strict";i.d(t,{F:()=>o});var n=i(4669);const o=new class{constructor(){this._onDidChange=new n.Q5,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}},53725:(e,t,i)=>{"use strict";var n;i.d(t,{$:()=>n}),function(e){function t(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]}e.is=t;const i=Object.freeze([]);function*n(e){yield e}e.empty=function(){return i},e.single=n,e.wrap=function(e){return t(e)?e:n(e)},e.from=function(e){return e||i},e.reverse=function*(e){for(let t=e.length-1;t>=0;t--)yield e[t]},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const i of e)if(t(i))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.concat=function*(...e){for(const t of e)yield*t},e.reduce=function(e,t,i){let n=i;for(const i of e)n=t(n,i);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);to}]},e.asyncToArray=async function(e){const t=[];for await(const i of e)t.push(i);return Promise.resolve(t)}}(n||(n={}))},22258:(e,t,i)=>{"use strict";i.d(t,{H_:()=>a,Vd:()=>u,gx:()=>m,kL:()=>p});class n{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new n,s=new n,r=new n,a=new Array(230),l={},d=[],c=Object.create(null),h=Object.create(null),u=[],g=[];for(let e=0;e<=193;e++)u[e]=-1;for(let e=0;e<=132;e++)g[e]=-1;var p;function m(e,t){return(e|(65535&t)<<16>>>0)>>>0}!function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[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,e,0,e,e,e],[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",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],i=[],n=[];for(const e of t){const[t,p,m,f,v,_,b,w,y]=e;if(n[p]||(n[p]=!0,d[p]=m,c[m]=p,h[m.toLowerCase()]=p,t&&(u[p]=f,0!==f&&3!==f&&5!==f&&4!==f&&6!==f&&57!==f&&(g[f]=p))),!i[f]){if(i[f]=!0,!v)throw new Error(`String representation missing for key code ${f} around scan code ${m}`);o.define(f,v),s.define(f,w||v),r.define(f,y||w||v)}_&&(a[_]=f),b&&(l[b]=f)}g[3]=46}(),function(e){e.toString=function(e){return o.keyCodeToStr(e)},e.fromString=function(e){return o.strToKeyCode(e)},e.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return r.keyCodeToStr(e)},e.fromUserSettings=function(e){return s.strToKeyCode(e)||r.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}}(p||(p={}))},8030:(e,t,i)=>{"use strict";i.d(t,{X4:()=>r,jC:()=>a,r6:()=>l,xo:()=>s});var n=i(63580);class o{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(0===t.length)return null;const n=[];for(let o=0,s=t.length;o{"use strict";i.d(t,{$M:()=>r,Z9:()=>o,aZ:()=>l,f1:()=>d});var n=i(17301);function o(e,t){if("number"==typeof e){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new a(0!==n?[s(i,t),s(n,t)]:[s(i,t)])}{const i=[];for(let n=0;n{"use strict";i.d(t,{o:()=>n});class n{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}},5976:(e,t,i)=>{"use strict";i.d(t,{B9:()=>h,F8:()=>u,JT:()=>m,Jz:()=>_,L6:()=>v,Nq:()=>a,OF:()=>g,SL:()=>p,Wf:()=>c,XK:()=>f,b2:()=>b,dk:()=>d,wi:()=>r});var n=i(88289),o=i(53725);let s=null;function r(e){return null==s||s.trackDisposable(e),e}function a(e){null==s||s.markAsDisposed(e)}function l(e,t){null==s||s.setParent(e,t)}function d(e){return null==s||s.markAsSingleton(e),e}function c(e){return"function"==typeof e.dispose&&0===e.dispose.length}function h(e){if(o.$.is(e)){const t=[];for(const i of e)if(i)try{i.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function u(...e){const t=g((()=>h(e)));return function(e,t){if(s)for(const i of e)s.setParent(i,t)}(e,t),t}function g(e){const t=r({dispose:(0,n.M)((()=>{a(t),e()}))});return t}class p{constructor(){this._toDispose=new Set,this._isDisposed=!1,r(this)}dispose(){this._isDisposed||(a(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{h(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return l(e,this),this._isDisposed?p.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}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),l(e,null))}}p.DISABLE_DISPOSED_WARNING=!1;class m{constructor(){this._store=new p,r(this),l(this._store,this)}dispose(){a(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}m.None=Object.freeze({dispose(){}});class f{constructor(){this._isDisposed=!1,r(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),e&&l(e,this),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,a(this),null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}}class v{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return 0==--this._counter&&this._disposable.dispose(),this}}class _{constructor(e){this.object=e}dispose(){}}class b{constructor(){this._store=new Map,this._isDisposed=!1,r(this)}dispose(){a(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{h(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){var n;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||null===(n=this._store.get(e))||void 0===n||n.dispose(),this._store.set(e,t)}deleteAndDispose(e){var t;null===(t=this._store.get(e))||void 0===t||t.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}},91741:(e,t,i)=>{"use strict";i.d(t,{S:()=>o});class n{constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}}n.Undefined=new n(void 0);class o{constructor(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===n.Undefined}clear(){let e=this._first;for(;e!==n.Undefined;){const t=e.next;e.prev=n.Undefined,e.next=n.Undefined,e=t}this._first=n.Undefined,this._last=n.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new n(e);if(this._first===n.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(i))}}shift(){if(this._first!==n.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==n.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==n.Undefined&&e.next!==n.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===n.Undefined&&e.next===n.Undefined?(this._first=n.Undefined,this._last=n.Undefined):e.next===n.Undefined?(this._last=this._last.prev,this._last.next=n.Undefined):e.prev===n.Undefined&&(this._first=this._first.next,this._first.prev=n.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==n.Undefined;)yield e.element,e=e.next}}},43702:(e,t,i)=>{"use strict";var n,o;i.d(t,{Y9:()=>r,YQ:()=>d,ri:()=>c,z6:()=>l});class s{constructor(e,t){this.uri=e,this.value=t}}class r{constructor(e,t){if(this[n]="ResourceMap",e instanceof r)this.map=new Map(e.map),this.toKey=null!=t?t:r.defaultToKey;else if(function(e){return Array.isArray(e)}(e)){this.map=new Map,this.toKey=null!=t?t:r.defaultToKey;for(const[t,i]of e)this.set(t,i)}else this.map=new Map,this.toKey=null!=e?e:r.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new s(e,t)),this}get(e){var t;return null===(t=this.map.get(this.toKey(e)))||void 0===t?void 0:t.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,t){void 0!==t&&(e=e.bind(t));for(const[t,i]of this.map)e(i.value,i.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]}*[(n=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}r.defaultToKey=e=>e.toString();class a{constructor(){this[o]="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(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.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,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(o=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;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 t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class l extends a{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}class d{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,i]of e)this.set(t,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class c{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}get(e){return this.map.get(e)||new Set}}},23897:(e,t,i)=>{"use strict";i.d(t,{Pz:()=>s,Qc:()=>r});var n=i(53060),o=i(70666);function s(e){return JSON.stringify(e,a)}function r(e){let t=JSON.parse(e);return t=l(t),t}function a(e,t){return t instanceof RegExp?{$mid:2,source:t.source,flags:t.flags}:t}function l(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return o.o.revive(e);case 2:return new RegExp(e.source,e.flags);case 17:return new Date(e.source)}if(e instanceof n.KN||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i{"use strict";i.d(t,{v:()=>n});const n=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})},66663:(e,t,i)=>{"use strict";i.d(t,{Gi:()=>u,Gs:()=>d,WX:()=>c,lg:()=>n,xn:()=>l});var n,o=i(17301),s=i(1432),r=i(97295),a=i(70666);function l(e,t){return a.o.isUri(e)?(0,r.qq)(e.scheme,t):(0,r.ok)(e,t+":")}function d(e,...t){return t.some((t=>l(e,t)))}!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.codeSetting="code-setting",e.codeFeature="code-feature"}(n||(n={}));const c=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${n.vscodeRemoteResource}`}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(t){return o.dL(t),e}const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&-1===i.indexOf("[")&&(i=`[${i}]`);const r=this._ports[t],l=this._connectionTokens[t];let d=`path=${encodeURIComponent(e.path)}`;return"string"==typeof l&&(d+=`&tkn=${encodeURIComponent(l)}`),a.o.from({scheme:s.$L?this._preferredWebSchema:n.vscodeRemoteResource,authority:`${i}:${r}`,path:this._remoteResourcesPath,query:d})}};class h{uriToBrowserUri(e){return e.scheme===n.vscodeRemote?c.rewrite(e):e.scheme!==n.file||!s.tY&&s.qB!==`${n.vscodeFileResource}://${h.FALLBACK_AUTHORITY}`?e:e.with({scheme:n.vscodeFileResource,authority:e.authority||h.FALLBACK_AUTHORITY,query:null,fragment:null})}}h.FALLBACK_AUTHORITY="vscode-app";const u=new h;var g;!function(e){const t=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"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const i="vscode-coi";e.getHeadersFromQuery=function(e){let n;"string"==typeof e?n=new URL(e).searchParams:e instanceof URL?n=e.searchParams:a.o.isUri(e)&&(n=new URL(e.toString(!0)).searchParams);const o=null==n?void 0:n.get(i);if(o)return t.get(o)},e.addSearchParam=function(e,t,n){if(!globalThis.crossOriginIsolated)return;const o=t&&n?"3":n?"2":"1";e instanceof URLSearchParams?e.set(i,o):e[i]=o}}(g||(g={}))},59870:(e,t,i)=>{"use strict";function n(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,{N:()=>s,nM:()=>o,uZ:()=>n});class o{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 s{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{"use strict";i.d(t,{$E:()=>h,I8:()=>o,IU:()=>u,_A:()=>s,fS:()=>c,jB:()=>d,rs:()=>a});var n=i(98401);function o(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.entries(e).forEach((([e,i])=>{t[e]=i&&"object"==typeof i?o(i):i})),t}function s(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(r.call(e,i)){const o=e[i];"object"!=typeof o||Object.isFrozen(o)||(0,n.fU)(o)||t.push(o)}}return e}const r=Object.prototype.hasOwnProperty;function a(e,t){return l(e,t,new Set)}function l(e,t,i){if((0,n.Jp)(e))return e;const o=t(e);if(void 0!==o)return o;if(Array.isArray(e)){const n=[];for(const o of e)n.push(l(o,t,i));return n}if((0,n.Kn)(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(const o in e)r.call(e,o)&&(n[o]=l(e[o],t,i));return i.delete(e),n}return e}function d(e,t,i=!0){return(0,n.Kn)(e)?((0,n.Kn)(t)&&Object.keys(t).forEach((o=>{o in e?i&&((0,n.Kn)(e[o])&&(0,n.Kn)(t[o])?d(e[o],t[o],i):e[o]=t[o]):e[o]=t[o]})),e):t}function c(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;ifunction(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},n={};for(const t of e)n[t]=i(t);return n}},21070:(e,t,i)=>{"use strict";i.d(t,{EH:()=>d,nJ:()=>h,UV:()=>c,gp:()=>u,Dz:()=>p.Dz,nK:()=>o.nK,aK:()=>o.aK,bx:()=>p.bx,bk:()=>o.bk,Be:()=>o.Be,DN:()=>n.DN,rD:()=>p.rD,GN:()=>p.GN,aq:()=>p.aq,uh:()=>n.uh,jx:()=>p.DN,c8:()=>n.c8,PS:()=>n.PS,F_:()=>m});var n=i(96512),o=i(54282),s=i(35146),r=i(5976),a=i(66248),l=i(121);function d(e){return new g(new a.IZ(void 0,void 0,e),e,void 0,void 0)}function c(e,t){var i;return new g(new a.IZ(e.owner,e.debugName,null!==(i=e.debugReferenceFn)&&void 0!==i?i:t),t,void 0,void 0)}function h(e,t){var i;return new g(new a.IZ(e.owner,e.debugName,null!==(i=e.debugReferenceFn)&&void 0!==i?i:t),t,e.createEmptyChangeSummary,e.handleChange)}function u(e){const t=new r.SL,i=c({owner:void 0,debugName:void 0,debugReferenceFn:e},(i=>{t.clear(),e(i,t)}));return(0,r.OF)((()=>{i.dispose(),t.dispose()}))}class g{get debugName(){var e;return null!==(e=this._debugNameData.getDebugName(this))&&void 0!==e?e:"(anonymous)"}constructor(e,t,i,n){var o,s;this._debugNameData=e,this._runFn=t,this.createChangeSummary=i,this._handleChange=n,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=null===(o=this.createChangeSummary)||void 0===o?void 0:o.call(this),null===(s=(0,l.jl)())||void 0===s||s.handleAutorunCreated(this),this._runIfNeeded(),(0,r.wi)(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),(0,r.Nq)(this)}_runIfNeeded(){var e,t,i;if(3===this.state)return;const n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n,this.state=3;const o=this.disposed;try{if(!o){null===(e=(0,l.jl)())||void 0===e||e.handleAutorunTriggered(this);const i=this.changeSummary;this.changeSummary=null===(t=this.createChangeSummary)||void 0===t?void 0:t.call(this),this._runFn(this,i)}}finally{o||null===(i=(0,l.jl)())||void 0===i||i.handleAutorunFinished(this);for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,(0,s.eZ)((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}!function(e){e.Observer=g}(d||(d={}));var p=i(86367);function m(e,t,i){return new Promise(((n,o)=>{let s=!0,r=!1;const a=e.map((e=>({isFinished:t(e),error:!!i&&i(e),state:e}))),l=d((e=>{const{isFinished:t,error:i,state:d}=a.read(e);(t||i)&&(s?r=!0:l.dispose(),i?o(!0===i?d:i):n(d))}));s=!1,r&&l.dispose()}))}},96512:(e,t,i)=>{"use strict";i.d(t,{Bl:()=>m,DN:()=>y,Hr:()=>f,Jn:()=>c,MK:()=>d,Nc:()=>u,PS:()=>p,c8:()=>v,hm:()=>g,mT:()=>h,uh:()=>b});var n=i(66248),o=i(121);let s,r,a,l;function d(e){s=e}function c(e){r=e}function h(e){a=e}class u{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const i=void 0===t?void 0:e,o=void 0===t?e:t;return a({owner:i,debugName:()=>{const e=(0,n.$P)(o);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(o.toString());return t?`${this.debugName}.${t[2]}`:i?void 0:`${this.debugName} (mapped)`}},(e=>o(this.read(e),e)))}recomputeInitiallyAndOnChange(e,t){return e.add(s(this,t)),this}}class g extends u{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function p(e,t){const i=new _(e,t);try{e(i)}finally{i.finish()}}function m(e){if(l)e(l);else{const t=new _(e,void 0);l=t;try{e(t)}finally{t.finish(),l=void 0}}}async function f(e,t){const i=new _(e,t);try{await e(i)}finally{i.finish()}}function v(e,t,i){e?t(e):p(t,i)}class _{constructor(e,t){var i;this._fn=e,this._getDebugName=t,this.updatingObservers=[],null===(i=(0,o.jl)())||void 0===i||i.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():(0,n.$P)(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){var e;const t=this.updatingObservers;for(let e=0;e{}),(()=>`Setting ${this.debugName}`)));try{const s=this._value;this._setValue(e),null===(n=(0,o.jl)())||void 0===n||n.handleObservableChanged(this,{oldValue:s,newValue:e,change:i,didChange:!0,hadValue:!0});for(const e of this.observers)t.updateObserver(e,this),e.handleChange(this,i)}finally{s&&s.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function y(e,t){return"string"==typeof e?new C(void 0,e,t):new C(e,void 0,t)}class C extends w{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;null===(e=this._value)||void 0===e||e.dispose()}}},66248:(e,t,i)=>{"use strict";i.d(t,{$P:()=>l,IZ:()=>n});class n{constructor(e,t,i){this.owner=e,this.debugNameSource=t,this.referenceFn=i}getDebugName(e){return function(e,t){var i;const n=s.get(e);if(n)return n;const d=function(e,t){const i=s.get(e);if(i)return i;const n=t.owner?function(e){var t;const i=a.get(e);if(i)return i;const n=function(e){const t=e.constructor;return t?t.name:"Object"}(e);let o=null!==(t=r.get(n))&&void 0!==t?t:0;o++,r.set(n,o);const s=1===o?n:`${n}#${o}`;return a.set(e,s),s}(t.owner)+".":"";let o;const d=t.debugNameSource;if(void 0!==d){if("function"!=typeof d)return n+d;if(o=d(),void 0!==o)return n+o}const c=t.referenceFn;if(void 0!==c&&(o=l(c),void 0!==o))return n+o;if(void 0!==t.owner){const i=function(e,t){for(const i in e)if(e[i]===t)return i}(t.owner,e);if(void 0!==i)return n+i}}(e,t);if(d){let t=null!==(i=o.get(d))&&void 0!==i?i:0;t++,o.set(d,t);const n=1===t?d:`${d}#${t}`;return s.set(e,n),n}}(e,this)}}const o=new Map,s=new WeakMap,r=new Map,a=new WeakMap;function l(e){const t=e.toString(),i=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(t),n=i?i[1]:void 0;return null==n?void 0:n.trim()}},54282:(e,t,i)=>{"use strict";i.d(t,{Be:()=>u,aK:()=>h,bk:()=>c,kA:()=>g,nK:()=>d});var n=i(35146),o=i(5976),s=i(96512),r=i(66248),a=i(121);const l=(e,t)=>e===t;function d(e,t){return void 0!==t?new p(new r.IZ(e,void 0,t),t,void 0,void 0,void 0,l):new p(new r.IZ(void 0,void 0,e),e,void 0,void 0,void 0,l)}function c(e,t){var i;return new p(new r.IZ(e.owner,e.debugName,e.debugReferenceFn),t,void 0,void 0,e.onLastObserverRemoved,null!==(i=e.equalityComparer)&&void 0!==i?i:l)}function h(e,t){var i;return new p(new r.IZ(e.owner,e.debugName,void 0),t,e.createEmptyChangeSummary,e.handleChange,void 0,null!==(i=e.equalityComparer)&&void 0!==i?i:l)}function u(e,t){let i,n;void 0===t?(i=e,n=void 0):(n=e,i=t);const s=new o.SL;return new p(new r.IZ(n,void 0,i),(e=>(s.clear(),i(e,s))),void 0,void 0,(()=>s.dispose()),l)}function g(e,t){let i,n;void 0===t?(i=e,n=void 0):(n=e,i=t);const s=new o.SL;return new p(new r.IZ(n,void 0,i),(e=>{s.clear();const t=i(e);return t&&s.add(t),t}),void 0,void 0,(()=>s.dispose()),l)}(0,s.mT)(c);class p extends s.hm{get debugName(){var e;return null!==(e=this._debugNameData.getDebugName(this))&&void 0!==e?e:"(anonymous)"}constructor(e,t,i,n,o=void 0,s){var r,l;super(),this._debugNameData=e,this._computeFn=t,this.createChangeSummary=i,this._handleChange=n,this._handleLastObserverRemoved=o,this._equalityComparator=s,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=null===(r=this.createChangeSummary)||void 0===r?void 0:r.call(this),null===(l=(0,a.jl)())||void 0===l||l.handleDerivedCreated(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),null===(e=this._handleLastObserverRemoved)||void 0===e||e.call(this)}get(){var e;if(0===this.observers.size){const t=this._computeFn(this,null===(e=this.createChangeSummary)||void 0===e?void 0:e.call(this));return this.onLastObserverRemoved(),t}do{if(1===this.state)for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break;1===this.state&&(this.state=3),this._recomputeIfNeeded()}while(3!==this.state);return this.value}_recomputeIfNeeded(){var e,t;if(3===this.state)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i;const n=0!==this.state,o=this.value;this.state=3;const s=this.changeSummary;this.changeSummary=null===(e=this.createChangeSummary)||void 0===e?void 0:e.call(this);try{this.value=this._computeFn(this,s)}finally{for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}const r=n&&!this._equalityComparator(o,this.value);if(null===(t=(0,a.jl)())||void 0===t||t.handleDerivedRecomputed(this,{oldValue:o,newValue:this.value,change:void 0,didChange:r,hadValue:n}),r)for(const e of this.observers)e.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const e of this.observers)e.handlePossibleChange(this);if(t)for(const e of this.observers)e.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}(0,n.eZ)((()=>this.updateCount>=0))}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),n=3===this.state;if(i&&(1===this.state||n)&&(this.state=2,n))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}},121:(e,t,i)=>{"use strict";let n;function o(e){n=e}function s(){return n}i.d(t,{EK:()=>o,Qy:()=>r,jl:()=>s});class r{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return function(e){const t=new Array,i=[];let n="";!function e(o){if("length"in o)for(const t of o)t&&e(t);else"text"in o?(n+=`%c${o.text}`,t.push(o.style),o.data&&i.push(...o.data)):"data"in o&&i.push(...o.data)}(e);const o=[n,...t];return o.push(...i),o}([a(h("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[a(" "),d(c(e.oldValue,70),{color:"red",strikeThrough:!0}),a(" "),d(c(e.newValue,60),{color:"green"})]:[a(" (unchanged)")]:[a(" "),d(c(e.newValue,60),{color:"green"}),a(" (initial)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([l("observable value changed"),d(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(0!==e.size)return d(" (changed deps: "+[...e].map((e=>e.debugName)).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(i,n)=>(this.changedObservablesSets.get(e).add(i),t.apply(e,[i,n]))}handleDerivedRecomputed(e,t){const i=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([l("derived recomputed"),d(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(i),{data:[{fn:e._computeFn}]}])),i.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([l("observable from event triggered"),d(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(i,n)=>(this.changedObservablesSets.get(e).add(i),t.apply(e,[i,n]))}handleAutorunTriggered(e){const t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([l("autorun"),d(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._runFn}]}])),t.clear(),this.indentation++}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();void 0===t&&(t=""),console.log(...this.textToConsoleArgs([l("transaction"),d(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}function a(e){return d(e,{color:"black"})}function l(e){return d(function(e,t){for(;e.length<10;)e+=" ";return e}(`${e}: `),{color:"black",bold:!0})}function d(e,t={color:"black"}){const i={color:t.color};return t.strikeThrough&&(i["text-decoration"]="line-through"),t.bold&&(i["font-weight"]="bold"),{text:e,style:(n=i,Object.entries(n).reduce(((e,[t,i])=>`${e}${t}:${i};`),""))};var n}function c(e,t){switch(typeof e){case"number":default:return""+e;case"string":return e.length+2<=t?`"${e}"`:`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":return null===e?"null":Array.isArray(e)?function(e,t){let i="[ ",n=!0;for(const o of e){if(n||(i+=", "),i.length-5>t){i+="...";break}n=!1,i+=`${c(o,t-i.length)}`}return i+=" ]",i}(e,t):function(e,t){let i="{ ",n=!0;for(const[o,s]of Object.entries(e)){if(n||(i+=", "),i.length-5>t){i+="...";break}n=!1,i+=`${o}: ${c(s,t-i.length)}`}return i+=" }",i}(e,t);case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`}}function h(e,t){let i="";for(let n=1;n<=t;n++)i+=e;return i}},86367:(e,t,i)=>{"use strict";i.d(t,{DN:()=>f,Dz:()=>l,GN:()=>p,Zg:()=>b,aq:()=>u,bx:()=>_,rD:()=>c});var n=i(5976),o=i(96512),s=i(66248),r=i(54282),a=i(121);function l(e){return new d(e)}class d extends o.Nc{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function c(e,t){return new h(e,t)}class h extends o.hm{constructor(e,t){super(),this.event=e,this._getValue=t,this.hasValue=!1,this.handleEvent=e=>{var t;const i=this._getValue(e),n=this.value,s=!this.hasValue||n!==i;let r=!1;s&&(this.value=i,this.hasValue&&(r=!0,(0,o.c8)(h.globalTransaction,(e=>{var t;null===(t=(0,a.jl)())||void 0===t||t.handleFromEventObservableTriggered(this,{oldValue:n,newValue:i,change:void 0,didChange:s,hadValue:this.hasValue});for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")}))),this.hasValue=!0),r||null===(t=(0,a.jl)())||void 0===t||t.handleFromEventObservableTriggered(this,{oldValue:n,newValue:i,change:void 0,didChange:s,hadValue:this.hasValue})}}getDebugName(){return(0,s.$P)(this._getValue)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}function u(e,t){return new g(e,t)}!function(e){e.Observer=h,e.batchEventsGlobally=function(e,t){let i=!1;void 0===h.globalTransaction&&(h.globalTransaction=e,i=!0);try{t()}finally{i&&(h.globalTransaction=void 0)}}}(c||(c={}));class g extends o.hm{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{(0,o.PS)((e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>this.debugName))}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function p(e){return"string"==typeof e?new m(e):new m(void 0,e)}class m extends o.hm{get debugName(){var e;return null!==(e=new s.IZ(this._owner,this._debugName,void 0).getDebugName(this))&&void 0!==e?e:"Observable Signal"}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(e)for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,t);else(0,o.PS)((e=>{this.trigger(e,t)}),(()=>`Trigger signal ${this.debugName}`))}get(){}}function f(e,t){const i=new v(!0,t);return e.addObserver(i),t?t(e.get()):e.reportChanges(),(0,n.OF)((()=>{e.removeObserver(i)}))}(0,o.Jn)((function(e){const t=new v(!1,void 0);return e.addObserver(t),(0,n.OF)((()=>{e.removeObserver(t)}))})),(0,o.MK)(f);class v{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,0===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}function _(e){let t;return(0,r.nK)((i=>(t=e(i,t),t)))}function b(e,t,i,n){let o=new w(i,n);return(0,r.bk)({debugReferenceFn:i,owner:e,onLastObserverRemoved:()=>{o.dispose(),o=new w(i)}},(e=>(o.setItems(t.read(e)),o.getItems())))}class w{constructor(e,t){this._map=e,this._keySelector=t,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach((e=>e.store.dispose())),this._cache.clear()}setItems(e){const t=[],i=new Set(this._cache.keys());for(const o of e){const e=this._keySelector?this._keySelector(o):o;let s=this._cache.get(e);if(s)i.delete(e);else{const t=new n.SL;s={out:this._map(o,t),store:t},this._cache.set(e,s)}t.push(s.out)}for(const e of i)this._cache.get(e).store.dispose(),this._cache.delete(e);this._items=t}getItems(){return this._items}}},82663:(e,t,i)=>{"use strict";i.d(t,{DB:()=>w,DZ:()=>x,EZ:()=>S,Fv:()=>b,Gf:()=>y,KR:()=>_,Ku:()=>f,XX:()=>C,ir:()=>k});var n=i(76648);const o=46,s=47,r=92,a=58;class l extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const o=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${o} ${n} of type ${t}`;s+=". Received type "+typeof i,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function d(e,t){if("string"!=typeof e)throw new l(t,"string",e)}const c="win32"===n.Jv;function h(e){return e===s||e===r}function u(e){return e===s}function g(e){return e>=65&&e<=90||e>=97&&e<=122}function p(e,t,i,n){let r="",a=0,l=-1,d=0,c=0;for(let h=0;h<=e.length;++h){if(h2){const e=r.lastIndexOf(i);-1===e?(r="",a=0):(r=r.slice(0,e),a=r.length-1-r.lastIndexOf(i)),l=h,d=0;continue}if(0!==r.length){r="",a=0,l=h,d=0;continue}}t&&(r+=r.length>0?`${i}..`:"..",a=2)}else r.length>0?r+=`${i}${e.slice(l+1,h)}`:r=e.slice(l+1,h),a=h-l-1;l=h,d=0}else c===o&&-1!==d?++d:d=-1}return r}function m(e,t){!function(e,t){if(null===e||"object"!=typeof e)throw new l("pathObject","Object",e)}(t);const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const f={resolve(...e){let t="",i="",o=!1;for(let s=e.length-1;s>=-1;s--){let l;if(s>=0){if(l=e[s],d(l,"path"),0===l.length)continue}else 0===t.length?l=n.Vj():(l=n.OB[`=${t}`]||n.Vj(),(void 0===l||l.slice(0,2).toLowerCase()!==t.toLowerCase()&&l.charCodeAt(2)===r)&&(l=`${t}\\`));const c=l.length;let u=0,p="",m=!1;const f=l.charCodeAt(0);if(1===c)h(f)&&(u=1,m=!0);else if(h(f))if(m=!0,h(l.charCodeAt(1))){let e=2,t=e;for(;e2&&h(l.charCodeAt(2))&&(m=!0,u=3));if(p.length>0)if(t.length>0){if(p.toLowerCase()!==t.toLowerCase())continue}else t=p;if(o){if(t.length>0)break}else if(i=`${l.slice(u)}\\${i}`,o=m,m&&t.length>0)break}return i=p(i,!o,"\\",h),o?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){d(e,"path");const t=e.length;if(0===t)return".";let i,n=0,o=!1;const s=e.charCodeAt(0);if(1===t)return u(s)?"\\":e;if(h(s))if(o=!0,h(e.charCodeAt(1))){let o=2,s=o;for(;o2&&h(e.charCodeAt(2))&&(o=!0,n=3));let r=n0&&h(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?o?`\\${r}`:r:o?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){d(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return h(i)||t>2&&g(i)&&e.charCodeAt(1)===a&&h(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let n=0;n0&&(void 0===t?t=i=o:t+=`\\${o}`)}if(void 0===t)return".";let n=!0,o=0;if("string"==typeof i&&h(i.charCodeAt(0))){++o;const e=i.length;e>1&&h(i.charCodeAt(1))&&(++o,e>2&&(h(i.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(t=`\\${t.slice(o)}`)}return f.normalize(t)},relative(e,t){if(d(e,"from"),d(t,"to"),e===t)return"";const i=f.resolve(e),n=f.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let o=0;for(;oo&&e.charCodeAt(s-1)===r;)s--;const a=s-o;let l=0;for(;ll&&t.charCodeAt(c-1)===r;)c--;const h=c-l,u=au){if(t.charCodeAt(l+p)===r)return n.slice(l+p+1);if(2===p)return n.slice(l+p)}a>u&&(e.charCodeAt(o+p)===r?g=p:2===p&&(g=3)),-1===g&&(g=0)}let m="";for(p=o+g+1;p<=s;++p)p!==s&&e.charCodeAt(p)!==r||(m+=0===m.length?"..":"\\..");return l+=g,m.length>0?`${m}${n.slice(l,c)}`:(n.charCodeAt(l)===r&&++l,n.slice(l,c))},toNamespacedPath(e){if("string"!=typeof e||0===e.length)return e;const t=f.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===r){if(t.charCodeAt(1)===r){const e=t.charCodeAt(2);if(63!==e&&e!==o)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(g(t.charCodeAt(0))&&t.charCodeAt(1)===a&&t.charCodeAt(2)===r)return`\\\\?\\${t}`;return e},dirname(e){d(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return h(o)?e:".";if(h(o)){if(i=n=1,h(e.charCodeAt(1))){let o=2,s=o;for(;o2&&h(e.charCodeAt(2))?3:2,n=i);let s=-1,r=!0;for(let i=t-1;i>=n;--i)if(h(e.charCodeAt(i))){if(!r){s=i;break}}else r=!1;if(-1===s){if(-1===i)return".";s=i}return e.slice(0,s)},basename(e,t){void 0!==t&&d(t,"ext"),d(e,"path");let i,n=0,o=-1,s=!0;if(e.length>=2&&g(e.charCodeAt(0))&&e.charCodeAt(1)===a&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(h(l)){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=n;--i)if(h(e.charCodeAt(i))){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){d(e,"path");let t=0,i=-1,n=0,s=-1,r=!0,l=0;e.length>=2&&e.charCodeAt(1)===a&&g(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(h(t)){if(!r){n=a+1;break}}else-1===s&&(r=!1,s=a+1),t===o?-1===i?i=a:1!==l&&(l=1):-1!==i&&(l=-1)}return-1===i||-1===s||0===l||1===l&&i===s-1&&i===n+1?"":e.slice(i,s)},format:m.bind(null,"\\"),parse(e){d(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,s=e.charCodeAt(0);if(1===i)return h(s)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(h(s)){if(n=1,h(e.charCodeAt(1))){let t=2,o=t;for(;t0&&(t.root=e.slice(0,n));let r=-1,l=n,c=-1,u=!0,p=e.length-1,m=0;for(;p>=n;--p)if(s=e.charCodeAt(p),h(s)){if(!u){l=p+1;break}}else-1===c&&(u=!1,c=p+1),s===o?-1===r?r=p:1!==m&&(m=1):-1!==r&&(m=-1);return-1!==c&&(-1===r||0===m||1===m&&r===c-1&&r===l+1?t.base=t.name=e.slice(l,c):(t.name=e.slice(l,r),t.base=e.slice(l,c),t.ext=e.slice(r,c))),t.dir=l>0&&l!==n?e.slice(0,l-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},v=(()=>{if(c){const e=/\\/g;return()=>{const t=n.Vj().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>n.Vj()})(),_={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const o=n>=0?e[n]:v();d(o,"path"),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===s)}return t=p(t,!i,"/",u),i?`/${t}`:t.length>0?t:"."},normalize(e){if(d(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===s,i=e.charCodeAt(e.length-1)===s;return 0===(e=p(e,!t,"/",u)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(d(e,"path"),e.length>0&&e.charCodeAt(0)===s),join(...e){if(0===e.length)return".";let t;for(let i=0;i0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":_.normalize(t)},relative(e,t){if(d(e,"from"),d(t,"to"),e===t)return"";if((e=_.resolve(e))===(t=_.resolve(t)))return"";const i=e.length,n=i-1,o=t.length-1,r=nr){if(t.charCodeAt(1+l)===s)return t.slice(1+l+1);if(0===l)return t.slice(1+l)}else n>r&&(e.charCodeAt(1+l)===s?a=l:0===l&&(a=0));let c="";for(l=1+a+1;l<=i;++l)l!==i&&e.charCodeAt(l)!==s||(c+=0===c.length?"..":"/..");return`${c}${t.slice(1+a)}`},toNamespacedPath:e=>e,dirname(e){if(d(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===s;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===s){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&d(t,"ext"),d(e,"path");let i,n=0,o=-1,r=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,l=-1;for(i=e.length-1;i>=0;--i){const d=e.charCodeAt(i);if(d===s){if(!r){n=i+1;break}}else-1===l&&(r=!1,l=i+1),a>=0&&(d===t.charCodeAt(a)?-1==--a&&(o=i):(a=-1,o=l))}return n===o?o=l:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===s){if(!r){n=i+1;break}}else-1===o&&(r=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){d(e,"path");let t=-1,i=0,n=-1,r=!0,a=0;for(let l=e.length-1;l>=0;--l){const d=e.charCodeAt(l);if(d!==s)-1===n&&(r=!1,n=l+1),d===o?-1===t?t=l:1!==a&&(a=1):-1!==t&&(a=-1);else if(!r){i=l+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===i+1?"":e.slice(t,n)},format:m.bind(null,"/"),parse(e){d(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===s;let n;i?(t.root="/",n=1):n=0;let r=-1,a=0,l=-1,c=!0,h=e.length-1,u=0;for(;h>=n;--h){const t=e.charCodeAt(h);if(t!==s)-1===l&&(c=!1,l=h+1),t===o?-1===r?r=h:1!==u&&(u=1):-1!==r&&(u=-1);else if(!c){a=h+1;break}}if(-1!==l){const n=0===a&&i?1:a;-1===r||0===u||1===u&&r===l-1&&r===a+1?t.base=t.name=e.slice(n,l):(t.name=e.slice(n,r),t.base=e.slice(n,l),t.ext=e.slice(r,l))}return a>0?t.dir=e.slice(0,a-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};_.win32=f.win32=f,_.posix=f.posix=_;const b=c?f.normalize:_.normalize,w=c?f.resolve:_.resolve,y=c?f.relative:_.relative,C=c?f.dirname:_.dirname,S=c?f.basename:_.basename,x=c?f.extname:_.extname,k=c?f.sep:_.sep},1432:(e,t,i)=>{"use strict";i.d(t,{$L:()=>I,Dt:()=>K,ED:()=>L,G6:()=>U,IJ:()=>D,OS:()=>B,dK:()=>P,dz:()=>N,fn:()=>F,gn:()=>M,i7:()=>z,qB:()=>T,r:()=>V,tY:()=>E,tq:()=>R,un:()=>q,vU:()=>j});var n,o=i(63580);const s="en";let r,a,l=!1,d=!1,c=!1,h=!1,u=!1,g=!1,p=!1,m=!1,f=!1,v=!1,_=s,b=null,w=null;const y=globalThis;let C;void 0!==y.vscode&&void 0!==y.vscode.process?C=y.vscode.process:"undefined"!=typeof process&&(C=process);const S="string"==typeof(null===(n=null==C?void 0:C.versions)||void 0===n?void 0:n.electron),x=S&&"renderer"===(null==C?void 0:C.type);if("object"==typeof C){l="win32"===C.platform,d="darwin"===C.platform,c="linux"===C.platform,h=c&&!!C.env.SNAP&&!!C.env.SNAP_REVISION,p=S,f=!!C.env.CI||!!C.env.BUILD_ARTIFACTSTAGINGDIRECTORY,r=s,_=s;const e=C.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];r=t.locale,b=t.osLocale,_=i||s,w=t._translationsConfigFile}catch(e){}u=!0}else"object"!=typeof navigator||x?console.error("Unable to resolve platform."):(a=navigator.userAgent,l=a.indexOf("Windows")>=0,d=a.indexOf("Macintosh")>=0,m=(a.indexOf("Macintosh")>=0||a.indexOf("iPad")>=0||a.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,c=a.indexOf("Linux")>=0,v=(null==a?void 0:a.indexOf("Mobi"))>=0,g=!0,r=o.aj(o.NC({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"))||s,_=r,b=navigator.language);let k=0;d?k=1:l?k=3:c&&(k=2);const L=l,N=d,D=c,E=u,I=g,T=g&&"function"==typeof y.importScripts?y.origin:void 0,M=m,R=v,A=a,P=_,O="function"==typeof y.postMessage&&!y.importScripts,F=(()=>{if(O){const e=[];y.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i{const n=++t;e.push({id:n,callback:i}),y.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),B=d||m?2:l?1:3;let W=!0,H=!1;function V(){if(!H){H=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);W=513===t[0]}return W}const z=!!(A&&A.indexOf("Chrome")>=0),j=!!(A&&A.indexOf("Firefox")>=0),U=!!(!z&&A&&A.indexOf("Safari")>=0),q=!!(A&&A.indexOf("Edg/")>=0),K=!!(A&&A.indexOf("Android")>=0)},76648:(e,t,i)=>{"use strict";i.d(t,{Jv:()=>l,OB:()=>a,Vj:()=>r});var n=i(1432);let o;const s=globalThis.vscode;if(void 0!==s&&void 0!==s.process){const e=s.process;o={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd:()=>e.cwd()}}else o="undefined"!=typeof process?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd()}:{get platform(){return n.ED?"win32":n.dz?"darwin":"linux"},get arch(){},get env(){return{}},cwd:()=>"/"};const r=o.cwd,a=o.env,l=o.platform},61134:(e,t,i)=>{"use strict";var n;i.d(t,{e:()=>n}),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],o={start:e.start,end:Math.min(t.start,e.end)},s={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(s)||n.push(s),n}}(n||(n={}))},95935:(e,t,i)=>{"use strict";i.d(t,{AH:()=>_,DZ:()=>m,EZ:()=>p,Hx:()=>g,SF:()=>h,Vb:()=>S,Vo:()=>v,XX:()=>f,Xy:()=>u,i3:()=>w,lX:()=>b,z_:()=>d});var n=i(15527),o=i(66663),s=i(82663),r=i(1432),a=i(97295),l=i(70666);function d(e){return(0,l.q)(e,!0)}class c{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:(0,a.qu)(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===o.lg.file)return n.KM(d(e),d(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(y(e.authority,t.authority))return n.KM(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.o.joinPath(e,...t)}basenameOrAuthority(e){return p(e)||e.authority}basename(e){return s.KR.basename(e.path)}extname(e){return s.KR.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===o.lg.file?t=l.o.file(s.XX(d(e))).path:(t=s.KR.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===o.lg.file?l.o.file(s.Fv(d(e))).path:s.KR.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!y(e.authority,t.authority))return;if(e.scheme===o.lg.file){const i=s.Gf(d(e),d(t));return r.ED?n.ej(i):i}let i=e.path||"/";const a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,a.length);en.yj(i).length&&i[i.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=s.ir){return C(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=s.ir){let i=!1;if(e.scheme===o.lg.file){const o=d(e);i=void 0!==o&&o.length===n.yj(o).length&&o[o.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||C(e,t)?e:e.with({path:e.path+"/"})}}const h=new c((()=>!1)),u=(new c((e=>e.scheme!==o.lg.file||!r.IJ)),new c((e=>!0)),h.isEqual.bind(h)),g=(h.isEqualOrParent.bind(h),h.getComparisonKey.bind(h),h.basenameOrAuthority.bind(h)),p=h.basename.bind(h),m=h.extname.bind(h),f=h.dirname.bind(h),v=h.joinPath.bind(h),_=h.normalizePath.bind(h),b=h.relativePath.bind(h),w=h.resolvePath.bind(h),y=(h.isAbsolutePath.bind(h),h.isEqualAuthority.bind(h)),C=h.hasTrailingPathSeparator.bind(h);var S;h.removeTrailingPathSeparator.bind(h),h.addTrailingPathSeparator.bind(h),function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(S||(S={}))},76633:(e,t,i)=>{"use strict";i.d(t,{Rm:()=>r});var n=i(4669),o=i(5976);class s{constructor(e,t,i,n,o,s,r){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,o|=0,s|=0,r|=0),this.rawScrollLeft=n,this.rawScrollTop=r,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),o<0&&(o=0),r+o>s&&(r=s-o),r<0&&(r=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=o,this.scrollHeight=s,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new s(this._forceIntegerValues,void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new s(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,s=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:o,heightChanged:s,scrollHeightChanged:r,scrollTopChanged:a}}}class r extends o.JT{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new n.Q5),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new s(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var i;const n=this._state.withScrollDimensions(e,t);this._setState(n,Boolean(this._smoothScrolling)),null===(i=this._smoothScrolling)||void 0===i||i.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new d(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=d.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}hasPendingScrollAnimation(){return Boolean(this._smoothScrolling)}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class a{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function l(e,t){const i=t-e;return function(t){return e+i*(1-(n=1-t,Math.pow(n,3)));var n}}class d{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let r,a;return e{"use strict";i.d(t,{Z:()=>s});var n,o=i(97295);!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(n||(n={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(s){return s?o.qq(t,s)?e.Error:o.qq(i,s)||o.qq("warn",s)?e.Warning:o.qq(n,s)?e.Info:e.Ignore:e.Ignore},e.toString=function(o){switch(o){case e.Error:return t;case e.Warning:return i;case e.Info:return n;default:return"ignore"}}}(n||(n={}));const s=n},84013:(e,t,i)=>{"use strict";i.d(t,{G:()=>o});const n=globalThis.performance&&"function"==typeof globalThis.performance.now;class o{static create(e){return new o(e)}constructor(e){this._now=n&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}},97295:(e,t,i)=>{"use strict";i.d(t,{$i:()=>$,B4:()=>re,C8:()=>Y,Fw:()=>w,GF:()=>v,HO:()=>z,IO:()=>_,J_:()=>j,K7:()=>Q,Kw:()=>ee,LC:()=>y,Mh:()=>R,P1:()=>A,PJ:()=>te,Qe:()=>G,R1:()=>f,T5:()=>D,TT:()=>k,Ut:()=>q,V8:()=>C,W1:()=>H,WU:()=>l,YK:()=>O,YU:()=>c,ZG:()=>P,ZH:()=>B,ZK:()=>ae,ab:()=>Z,c1:()=>J,df:()=>I,ec:()=>h,fA:()=>d,fy:()=>u,j3:()=>g,j_:()=>N,m5:()=>r,mK:()=>E,oH:()=>oe,oL:()=>p,ok:()=>M,ow:()=>S,qq:()=>T,qu:()=>x,rL:()=>F,uS:()=>X,un:()=>m,uq:()=>b,vH:()=>V,vU:()=>le,zY:()=>L});var n,o=i(701),s=i(79579);function r(e){return!e||"string"!=typeof e||0===e.trim().length}const a=/{(\d+)}/g;function l(e,...t){return 0===t.length?e:e.replace(a,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function d(e){return e.replace(/[<>"'&]/g,(e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e}))}function c(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function h(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function u(e,t=" "){return p(g(e,t),t)}function g(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function p(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let o=n,s=-1;for(;s=e.lastIndexOf(t,o-1),-1!==s&&s+i===o;){if(0===s)return"";o=s}return e.substring(0,o)}function m(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function f(e){return e.replace(/\*/g,"")}function v(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=h(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function _(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function b(e){return e.split(/\r\n|\r|\n/)}function w(e){var t;const i=[],n=e.split(/(\r\n|\r|\n)/);for(let e=0;e=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function x(e,t){return et?1:0}function k(e,t,i=0,n=e.length,o=0,s=t.length){for(;is)return 1}const r=n-i,a=s-o;return ra?1:0}function L(e,t){return N(e,t,0,e.length,0,t.length)}function N(e,t,i=0,n=e.length,o=0,s=t.length){for(;i=128||a>=128)return k(e.toLowerCase(),t.toLowerCase(),i,n,o,s);E(r)&&(r-=32),E(a)&&(a-=32);const l=r-a;if(0!==l)return l}const r=n-i,a=s-o;return ra?1:0}function D(e){return e>=48&&e<=57}function E(e){return e>=97&&e<=122}function I(e){return e>=65&&e<=90}function T(e,t){return e.length===t.length&&0===N(e,t)}function M(e,t){const i=t.length;return!(t.length>e.length)&&0===N(e,t,0,i)}function R(e,t){const i=Math.min(e.length,t.length);let n;for(n=0;n1){const n=e.charCodeAt(t-2);if(P(n))return F(n,i)}return i}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=B(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class H{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new W(e,t)}nextGraphemeLength(){const e=ne.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const i=t.offset,o=e.getGraphemeBreakType(t.nextCodePoint());if(ie(n,o)){t.setOffset(i);break}n=o}return t.offset-i}prevGraphemeLength(){const e=ne.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const i=t.offset,o=e.getGraphemeBreakType(t.prevCodePoint());if(ie(o,n)){t.setOffset(i);break}n=o}return i-t.offset}eol(){return this._iterator.eol()}}function V(e,t){return new H(e,t).nextGraphemeLength()}function z(e,t){return new H(e,t).prevGraphemeLength()}function j(e,t){t>0&&O(e.charCodeAt(t))&&t--;const i=t+V(e,t);return[i-z(e,i),i]}let U;function q(e){return U||(U=/(?:[\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])/),U.test(e)}const K=/^[\t\n\r\x20-\x7E]*$/;function $(e){return K.test(e)}const G=/[\u2028\u2029]/;function Z(e){return G.test(e)}function Q(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function Y(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const J=String.fromCharCode(65279);function X(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function ee(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function te(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function ie(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class ne{static getInstance(){return ne._INSTANCE||(ne._INSTANCE=new ne),ne._INSTANCE}constructor(){this._data=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]")}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(et[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function oe(e,t){if(0===e)return 0;const i=function(e,t){const i=new W(t,e);let n=i.prevCodePoint();for(;se(n)||65039===n||8419===n;){if(0===i.offset)return;n=i.prevCodePoint()}if(!Y(n))return;let o=i.offset;return o>0&&8205===i.prevCodePoint()&&(o=i.offset),o}(e,t);if(void 0!==i)return i;const n=new W(t,e);return n.prevCodePoint(),n.offset}function se(e){return 127995<=e&&e<=127999}ne._INSTANCE=null;const re=" ";class ae{static getInstance(e){return n.cache.get(Array.from(e))}static getLocales(){return n._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())}}n=ae,ae.ambiguousCharacterData=new s.o((()=>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,8218,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,8242,96,1370,96,1523,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,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,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,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,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,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,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,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,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,71922,67,71913,67,65315,67,8557,67,8450,67,8493,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,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,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,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,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,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,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,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,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,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,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,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,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,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,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,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,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,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,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,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,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,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,71919,87,71910,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,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,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,66293,90,71909,90,65338,90,8484,90,8488,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,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,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,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,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,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,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,65283,35,65292,44,65307,59],"ko":[8211,45,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,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,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,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[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,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,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,65283,35,65307,59]}'))),ae.cache=new o.t((e=>{function t(e){const t=new Map;for(let i=0;i!e.startsWith("_")&&e in o));0===r.length&&(r=["_default"]);for(const e of r)s=i(s,t(o[e]));const a=function(e,t){const i=new Map(e);for(const[e,n]of t)i.set(e,n);return i}(t(o._common),s);return new n(a)})),ae._locales=new s.o((()=>Object.keys(n.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))));class le{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,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,12288,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]")}static getData(){return this._data||(this._data=new Set(le.getRawData())),this._data}static isInvisibleCharacter(e){return le.getData().has(e)}static get codePoints(){return le.getData()}}le._data=void 0},5635:(e,t,i)=>{"use strict";i.d(t,{n:()=>n});const n=Symbol("MicrotaskDelay")},4767:(e,t,i)=>{"use strict";i.d(t,{Id:()=>d});var n=i(97295);class o{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 e=this._value.charCodeAt(t);if(!(47===e||this._splitOnBackslash&&92===e))break}return this.next()}hasNext(){return this._to!1),t=(()=>!1)){return new d(new a(e,t))}static forStrings(){return new d(new o)}static forConfigKeys(){return new d(new s)}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 l,this._root.segment=i.value());const o=[];for(n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new l,n.left.segment=i.value()),o.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new l,n.right.segment=i.value()),o.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new l,n.mid.segment=i.value()),o.push([0,n]),n=n.mid}}const s=n.value;n.value=t,n.key=e;for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i<-1||i>1){const i=o[e][0],n=o[e+1][0];if(1===i&&1===n)o[e][1]=t.rotateLeft();else if(-1===i&&-1===n)o[e][1]=t.rotateRight();else if(1===i&&-1===n)t.right=o[e+1][1]=o[e+1][1].rotateRight(),o[e][1]=t.rotateLeft();else{if(-1!==i||1!==n)throw new Error;t.left=o[e+1][1]=o[e+1][1].rotateLeft(),o[e][1]=t.rotateRight()}if(e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1]}else this._root=o[0][1]}}return s}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===(null==t?void 0:t.value)&&void 0===(null==t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),o=[];let s=this._root;for(;s;){const e=n.cmp(s.segment);if(e>0)o.push([-1,s]),s=s.left;else if(e<0)o.push([1,s]),s=s.right;else{if(!n.hasNext())break;n.next(),o.push([0,s]),s=s.mid}}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 e=this._min(s.right);if(e.key){const{key:t,value:i,segment:n}=e;this._delete(e.key,!1),s.key=t,s.value=i,s.segment=n}}else{const e=null!==(i=s.left)&&void 0!==i?i:s.right;if(o.length>0){const[t,i]=o[o.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e}}else this._root=e}for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),o[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),o[e][1]=t.rotateRight()),e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1]}else this._root=o[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const i=this._iter.reset(e);let n=this._root;for(;n;){const e=i.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!i.hasNext())return n.mid?this._entries(n.mid):t?n.value:void 0;i.next(),n=n.mid}}}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&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}},25670:(e,t,i)=>{"use strict";i.d(t,{k:()=>o});var n,o,s=i(73046);!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(n||(n={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){const n=t.exec(e.id);if(!n)return i(s.l.error);const[,o,r]=n,a=["codicon","codicon-"+o];return r&&a.push("codicon-modifier-"+r.substring(1)),a}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")},e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||n.isThemeColor(e.color))};const o=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);e.fromString=function(e){const t=o.exec(e);if(!t)return;const[,i]=t;return{id:i}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){var i,n;return e.id===t.id&&(null===(i=e.color)||void 0===i?void 0:i.id)===(null===(n=t.color)||void 0===n?void 0:n.id)}}(o||(o={}))},98401:(e,t,i)=>{"use strict";function n(e){return"string"==typeof e}function o(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){const t=Object.getPrototypeOf(Uint8Array);return"object"==typeof e&&e instanceof t}function r(e){return"number"==typeof e&&!isNaN(e)}function a(e){return!!e&&"function"==typeof e[Symbol.iterator]}function l(e){return!0===e||!1===e}function d(e){return void 0===e}function c(e){return!h(e)}function h(e){return d(e)||null===e}function u(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function g(e){if(h(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function p(e){return"function"==typeof e}function m(e,t){const i=Math.min(e.length,t.length);for(let n=0;nc,D8:()=>m,HD:()=>n,Jp:()=>h,Kn:()=>o,TW:()=>a,cW:()=>g,fU:()=>s,hj:()=>r,jn:()=>l,mf:()=>p,o8:()=>d,p_:()=>u})},85427:(e,t,i)=>{"use strict";function n(e){return e<0?0:e>255?255:0|e}function o(e){return e<0?0:e>4294967295?4294967295:0|e}i.d(t,{A:()=>o,K:()=>n})},70666:(e,t,i)=>{"use strict";i.d(t,{o:()=>h,q:()=>v});var n=i(82663),o=i(1432);const s=/^\w[\w\d+.-]*$/,r=/^\//,a=/^\/\//,l="",d="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(e){return e instanceof h||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}constructor(e,t,i,n,o,c=!1){"object"==typeof e?(this.scheme=e.scheme||l,this.authority=e.authority||l,this.path=e.path||l,this.query=e.query||l,this.fragment=e.fragment||l):(this.scheme=function(e,t){return e||t?e:"file"}(e,c),this.authority=t||l,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d}return t}(this.scheme,i||l),this.query=n||l,this.fragment=o||l,function(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.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(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,c))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:o,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=l),void 0===i?i=this.authority:null===i&&(i=l),void 0===n?n=this.path:null===n&&(n=l),void 0===o?o=this.query:null===o&&(o=l),void 0===s?s=this.fragment:null===s&&(s=l),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&s===this.fragment?this:new g(t,i,n,o,s)}static parse(e,t=!1){const i=c.exec(e);return i?new g(i[2]||l,y(i[4]||l),y(i[5]||l),y(i[7]||l),y(i[9]||l),t):new g(l,l,l,l,l)}static file(e){let t=l;if(o.ED&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){const i=e.indexOf(d,2);-1===i?(t=e.substring(2),e=d):(t=e.substring(2,i),e=e.substring(i)||d)}return new g("file",t,e,l,l)}static from(e,t){return new g(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=o.ED&&"file"===e.scheme?h.file(n.Ku.join(v(e,!0),...t)).path:n.KR.join(e.path,...t),e.with({path:i})}toString(e=!1){return _(this,e)}toJSON(){return this}static revive(e){var t,i;if(e){if(e instanceof h)return e;{const n=new g(e);return n._formatted=null!==(t=e.external)&&void 0!==t?t:null,n._fsPath=e._sep===u&&null!==(i=e.fsPath)&&void 0!==i?i:null,n}}return e}}const u=o.ED?1:void 0;class g extends h{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=u),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 p={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 m(e,t,i){let n,o=-1;for(let s=0;s=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r||i&&91===r||i&&93===r||i&&58===r)-1!==o&&(n+=encodeURIComponent(e.substring(o,s)),o=-1),void 0!==n&&(n+=e.charAt(s));else{void 0===n&&(n=e.substr(0,s));const t=p[r];void 0!==t?(-1!==o&&(n+=encodeURIComponent(e.substring(o,s)),o=-1),n+=t):-1===o&&(o=s)}}return-1!==o&&(n+=encodeURIComponent(e.substring(o))),void 0!==n?n:e}function f(e){let t;for(let i=0;i1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,o.ED&&(i=i.replace(/\//g,"\\")),i}function _(e,t){const i=t?f:m;let n="",{scheme:o,authority:s,path:r,query:a,fragment:l}=e;if(o&&(n+=o,n+=":"),(s||"file"===o)&&(n+=d,n+=d),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?n+=i(s,!1,!0):(n+=i(s.substr(0,e),!1,!0),n+=s.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),l&&(n+="#",n+=t?l:m(l,!1,!1)),n}function b(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+b(e.substr(3)):e}}const w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function y(e){return e.match(w)?e.replace(w,(e=>b(e))):e}},98e3:(e,t,i)=>{"use strict";i.d(t,{R:()=>n});const n=function(){if("object"==typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID.bind(crypto);let e;e="object"==typeof crypto&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;t{"use strict";i.d(t,{H:()=>g});var n=i(36566),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},d={};l(d,n,"default");var c={},h={},u=class e{static getOrCreate(t){return h[t]||(h[t]=new e(t)),h[t]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t}))}load(){return this._loadingTriggered||(this._loadingTriggered=!0,c[this._languageId].loader().then((e=>this._lazyLoadPromiseResolve(e)),(e=>this._lazyLoadPromiseReject(e)))),this._lazyLoadPromise}};function g(e){const t=e.id;c[t]=e,d.languages.register(e);const i=u.getOrCreate(t);d.languages.registerTokensProviderFactory(t,{create:async()=>(await i.load()).language}),d.languages.onLanguageEncountered(t,(async()=>{const e=await i.load();d.languages.setLanguageConfiguration(t,e.conf)}))}},29126:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>i.e(848).then(i.bind(i,40848))})},89808:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>i.e(4386).then(i.bind(i,54386))})},13598:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>i.e(1471).then(i.bind(i,31471))})},52042:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>i.e(4129).then(i.bind(i,84129))})},50497:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>i.e(7131).then(i.bind(i,47131))})},11336:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>i.e(1448).then(i.bind(i,11448))})},76334:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>i.e(3036).then(i.bind(i,33036))})},30253:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>i.e(1147).then(i.bind(i,21147))})},47940:(e,t,i)=>{"use strict";var n=i(25552);(0,n.H)({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>i.e(1960).then(i.bind(i,71960))}),(0,n.H)({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>i.e(1960).then(i.bind(i,71960))})},18162:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>i.e(8719).then(i.bind(i,18719))})},79556:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>i.e(8946).then(i.bind(i,68946))})},56292:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>i.e(2075).then(i.bind(i,62075))})},30282:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>i.e(6423).then(i.bind(i,56423))})},42429:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>i.e(9343).then(i.bind(i,39343))})},24129:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>i.e(5849).then(i.bind(i,25849))})},88765:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>i.e(2814).then(i.bind(i,12814))})},43814:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>i.e(2240).then(i.bind(i,92240))})},45067:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>i.e(4188).then(i.bind(i,14188))})},21589:(e,t,i)=>{"use strict";var n=i(25552);(0,n.H)({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagAutoInterpolationDollar))}),(0,n.H)({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagAngleInterpolationDollar))}),(0,n.H)({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagBracketInterpolationDollar))}),(0,n.H)({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagAngleInterpolationBracket))}),(0,n.H)({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagBracketInterpolationBracket))}),(0,n.H)({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagAutoInterpolationDollar))}),(0,n.H)({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagAutoInterpolationBracket))})},97820:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>i.e(6241).then(i.bind(i,96241))})},40927:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>i.e(249).then(i.bind(i,80249))})},26220:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>i.e(6489).then(i.bind(i,66489))})},1526:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>i.e(5703).then(i.bind(i,15703))})},64091:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>i.e(3632).then(i.bind(i,53632))})},40902:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>i.e(2571).then(i.bind(i,2571))})},17476:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>i.e(2798).then(i.bind(i,52798))})},16745:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>i.e(7043).then(i.bind(i,17043))})},43763:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>i.e(1134).then(i.bind(i,41134))})},46595:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>i.e(4946).then(i.bind(i,34946))})},36831:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>i.e(4368).then(i.bind(i,84368))})},66079:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>i.e(5593).then(i.bind(i,35593))})},90158:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>i.e(4912).then(i.bind(i,64912))})},38698:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>i.e(4028).then(i.bind(i,94028))})},82665:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>i.e(911).then(i.bind(i,20911))})},51944:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>i.e(8906).then(i.bind(i,38906))})},77365:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>i.e(2954).then(i.bind(i,42954))})},37562:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>i.e(4456).then(i.bind(i,4456))})},6595:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>i.e(854).then(i.bind(i,60854))})},75769:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>i.e(9398).then(i.bind(i,79398))})},51714:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>i.e(1961).then(i.bind(i,31961))})},86935:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>i.e(9537).then(i.bind(i,79537))})},62893:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>i.e(6082).then(i.bind(i,86082))})},27616:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>i.e(8084).then(i.bind(i,98084))})},83335:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>i.e(8070).then(i.bind(i,8070))})},46266:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>i.e(996).then(i.bind(i,20996))})},89723:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>i.e(7835).then(i.bind(i,47835))})},55788:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"pla",extensions:[".pla"],loader:()=>i.e(3682).then(i.bind(i,23682))})},48746:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>i.e(8180).then(i.bind(i,48180))})},94992:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>i.e(4407).then(i.bind(i,94407))})},16563:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>i.e(7562).then(i.bind(i,47410))})},57296:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>i.e(3760).then(i.bind(i,63760))})},85098:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>i.e(2892).then(i.bind(i,22892))})},83187:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>i.e(7287).then(i.bind(i,37287))})},12026:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>i.e(9400).then(i.bind(i,69400))})},76194:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>i.e(2140).then(i.bind(i,22140))})},5566:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>i.e(6424).then(i.bind(i,76424))})},26254:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>i.e(1259).then(i.bind(i,91259))})},5734:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>i.e(6449).then(i.bind(i,56449))})},40191:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>i.e(1065).then(i.bind(i,71065))})},93127:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>i.e(9684).then(i.bind(i,69684))})},34483:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>i.e(8715).then(i.bind(i,8715))})},40840:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>i.e(5062).then(i.bind(i,95062))})},37266:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>i.e(180).then(i.bind(i,90180))})},2375:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>i.e(2060).then(i.bind(i,32060))})},96461:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>i.e(525).then(i.bind(i,90525))})},76628:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>i.e(8670).then(i.bind(i,88670))})},40185:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>i.e(1156).then(i.bind(i,1156))})},27776:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>i.e(3919).then(i.bind(i,63919))})},28118:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>i.e(5962).then(i.bind(i,85962))})},96337:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>i.e(7778).then(i.bind(i,27778))})},87530:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>i.e(6587).then(i.bind(i,86587))})},25929:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>i.e(2911).then(i.bind(i,42911))})},17918:(e,t,i)=>{"use strict";var n=i(25552);(0,n.H)({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>i.e(1886).then(i.bind(i,81886))}),(0,n.H)({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>i.e(1886).then(i.bind(i,81886))})},6205:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>i.e(7637).then(i.bind(i,57637))})},46837:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>i.e(8424).then(i.bind(i,98424))})},88307:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>i.e(6717).then(i.bind(i,96717))})},58203:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>i.e(9907).then(i.bind(i,39907))})},67077:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>i.e(147).then(i.bind(i,40147))})},81905:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\i.e(4902).then(i.bind(i,4902))})},94199:(e,t,i)=>{"use strict";(0,i(25552).H)({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>i.e(3585).then(i.bind(i,23585))})},52136:(e,t,i)=>{"use strict";i.d(t,{N:()=>o});var n=i(38626);function o(e,t){e instanceof n.Z?(e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setFontVariationSettings(t.fontVariationSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.fontVariationSettings=t.fontVariationSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}},54534:(e,t,i)=>{"use strict";i.d(t,{I:()=>r});var n=i(5976),o=i(4669),s=i(65321);class r extends n.JT{constructor(e,t){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let i=!1,n=!1;const o=()=>{if(i&&!n)try{i=!1,n=!0,t()}finally{(0,s.jL)((0,s.Jj)(this._referenceDomElement),(()=>{n=!1,o()}))}};this._resizeObserver=new ResizeObserver((t=>{e=t&&t[0]&&t[0].contentRect?{width:t[0].contentRect.width,height:t[0].contentRect.height}:null,i=!0,o()})),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this._width===i&&this._height===n||(this._width=i,this._height=n,e&&this._onDidChange.fire())}}},27231:(e,t,i)=>{"use strict";i.d(t,{g:()=>p});var n=i(65321),o=i(28731),s=i(4669),r=i(5976),a=i(52136);class l{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class d{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(e){this._createDomElements(),e.document.body.appendChild(this._container),this._readFromDomElements(),e.document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");(0,a.N)(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");(0,a.N)(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");(0,a.N)(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const o=[];for(const e of this._requests){let s;0===e.type&&(s=t),2===e.type&&(s=i),1===e.type&&(s=n),s.appendChild(document.createElement("br"));const r=document.createElement("span");d._render(r,e),s.appendChild(r),o.push(r)}this._container=e,this._testElements=o}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings(e)}),5e3))}_evictUntrustedReadings(e){const t=this._ensureCache(e),i=t.getValues();let n=!1;for(const e of i)e.isTrusted||(n=!0,t.remove(e));n&&this._onDidChange.fire()}readFontInfo(e,t){const i=this._ensureCache(e);if(!i.has(t)){let i=this._actualReadFontInfo(e,t);(i.typicalHalfwidthCharacterWidth<=2||i.typicalFullwidthCharacterWidth<=2||i.spaceWidth<=2||i.maxDigitWidth<=2)&&(i=new h.pR({pixelRatio:o.T.getInstance(e).value,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,fontVariationSettings:i.fontVariationSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:i.isMonospace,typicalHalfwidthCharacterWidth:Math.max(i.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(i.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:i.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(i.spaceWidth,5),middotWidth:Math.max(i.middotWidth,5),wsmiddotWidth:Math.max(i.wsmiddotWidth,5),maxDigitWidth:Math.max(i.maxDigitWidth,5)},!1)),this._writeToCache(e,t,i)}return i.get(t)}_createRequest(e,t,i,n){const o=new l(e,t);return i.push(o),null==n||n.push(o),o}_actualReadFontInfo(e,t){const i=[],n=[],s=this._createRequest("n",0,i,n),r=this._createRequest("m",0,i,null),a=this._createRequest(" ",0,i,n),l=this._createRequest("0",0,i,n),u=this._createRequest("1",0,i,n),g=this._createRequest("2",0,i,n),p=this._createRequest("3",0,i,n),m=this._createRequest("4",0,i,n),f=this._createRequest("5",0,i,n),v=this._createRequest("6",0,i,n),_=this._createRequest("7",0,i,n),b=this._createRequest("8",0,i,n),w=this._createRequest("9",0,i,n),y=this._createRequest("→",0,i,n),C=this._createRequest("→",0,i,null),S=this._createRequest("·",0,i,n),x=this._createRequest(String.fromCharCode(11825),0,i,null),k="|/-_ilm%";for(let e=0,t=8;e.001){N=!1;break}}let E=!0;return N&&C.width!==D&&(E=!1),C.width>y.width&&(E=!1),new h.pR({pixelRatio:o.T.getInstance(e).value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:N,typicalHalfwidthCharacterWidth:s.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:E,spaceWidth:a.width,middotWidth:S.width,wsmiddotWidth:x.width,maxDigitWidth:L},!0)}}class g{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map((e=>this._values[e]))}}const p=new u},37940:(e,t,i)=>{"use strict";i.d(t,{n:()=>o});var n=i(4669);const o=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new n.Q5,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}}},35715:(e,t,i)=>{"use strict";i.d(t,{Fz:()=>C,Nl:()=>w,RA:()=>b,Tj:()=>x,b6:()=>S,pd:()=>n});var n,o=i(16268),s=i(65321),r=i(4850),a=i(59069),l=i(50795),d=i(15393),c=i(4669),h=i(5976),u=i(81170),g=i(97295),p=i(15887),m=i(3860),f=i(31106),v=i(43557),_=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(n||(n={}));const b={forceCopyWithSyntaxHighlighting:!1};class w{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}w.INSTANCE=new w;class y{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){const t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}let C=class extends h.JT{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,o,s){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=o,this._logService=s,this._onFocus=this._register(new c.Q5),this.onFocus=this._onFocus.event,this._onBlur=this._register(new c.Q5),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new c.Q5),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new c.Q5),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new c.Q5),this.onCut=this._onCut.event,this._onPaste=this._register(new c.Q5),this.onPaste=this._onPaste.event,this._onType=this._register(new c.Q5),this.onType=this._onType.event,this._onCompositionStart=this._register(new c.Q5),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new c.Q5),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new c.Q5),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new c.Q5),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new h.XK),this._asyncTriggerCut=this._register(new d.pY((()=>this._onCut.fire()),0)),this._textAreaState=p.un.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(c.ju.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new d.pY((()=>this.writeNativeTextAreaContent("asyncFocusGain")),0)):this._asyncFocusGainWriteScreenReaderContent.clear()}))),this._hasFocus=!1,this._currentComposition=null;let r=null;this._register(this._textArea.onKeyDown((e=>{const t=new a.y(e);(114===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),r=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new a.y(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{p.al&&console.log("[compositionstart]",e);const t=new y;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&r&&r.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===r.code||"ArrowLeft"===r.code))return p.al&&console.log("[compositionstart] Handling long press case on macOS + arrow key",e),t.handleCompositionUpdate("x"),void this._onCompositionStart.fire({data:e.data});this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})}}))),this._register(this._textArea.onCompositionUpdate((e=>{p.al&&console.log("[compositionupdate]",e);const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=p.un.readFromTextArea(this._textArea,this._textAreaState),i=p.un.deduceAndroidCompositionInput(this._textAreaState,t);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p.un.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{p.al&&console.log("[compositionend]",e);const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=p.un.readFromTextArea(this._textArea,this._textAreaState),t=p.un.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p.un.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(p.al&&console.log("[input]",e),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=p.un.readFromTextArea(this._textArea,this._textAreaState),i=p.un.deduceInput(this._textAreaState,t,2===this._OS);(0!==i.replacePrevCharCnt||1!==i.text.length||!g.ZG(i.text.charCodeAt(0))&&127!==i.text.charCodeAt(0))&&(this._textAreaState=t,""===i.text&&0===i.replacePrevCharCnt&&0===i.replaceNextCharCnt&&0===i.positionDelta||this._onType.fire(i))}))),this._register(this._textArea.onCut((e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(this._textArea.onCopy((e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(this._textArea.onPaste((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=S.getTextData(e.clipboardData);t&&(i=i||w.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!e&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new d.pY((()=>this.writeNativeTextAreaContent("asyncFocusGain")),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return s.nm(this._textArea.ownerDocument,"selectionchange",(t=>{if(l.B.onSelectionChange(),!this._hasFocus)return;if(this._currentComposition)return;if(!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const o=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),o<100)return;if(!this._textAreaState.selection)return;const s=this._textArea.getValue();if(this._textAreaState.value!==s)return;const r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;const d=this._textAreaState.deduceEditorPosition(r),c=this._host.deduceModelPosition(d[0],d[1],d[2]),h=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(h[0],h[1],h[2]),g=new m.Y(c.lineNumber,c.column,u.lineNumber,u.column);this._onSelectionChangeRequest.fire(g)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&"render"===e||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};w.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&S.setTextData(e.clipboardData,t.text,t.html,i)}};C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([_(4,f.F),_(5,v.VZ)],C);const S={getTextData(e){const t=e.getData(u.v.text);let i=null;const n=e.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(e){}return 0===t.length&&null===i&&e.files.length>0?[Array.prototype.slice.call(e.files,0).map((e=>e.name)).join("\n"),null]:[t,i]},setTextData(e,t,i,n){e.setData(u.v.text,t),"string"==typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}};class x extends h.JT{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new r.Y(this._actual,"keydown")).event,this.onKeyUp=this._register(new r.Y(this._actual,"keyup")).event,this.onCompositionStart=this._register(new r.Y(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new r.Y(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new r.Y(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new r.Y(this._actual,"beforeinput")).event,this.onInput=this._register(new r.Y(this._actual,"input")).event,this.onCut=this._register(new r.Y(this._actual,"cut")).event,this.onCopy=this._register(new r.Y(this._actual,"copy")).event,this.onPaste=this._register(new r.Y(this._actual,"paste")).event,this.onFocus=this._register(new r.Y(this._actual,"focus")).event,this.onBlur=this._register(new r.Y(this._actual,"blur")).event,this._onSyntheticTap=this._register(new c.Q5),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown((()=>l.B.onKeyDown()))),this._register(this.onBeforeInput((()=>l.B.onBeforeInput()))),this._register(this.onInput((()=>l.B.onInput()))),this._register(this.onKeyUp((()=>l.B.onKeyUp()))),this._register(s.nm(this._actual,n.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=s.Ay(this._actual);return e?e.activeElement===this._actual:!!this._actual.isConnected&&s.vY()===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let r=null;const a=s.Ay(n);r=a?a.activeElement:s.vY();const l=s.Jj(r),d=r===n,c=n.selectionStart,h=n.selectionEnd;if(d&&c===t&&h===i)o.vU&&l.parent!==l&&n.focus();else{if(d)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(o.vU&&l.parent!==l&&n.focus());try{const e=s.vL(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),s._0(n,e)}catch(e){}}}}},15887:(e,t,i)=>{"use strict";i.d(t,{al:()=>s,ee:()=>a,un:()=>r});var n=i(97295),o=i(24314);const s=!1;class r{constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=o}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),o=e.getSelectionEnd();let s;return t&&i.substring(0,n)===t.value.substring(0,t.selectionStart)&&(s=t.newlineCountBeforeSelection),new r(i,n,o,null,s)}collapseSelection(){return this.selectionStart===this.value.length?this:new r(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,i){s&&console.log(`writeToTextArea ${e}: ${this.toString()}`),t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var t,i,n,o,s,r,a,l;if(e<=this.selectionStart){const n=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(null!==(i=null===(t=this.selection)||void 0===t?void 0:t.getStartPosition())&&void 0!==i?i:null,n,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(null!==(o=null===(n=this.selection)||void 0===n?void 0:n.getEndPosition())&&void 0!==o?o:null,t,1)}const d=this.value.substring(this.selectionStart,e);if(-1===d.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(null!==(r=null===(s=this.selection)||void 0===s?void 0:s.getStartPosition())&&void 0!==r?r:null,d,1);const c=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(null!==(l=null===(a=this.selection)||void 0===a?void 0:a.getEndPosition())&&void 0!==l?l:null,c,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,o=-1;for(;-1!==(o=t.indexOf("\n",o+1));)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};s&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`));const o=Math.min(n.Mh(e.value,t.value),e.selectionStart,t.selectionStart),r=Math.min(n.P1(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),a=e.value.substring(o,e.value.length-r),l=t.value.substring(o,t.value.length-r),d=e.selectionStart-o,c=e.selectionEnd-o,h=t.selectionStart-o,u=t.selectionEnd-o;if(s&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${a}>, selectionStart: ${d}, selectionEnd: ${c}`),console.log(`AFTER DIFFING CURRENT STATE: <${l}>, selectionStart: ${h}, selectionEnd: ${u}`)),h===u){const t=e.selectionStart-o;return s&&console.log(`REMOVE PREVIOUS: ${t} chars`),{text:l,replacePrevCharCnt:t,replaceNextCharCnt:0,positionDelta:0}}return{text:l,replacePrevCharCnt:c-d,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(s&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`)),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(n.Mh(e.value,t.value),e.selectionEnd),o=Math.min(n.P1(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(i,e.value.length-o),a=t.value.substring(i,t.value.length-o),l=e.selectionStart-i,d=e.selectionEnd-i,c=t.selectionStart-i,h=t.selectionEnd-i;return s&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${r}>, selectionStart: ${l}, selectionEnd: ${d}`),console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${c}, selectionEnd: ${h}`)),{text:a,replacePrevCharCnt:d,replaceNextCharCnt:r.length-d,positionDelta:h-a.length}}}r.EMPTY=new r("",0,0,null,void 0);class a{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,s=i+t;return new o.e(n,1,s+1,1)}static fromEditorSelection(e,t,i,n){const s=500,l=a._getPageOfLine(t.startLineNumber,i),d=a._getRangeForPage(l,i),c=a._getPageOfLine(t.endLineNumber,i),h=a._getRangeForPage(c,i);let u=d.intersectRanges(new o.e(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(u,1)>s){const t=e.modifyPosition(u.getEndPosition(),-500);u=o.e.fromPositions(t,u.getEndPosition())}const g=e.getValueInRange(u,1),p=e.getLineCount(),m=e.getLineMaxColumn(p);let f=h.intersectRanges(new o.e(t.endLineNumber,t.endColumn,p,m));if(n&&e.getValueLengthInRange(f,1)>s){const t=e.modifyPosition(f.getStartPosition(),s);f=o.e.fromPositions(f.getStartPosition(),t)}const v=e.getValueInRange(f,1);let _;if(l===c||l+1===c)_=e.getValueInRange(t,1);else{const i=d.intersectRanges(t),n=h.intersectRanges(t);_=e.getValueInRange(i,1)+String.fromCharCode(8230)+e.getValueInRange(n,1)}return n&&_.length>1e3&&(_=_.substring(0,s)+String.fromCharCode(8230)+_.substring(_.length-s,_.length)),new r(g+_+v,g.length,g.length+_.length,t,u.endLineNumber-u.startLineNumber)}}},69317:(e,t,i)=>{"use strict";i.d(t,{wk:()=>D,Ox:()=>m});var n=i(63580),o=i(16268),s=i(98401),r=i(56346),a=i(16830),l=i(11640),d=i(55343),c=i(50187),h=i(24314);class u{static columnSelect(e,t,i,n,o,s){const r=Math.abs(o-i)+1,a=i>o,l=n>s,u=ns)continue;if(vn)continue;if(f0&&n--,u.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const o=Math.min(i.fromViewLineNumber,i.toViewLineNumber),s=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=o;i<=s;i++){const o=t.getLineMaxColumn(i),s=e.visibleColumnFromColumn(t,new c.L(i,o));n=Math.max(n,s)}let r=i.toViewVisualColumn;return r{const i=e.get(l.$).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=(0,C.vY)();return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(i),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(l.$).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){return this.runEditorCommand(e,t,i)||!0}}!function(e){class t extends S{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){t.position&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[v.P.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)])&&2!==t.revealType&&e.revealPrimaryCursor(t.source,!0,!0))}}e.MoveTo=(0,a.fK)(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=(0,a.fK)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends S{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);null!==i&&(e.setCursorStates(t.source,3,i.viewStates.map((e=>d.Vi.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source))}}e.ColumnSelect=(0,a.fK)(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){if(void 0===n.position||void 0===n.viewPosition||void 0===n.mouseColumn)return null;const o=e.model.validatePosition(n.position),s=e.coordinatesConverter.validateViewPosition(new c.L(n.viewPosition.lineNumber,n.viewPosition.column),o),r=n.doColumnSelect?i.fromViewLineNumber:s.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return u.columnSelect(e.cursorConfig,e,r,a,s.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectRight(e.cursorConfig,e,i)}});class s extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=(0,a.fK)(new s({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=(0,a.fK)(new s({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3595,linux:{primary:0}}}));class l extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=(0,a.fK)(new l({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=(0,a.fK)(new l({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3596,linux:{primary:0}}}));class m extends S{constructor(){super({id:"cursorMove",precondition:void 0,metadata:v.N.metadata})}runCoreEditorCommand(e,t){const i=v.N.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,m._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(t,!0)}static _move(e,t,i){const n=i.select,o=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return v.P.simpleMove(e,t,i.direction,n,o,i.unit);case 11:case 13:case 12:case 14:return v.P.viewportMove(e,t,i.direction,n,o);default:return null}}}e.CursorMoveImpl=m,e.CursorMove=(0,a.fK)(new m);class f extends S{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.pageSize||e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,v.P.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=(0,a.fK)(new f({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=(0,a.fK)(new f({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1039}})),e.CursorRight=(0,a.fK)(new f({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=(0,a.fK)(new f({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1041}})),e.CursorUp=(0,a.fK)(new f({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=(0,a.fK)(new f({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=(0,a.fK)(new f({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:11}})),e.CursorPageUpSelect=(0,a.fK)(new f({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1035}})),e.CursorDown=(0,a.fK)(new f({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=(0,a.fK)(new f({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=(0,a.fK)(new f({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:12}})),e.CursorPageDownSelect=(0,a.fK)(new f({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1036}})),e.CreateCursor=(0,a.fK)(new class extends S{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;let i;i=t.wholeLine?v.P.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):v.P.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const o=i.modelState?i.modelState.position:null,s=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;is&&(o=s);const r=new h.e(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(i.at)switch(i.at){case p.RawAtArgument.Top:a=3;break;case p.RawAtArgument.Center:a=1;break;case p.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends x{constructor(){super(a.Sq)}runDOMCommand(e){o.vU&&(e.focus(),e.select()),e.ownerDocument.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[v.P.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=(0,a.fK)(new class extends S{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){t.selection&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[d.Vi.fromModelSelection(t.selection)]))}})}(m||(m={}));const k=w.Ao.and(b.u.textInputFocus,b.u.columnSelection);function L(e,t){y.W.registerKeybindingRule({id:e,primary:t,when:k,weight:1})}function N(e){return e.register(),e}var D;L(m.CursorColumnSelectLeft.id,1039),L(m.CursorColumnSelectRight.id,1041),L(m.CursorColumnSelectUp.id,1040),L(m.CursorColumnSelectPageUp.id,1035),L(m.CursorColumnSelectDown.id,1042),L(m.CursorColumnSelectPageDown.id,1036),function(e){class t extends a._l{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=(0,a.fK)(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,_.u6.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=(0,a.fK)(new class extends t{constructor(){super({id:"outdent",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:w.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,_.u6.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=(0,a.fK)(new class extends t{constructor(){super({id:"tab",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:w.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,_.u6.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=(0,a.fK)(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=f.A.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=(0,a.fK)(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=f.A.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends x{constructor(){super(a.n_)}runDOMCommand(e){e.ownerDocument.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(91))return t.getModel().undo()}},e.Redo=new class extends x{constructor(){super(a.kz)}runDOMCommand(e){e.ownerDocument.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(91))return t.getModel().redo()}}}(D||(D={}));class E extends a.mY{constructor(e,t,i){super({id:e,precondition:void 0,metadata:i}),this._handlerId=t}runCommand(e,t){const i=e.get(l.$).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function I(e,t){N(new E("default:"+e,e)),N(new E(e,e,t))}I("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),I("replacePreviousChar"),I("compositionType"),I("compositionStart"),I("compositionEnd"),I("paste"),I("cut")},92944:(e,t,i)=>{"use strict";i.d(t,{B:()=>l,L:()=>h});var n=i(23547),o=i(73278),s=i(81170),r=i(70666),a=i(16021);function l(e){const t=new o.Hl;for(const i of e.items){const e=i.type;if("string"===i.kind){const n=new Promise((e=>i.getAsString(e)));t.append(e,(0,o.ZO)(n))}else if("file"===i.kind){const n=i.getAsFile();n&&t.append(e,d(n))}}return t}function d(e){const t=e.path?r.o.parse(e.path):void 0;return(0,o.Ix)(e.name,t,(async()=>new Uint8Array(await e.arrayBuffer())))}const c=Object.freeze([a.Km.EDITORS,a.Km.FILES,n.g.RESOURCES,n.g.INTERNAL_URI_LIST]);function h(e,t=!1){const i=l(e),a=i.get(n.g.INTERNAL_URI_LIST);if(a)i.replace(s.v.uriList,a);else if(t||!i.has(s.v.uriList)){const t=[];for(const i of e.items){const e=i.getAsFile();if(e){const i=e.path;try{i?t.push(r.o.file(i).toString()):t.push(r.o.parse(e.name,!0).toString())}catch(e){}}}t.length&&i.replace(s.v.uriList,(0,o.ZO)(o.Z0.create(t)))}for(const e of c)i.delete(e);return i}},65520:(e,t,i)=>{"use strict";i.d(t,{CL:()=>o,Pi:()=>r,QI:()=>s});var n=i(96518);function o(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.ICodeEditor}function s(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.IDiffEditor}function r(e){return o(e)?e:s(e)?e.getModifiedEditor():function(e){return!!e&&"object"==typeof e&&"function"==typeof e.onDidChangeActiveEditor}(e)&&o(e.activeCodeEditor)?e.activeCodeEditor:null}},29994:(e,t,i)=>{"use strict";i.d(t,{AL:()=>_,N5:()=>f,Pp:()=>p,YN:()=>d,gy:()=>m,kG:()=>g,rU:()=>c,t7:()=>b,tC:()=>v});var n=i(65321),o=i(93911),s=i(7448),r=i(15393),a=i(5976),l=i(73910);class d{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new c(this.x-e.scrollX,this.y-e.scrollY)}}class c{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new d(this.clientX+e.scrollX,this.clientY+e.scrollY)}}class h{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class u{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function g(e){const t=n.i(e);return new h(t.left,t.top,t.width,t.height)}function p(e,t,i){const n=t.width/e.offsetWidth,o=t.height/e.offsetHeight,s=(i.x-t.x)/n,r=(i.y-t.y)/o;return new u(s,r)}class m extends s.n{constructor(e,t,i){super(n.Jj(i),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new d(this.posx,this.posy),this.editorPos=g(i),this.relativePos=p(i,this.editorPos,this.pos)}}class f{constructor(e){this._editorViewDomNode=e}_create(e){return new m(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return n.nm(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return n.nm(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return n.nm(e,n.tw.MOUSE_DOWN,(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.nm(e,n.tw.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onMouseLeave(e,t){return n.nm(e,n.tw.MOUSE_LEAVE,(e=>{t(this._create(e))}))}onMouseMove(e,t){return n.nm(e,"mousemove",(e=>t(this._create(e))))}}class v{constructor(e){this._editorViewDomNode=e}_create(e){return new m(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return n.nm(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.nm(e,n.tw.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onPointerLeave(e,t){return n.nm(e,n.tw.POINTER_LEAVE,(e=>{t(this._create(e))}))}onPointerMove(e,t){return n.nm(e,"pointermove",(e=>t(this._create(e))))}}class _ extends a.JT{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new o.C),this._keydownListener=null}startMonitoring(e,t,i,o,s){this._keydownListener=n.mu(e.ownerDocument,"keydown",(e=>{e.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalPointerMoveMonitor.startMonitoring(e,t,i,(e=>{o(new m(e,!0,this._editorViewDomNode))}),(e=>{this._keydownListener.dispose(),s(e)}))}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class b{constructor(e){this._editor=e,this._instanceId=++b._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new r.pY((()=>this.garbageCollect()),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const o=this._counter++;i=new w(t,`dyn-rule-${this._instanceId}-${o}`,n.OO(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}b._idPool=0;class w{constructor(e,t,i,o){this.key=e,this.className=t,this.properties=o,this._referenceCount=0,this._styleElementDisposables=new a.SL,this._styleElement=n.dS(i,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const e in t){const n=t[e];let o;o="object"==typeof n?(0,l.n_1)(n.id):n,i+=`\n\t${y(e)}: ${o};`}return i+="\n}",i}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function y(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}},16830:(e,t,i)=>{"use strict";i.d(t,{AJ:()=>y,QG:()=>T,Qr:()=>E,R6:()=>x,Sq:()=>F,Uc:()=>n,_K:()=>M,_l:()=>S,fK:()=>D,jY:()=>k,kz:()=>O,mY:()=>w,n_:()=>P,rn:()=>I,sb:()=>N,x1:()=>L});var n,o=i(63580),s=i(70666),r=i(11640),a=i(50187),l=i(73733),d=i(88216),c=i(84144),h=i(94565),u=i(93983),g=i(72065),p=i(49989),m=i(89872),f=i(10829),v=i(98401),_=i(43557),b=i(65321);class w{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?u.Ao.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};p.W.registerKeybindingRule(i)}}h.P.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),metadata:this.metadata})}_registerMenuItem(e){c.BH.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class y extends w{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i,n){return this._implementations.push({priority:e,name:t,implementation:i,when:n}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{if(e.get(u.i6).contextMatchesRules(null!=i?i:void 0))return n(e,s,t)}))}runCommand(e,t){return S.runEditorCommand(e,t,this.precondition,((e,t,i)=>this.runEditorCommand(e,t,i)))}}class x extends S{static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=c.eH.EditorContext),t.title||(t.title=e.label),t.when=u.Ao.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(x.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(f.b).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class k extends x{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;e{var i,o;const s=e.get(u.i6),r=e.get(_.VZ);if(s.contextMatchesRules(null!==(i=this.desc.precondition)&&void 0!==i?i:void 0))return this.runEditorCommand(e,n,...t);r.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,null===(o=this.desc.precondition)||void 0===o?void 0:o.serialize())}))}}function N(e,t){h.P.registerCommand(e,(function(e,...i){const n=e.get(g.TG),[o,r]=i;(0,v.p_)(s.o.isUri(o)),(0,v.p_)(a.L.isIPosition(r));const c=e.get(l.q).getModel(o);if(c){const e=a.L.lift(r);return n.invokeFunction(t,c,e,...i.slice(2))}return e.get(d.S).createModelReference(o).then((e=>new Promise(((o,s)=>{try{o(n.invokeFunction(t,e.object.textEditorModel,a.L.lift(r),i.slice(2)))}catch(e){s(e)}})).finally((()=>{e.dispose()}))))}))}function D(e){return R.INSTANCE.registerEditorCommand(e),e}function E(e){const t=new e;return R.INSTANCE.registerEditorAction(t),t}function I(e){return R.INSTANCE.registerEditorAction(e),e}function T(e){R.INSTANCE.registerEditorAction(e)}function M(e,t,i){R.INSTANCE.registerEditorContribution(e,t,i)}!function(e){e.getEditorCommand=function(e){return R.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return R.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return R.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return R.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return R.INSTANCE.getDiffEditorContributions()}}(n||(n={}));class R{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,i){this.editorContributions.push({id:e,ctor:t,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function A(e){return e.register(),e}R.INSTANCE=new R,m.B.add("editor.contributions",R.INSTANCE);const P=A(new y({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:c.eH.MenubarEditMenu,group:"1_do",title:o.NC({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:c.eH.CommandPalette,group:"",title:o.NC("undo","Undo"),order:1}]}));A(new C(P,{id:"default:undo",precondition:void 0}));const O=A(new y({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:c.eH.MenubarEditMenu,group:"1_do",title:o.NC({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:c.eH.CommandPalette,group:"",title:o.NC("redo","Redo"),order:1}]}));A(new C(O,{id:"default:redo",precondition:void 0}));const F=A(new y({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:c.eH.MenubarSelectionMenu,group:"1_basic",title:o.NC({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:c.eH.CommandPalette,group:"",title:o.NC("selectAll","Select All"),order:1}]}))},66007:(e,t,i)=>{"use strict";i.d(t,{Gl:()=>l,fo:()=>a,vu:()=>r});var n=i(72065),o=i(70666),s=i(98401);const r=(0,n.yh)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(l.is(e))return l.lift(e);if(d.is(e))return d.lift(e);throw new Error("Unsupported edit")}))}}class l extends a{static is(e){return e instanceof l||(0,s.Kn)(e)&&o.o.isUri(e.resource)&&(0,s.Kn)(e.textEdit)}static lift(e){return e instanceof l?e:new l(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 d extends a{static is(e){return e instanceof d||(0,s.Kn)(e)&&(Boolean(e.newResource)||Boolean(e.oldResource))}static lift(e){return e instanceof d?e:new d(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}},11640:(e,t,i)=>{"use strict";i.d(t,{$:()=>n});const n=(0,i(72065).yh)("codeEditorService")},35034:(e,t,i)=>{"use strict";i.d(t,{Q8:()=>De,eu:()=>Ce});var n=i(15393),o=i(5976),s=i(17301),r=i(4669),a=i(36248),l=i(1432),d=i(97295);let c=!1;function h(e){l.$L&&(c||(c=!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(e.message))}class u{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.method=i,this.args=n,this.type=0}}class g{constructor(e,t,i,n){this.vsWorker=e,this.seq=t,this.res=i,this.err=n,this.type=1}}class p{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.eventName=i,this.arg=n,this.type=2}}class m{constructor(e,t,i){this.vsWorker=e,this.req=t,this.event=i,this.type=3}}class f{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class v{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}sendMessage(e,t){const i=String(++this._lastSentReq);return new Promise(((n,o)=>{this._pendingReplies[i]={resolve:n,reject:o},this._send(new u(this._workerId,i,e,t))}))}listen(e,t){let i=null;const n=new r.Q5({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,n),this._send(new p(this._workerId,i,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new f(this._workerId,i)),i=null}});return n.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_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])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;return e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),void t.reject(i)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.method,e.args).then((e=>{this._send(new g(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=(0,s.ri)(e.detail)),this._send(new g(this._workerId,t,void 0,(0,s.ri)(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.eventName,e.arg)((e=>{this._send(new m(this._workerId,t,e))}));this._pendingEvents.set(t,i)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let i=0;i{this._protocol.handleMessage(e)}),(e=>{null==n||n(e)}))),this._protocol=new v({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!=typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(e){return Promise.reject(e)}},handleEvent:(e,t)=>{if(w(e)){const n=i[e].call(i,t);if("function"!=typeof n)throw new Error(`Missing dynamic event ${e} on main thread host.`);return n}if(b(e)){const t=i[e];if("function"!=typeof t)throw new Error(`Missing event ${e} on main thread host.`);return t}throw new Error(`Malformed event name ${e}`)}}),this._protocol.setWorkerId(this._worker.getId());let o=null;const s=globalThis.require;void 0!==s&&"function"==typeof s.getConfig?o=s.getConfig():void 0!==globalThis.requirejs&&(o=globalThis.requirejs.s.contexts._.config);const r=(0,a.$E)(i);this._onModuleLoaded=this._protocol.sendMessage("$initialize",[this._worker.getId(),JSON.parse(JSON.stringify(o)),t,r]);const l=(e,t)=>this._request(e,t),d=(e,t)=>this._protocol.listen(e,t);this._lazyProxy=new Promise(((e,i)=>{n=i,this._onModuleLoaded.then((t=>{e(function(e,t,i){const n=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o=e=>function(t){return i(e,t)},s={};for(const t of e)w(t)?s[t]=o(t):b(t)?s[t]=i(t,void 0):s[t]=n(t);return s}(t,l,d))}),(e=>{i(e),this._onError("Worker failed to load "+t,e)}))}))}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise(((i,n)=>{this._onModuleLoaded.then((()=>{this._protocol.sendMessage(e,t).then(i,n)}),n)}))}_onError(e,t){console.error(e),console.info(t)}}function b(e){return"o"===e[0]&&"n"===e[1]&&d.df(e.charCodeAt(2))}function w(e){return/^onDynamic/.test(e)&&d.df(e.charCodeAt(9))}const y=(0,i(77514).Z)("defaultWorkerFactory",{createScriptURL:e=>e});class C extends o.JT{constructor(e,t,i,n,s){super(),this.id=t,this.label=i;const r=function(e){const t=globalThis.MonacoEnvironment;if(t){if("function"==typeof t.getWorker)return t.getWorker("workerMain.js",e);if("function"==typeof t.getWorkerUrl){const i=t.getWorkerUrl("workerMain.js",e);return new Worker(y?y.createScriptURL(i):i,{name:e})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}(i);"function"==typeof r.then?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(e,[]),this.worker.then((e=>{e.onmessage=function(e){n(e.data)},e.onmessageerror=s,"function"==typeof e.addEventListener&&e.addEventListener("error",s)})),this._register((0,o.OF)((()=>{var e;null===(e=this.worker)||void 0===e||e.then((e=>{e.onmessage=null,e.onmessageerror=null,e.removeEventListener("error",s),e.terminate()})),this.worker=null})))}getId(){return this.id}postMessage(e,t){var i;null===(i=this.worker)||void 0===i||i.then((i=>{try{i.postMessage(e,t)}catch(e){(0,s.dL)(e),(0,s.dL)(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:e}))}}))}}class S{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){const n=++S.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new C(e,n,this._label||"anonymous"+n,t,(e=>{h(e),this._webWorkerFailedBeforeError=e,i(e)}))}}S.LAST_WORKER_ID=0;var x=i(24314),k=i(51381),L=i(2484),N=i(70666),D=i(50187),E=i(90310);class I{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(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 t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new D.L(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;nt&&(t=s),o>i&&(i=o),r>i&&(i=r)}t++,i++;const n=new R(i,t,0);for(let t=0,i=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let P=null,O=null;class F{static _createLink(e,t,i,n,o){let s=o-1;do{const i=t.charCodeAt(s);if(2!==e.get(i))break;s--}while(s>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(s);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&s--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:s+2},url:t.substring(n,s+1)}}static computeLinks(e,t=function(){return null===P&&(P=new A([[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]])),P}()){const i=function(){if(null===O){O=new M.N(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}B.INSTANCE=new B;var W=i(20927),H=i(84013),V=i(31446),z=i(60652),j=i(54648),U=i(35146),q=i(45463);class K{computeDiff(e,t,i){var n;const o=new J(e,t,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),s=[];let r=null;for(const e of o.changes){let t,i;t=0===e.originalEndLineNumber?new q.z(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new q.z(e.originalStartLineNumber,e.originalEndLineNumber+1),i=0===e.modifiedEndLineNumber?new q.z(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new q.z(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let o=new j.gB(t,i,null===(n=e.charChanges)||void 0===n?void 0:n.map((e=>new j.iy(new x.e(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new x.e(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));r&&(r.modified.endLineNumberExclusive!==o.modified.startLineNumber&&r.original.endLineNumberExclusive!==o.original.startLineNumber||(o=new j.gB(r.original.join(o.original),r.modified.join(o.modified),r.innerChanges&&o.innerChanges?r.innerChanges.concat(o.innerChanges):void 0),s.pop())),s.push(o),r=o}return(0,U.eZ)((()=>(0,U.DM)(s,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.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-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?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-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class Q{constructor(e,t,i,n,o,s,r,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=o,this.modifiedStartColumn=s,this.modifiedEndLineNumber=r,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){const n=t.getStartLineNumber(e.originalStart),o=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),r=t.getEndColumn(e.originalStart+e.originalLength-1),a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),d=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),c=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new Q(n,o,s,r,a,l,d,c)}}class Y{constructor(e,t,i,n,o){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=i,this.modifiedEndLineNumber=n,this.charChanges=o}static createFromDiffResult(e,t,i,n,o,s,r){let a,l,d,c,h;if(0===t.originalLength?(a=i.getStartLineNumber(t.originalStart)-1,l=0):(a=i.getStartLineNumber(t.originalStart),l=i.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(d=n.getStartLineNumber(t.modifiedStart)-1,c=0):(d=n.getStartLineNumber(t.modifiedStart),c=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const s=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=$(s,a,o,!0).changes;r&&(e=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,o=e.length;n1&&r>1&&e.charCodeAt(i-2)===t.charCodeAt(r-2);)i--,r--;(i>1||r>1)&&this._pushTrimWhitespaceCharChange(n,o+1,1,i,s+1,1,r)}{let i=ee(e,1),r=ee(t,1);const a=e.length+1,l=t.length+1;for(;i!0;const t=Date.now();return()=>Date.now()-tthis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class ue{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new he(N.o.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}async computeUnicodeHighlights(e,t,i){const n=this._getModel(e);return n?V.a.computeUnicodeHighlights(n,t,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async computeDiff(e,t,i,n){const o=this._getModel(e),s=this._getModel(t);return o&&s?ue.computeDiff(o,s,i,n):null}static computeDiff(e,t,i,n){const o="advanced"===n?new ie.DW:new K,s=e.getLinesContent(),r=t.getLinesContent(),a=o.computeDiff(s,r,i);function l(e){return e.map((e=>{var t;return[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,null===(t=e.innerChanges)||void 0===t?void 0:t.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]}))}return{identical:!(a.changes.length>0)&&this._modelsAreIdentical(e,t),quitEarly:a.hitTimeout,changes:l(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,l(e.changes)]))}}static _modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++)if(e.getLineContent(n)!==t.getLineContent(n))return!1;return!0}async computeMoreMinimalEdits(e,t,i){const n=this._getModel(e);if(!n)return t;const o=[];let s;t=t.slice(0).sort(((e,t)=>e.range&&t.range?x.e.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));let r=0;for(let e=1;eue._diffLimit){o.push({range:e,text:r});continue}const l=(0,L.a$)(t,r,i),d=n.offsetAt(x.e.lift(e).getStartPosition());for(const e of l){const t=n.positionAt(d+e.originalStart),i=n.positionAt(d+e.originalStart+e.originalLength),s={text:r.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}};n.getValueInRange(s.range)!==s.text&&o.push(s)}}return"number"==typeof s&&o.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),o}async computeLinks(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?F.computeLinks(e):[]}(t):null}async computeDefaultDocumentColors(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getValue&&"function"==typeof e.positionAt?function(e){const t=[],i=ce(e,/\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/gm);if(i.length>0)for(const n of i){const i=n.filter((e=>void 0!==e)),o=i[1],s=i[2];if(!s)continue;let r;if("rgb"===o){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;r=le(re(e,n),ce(s,t),!1)}else if("rgba"===o){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=le(re(e,n),ce(s,t),!0)}else if("hsl"===o){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;r=de(re(e,n),ce(s,t),!1)}else if("hsla"===o){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=de(re(e,n),ce(s,t),!0)}else"#"===o&&(r=ae(re(e,n),o+s));r&&t.push(r)}return t}(e):[]}(t):null}async textualSuggest(e,t,i,n){const o=new H.G,s=new RegExp(i,n),r=new Set;e:for(const i of e){const e=this._getModel(i);if(e)for(const i of e.words(s))if(i!==t&&isNaN(Number(i))&&(r.add(i),r.size>ue._suggestionsLimit))break e}return{words:Array.from(r),duration:o.elapsed()}}async computeWordRanges(e,t,i,n){const o=this._getModel(e);if(!o)return Object.create(null);const s=new RegExp(i,n),r=Object.create(null);for(let e=t.startLineNumber;ethis._host.fhr(e,t))),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(n,t),Promise.resolve((0,a.$E)(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}ue._diffLimit=1e5,ue._suggestionsLimit=1e4,"function"==typeof importScripts&&(globalThis.monaco=(0,W.O)());var ge=i(73733),pe=i(71765),me=i(9488),fe=i(43557),ve=i(71922),_e=i(48906),be=i(65321),we=function(e,t){return function(i,n){t(i,n,e)}};function ye(e,t){const i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let Ce=class extends o.JT{constructor(e,t,i,n,o){super(),this._modelService=e,this._workerManager=this._register(new xe(this._modelService,n)),this._logService=i,this._register(o.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(e,t)=>ye(this._modelService,e.uri)?this._workerManager.withWorker().then((t=>t.computeLinks(e.uri))).then((e=>e&&{links:e})):Promise.resolve({links:[]})})),this._register(o.completionProvider.register("*",new Se(this._workerManager,t,this._modelService,n)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return ye(this._modelService,e)}computedUnicodeHighlights(e,t,i){return this._workerManager.withWorker().then((n=>n.computedUnicodeHighlights(e,t,i)))}async computeDiff(e,t,i,n){const o=await this._workerManager.withWorker().then((o=>o.computeDiff(e,t,i,n)));return o?{identical:o.identical,quitEarly:o.quitEarly,changes:s(o.changes),moves:o.moves.map((e=>new z.y(new j.f0(new q.z(e[0],e[1]),new q.z(e[2],e[3])),s(e[4]))))}:null;function s(e){return e.map((e=>{var t;return new j.gB(new q.z(e[0],e[1]),new q.z(e[2],e[3]),null===(t=e[4])||void 0===t?void 0:t.map((e=>new j.iy(new x.e(e[0],e[1],e[2],e[3]),new x.e(e[4],e[5],e[6],e[7])))))}))}}computeMoreMinimalEdits(e,t,i=!1){if((0,me.Of)(t)){if(!ye(this._modelService,e))return Promise.resolve(t);const o=H.G.create(),s=this._workerManager.withWorker().then((n=>n.computeMoreMinimalEdits(e,t,i)));return s.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),o.elapsed()))),Promise.race([s,(0,n.Vs)(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return ye(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then((n=>n.navigateValueSet(e,t,i)))}canComputeWordRanges(e){return ye(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then((i=>i.computeWordRanges(e,t)))}};Ce=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([we(0,ge.q),we(1,pe.V),we(2,fe.VZ),we(3,k.c_),we(4,ve.p)],Ce);class Se{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}async provideCompletionItems(e,t){const i=this._configurationService.getValue(e.uri,t,"editor");if("off"===i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestions)ye(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())ye(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestions&&t.getLanguageId()!==e.getLanguageId()||n.push(t.uri));if(0===n.length)return;const o=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),s=e.getWordAtPosition(t),r=s?new x.e(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):x.e.fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=await this._workerManager.withWorker(),d=await l.textualSuggest(n,null==s?void 0:s.word,o);return d?{duration:d.duration,suggestions:d.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}})))}:void 0}}class xe extends o.JT{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime(),this._register(new be.ne).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4),_e.vO),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){this._editorWorkerClient&&(new Date).getTime()-this._lastWorkerUsedTime>3e5&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new De(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class ke extends o.JT{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){const e=new n.zh;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(3e4)),this._register(e)}}dispose(){for(const e in this._syncedModels)(0,o.B9)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const i of e){const e=i.toString();this._syncedModels[e]||this._beginModelSync(i,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>6e4&&t.push(i);for(const e of t)this._stopModelSync(e)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i)return;if(!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const s=new o.SL;s.add(i.onDidChangeContent((e=>{this._proxy.acceptModelChanged(n.toString(),e)}))),s.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),s.add((0,o.OF)((()=>{this._proxy.acceptRemovedModel(n)}))),this._syncedModels[n]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,o.B9)(t)}}class Le{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class Ne{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class De extends o.JT{constructor(e,t,i,n){super(),this.languageConfigurationService=n,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new S(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new _(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Ne(this)))}catch(e){h(e),this._worker=new Le(new ue(new Ne(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(e=>(h(e),this._worker=new Le(new ue(new Ne(this),null)),this._getOrCreateWorker().getProxyObject())))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new ke(e,this._modelService,this._keepIdleModels))),this._modelManager}async _withSyncedResources(e,t=!1){return this._disposed?Promise.reject((0,s.F0)()):this._getProxy().then((i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i)))}computedUnicodeHighlights(e,t,i){return this._withSyncedResources([e]).then((n=>n.computeUnicodeHighlights(e.toString(),t,i)))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t],!0).then((o=>o.computeDiff(e.toString(),t.toString(),i,n)))}computeMoreMinimalEdits(e,t,i){return this._withSyncedResources([e]).then((n=>n.computeMoreMinimalEdits(e.toString(),t,i)))}computeLinks(e){return this._withSyncedResources([e]).then((t=>t.computeLinks(e.toString())))}computeDefaultDocumentColors(e){return this._withSyncedResources([e]).then((t=>t.computeDefaultDocumentColors(e.toString())))}async textualSuggest(e,t,i){const n=await this._withSyncedResources(e),o=i.source,s=i.flags;return n.textualSuggest(e.map((e=>e.toString())),t,o,s)}computeWordRanges(e,t){return this._withSyncedResources([e]).then((i=>{const n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);const o=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),s=o.source,r=o.flags;return i.computeWordRanges(e.toString(),t,s,r)}))}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then((n=>{const o=this._modelService.getModel(e);if(!o)return null;const s=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId()).getWordDefinition(),r=s.source,a=s.flags;return n.navigateValueSet(e.toString(),t,i,r,a)}))}dispose(){super.dispose(),this._disposed=!0}}},43407:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});class n{static capture(e){if(0===e.getScrollTop()||e.hasPendingScrollAnimation())return new n(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0;const o=e.getVisibleRanges();if(o.length>0){t=o[0].getStartPosition();const n=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-n}return new n(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,o){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=o}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)}}},7031:(e,t,i)=>{"use strict";i.d(t,{CH:()=>d,CR:()=>a,D4:()=>l,u7:()=>s,xh:()=>o,yu:()=>r});class n{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class o extends n{constructor(e,t,i){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class s{constructor(e,t,i,n){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i,this.continuesOnNextLine=n}}class r{static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i{"use strict";i.d(t,{Nt:()=>m,ob:()=>p,dL:()=>w});var n=i(16268),o=i(38626),s=i(1432),r=i(7031);class a{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,o){const s=this._createRange();try{return s.setStart(e,t),s.setEnd(i,n),s.getClientRects()}catch(e){return null}finally{this._detachRange(s,o)}}static _mergeAdjacentRanges(e){if(1===e.length)return e;e.sort(r.CR.compare);const t=[];let i=0,n=e[0];for(let o=1,s=e.length;o=s.left?n.width=Math.max(n.width,s.left+s.width-n.left):(t[i++]=n,n=s)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||0===e.length)return null;const n=[];for(let o=0,s=e.length;or)return null;if((t=Math.min(r,Math.max(0,t)))===(n=Math.min(r,Math.max(0,n)))&&i===o&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(i,s.clientRectDeltaLeft,s.clientRectScale)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let a=e.children[t].firstChild,l=e.children[n].firstChild;if(a&&l||(!a&&0===i&&t>0&&(a=e.children[t-1].firstChild,i=1073741824),!l&&0===o&&n>0&&(l=e.children[n-1].firstChild,o=1073741824)),!a||!l)return null;i=Math.min(a.textContent.length,Math.max(0,i)),o=Math.min(l.textContent.length,Math.max(0,o));const d=this._readClientRects(a,i,l,o,s.endNode);return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(d,s.clientRectDeltaLeft,s.clientRectScale)}}var l=i(92550),d=i(91557),c=i(92321),h=i(64141);const u=!!s.tY||!(s.IJ||n.vU||n.G6);let g=!0;class p{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(50),o=i.get(38);this.renderWhitespace="off"===o?i.get(99):"none",this.renderControlCharacters=i.get(94),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(33),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(67),this.stopRenderingLineAfter=i.get(117),this.fontLigatures=i.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&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}}class m{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=(0,o.X)(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return!(!(0,c.c3)(this._options.themeType)&&"selection"!==this._options.renderWhitespace||(this._isMaybeInvalid=!0,0))}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=i.getViewLineRenderingData(e),s=this._options,r=l.Kp.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let a=null;if((0,c.c3)(s.themeType)||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:o.minColumn,n=i.endLineNumber===e?i.endColumn:o.maxColumn;t');const v=(0,d.d1)(p,n);n.appendString("");let _=null;return g&&u&&o.isBasicASCII&&s.useMonospaceOptimizations&&0===v.containsForeignElements&&(_=new f(this._renderedViewLine?this._renderedViewLine.domNode:null,p,v.characterMapping)),_||(_=b(this._renderedViewLine?this._renderedViewLine.domNode:null,p,v.characterMapping,v.containsRTL,v.containsForeignElements)),this._renderedViewLine=_,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof f}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof f?this._renderedViewLine.monospaceAssumptionsAreValid():g}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof f&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const o=this._renderedViewLine.input.stopRenderingLineAfter;if(-1!==o&&t>o+1&&i>o+1)return new r.CH(!0,[new r.CR(this.getWidth(n),0)]);-1!==o&&t>o+1&&(t=o+1),-1!==o&&i>o+1&&(i=o+1);const s=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return s&&s.length>0?new r.CH(!1,s):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}}m.CLASS_NAME="view-line";class f{constructor(e,t,i){this._cachedWidth=-1,this.domNode=e,this.input=t;const n=Math.floor(t.lineContent.length/300);if(n>0){this._keyColumnPixelOffsetCache=new Float32Array(n);for(let e=0;e=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),g=!1)}return g}toSlowRenderedLine(){return b(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const o=this._getColumnPixelOffset(e,t,n),s=this._getColumnPixelOffset(e,i,n);return[new r.CR(o,s-o)]}_getColumnPixelOffset(e,t,i){if(t<=300){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const n=Math.floor((t-1)/300)-1,o=300*(n+1)+1;let s=-1;if(this._keyColumnPixelOffsetCache&&(s=this._keyColumnPixelOffsetCache[n],-1===s&&(s=this._actualReadPixelOffset(e,o,i),this._keyColumnPixelOffsetCache[n]=s)),-1===s){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const r=this._characterMapping.getHorizontalOffset(o),a=this._characterMapping.getHorizontalOffset(t);return s+this._charWidth*(a-r)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,i){if(!this.domNode)return-1;const n=this._characterMapping.getDomPosition(t),o=a.readHorizontalRanges(this._getReadingTarget(this.domNode),n.partIndex,n.charIndex,n.partIndex,n.charIndex,i);return o&&0!==o.length?o[0].left:-1}getColumnOfNodeOffset(e,t){return w(this._characterMapping,e,t)}}class v{constructor(e,t,i,n,o){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,null==e||e.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const o=this._readPixelOffset(this.domNode,e,t,n);if(-1===o)return null;const s=this._readPixelOffset(this.domNode,e,i,n);return-1===s?null:[new r.CR(o,s-o)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,o){if(i===n){const n=this._readPixelOffset(e,t,i,o);return-1===n?null:[new r.CR(n,0)]}return this._readRawVisibleRangesForRange(e,i,n,o)}_readPixelOffset(e,t,i,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth(n);const t=this._getReadingTarget(e);return t.firstChild?(n.markDidDomLayout(),t.firstChild.offsetWidth):0}if(null!==this._pixelOffsetCache){const o=this._pixelOffsetCache[i];if(-1!==o)return o;const s=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=s,s}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=a.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth(n);const o=this._characterMapping.getDomPosition(i),s=a.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n);if(!s||0===s.length)return-1;const r=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getHorizontalOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-r)<=1)return t}return r}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new r.CR(0,this.getWidth(n))];const o=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(i);return a.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,s.partIndex,s.charIndex,n)}getColumnOfNodeOffset(e,t){return w(this._characterMapping,e,t)}}class _ extends v{_readVisibleRangesForRange(e,t,i,n,o){const s=super._readVisibleRangesForRange(e,t,i,n,o);if(!s||0===s.length||i===n||1===i&&n===this._characterMapping.length)return s;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,o);if(-1!==i){const e=s[s.length-1];e.left{"use strict";i.d(t,{Gm:()=>Hs});var n=i(36357),o=i(16830);let s=class{constructor(e,t){}dispose(){}};var r,a;s.ID="editor.contrib.markerDecorations",s=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(r=1,a=n.i,function(e,t){a(e,t,r)})],s),(0,o._K)(s.ID,s,0);var l=i(65321),d=i(17301),c=i(4669),h=i(5976),u=i(66663),g=i(93379),p=i.n(g),m=i(7795),f=i.n(m),v=i(90569),_=i.n(v),b=i(3565),w=i.n(b),y=i(19216),C=i.n(y),S=i(44589),x=i.n(S),k=i(97337),L={};L.styleTagTransform=x(),L.setAttributes=w(),L.insert=_().bind(null,"head"),L.domAPI=f(),L.insertStyleElement=C(),p()(k.Z,L),k.Z&&k.Z.locals&&k.Z.locals;var N=i(52136),D=i(16268),E=i(9488),I=i(36248),T=i(1432),M=i(54534),R=i(27231);class A{constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=A._read(e,this.key);this.migrate(t,(t=>A._read(e,t)),((t,i)=>A._write(e,t,i)))}static _read(e,t){if(void 0===e)return;const i=t.indexOf(".");if(i>=0){const n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){const n=t.indexOf(".");if(n>=0){const o=t.substring(0,n);return e[o]=e[o]||{},void this._write(e[o],t.substring(n+1),i)}e[t]=i}}function P(e,t){A.items.push(new A(e,t))}function O(e,t){P(e,((i,n,o)=>{if(void 0!==i)for(const[n,s]of t)if(i===n)return void o(e,s)}))}A.items=[],O("wordWrap",[[!0,"on"],[!1,"off"]]),O("lineNumbers",[[!0,"on"],[!1,"off"]]),O("cursorBlinking",[["visible","solid"]]),O("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),O("renderLineHighlight",[[!0,"line"],[!1,"none"]]),O("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),O("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),O("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),O("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),O("autoIndent",[[!1,"advanced"],[!0,"full"]]),O("matchBrackets",[[!0,"always"],[!1,"never"]]),O("renderFinalNewline",[[!0,"on"],[!1,"off"]]),O("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),O("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]),O("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]),P("autoClosingBrackets",((e,t,i)=>{!1===e&&(i("autoClosingBrackets","never"),void 0===t("autoClosingQuotes")&&i("autoClosingQuotes","never"),void 0===t("autoSurround")&&i("autoSurround","never"))})),P("renderIndentGuides",((e,t,i)=>{void 0!==e&&(i("renderIndentGuides",void 0),void 0===t("guides.indentation")&&i("guides.indentation",!!e))})),P("highlightActiveIndentGuide",((e,t,i)=>{void 0!==e&&(i("highlightActiveIndentGuide",void 0),void 0===t("guides.highlightActiveIndentation")&&i("guides.highlightActiveIndentation",!!e))}));const F={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};P("suggest.filteredTypes",((e,t,i)=>{if(e&&"object"==typeof e){for(const n of Object.entries(F))!1===e[n[0]]&&void 0===t(`suggest.${n[1]}`)&&i(`suggest.${n[1]}`,!1);i("suggest.filteredTypes",void 0)}})),P("quickSuggestions",((e,t,i)=>{if("boolean"==typeof e){const t=e?"on":"off";i("quickSuggestions",{comments:t,strings:t,other:t})}})),P("experimental.stickyScroll.enabled",((e,t,i)=>{"boolean"==typeof e&&(i("experimental.stickyScroll.enabled",void 0),void 0===t("stickyScroll.enabled")&&i("stickyScroll.enabled",e))})),P("experimental.stickyScroll.maxLineCount",((e,t,i)=>{"number"==typeof e&&(i("experimental.stickyScroll.maxLineCount",void 0),void 0===t("stickyScroll.maxLineCount")&&i("stickyScroll.maxLineCount",e))})),P("codeActionsOnSave",((e,t,i)=>{if(e&&"object"==typeof e){let t=!1;const n={};for(const i of Object.entries(e))"boolean"==typeof i[1]?(t=!0,n[i[0]]=i[1]?"explicit":"never"):n[i[0]]=i[1];t&&i("codeActionsOnSave",n)}})),P("codeActionWidget.includeNearbyQuickfixes",((e,t,i)=>{"boolean"==typeof e&&(i("codeActionWidget.includeNearbyQuickfixes",void 0),void 0===t("codeActionWidget.includeNearbyQuickFixes")&&i("codeActionWidget.includeNearbyQuickFixes",e))})),P("lightbulb.enabled",((e,t,i)=>{"boolean"==typeof e&&i("lightbulb.enabled",e?void 0:"off")}));var B=i(37940),W=i(64141),H=i(82334),V=i(27374),z=i(31106),j=i(28731);let U=class extends h.JT{constructor(e,t,i,n){super(),this._accessibilityService=n,this._onDidChange=this._register(new c.Q5),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new c.Q5),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new W.LJ,this.isSimpleWidget=e,this._containerObserver=this._register(new M.I(i,t.dimension)),this._targetWindowId=(0,l.Jj)(i).vscodeWindowId,this._rawOptions=Z(t),this._validatedOptions=G.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(H.C.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(B.n.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(R.g.onDidChange((()=>this._recomputeOptions()))),this._register(j.T.getInstance((0,l.Jj)(i)).onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=G.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=V.E4.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:B.n.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return G.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:q(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:D.Pf||D.vU,pixelRatio:j.T.getInstance((0,l.ed)(this._targetWindowId,!0).window).value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return R.g.readFontInfo((0,l.ed)(this._targetWindowId,!0).window,e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=Z(e);G.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=G.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=function(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};function q(){let e="";return D.G6||D.MG||(e+="no-user-select "),D.G6&&(e+="no-minimap-shadow ",e+="enable-user-select "),T.dz&&(e+="mac "),e}U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,z.F)],U);class K{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class ${constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class G{static validateOptions(e){const t=new K;for(const i of W.Bc){const n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new $;for(const n of W.Bc)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&E.fS(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!G._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of W.Bc){const s=!G._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=s,s&&(n=!0)}return n?new W.Bb(i):null}static applyUpdate(e,t){let i=!1;for(const n of W.Bc)if(t.hasOwnProperty(n.name)){const o=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=o.newValue,i=i||o.didChange}return i}}function Z(e){const t=I.I8(e);return function(e){A.items.forEach((t=>t.apply(e)))}(t),t}var Q=i(11640),Y=i(38626),J=i(50795),X=i(29994);class ee extends h.JT{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=4&&3===e[0]&&8===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&8===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&6===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&9===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowGuard(e){return e.length>=1&&3===e[0]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&5===e[0]}}class pe{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(144),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(67),this.stickyTabStops=n.get(116),this.typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return pe.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,o=e.viewModel.getLineCount();let s,r=null,a=null;return i.afterLineNumber!==o&&(a=new se.L(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new se.L(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),s=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,be._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class fe extends me{constructor(e,t,i,n,o){super(e,t,i,n),this._ctx=e,o?(this.target=o,this.targetPath=ie.collect(o,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.columns.contentLeft+s.width)continue;const i=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(i<=o&&o<=i+s.height)return t.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return ge.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let o=Math.abs(t.relativePos.x);const s={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};if(o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth){const r=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition()),a=e.viewModel.glyphLanes.getLanesAtLine(r.lineNumber);return s.glyphMarginLane=a[Math.floor(o/e.lineHeight)],t.fulfillMargin(2,n,i.range,s)}return o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,s):(o-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,s))}return null}static _hitTestViewLines(e,t,i){if(!ge.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new se.L(1,1),ve);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new se.L(i,n),ve)}if(i){if(ge.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),o=_e(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new se.L(i,1),o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=_e(t.mouseContentHorizontalOffset-n),s=new se.L(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(s,o)}}return t.fulfillUnknown()}const n=be._doHitTest(e,t);return 1===n.type?be.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(ge.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new se.L(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(ge.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new se.L(i,n))}}return null}static _hitTestScrollbar(e,t){if(ge.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new se.L(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(144),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return be._getMouseColumn(n,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,o){const s=n.lineNumber,r=n.column,a=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>a){const e=_e(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const d=e.visibleRangeForPosition(s,r);if(!d)return t.fulfillUnknown(n);const c=d.left;if(Math.abs(t.mouseContentHorizontalOffset-c)<1)return t.fulfillContentText(n,null,{mightBeForeignElement:!!o,injectedText:o});const h=[];if(h.push({offset:d.left,column:r}),r>1){const t=e.visibleRangeForPosition(s,r-1);t&&h.push({offset:t.left,column:r-1})}if(re.offset-t.offset));const u=t.pos.toClientCoordinates(l.Jj(e.viewDomNode)),g=i.getBoundingClientRect(),p=g.left<=u.clientX&&u.clientX<=g.right;let m=null;for(let e=1;eo)){const i=Math.floor((n+o)/2);let s=t.pos.y+(i-t.mouseVerticalOffset);s<=t.editorPos.y&&(s=t.editorPos.y+1),s>=t.editorPos.y+t.editorPos.height&&(s=t.editorPos.y+t.editorPos.height-1);const r=new X.YN(t.pos.x,s),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates(l.Jj(e.viewDomNode)));if(1===a.type)return a}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(l.Jj(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=l.Ay(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let o=e.elementFromPoint(t,i);if(null!==o){for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild;)o=o.lastChild;const e=o.getBoundingClientRect(),i=l.Jj(o),s=`${i.getComputedStyle(o,null).getPropertyValue("font-style")} ${i.getComputedStyle(o,null).getPropertyValue("font-variant")} ${i.getComputedStyle(o,null).getPropertyValue("font-weight")} ${i.getComputedStyle(o,null).getPropertyValue("font-size")}/${i.getComputedStyle(o,null).getPropertyValue("line-height")} ${i.getComputedStyle(o,null).getPropertyValue("font-family")}`,r=o.innerText;let a,d=e.left,c=0;if(t>e.left+e.width)c=r.length;else{const e=we.getInstance();for(let i=0;ithis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(144).height;const n=new X.N5(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,(e=>{this._onMouseMove(e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=l.nm(this.viewHelper.viewDomNode.ownerDocument,"mousemove",(e=>{this.viewHelper.viewDomNode.contains(e.target)||this._onMouseLeave(new X.gy(e,!1,this.viewHelper.viewDomNode))})))}))),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e))));let o=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>{o=t}))),this._register(l.nm(this.viewHelper.viewDomNode,l.tw.POINTER_UP,(e=>{this._mouseDownOperation.onPointerUp()}))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e,o)))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=Le.Io.INSTANCE;let t=0,i=H.C.getZoomLevel(),n=!1,o=0;function s(e){return T.dz?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}this._register(l.nm(this.viewHelper.viewDomNode,l.tw.MOUSE_WHEEL,(r=>{if(this.viewController.emitMouseWheel(r),!this._context.configuration.options.get(76))return;const a=new xe.q(r);if(e.acceptStandardWheelEvent(a),e.isPhysicalMouseWheel()){if(s(r)){const e=H.C.getZoomLevel(),t=a.deltaY>0?1:-1;H.C.setZoomLevel(e+t),a.preventDefault(),a.stopPropagation()}}else Date.now()-t>50&&(i=H.C.getZoomLevel(),n=s(r),o=0),t=Date.now(),o+=a.deltaY,n&&(H.C.setZoomLevel(i+o/5),a.preventDefault(),a.stopPropagation())}),{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(144)){const e=this._context.configuration.options.get(144).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const i=new X.rU(e,t).toPageCoordinates(l.Jj(this.viewHelper.viewDomNode)),n=(0,X.kG)(this.viewHelper.viewDomNode);if(i.yn.y+n.height||i.xn.x+n.width)return null;const o=(0,X.Pp)(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,o,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=l.Ay(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find((e=>this.viewHelper.viewDomNode.contains(e))))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(d&&(n||s&&r))c(),this._mouseDownOperation.start(i.type,e,t);else if(o)e.preventDefault();else if(a){const n=i.detail;d&&this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(c(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(c(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class De extends h.JT{constructor(e,t,i,n,o,s){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=o,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new X.AL(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new Ee(this._context,this._viewHelper,this._mouseTargetFactory,((e,t,i)=>this._dispatchMouse(e,t,i)))),this._mouseState=new Te,this._currentSelection=new ke.Y(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):13!==t.type||"above"!==t.outsidePosition&&"below"!==t.outsidePosition?(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)):this._topBottomDragScrolling.start(t,e))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const o=this._context.configuration.options;if(!o.get(91)&&o.get(35)&&!o.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!1);l.vd(e)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posyt.y+t.height){const s=e.posy-t.y-t.height,r=n.getCurrentScrollTop()+e.relativePos.y,a=pe.getZoneAtCoord(this._context,r);if(a){const e=this._helpPositionJumpOverViewZone(a);if(e)return ue.createOutsideEditor(o,e,"below",s)}const l=n.getLineNumberAtVerticalOffset(r);return ue.createOutsideEditor(o,new se.L(l,i.getLineMaxColumn(l)),"below",s)}const s=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){const n=e.posx-t.x-t.width;return ue.createOutsideEditor(o,new se.L(s,i.getLineMaxColumn(s)),"right",n)}return null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return ue.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new se.L(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class Ee extends h.JT{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new Ie(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class Ie extends h.JT{constructor(e,t,i,n,o,s){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=o,this._mouseEvent=s,this._lastTime=Date.now(),this._animationFrameDisposable=l.jL(l.Jj(s.browserEvent),(()=>this._execute()))}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(67),t=this._context.configuration.options.get(144).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){const e=this._context.configuration.options.get(67),t=this._getScrollSpeed()*(this._tick()/1e3)*e,i="above"===this._position.outsidePosition?-t:t;this._context.viewModel.viewLayout.deltaScrollNow(0,i),this._viewHelper.renderNow();const n=this._context.viewLayout.getLinesViewportData(),o="above"===this._position.outsidePosition?n.startLineNumber:n.endLineNumber;let s;{const e=(0,X.kG)(this._viewHelper.viewDomNode),t=this._context.configuration.options.get(144).horizontalScrollbarHeight,i=new X.YN(this._mouseEvent.pos.x,e.y+e.height-t-.1),n=(0,X.Pp)(this._viewHelper.viewDomNode,e,i);s=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),e,i,n,null)}s.position&&s.position.lineNumber===o||(s="above"===this._position.outsidePosition?ue.createOutsideEditor(this._position.mouseColumn,new se.L(o,1),"above",this._position.outsideDistance):ue.createOutsideEditor(this._position.mouseColumn,new se.L(o,this._context.viewModel.getLineMaxColumn(o)),"below",this._position.outsideDistance)),this._dispatchMouse(s,!0,2),this._animationFrameDisposable=l.jL(l.Jj(s.element),(()=>this._execute()))}}class Te{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>Te.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}Te.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var Me=i(35715);class Re extends Ne{constructor(e,t,i){super(e,t,i),this._register(Ce.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(l.nm(this.viewHelper.linesContentDomNode,Ce.t.Tap,(e=>this.onTap(e)))),this._register(l.nm(this.viewHelper.linesContentDomNode,Ce.t.Change,(e=>this.onChange(e)))),this._register(l.nm(this.viewHelper.linesContentDomNode,Ce.t.Contextmenu,(e=>this._onContextMenu(new X.gy(e,!1,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(l.nm(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new X.tC(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>this._onMouseDown(e,t))))}onTap(e){e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)&&(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),"pen"===this._lastPointerType&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){const i=this._createMouseTarget(new X.gy(e,!1,this.viewHelper.viewDomNode),!1);i.position&&this.viewController.dispatchMouse({position:i.position,mouseColumn:i.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===i.type&&null!==i.detail.injectedText})}_onMouseDown(e,t){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e,t)}}class Ae extends Ne{constructor(e,t,i){super(e,t,i),this._register(Ce.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(l.nm(this.viewHelper.linesContentDomNode,Ce.t.Tap,(e=>this.onTap(e)))),this._register(l.nm(this.viewHelper.linesContentDomNode,Ce.t.Change,(e=>this.onChange(e)))),this._register(l.nm(this.viewHelper.linesContentDomNode,Ce.t.Contextmenu,(e=>this._onContextMenu(new X.gy(e,!1,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new X.gy(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(Me.pd.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class Pe extends h.JT{constructor(e,t,i){super(),(T.gn||T.Dt&&T.tq)&&ye.D.pointerEvents?this.handler=this._register(new Re(e,t,i)):Se.Ex.TouchEvent?this.handler=this._register(new Ae(e,t,i)):this.handler=this._register(new Ne(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var Oe=i(40504),Fe={};Fe.styleTagTransform=x(),Fe.setAttributes=w(),Fe.insert=_().bind(null,"head"),Fe.domAPI=f(),Fe.insertStyleElement=C(),p()(Oe.Z,Fe),Oe.Z&&Oe.Z.locals&&Oe.Z.locals;var Be=i(63580),We=i(97295),He=i(15887),Ve=i(6184),ze={};ze.styleTagTransform=x(),ze.setAttributes=w(),ze.insert=_().bind(null,"head"),ze.domAPI=f(),ze.insertStyleElement=C(),p()(Ve.Z,ze),Ve.Z&&Ve.Z.locals&&Ve.Z.locals;class je extends ee{}var Ue=i(97781),qe=i(8625);class Ke extends je{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new se.L(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(67);const t=e.get(68);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(95);const i=e.get(144);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._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(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 se.L(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?''+i+"":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=T.IJ?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter((e=>!!e.options.lineNumberClassName));o.sort(((e,t)=>re.e.compareRangesUsingEnds(e.range,t.range)));let s=0;const r=this._context.viewModel.getLineCount(),a=[];for(let e=i;e<=n;e++){const n=e-i;let l=this._getLineRenderLineNumber(e),d="";for(;s${l}`):a[n]=""}this._renderResult=a}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}Ke.CLASS_NAME="line-numbers",(0,Ue.Ic)(((e,t)=>{const i=e.getColor(qe.hw),n=e.getColor(qe.Bj);n?t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)}));var $e=i(11596),Ge={};Ge.styleTagTransform=x(),Ge.setAttributes=w(),Ge.insert=_().bind(null,"head"),Ge.domAPI=f(),Ge.insertStyleElement=C(),p()($e.Z,Ge),$e.Z&&$e.Z.locals&&$e.Z.locals;class Ze extends te{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(144);this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,Y.X)(document.createElement("div")),this._domNode.setClassName(Ze.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,Y.X)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Ze.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(144);return this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}Ze.CLASS_NAME="glyph-margin",Ze.OUTER_CLASS_NAME="margin";var Qe=i(24929),Ye=i(67548),Je={};Je.styleTagTransform=x(),Je.setAttributes=w(),Je.insert=_().bind(null,"head"),Je.domAPI=f(),Je.insertStyleElement=C(),p()(Ye.Z,Je),Ye.Z&&Ye.Z.locals&&Ye.Z.locals;const Xe="monaco-mouse-cursor-text";var et=i(96887),tt=i(41264),it=i(77173),nt=i(91847),ot=i(72065),st=function(e,t){return function(i,n){t(i,n,e)}};class rt{constructor(e,t,i,n,o){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=o,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new se.L(this.modelLineNumber,this.distanceToModelLineStart+1),i=new se.L(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||(this._previousPresentation=e||{foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const at=D.vU;let lt=class extends te{constructor(e,t,i,n,o){super(e),this._keybindingService=n,this._instantiationService=o,this._primaryCursorPosition=new se.L(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const s=this._context.configuration.options,r=s.get(144);this._setAccessibilityOptions(s),this._contentLeft=r.contentLeft,this._contentWidth=r.contentWidth,this._contentHeight=r.height,this._fontInfo=s.get(50),this._lineHeight=s.get(67),this._emptySelectionClipboard=s.get(37),this._copyWithSyntaxHighlighting=s.get(25),this._visibleTextArea=null,this._selections=[new ke.Y(1,1,1,1)],this._modelSelections=[new ke.Y(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,Y.X)(document.createElement("textarea")),ie.write(this.textArea,7),this.textArea.setClassName(`inputarea ${Xe}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:a}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=a*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",this._getAriaLabel(s)),this.textArea.setAttribute("aria-required",s.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(s.get(124))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",Be.NC("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",s.get(91)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,Y.X)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const l={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t),getValueLengthInRange:(e,t)=>this._context.viewModel.getValueLengthInRange(e,t),modifyPosition:(e,t)=>this._context.viewModel.modifyPosition(e,t)},d={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,T.ED),t=this._context.viewModel.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),n=Array.isArray(e)?e:null,o=Array.isArray(e)?e.join(t):e;let s,r=null;if(Me.RA.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&o.length<65536){const e=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(s=e.html,r=e.mode)}return{isFromEmptySelection:i,multicursorText:n,text:o,html:s,mode:r}},getScreenReaderContent:()=>{if(1===this._accessibilitySupport){const e=this._selections[0];if(T.dz&&e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new He.un(i,i.length,i.length,re.e.fromPositions(t),0)}const t=500;if(T.dz&&!e.isEmpty()&&l.getValueLengthInRange(e,0)0)return new He.un(i,n,n,re.e.fromPositions(t),0)}return He.un.EMPTY}return He.ee.fromEditorSelection(l,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},c=this._register(new Me.Tj(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(Me.Fz,d,c,T.OS,{isAndroid:D.Dt,isChrome:D.i7,isFirefox:D.vU,isSafari:D.G6})),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?(He.al&&console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`),this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)):(He.al&&console.log(` => type: <<${e.text}>>`),this._viewController.type(e.text))}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this.textArea.domNode,i=this._modelSelections[0],{distanceToModelLineStart:n,widthOfHiddenTextBefore:o}=(()=>{const e=t.value.substring(0,Math.min(t.selectionStart,t.selectionEnd)),n=e.lastIndexOf("\n"),o=e.substring(n+1),s=o.lastIndexOf("\t"),r=o.length-s-1,a=i.getStartPosition(),l=Math.min(a.column-1,r),d=a.column-1-l,c=o.substring(0,o.length-l),{tabSize:h}=this._context.viewModel.model.getOptions(),u=function(e,t,i,n){if(0===t.length)return 0;const o=e.createElement("div");o.style.position="absolute",o.style.top="-50000px",o.style.width="50000px";const s=e.createElement("span");(0,N.N)(s,i),s.style.whiteSpace="pre",s.style.tabSize=n*i.spaceWidth+"px",s.append(t),o.appendChild(s),e.body.appendChild(o);const r=s.offsetWidth;return e.body.removeChild(o),r}(this.textArea.domNode.ownerDocument,c,this._fontInfo,h);return{distanceToModelLineStart:d,widthOfHiddenTextBefore:u}})(),{distanceToModelLineEnd:s}=(()=>{const e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),o=-1===n?e:e.substring(0,n),s=o.indexOf("\t"),r=-1===s?o.length:o.length-s-1,a=i.getEndPosition(),l=Math.min(this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column,r);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l}})();this._context.viewModel.revealRange("keyboard",!0,re.e.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new rt(this._context,i.startLineNumber,n,o,s),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Xe} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{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 ${Xe}`),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(it.F.onDidChange((()=>{this._ensureReadOnlyAttribute()})))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,Qe.u)('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');let n=!0,o=e.column,s=!0,r=e.column,a=0;for(;a<50&&(n||s);){if(n&&o<=1&&(n=!1),n){const e=t.charCodeAt(o-2);0!==i.get(e)?n=!1:o--}if(s&&r>t.length&&(s=!1),s){const e=t.charCodeAt(r-1);0!==i.get(e)?s=!1:r++}a++}return[t.substring(o-1,r-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,Qe.u)(this._context.configuration.options.get(130));let n=e.column,o=0;for(;n>1;){const s=t.charCodeAt(n-2);if(0!==i.get(s)||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!We.ZG(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){var t,i,n;if(1===e.get(2)){const e=null===(t=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))||void 0===t?void 0:t.getAriaLabel(),o=null===(i=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))||void 0===i?void 0:i.getAriaLabel(),s=null===(n=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))||void 0===n?void 0:n.getAriaLabel(),r=Be.NC("accessibilityModeOff","The editor is not accessible at this time.");return e?Be.NC("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",r,e):o?Be.NC("accessibilityOffAriaLabelNoKb","{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,o):s?Be.NC("accessibilityOffAriaLabelNoKbs","{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 e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===W.BH.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const i=e.get(144).wrappingColumn;if(-1!==i&&1!==this._accessibilitySupport){const t=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(i*t.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=at?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(144);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(50),this._lineHeight=t.get(67),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),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",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(124))),(e.hasChanged(34)||e.hasChanged(91))&&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()}focusTextArea(){this._textAreaInput.focusTextArea()}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;!it.F.enabled||e.get(34)&&e.get(91)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var t;this._primaryCursorPosition=new se.L(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),null===(t=this._visibleTextArea)||void 0===t||t.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){var e;if(this._visibleTextArea){const e=this._visibleTextArea.visibleTextareaStart,t=this._visibleTextArea.visibleTextareaEnd,i=this._visibleTextArea.startPosition,n=this._visibleTextArea.endPosition;if(i&&n&&e&&t&&t.left>=this._scrollLeft&&e.left<=this._scrollLeft+this._contentWidth){const o=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,s=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let r=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left+1;if(athis._contentWidth&&(l=this._contentWidth);const d=this._context.viewModel.getViewLineData(i.lineNumber),c=d.tokens.findTokenIndexAtOffset(i.column-1),h=c===d.tokens.findTokenIndexAtOffset(n.column-1),u=this._visibleTextArea.definePresentation(h?d.tokens.getPresentation(c):null);this.textArea.domNode.scrollTop=s*this._lineHeight,this.textArea.domNode.scrollLeft=r,this._doRender({lastRenderPosition:null,top:o,left:a,width:l,height:this._lineHeight,useCover:!1,color:(et.RW.getColorMap()||[])[u.foreground],italic:u.italic,bold:u.bold,underline:u.underline,strikethrough:u.strikethrough})}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const t=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(tthis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const i=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(i<0||i>this._contentHeight)this._renderAtTopLeft();else if(T.dz||2===this._accessibilitySupport){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const n=null!==(e=this._textAreaInput.textAreaState.newlineCountBeforeSelection)&&void 0!==e?e:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=n*this._lineHeight}else this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:at?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;for(;i=e.indexOf("\n",i+1),-1!==i;)t++;return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:at?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;(0,N.N)(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?tt.Il.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(57)?i.setClassName("monaco-editor-background textAreaCover "+Ze.OUTER_CLASS_NAME):0!==n.get(68).renderType?i.setClassName("monaco-editor-background textAreaCover "+Ke.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};lt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([st(3,nt.d),st(4,ot.TG)],lt);var dt=i(7031),ct=i(69317);class ht{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){ct.Ox.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){ct.Ox.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){ct.Ox.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),ct.Ox.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),ct.Ox.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){ct.Ox.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){ct.Ox.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){ct.Ox.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){ct.Ox.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){ct.Ox.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){ct.Ox.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){ct.Ox.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){ct.Ox.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){ct.Ox.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}var ut=i(77514),gt=i(50072);class pt{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new d.he("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let o=0,s=0;for(let r=i;r<=n;r++){const i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===s?(o=i,s=1):s++)}if(e=n&&t<=o&&(this._lines[t-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);const s=[];for(let e=0;ei)continue;const r=Math.max(t,s.fromLineNumber),a=Math.min(i,s.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class mt{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new pt((()=>this._host.createVisibleLine()))}_createDomNode(){const e=(0,Y.X)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(144)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;et){const e=t,s=Math.min(i,o.rendLineNumberStart-1);e<=s&&(this._insertLinesBefore(o,e,s,n,t),o.linesLength+=s-e+1)}else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1i){const e=Math.max(0,i-o.rendLineNumberStart+1),t=o.linesLength-1-e+1;t>0&&(this._removeLinesAfter(o,t),o.linesLength-=t)}return this._finishRendering(o,!1,n),o}_renderUntouchedLines(e,t,i,n,o){const s=e.rendLineNumberStart,r=e.lines;for(let e=t;e<=i;e++){const t=s+e;r[e].layoutLine(t,n[t-o])}}_insertLinesBefore(e,t,i,n,o){const s=[];let r=0;for(let e=t;e<=i;e++)s[r++]=this.host.createVisibleLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");ft._ttPolicy&&(t=ft._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;te}),ft._sb=new gt.HT(1e5);class vt extends te{constructor(e){super(e),this._visibleLines=new mt(this),this.domNode=this._visibleLines.domNode;const t=this._context.configuration.options.get(50);(0,N.N)(this.domNode,t),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender()));for(let i=0,n=t.length;i'),n.appendString(o),n.appendString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class bt extends vt{constructor(e){super(e);const t=this._context.configuration.options.get(144);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(144);return this._contentWidth=t.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 wt extends vt{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(144);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,N.N)(this.domNode,t.get(50))}onConfigurationChanged(e){const t=this._context.configuration.options;(0,N.N)(this.domNode,t.get(50));const i=t.get(144);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 yt{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){var t;null===(t=this.onKeyDown)||void 0===t||t.call(this,e)}emitKeyUp(e){var t;null===(t=this.onKeyUp)||void 0===t||t.call(this,e)}emitContextMenu(e){var t;null===(t=this.onContextMenu)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;null===(t=this.onMouseMove)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;null===(t=this.onMouseLeave)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;null===(t=this.onMouseDown)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;null===(t=this.onMouseUp)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;null===(t=this.onMouseDrag)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;null===(t=this.onMouseDrop)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;null===(e=this.onMouseDropCanceled)||void 0===e||e.call(this)}emitMouseWheel(e){var t;null===(t=this.onMouseWheel)||void 0===t||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return yt.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)),5!==i.type&&8!==i.type||(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 se.L(e.afterLineNumber,1)).lineNumber}}}var Ct=i(29463),St={};St.styleTagTransform=x(),St.setAttributes=w(),St.insert=_().bind(null,"head"),St.domAPI=f(),St.insertStyleElement=C(),p()(Ct.Z,St),Ct.Z&&Ct.Z.locals&&Ct.Z.locals;class xt extends te{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,Y.X)(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 t=this._context.configuration.options.get(144),i=t.contentWidth-t.verticalScrollbarWidth;this.contentWidth!==i&&(this.contentWidth=i,e=!0);const n=t.contentLeft;return this.contentLeft!==n&&(this.contentLeft=n,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){var t;let i=0;const n=e.getDecorationsInViewport();for(const o of n){if(!o.options.blockClassName)continue;let n,s,r=this.blocks[i];r||(r=this.blocks[i]=(0,Y.X)(document.createElement("div")),this.domNode.appendChild(r)),o.options.blockIsAfterEnd?(n=e.getVerticalOffsetAfterLineNumber(o.range.endLineNumber,!1),s=e.getVerticalOffsetAfterLineNumber(o.range.endLineNumber,!0)):(n=e.getVerticalOffsetForLineNumber(o.range.startLineNumber,!0),s=o.range.isEmpty()&&!o.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(o.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(o.range.endLineNumber,!0));const[a,l,d,c]=null!==(t=o.options.blockPadding)&&void 0!==t?t:[0,0,0,0];r.setClassName("blockDecorations-block "+o.options.blockClassName),r.setLeft(this.contentLeft-c),r.setWidth(this.contentWidth+c+l),r.setTop(n-e.scrollTop-a),r.setHeight(s-n+a+d),i++}for(let e=i;e0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){const o=e.top,s=o,r=e.top+e.height,a=o-i,l=s>=i,d=r,c=n.viewportHeight-r>=i;let h=e.left;return h+t>n.scrollLeft+n.viewportWidth&&(h=n.scrollLeft+n.viewportWidth-t),hr){const e=l-(r-n);l-=e,i-=e}if(l=22,_=g+i<=p.height-22;return this._fixedOverflowWidgets?{fitsAbove:v,aboveTop:Math.max(u,22),fitsBelow:_,belowTop:g,left:f}:{fitsAbove:v,aboveTop:r,fitsBelow:_,belowTop:a,left:m}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new Dt(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var t,i;return{primary:n(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),secondary:n((null===(t=this._secondaryAnchor.viewPosition)||void 0===t?void 0:t.lineNumber)===(null===(i=this._primaryAnchor.viewPosition)||void 0===i?void 0:i.lineNumber)?this._secondaryAnchor.viewPosition:null,this._affinity,this._lineHeight)};function n(t,i,n){if(!t)return null;const o=e.visibleRangeForPosition(t);if(!o)return null;const s=1===t.column&&3===i?0:o.left,r=e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop;return new Et(r,s,n)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;const n=this._context.configuration.options.get(50);let o=t.left;return o=oe.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&It(this._actual.afterRender,this._actual,null));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),"function"==typeof this._actual.afterRender&&It(this._actual.afterRender,this._actual,this._renderData.position)}}class Nt{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class Dt{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class Et{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function It(e,t,...i){try{return e.call(t,...i)}catch(e){return null}}var Tt=i(91260),Mt={};Mt.styleTagTransform=x(),Mt.setAttributes=w(),Mt.insert=_().bind(null,"head"),Mt.domAPI=f(),Mt.insertStyleElement=C(),p()(Tt.Z,Mt),Tt.Z&&Tt.Z.locals&&Tt.Z.locals;var Rt=i(92321);class At extends je{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(144);this._lineHeight=t.get(67),this._renderLineHighlight=t.get(96),this._renderLineHighlightOnlyWhenFocus=t.get(97),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new ke.Y(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 e of this._selections)t.add(e.positionLineNumber);const i=Array.from(t);i.sort(((e,t)=>e-t)),E.fS(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=this._selections.every((e=>e.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(144);return this._lineHeight=t.get(67),this._renderLineHighlight=t.get(96),this._renderLineHighlightOnlyWhenFocus=t.get(97),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)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=[];for(let e=t;e<=i;e++)n[e-t]="";if(this._wordWrap){const o=this._renderOne(e,!1);for(const e of this._cursorLineNumbers){const s=this._context.viewModel.coordinatesConverter,r=s.convertViewPositionToModelPosition(new se.L(e,1)).lineNumber,a=s.convertModelPositionToViewPosition(new se.L(r,1)).lineNumber,l=s.convertModelPositionToViewPosition(new se.L(r,this._context.viewModel.model.getLineMaxColumn(r))).lineNumber,d=Math.max(a,t),c=Math.min(l,i);for(let e=d;e<=c;e++)n[e-t]=o}}const o=this._renderOne(e,!0);for(const e of this._cursorLineNumbers)ei||(n[e-t]=o);this._renderData=n}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class Pt extends At{_renderOne(e,t){return`
    `}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class Ot extends At{_renderOne(e,t){return`
    `}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,Ue.Ic)(((e,t)=>{const i=e.getColor(qe.Kh);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(qe.Mm)){const i=e.getColor(qe.Mm);i&&(t.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${i}; }`),(0,Rt.c3)(e.type)&&(t.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}}));var Ft=i(71329),Bt={};Bt.styleTagTransform=x(),Bt.setAttributes=w(),Bt.insert=_().bind(null,"head"),Bt.domAPI=f(),Bt.insertStyleElement=C(),p()(Ft.Z,Bt),Ft.Z&&Ft.Z.locals&&Ft.Z.locals;class Wt extends je{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=t.get(50).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._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=t.get(50).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 e=0,o=t.length;e{if(e.options.zIndext.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return in?1:re.e.compareRangesUsingStarts(e.range,t.range)}));const o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,r=[];for(let e=o;e<=s;e++)r[e-o]="";this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let e=0,r=t.length;e',l=Math.max(r.range.startLineNumber,o),d=Math.min(r.range.endLineNumber,s);for(let e=l;e<=d;e++)i[e-o]+=a}}_renderNormalDecorations(e,t,i){var n;const o=String(this._lineHeight),s=e.visibleRange.startLineNumber;let r=null,a=!1,l=null,d=!1;for(let c=0,h=t.length;c';a[d]+=c}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Ht extends te{constructor(e,t,i,n){super(e);const o=this._context.configuration.options,s=o.get(103),r=o.get(75),a=o.get(40),d=o.get(106),c={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,Ue.m6)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:d,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new Le.$Z(t.domNode,c,this._context.viewLayout.getScrollable())),ie.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=(0,Y.X)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const h=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(l.nm(i.domNode,"scroll",(e=>h(i.domNode,!0,!0)))),this._register(l.nm(t.domNode,"scroll",(e=>h(t.domNode,!0,!1)))),this._register(l.nm(n.domNode,"scroll",(e=>h(n.domNode,!0,!1)))),this._register(l.nm(this.scrollbarDomNode.domNode,"scroll",(e=>h(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(144);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(73).side?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(103)||e.hasChanged(75)||e.hasChanged(40)){const e=this._context.configuration.options,t=e.get(103),i=e.get(75),n=e.get(40),o=e.get(106),s={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:o};this.scrollbar.updateOptions(s)}return e.hasChanged(144)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,Ue.m6)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}var Vt=i(64827),zt={};zt.styleTagTransform=x(),zt.setAttributes=w(),zt.insert=_().bind(null,"head"),zt.domAPI=f(),zt.insertStyleElement=C(),p()(Vt.Z,zt),Vt.Z&&Vt.Z.locals&&Vt.Z.locals;var jt=i(84973);class Ut{constructor(e,t,i,n,o){this.startLineNumber=e,this.endLineNumber=t,this.className=i,this.tooltip=n,this._decorationToRenderBrand=void 0,this.zIndex=null!=o?o:0}}class qt{constructor(e,t,i){this.className=e,this.zIndex=t,this.tooltip=i}}class Kt{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class $t extends je{_render(e,t,i){const n=[];for(let i=e;i<=t;i++)n[i-e]=new Kt;if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.classNamen)continue;const a=Math.max(s,i),l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new se.L(a,0)),d=this._context.viewModel.glyphLanes.getLanesAtLine(l.lineNumber).indexOf(e.preference.lane);t.push(new Qt(a,d,e.preference.zIndex,e))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.laneIndex===t.laneIndex?e.zIndex===t.zIndex?t.type===e.type?0===e.type&&0===t.type?e.className0;){const e=t.peek();if(!e)break;const n=t.takeWhile((t=>t.lineNumber===e.lineNumber&&t.laneIndex===e.laneIndex));if(!n||0===n.length)break;const o=n[0];if(0===o.type){const e=[];for(const t of n){if(t.zIndex!==o.zIndex||t.type!==o.type)break;0!==e.length&&e[e.length-1]===t.className||e.push(t.className)}i.push(o.accept(e.join(" ")))}else o.widget.renderInfo={lineNumber:o.lineNumber,laneIndex:o.laneIndex}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(const e of Object.values(this._widgets))e.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const e=this._managedDomNodes.pop();null==e||e.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const i of Object.values(this._widgets))if(i.renderInfo){const n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],o=this._glyphMarginLeft+i.renderInfo.laneIndex*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(o),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}else i.domNode.setDisplay("none");for(let i=0;ithis._decorationGlyphsToRender.length;){const e=this._managedDomNodes.pop();null==e||e.domNode.remove()}}}class Zt{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new Yt(this.lineNumber,this.laneIndex,e)}}class Qt{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.widget=n,this.type=1}}class Yt{constructor(e,t,i){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=i}}var Jt=i(86848),Xt={};Xt.styleTagTransform=x(),Xt.setAttributes=w(),Xt.insert=_().bind(null,"head"),Xt.domAPI=f(),Xt.insertStyleElement=C(),p()(Jt.Z,Xt),Jt.Z&&Jt.Z.locals&&Jt.Z.locals;var ei=i(98401),ti=i(1516),ii=i(65094);class ni extends je{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(145),n=t.get(50);this._lineHeight=t.get(67),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),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,i=t.get(145),n=t.get(50);return this._lineHeight=t.get(67),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(e){var t;const i=e.selections[0].getPosition();return!(null===(t=this._primaryPosition)||void 0===t?void 0:t.equals(i))&&(this._primaryPosition=i,!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}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,i,n,o;if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=e.scrollWidth,l=this._lineHeight,d=this._primaryPosition,c=this.getGuidesByLine(s,Math.min(r+1,this._context.viewModel.getLineCount()),d),h=[];for(let d=s;d<=r;d++){const r=d-s,u=c[r];let g="";const p=null!==(i=null===(t=e.visibleRangeForPosition(new se.L(d,1)))||void 0===t?void 0:t.left)&&void 0!==i?i:0;for(const t of u){const i=-1===t.column?p+(t.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new se.L(d,t.column)).left;if(i>a||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const s=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(null!==(o=null===(n=e.visibleRangeForPosition(new se.L(d,t.horizontalLine.endColumn)))||void 0===n?void 0:n.left)&&void 0!==o?o:i+this._spaceWidth)-i:this._spaceWidth;g+=`
    `}h[r]=g}this._renderResult=h}getGuidesByLine(e,t,i){const n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?ii.s6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?ii.s6.EnabledForActive:ii.s6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,o=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let s=0,r=0,a=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);s=n.startLineNumber,r=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),d=[];for(let i=e;i<=t;i++){const t=new Array;d.push(t);const c=n?n[i-e]:[],h=new E.H9(c),u=o?o[i-e]:0;for(let e=1;e<=u;e++){const n=(e-1)*l+1,o=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===c.length)&&s<=i&&i<=r&&e===a;t.push(...h.takeWhile((e=>e.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 oi(e){if(!e||!e.isTransparent())return e}(0,Ue.Ic)(((e,t)=>{const i=[{bracketColor:qe.zJ,guideColor:qe.oV,guideColorActive:qe.Qb},{bracketColor:qe.Vs,guideColor:qe.m$,guideColorActive:qe.m3},{bracketColor:qe.CE,guideColor:qe.DS,guideColorActive:qe.To},{bracketColor:qe.UP,guideColor:qe.lS,guideColorActive:qe.L7},{bracketColor:qe.r0,guideColor:qe.Jn,guideColorActive:qe.HV},{bracketColor:qe.m1,guideColor:qe.YF,guideColorActive:qe.f9}],n=new ti.W,o=[{indentColor:qe.gS,indentColorActive:qe.qe},{indentColor:qe.Tf,indentColorActive:qe.Xy},{indentColor:qe.H_,indentColorActive:qe.cK},{indentColor:qe.h1,indentColorActive:qe.N8},{indentColor:qe.vP,indentColorActive:qe.zd},{indentColor:qe.e9,indentColorActive:qe.ll}],s=i.map((t=>{var i,n;const o=e.getColor(t.bracketColor),s=e.getColor(t.guideColor),r=e.getColor(t.guideColorActive),a=oi(null!==(i=oi(s))&&void 0!==i?i:null==o?void 0:o.transparent(.3)),l=oi(null!==(n=oi(r))&&void 0!==n?n:o);if(a&&l)return{guideColor:a,guideColorActive:l}})).filter(ei.$K),r=o.map((t=>{const i=e.getColor(t.indentColor),n=e.getColor(t.indentColorActive),o=oi(i),s=oi(n);if(o&&s)return{indentColor:o,indentColorActive:s}})).filter(ei.$K);if(s.length>0){for(let e=0;e<30;e++){const i=s[e%s.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${e} { --indent-color: ${i.indentColor}; --indent-color-active: ${i.indentColorActive}; }`)}t.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),t.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}));var si=i(15393),ri=i(89565),ai={};ai.styleTagTransform=x(),ai.setAttributes=w(),ai.insert=_().bind(null,"head"),ai.domAPI=f(),ai.insertStyleElement=C(),p()(ri.Z,ai),ri.Z&&ri.Z.locals&&ri.Z.locals;class li{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}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 di{constructor(){this._currentVisibleRange=new re.e(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class ci{constructor(e,t,i,n,o,s,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=o,this.stopScrollTop=s,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class hi{constructor(e,t,i,n,o){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=o,this.type="selections";let s=t[0].startLineNumber,r=t[0].endLineNumber;for(let e=1,i=t.length;e{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new si.pY((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new di,this._horizontalRevealRequest=null,this._stickyScrollEnabled=n.get(115).enabled,this._maxNumberStickyLines=n.get(115).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new oe.Nt(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(145)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(50),n=t.get(145);return this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(100),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(115).enabled,this._maxNumberStickyLines=t.get(115).maxLineCount,(0,N.N)(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(144)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new oe.ob(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++)this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);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(-1===t)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 ci(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 hi(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,n),!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)||!0}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(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new se.L(n,1);const o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(ns)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t);const a=this._context.viewModel.getLineMinColumn(n);return ri)return-1;const n=new li(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),o}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=re.e.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const o=[];let s=0;const r=new li(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new se.L(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(ed)continue;const c=e===n.startLineNumber?n.startColumn:1,h=e!==n.endLineNumber,u=h?this._context.viewModel.getLineMaxColumn(e):n.endColumn,g=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,c,u,r);if(g){if(t&&ethis._visibleLines.getEndLineNumber())return null;const n=new li(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),o}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new dt.D4(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,o=!0;for(let s=t;s<=i;s++){const t=this._visibleLines.getVisibleLine(s);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth(null)):o=!1}return o&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=i;o<=n;o++){const i=this._visibleLines.getVisibleLine(o);if(i.needsMonospaceFontCheck()){const n=i.getWidth(null);n>t&&(t=n,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).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 t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),T.IJ&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)if(this._visibleLines.getVisibleLine(i).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){const t=Math.ceil(e);this._maxLineWidth0){let e=o[0].startLineNumber,t=o[0].endLineNumber;for(let i=1,n=o.length;ia){if(!d)return-1;u=c}else if(5===s||6===s)if(6===s&&r<=c&&h<=l)u=r;else{const e=c-Math.max(5*this._lineHeight,.2*a),t=h-a;u=Math.max(t,e)}else if(1===s||2===s)if(2===s&&r<=c&&h<=l)u=r;else{const e=(c+h)/2;u=Math.max(0,e-a/2)}else u=this._computeMinimumScrolling(r,l,c,h,3===s,4===s);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(144),n=t.left,o=n+t.width-i.verticalScrollbarWidth;let s=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)s=Math.min(s,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)s=Math.min(s,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}return e.minimalReveal||(s=Math.max(0,s-ui.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-s>t.width?null:{scrollLeft:this._computeMinimumScrolling(n,o,s,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,o,s){o=!!o,s=!!s;const r=(t|=0)-(e|=0);return(n|=0)-(i|=0)t?Math.max(0,n-r):e:i}}ui.HORIZONTAL_EXTRA_PX=30;var gi=i(74444),pi={};pi.styleTagTransform=x(),pi.setAttributes=w(),pi.insert=_().bind(null,"head"),pi.domAPI=f(),pi.insertStyleElement=C(),p()(gi.Z,pi),gi.Z&&gi.Z.locals&&gi.Z.locals;class mi extends $t{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(144);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,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.get(144);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.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){var t,i;const n=e.getDecorationsInViewport(),o=[];let s=0;for(let e=0,r=n.length;e',s=[];for(let e=t;e<=i;e++){const i=e-t,r=n[i].getDecorations();let a="";for(const e of r){let t='
    ';o[i]=r}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var bi=i(40563),wi={};wi.styleTagTransform=x(),wi.setAttributes=w(),wi.insert=_().bind(null,"head"),wi.domAPI=f(),wi.insertStyleElement=C(),p()(bi.Z,wi),bi.Z&&bi.Z.locals&&bi.Z.locals;var yi=i(93911);class Ci{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=Ci._clamp(e),this.g=Ci._clamp(t),this.b=Ci._clamp(i),this.a=Ci._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:0|e}}Ci.Empty=new Ci(0,0,0,0);class Si extends h.JT{static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,h.dk)(new Si)),this._INSTANCE}constructor(){super(),this._onDidChange=new c.Q5,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(et.RW.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}_updateColorMap(){const e=et.RW.getColorMap();if(!e)return this._colors=[Ci.Empty],void(this._backgroundIsLight=!0);this._colors=[Ci.Empty];for(let t=1;t=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}Si._INSTANCE=null;var xi=i(1118),ki=i(73910);const Li=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();var Ni=i(85427);class Di{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=Di.soften(e,.8),this.charDataLight=Di.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,o=e.length;ne.width||i+g>e.height)return void console.warn("bad render request outside image data");const p=d?this.charDataLight:this.charDataNormal,m=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,l),f=4*e.width,v=r.r,_=r.g,b=r.b,w=o.r-v,y=o.g-_,C=o.b-b,S=Math.max(s,a),x=e.data;let k=m*h*u,L=i*f+4*t;for(let e=0;ee.width||i+c>e.height)return void console.warn("bad render request outside image data");const h=4*e.width,u=o/255*.5,g=s.r,p=s.g,m=s.b,f=g+(n.r-g)*u,v=p+(n.g-p)*u,_=m+(n.b-m)*u,b=Math.max(o,r),w=e.data;let y=i*h+4*t;for(let e=0;e{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=Ii[e[i]]<<4|15&Ii[e[i+1]];return t},Mi={1:(0,Ei.M)((()=>Ti("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:(0,Ei.M)((()=>Ti("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class Ri{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=Mi[e]?new Di(Mi[e](),e):Ri.createFromSampleData(Ri.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 e of Li)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");const i=Ri._downsample(e,t);return new Di(i,t)}static _downsampleChar(e,t,i,n,o){const s=1*o,r=2*o;let a=n,l=0;for(let n=0;n0){const e=255/a;for(let t=0;tRi.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=Ai._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=Ai._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(ki.kVY);return i?new Ci(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(ki.Itd);return t?Ci._clamp(Math.round(255*t.rgba.a)):255}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.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class Pi{constructor(e,t,i,n,o,s,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=s,this.topPaddingLineCount=r,this.startLineNumber=a,this.endLineNumber=l}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,o,s,r,a,l,d,c){const h=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){let t=a*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(t+=Math.max(0,o-e.lineHeight-e.paddingBottom));const i=Math.max(1,Math.floor(o*o/t)),n=Math.max(0,e.minimapHeight-i),s=n/(d-o),c=l*s,h=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),g=Math.floor(e.paddingTop/e.lineHeight);return new Pi(l,d,h,s,c,i,g,1,Math.min(r,u))}let m;if(s&&i!==r){const e=i-t+1;m=Math.floor(e*u/h)}else{const e=o/p;m=Math.floor(e*u/h)}const f=Math.floor(e.paddingTop/p);let v,_=Math.floor(e.paddingBottom/p);if(e.scrollBeyondLastLine){const e=o/p;_=Math.max(_,e-1)}v=_>0?(f+r+_-o/p-1)*u/h:Math.max(0,(f+r)*u/h-m),v=Math.min(e.minimapHeight-m,v);const b=v/(d-o),w=l*b;if(g>=f+r+_)return new Pi(l,d,v>0,b,w,m,f,1,r);{let i,o;i=t>1?t+f:Math.max(1,l/p);let s=Math.max(1,Math.floor(i-w*h/u));sl&&(s=Math.min(s,c.startLineNumber),o=Math.max(o,c.topPaddingLineCount)),c.scrollTop=e.paddingTop?(t-s+o+v)*u/h:l/e.paddingTop*(o+v)*u/h,new Pi(l,d,!0,b,_,m,o,s,a)}}}class Oi{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}Oi.INVALID=new Oi(-1);class Fi{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new pt((()=>Oi.INVALID)),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,i=t.length;e1){for(let t=0,i=n-1;t0&&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 o=this.minimapLines.length-1;o>=0&&!(this.minimapLines[o]=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=Boolean(this._samplingState),[t,i]=Wi.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}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 o=0,s=t-e+1;o{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(0===e.button&&this._lastRenderData){const t=l.i(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e,i,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderPointerMoveMonitor=new yi.C,this._sliderPointerDownListener=l.mu(this._slider.domNode,l.tw.POINTER_DOWN,(e=>{e.preventDefault(),e.stopPropagation(),0===e.button&&this._lastRenderData&&this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)})),this._gestureDisposable=Ce.o.addTarget(this._domNode.domNode),this._sliderTouchStartListener=l.nm(this._domNode.domNode,Ce.t.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=l.nm(this._domNode.domNode,Ce.t.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=l.mu(this._domNode.domNode,Ce.t.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.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 o=(e,o)=>{const s=l.i(this._domNode.domNode),r=Math.min(Math.abs(o-n),Math.abs(o-s.left),Math.abs(o-s.left-s.width));if(T.ED&&r>140)return void this._model.setScrollTop(i.scrollTop);const a=e-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(a))};e.pageY!==t&&o(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>o(e.pageY,e.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"always"===this._model.options.showSlider?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),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 Bi(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)}onLinesDeleted(e,t){var i;return null===(i=this._lastRenderData)||void 0===i||i.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var i;return null===(i=this._lastRenderData)||void 0===i||i.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(ki.ov3),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=Pi.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(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(re.e.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort(((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0)));const{canvasInnerWidth:n,canvasInnerHeight:o}=this._model.options,s=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,o);const d=new zi(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,d,e,s),this._renderDecorationsLineHighlights(l,i,d,e,s);const c=new zi(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,c,e,s,a,r,n),this._renderDecorationsHighlights(l,i,c,e,s,a,r,n)}}_renderSelectionLineHighlights(e,t,i,n,o){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let s=0,r=0;for(const a of t){const t=n.intersectWithViewport(a);if(!t)continue;const[l,d]=t;for(let e=l;e<=d;e++)i.set(e,!0);const c=n.getYForLineNumber(l,o),h=n.getYForLineNumber(d,o);r>=c||(r>s&&e.fillRect(W.y0,s,e.canvas.width,r-s),s=c),r=h}r>s&&e.fillRect(W.y0,s,e.canvas.width,r-s)}_renderDecorationsLineHighlights(e,t,i,n,o){const s=new Map;for(let r=t.length-1;r>=0;r--){const a=t[r],l=a.options.minimap;if(!l||l.position!==jt.F5.Inline)continue;const d=n.intersectWithViewport(a.range);if(!d)continue;const[c,h]=d,u=l.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=s.get(u.toString());g||(g=u.transparent(.5).toString(),s.set(u.toString(),g)),e.fillStyle=g;for(let t=c;t<=h;t++){if(i.has(t))continue;i.set(t,!0);const s=n.getYForLineNumber(c,o);e.fillRect(W.y0,s,e.canvas.width,o)}}}_renderSelectionsHighlights(e,t,i,n,o,s,r,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=n.intersectWithViewport(l);if(!t)continue;const[d,c]=t;for(let t=d;t<=c;t++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,t,o,o,s,r,a)}}_renderDecorationsHighlights(e,t,i,n,o,s,r,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const d=n.intersectWithViewport(l.range);if(!d)continue;const[c,h]=d,u=t.getColor(this._theme.value);if(u&&!u.isTransparent())for(let d=c;d<=h;d++)switch(t.position){case jt.F5.Inline:this.renderDecorationOnLine(e,i,l.range,u,n,d,o,o,s,r,a);continue;case jt.F5.Gutter:{const t=n.getYForLineNumber(d,o),i=2;this.renderDecoration(e,u,i,t,2,o);continue}}}}renderDecorationOnLine(e,t,i,n,o,s,r,a,l,d,c){const h=o.getYForLineNumber(s,a);if(h+r<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:u,endLineNumber:g}=i,p=u===s?i.startColumn:1,m=g===s?i.endColumn:this._model.getLineMaxColumn(s),f=this.getXOffsetForPosition(t,s,p,l,d,c),v=this.getXOffsetForPosition(t,s,m,l,d,c);this.renderDecoration(e,n,f,h,v-f,r)}getXOffsetForPosition(e,t,i,n,o,s){if(1===i)return W.y0;if((i-1)*o>=s)return s;let r=e.get(t);if(!r){const i=this._model.getLineContent(t);r=[W.y0];let a=W.y0;for(let e=1;e=s){r[e]=s;break}r[e]=l,a=l}e.set(t,r)}return i-1b?Math.floor((n-b)/2):0,y=h.a/255,C=new Ci(Math.round((h.r-c.r)*y+c.r),Math.round((h.g-c.g)*y+c.g),Math.round((h.b-c.b)*y+c.b),255);let S=e.topPaddingLineCount*n;const x=[];for(let e=0,s=i-t+1;e=0&&nv)return;const r=m.charCodeAt(w);if(9===r){const e=h-(w+y)%h;y+=e-1,b+=e*s}else if(32===r)b+=s;else{const h=We.K7(r)?2:1;for(let u=0;uv)return}}}}}class zi{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;ethis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}var ji=i(59822),Ui={};Ui.styleTagTransform=x(),Ui.setAttributes=w(),Ui.insert=_().bind(null,"head"),Ui.domAPI=f(),Ui.insertStyleElement=C(),p()(ji.Z,Ui),ji.Z&&ji.Z.locals&&ji.Z.locals;class qi extends te{constructor(e,t){super(e),this._viewDomNode=t;const i=this._context.configuration.options.get(144);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=(0,Y.X)(document.createElement("div")),ie.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=(0,Y.X)(document.createElement("div")),ie.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(144);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=(0,Y.X)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),e.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference===t?(this._updateMaxMinWidth(),!1):(i.preference=t,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var e,t;let i=0;const n=Object.keys(this._widgets);for(let o=0,s=n.length;o=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,s=e+t;return[[0,e,s,e,e+t+o,e,s,e],[0,t,o,t+o,i,t+o+i,o+i,t+o+i]]}if(2===i){const t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}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.cursorColor===e.cursorColor&&this.themeType===e.themeType&&tt.Il.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 $i extends te{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=(0,Y.X)(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=et.RW.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[new se.L(1,1)]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new Ki(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t)||(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()}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;te.lineNumber===t.lineNumber))||(this._actualShouldRender=2),1===this._actualShouldRender)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const i=this._settings.canvasWidth,n=this._settings.canvasHeight,o=this._settings.lineHeight,s=this._context.viewLayout,r=n/this._context.viewLayout.getScrollHeight(),a=6*this._settings.pixelRatio|0,l=a/2|0,d=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(d.fillStyle=tt.Il.Format.CSS.formatHexA(e),d.fillRect(0,0,i,n)):(d.clearRect(0,0,i,n),d.fillStyle=tt.Il.Format.CSS.formatHexA(e),d.fillRect(0,0,i,n)):d.clearRect(0,0,i,n);const c=this._settings.x,h=this._settings.w;for(const e of t){const t=e.color,i=e.data;d.fillStyle=t;let u=0,g=0,p=0;for(let e=0,t=i.length/3;en&&(e=n-l),v=e-l,_=e+l}v>p+1||t!==u?(0!==e&&d.fillRect(c[u],g,h[u],p-g),u=t,g=v,p=_):_>p&&(p=_)}d.fillRect(c[u],g,h[u],p-g)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,t=e/2|0,i=this._settings.x[7],o=this._settings.w[7];d.fillStyle=this._settings.cursorColor;let a=-100,l=-100;for(let c=0,h=this._cursorPositions.length;cn&&(u=n-t);const g=u-t,p=g+e;g>l+1?(0!==c&&d.fillRect(i,a,o,l-a),a=g,l=p):p>l&&(l=p)}d.fillRect(i,a,o,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,n),d.stroke(),d.moveTo(0,0),d.lineTo(i,0),d.stroke())}}var Gi=i(30665);class Zi extends ee{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=(0,Y.X)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new Gi.Tj((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(67)),this._zoneManager.setPixelRatio(i.get(142)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(67)&&(this._zoneManager.setLineHeight(t.get(67)),this._render()),e.hasChanged(142)&&(this._zoneManager.setPixelRatio(t.get(142)),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(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(o,i,n,e),!0}_renderOneLane(e,t,i,n){let o=0,s=0,r=0;for(const a of t){const t=a.colorId,l=a.from,d=a.to;t!==o?(e.fillRect(0,s,n,r-s),o=t,e.fillStyle=i[o],s=l,r=d):r>=l?r=Math.max(r,d):(e.fillRect(0,s,n,r-s),s=l,r=d)}e.fillRect(0,s,n,r-s)}}var Qi=i(29443),Yi={};Yi.styleTagTransform=x(),Yi.setAttributes=w(),Yi.insert=_().bind(null,"head"),Yi.domAPI=f(),Yi.insertStyleElement=C(),p()(Qi.Z,Yi),Qi.Z&&Qi.Z.locals&&Qi.Z.locals;class Ji extends te{constructor(e){super(e),this.domNode=(0,Y.X)(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(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).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 e=(0,Y.X)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(144);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(103);return this._useShadows=t.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":"")}}var nn=i(52595),on={};on.styleTagTransform=x(),on.setAttributes=w(),on.insert=_().bind(null,"head"),on.domAPI=f(),on.insertStyleElement=C(),p()(nn.Z,on),nn.Z&&nn.Z.locals&&nn.Z.locals;class sn{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class rn{constructor(e,t){this.lineNumber=e,this.ranges=t}}function an(e){return new sn(e)}function ln(e){return new rn(e.lineNumber,e.ranges.map(an))}class dn extends je{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(67),this._roundedSelection=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).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._lineHeight=t.get(67),this._roundedSelection=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).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 o=null,s=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!o&&e=0;e--)i[e].lineNumber===r&&(s=i[e].ranges[0]);o&&!o.startStyle&&(o=null),s&&!s.startStyle&&(s=null)}for(let e=0,i=t.length;e0){const i=t[e-1].ranges[0].left,o=t[e-1].ranges[0].left+t[e-1].ranges[0].width;cn(a-i)i&&(d.top=1),cn(l-o)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,s=this._lineHeight.toString(),r=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let d=0,c=n.length;d1,r)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function cn(e){return e<0?-e:e}dn.SELECTION_CLASS_NAME="selected-text",dn.SELECTION_TOP_LEFT="top-left-radius",dn.SELECTION_BOTTOM_LEFT="bottom-left-radius",dn.SELECTION_TOP_RIGHT="top-right-radius",dn.SELECTION_BOTTOM_RIGHT="bottom-right-radius",dn.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",dn.ROUNDED_PIECE_WIDTH=10,(0,Ue.Ic)(((e,t)=>{const i=e.getColor(ki.yb5);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)}));var hn=i(4057),un={};un.styleTagTransform=x(),un.setAttributes=w(),un.insert=_().bind(null,"head"),un.domAPI=f(),un.insertStyleElement=C(),p()(hn.Z,un),hn.Z&&hn.Z.locals&&hn.Z.locals;class gn{constructor(e,t,i,n,o,s,r){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=o,this.textContent=s,this.textContentClassName=r}}class pn{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(50);this._cursorStyle=t.get(28),this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,Y.X)(document.createElement("div")),this._domNode.setClassName(`cursor ${Xe}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,N.N)(this._domNode,i),this._domNode.setDisplay("none"),this._position=new se.L(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}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(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),(0,N.N)(this._domNode,i),!0}onCursorPositionChanged(e,t){return this._domNode.domNode.style.transitionProperty=t?"none":"",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,o]=We.J_(i,t-1);return[new se.L(e,n+1),i.substring(n,o)]}_prepareRender(e){let t="",i="";const[n,o]=this._getGraphemeAwarePosition();if(this._cursorStyle===W.d2.Line||this._cursorStyle===W.d2.LineThin){const s=e.visibleRangeForPosition(n);if(!s||s.outsideRenderedLine)return null;const r=l.Jj(this._domNode.domNode);let a;this._cursorStyle===W.d2.Line?(a=l.Uh(r,this._lineCursorWidth>0?this._lineCursorWidth:2),a>2&&(t=o,i=this._getTokenClassName(n))):a=l.Uh(r,1);let d=s.left,c=0;a>=2&&d>=1&&(c=1,d-=c);const h=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta;return new gn(h,d,c,a,this._lineHeight,t,i)}const s=e.linesVisibleRangesForRange(new re.e(n.lineNumber,n.column,n.lineNumber,n.column+o.length),!1);if(!s||0===s.length)return null;const r=s[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const a=r.ranges[0],d="\t"===o||a.width<1?this._typicalHalfwidthCharacterWidth:a.width;this._cursorStyle===W.d2.Block&&(t=o,i=this._getTokenClassName(n));let c=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,h=this._lineHeight;return this._cursorStyle!==W.d2.Underline&&this._cursorStyle!==W.d2.UnderlineThin||(c+=this._lineHeight-2,h=2),new gn(c,a.left,0,d,h,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 ${Xe} ${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)}}class mn extends te{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(91),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new pn(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,Y.X)(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 si._F,this._cursorFlatBlinkInterval=new l.ne,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(91),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;tt.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let i=0,n=e.ranges.length;i{this._isVisible?this._hide():this._show()}),mn.BLINK_INTERVAL,(0,l.Jj)(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),mn.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case W.d2.Line:e+=" cursor-line-style";break;case W.d2.Block:e+=" cursor-block-style";break;case W.d2.Underline:e+=" cursor-underline-style";break;case W.d2.LineThin:e+=" cursor-line-thin-style";break;case W.d2.BlockOutline:e+=" cursor-block-outline-style";break;case W.d2.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;default:e+=" cursor-solid"}else e+=" cursor-solid";return"on"!==this._cursorSmoothCaretAnimation&&"explicit"!==this._cursorSmoothCaretAnimation||(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=e.getColor(qe.n0);if(i){let n=e.getColor(qe.fY);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),(0,Rt.c3)(e.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}}));const fn=()=>{throw new Error("Invalid change accessor")};class vn extends te{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(144);this._lineHeight=t.get(67),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,Y.X)(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=(0,Y.X)(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 i of e)t.set(i.id,i);let i=!1;return this._context.viewModel.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let o=0,s=n.length;o{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{return e(t)}catch(e){(0,d.dL)(e)}}(e,n),n.addZone=fn,n.removeZone=fn,n.layoutZone=fn})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,Y.X)(t.domNode),marginDomNode:t.marginDomNode?(0,Y.X)(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.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.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),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){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,d.dL)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,d.dL)(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);const o=Object.keys(this._zones);for(let t=0,n=o.length;tt)continue;const e=i.startLineNumber===t?i.startColumn:n.minColumn,o=i.endLineNumber===t?i.endColumn:n.maxColumn;e=S.endOffset&&(C++,S=i&&i[C]),9!==o&&32!==o)continue;if(h&&!w&&n<=_)continue;if(c&&n>=y&&n<=_&&32===o){const e=n-1>=0?r.charCodeAt(n-1):0,t=n+1=0?r.charCodeAt(n-1):0;if(32===o&&32!==e&&9!==e)continue}if(i&&(!S||S.startOffset>n||S.endOffset<=n))continue;const d=e.visibleRangeForPosition(new se.L(t,n+1));d&&(s?(x=Math.max(x,d.left),b+=9===o?this._renderArrow(u,m,d.left):``):b+=9===o?`
    ${v?String.fromCharCode(65515):String.fromCharCode(8594)}
    `:`
    ${String.fromCharCode(f)}
    `)}return s?(x=Math.round(x+m),``+b+""):b}_renderArrow(e,t,i){const n=e/2,o=i,s={x:0,y:t/7/2},r={x:.8*t,y:s.y},a={x:r.x-.2*r.x,y:r.y+.2*r.x},l={x:a.x+.1*r.x,y:a.y+.1*r.x},d={x:l.x+.35*r.x,y:l.y-.35*r.x};return``}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Cn{constructor(e){const t=e.options,i=t.get(50),n=t.get(38);"off"===n?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===n?(this.renderWhitespace=t.get(99),this.renderWithSVG=!0):(this.renderWhitespace=t.get(99),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(67),this.stopRenderingLineAfter=t.get(117)}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 Sn{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new re.e(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 xn{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 kn{constructor(e,t,i){this.configuration=e,this.theme=new xn(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}let Ln=class extends ee{constructor(e,t,i,n,o,s,r){super(),this._instantiationService=r,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new ke.Y(1,1,1,1)],this._renderAnimationFrame=null;const a=new ht(t,n,o,e);this._context=new kn(t,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(lt,this._context,a,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,Y.X)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,Y.X)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,Y.X)(document.createElement("div")),ie.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new Ht(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new ui(this._context,this._linesContent),this._viewZones=new vn(this._context),this._viewParts.push(this._viewZones);const l=new $i(this._context);this._viewParts.push(l);const d=new tn(this._context);this._viewParts.push(d);const c=new bt(this._context);this._viewParts.push(c),c.addDynamicOverlay(new Pt(this._context)),c.addDynamicOverlay(new dn(this._context)),c.addDynamicOverlay(new ni(this._context)),c.addDynamicOverlay(new Wt(this._context)),c.addDynamicOverlay(new yn(this._context));const h=new wt(this._context);this._viewParts.push(h),h.addDynamicOverlay(new Ot(this._context)),h.addDynamicOverlay(new _i(this._context)),h.addDynamicOverlay(new mi(this._context)),h.addDynamicOverlay(new Ke(this._context)),this._glyphMarginWidgets=new Gt(this._context),this._viewParts.push(this._glyphMarginWidgets);const u=new Ze(this._context);u.getDomNode().appendChild(this._viewZones.marginDomNode),u.getDomNode().appendChild(h.getDomNode()),u.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(u),this._contentWidgets=new kt(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new mn(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new qi(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);const g=new Ji(this._context);this._viewParts.push(g);const p=new xt(this._context);this._viewParts.push(p);const m=new Hi(this._context);if(this._viewParts.push(m),l){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(l.getDomNode(),e.insertBefore)}this._linesContent.appendChild(c.getDomNode()),this._linesContent.appendChild(g.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(u.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(d.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(m.getDomNode()),this._overflowGuardContainer.appendChild(p.domNode),this.domNode.appendChild(this._overflowGuardContainer),s?(s.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),s.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new Pe(this._context,a,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){const e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes;let i=[],n=0;i=i.concat(e.getAllMarginDecorations().map((e=>{var t,i,o;const s=null!==(i=null===(t=e.options.glyphMargin)||void 0===t?void 0:t.position)&&void 0!==i?i:jt.U.Center;return n=Math.max(n,e.range.endLineNumber),{range:e.range,lane:s,persist:null===(o=e.options.glyphMargin)||void 0===o?void 0:o.persistLane}}))),i=i.concat(this._glyphMarginWidgets.getWidgets().map((t=>{const i=e.validateRange(t.preference.range);return n=Math.max(n,i.endLineNumber),{range:i,lane:t.preference.lane}}))),i.sort(((e,t)=>re.e.compareRangesUsingStarts(e.range,t.range))),t.reset(n);for(const e of i)t.push(e.lane,e.range,e.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new he(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(),this._viewLines.visibleRangeForPosition(new se.L(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const e=this._context.configuration.options.get(144);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(141)+" "+(0,Ue.m6)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),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(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new d.he;if(null===this._renderAnimationFrame){const e=this._createCoordinatedRendering();this._renderAnimationFrame=Dn.INSTANCE.scheduleCoordinatedRendering({window:l.Jj(this.domNode.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new d.he;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new d.he;return e.renderText()},prepareRender:(t,i)=>{if(this._store.isDisposed)throw new d.he;return e.prepareRender(t,i)},render:(t,i)=>{if(this._store.isDisposed)throw new d.he;return e.render(t,i)}})}}_flushAccumulatedAndRenderNow(){const e=this._createCoordinatedRendering();Nn((()=>e.prepareRenderText()));const t=Nn((()=>e.renderText()));if(t){const[i,n]=t;Nn((()=>e.prepareRender(i,n))),Nn((()=>e.render(i,n)))}}_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 e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}J.B.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return null;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new Sn(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new dt.xh(this._context.viewLayout,i,this._viewLines)]},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 o=this._viewLines.visibleRangeForPosition(new se.L(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?yt.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new Zi(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,i,n,o,s,r,a,l;this._contentWidgets.setWidgetPosition(e.widget,null!==(i=null===(t=e.position)||void 0===t?void 0:t.position)&&void 0!==i?i:null,null!==(o=null===(n=e.position)||void 0===n?void 0:n.secondaryPosition)&&void 0!==o?o:null,null!==(r=null===(s=e.position)||void 0===s?void 0:s.preference)&&void 0!==r?r:null,null!==(l=null===(a=e.position)||void 0===a?void 0:a.positionAffinity)&&void 0!==l?l:null),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){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&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()}};function Nn(e){try{return e()}catch(e){return(0,d.dL)(e),null}}Ln=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(6,ot.TG)],Ln);class Dn{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(-1!==t&&(this._coordinatedRenderings.splice(t,1),0===this._coordinatedRenderings.length)){for(const[e,t]of this._animationFrameRunners)t.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){const t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,l.lI(e,t,100))}}_onRenderScheduled(){const e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const t of e)Nn((()=>t.prepareRenderText()));const t=[];for(let i=0,n=e.length;in.renderText()))}for(let i=0,n=e.length;in.prepareRender(s,r)))}for(let i=0,n=e.length;in.render(s,r)))}}}Dn.INSTANCE=new Dn;var En=i(35146);class In{constructor(e,t,i,n,o){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=o}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 i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=0===e?t:this.breakOffsets[e-1]+t;if(null!==this.injectionOffsets)for(let e=0;ethis.injectionOffsets[e];e++)i0?this.breakOffsets[o-1]:0,0===t)if(e<=s)n=o-1;else{if(!(e>r))break;i=o+1}else if(e=r))break;i=o+1}}let r=e-s;return o>0&&(r+=this.wrappedTextIndentLength),new Rn(o,r)}normalizeOutputPosition(e,t,i){if(null!==this.injectionOffsets){const n=this.outputPositionToOffsetInInputWithInjections(e,t),o=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(o!==n)return this.offsetInInputWithInjectionsToOutputPosition(o,i)}if(0===i){if(e>0&&t===this.getMinOutputOffset(e))return new Rn(e-1,this.getMaxOutputOffset(e-1))}else if(1===i&&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(2===t){if(e===i.offsetInInputWithInjections+i.length&&Tn(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(Mn(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!Tn(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!Mn(this.injectionOptions[t].cursorStops));)t--;return e}}if(1===t||4===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;for(;t+1=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t];)e-=this.injectionOptions[t-1].content.length,t--;return e}(0,En.vE)(t)}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(null!==t){let n=0;for(let o=0;oe)break;if(e<=a)return{injectedTextIndex:o,offsetInInputWithInjections:r,length:s};n+=s}}}}function Tn(e){return null==e||e===jt.RM.Right||e===jt.RM.Both}function Mn(e){return null==e||e===jt.RM.Left||e===jt.RM.Both}class Rn{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new se.L(e+this.outputLineIndex,this.outputOffset+1)}}var An=i(14706);const Pn=(0,ut.Z)("domLineBreaksComputer",{createHTML:e=>e});class On{static create(e){return new On(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,i,n,o){const s=[],r=[];return{addRequest:(e,t,i)=>{s.push(e),r.push(t)},finalize:()=>function(e,t,i,n,o,s,r,a){var l;function d(e){const i=a[e];if(i){const n=An.gk.applyInjectedText(t[e],i),o=i.map((e=>e.options)),s=i.map((e=>e.column-1));return new In(s,o,[n.length],[],0)}return null}if(-1===o){const e=[];for(let i=0,n=t.length;ic?(r=0,l=0):d=c-e}const h=o.substr(r),u=Fn(h,l,n,d,m,g);f[e]=r,v[e]=l,_[e]=h,b[e]=u[0],w[e]=u[1]}const y=m.build(),C=null!==(l=null==Pn?void 0:Pn.createHTML(y))&&void 0!==l?l:y;p.innerHTML=C,p.style.position="absolute",p.style.top="10000","keepAll"===r?(p.style.wordBreak="keep-all",p.style.overflowWrap="anywhere"):(p.style.wordBreak="inherit",p.style.overflowWrap="break-word"),e.document.body.appendChild(p);const S=document.createRange(),x=Array.prototype.slice.call(p.children,0),k=[];for(let e=0;ee.options)),l=c.map((e=>e.column-1))):(r=null,l=null),k[e]=new In(l,r,t,s,n)}return e.document.body.removeChild(p),k}((0,ei.cW)(this.targetWindow.deref()),s,e,t,i,n,o,r)}}}function Fn(e,t,i,n,o,s){if(0!==s){const e=String(s);o.appendString('
    ');const r=e.length;let a=t,l=0;const d=[],c=[];let h=0");for(let t=0;t"),d[t]=l,c[t]=a;const n=h;h=t+1"),d[e.length]=l,c[e.length]=a,o.appendString("
    "),[d,c]}function Bn(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),s=[];try{Wn(e,o,n,0,null,i.length-1,null,s)}catch(e){return console.log(e),null}return 0===s.length?null:(s.push(i.length),s)}function Wn(e,t,i,n,o,s,r,a){if(n===s)return;if(o=o||Hn(e,t,i[n],i[n+1]),r=r||Hn(e,t,i[s],i[s+1]),Math.abs(o[0].top-r[0].top)<=.1)return;if(n+1===s)return void a.push(s);const l=n+(s-n)/2|0,d=Hn(e,t,i[l],i[l+1]);Wn(e,t,i,n,o,l,d,a),Wn(e,t,i,l,d,s,r,a)}function Hn(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}class Vn extends h.JT{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new h.b2),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 e of t)this._pending.has(e.id)?(0,d.dL)(new Error(`Cannot have two contributions with the same id ${e.id}`)):this._pending.set(e.id,e);this._instantiateSome(0),this._register((0,l.se)((0,l.Jj)(this._editor.getDomNode()),(()=>{this._instantiateSome(1)}))),this._register((0,l.se)((0,l.Jj)(this._editor.getDomNode()),(()=>{this._instantiateSome(2)}))),this._register((0,l.se)((0,l.Jj)(this._editor.getDomNode()),(()=>{this._instantiateSome(3)}),5e3))}saveViewState(){const e={};for(const[t,i]of this._instances)"function"==typeof i.saveViewState&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(const[t,i]of this._instances)"function"==typeof i.restoreViewState&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){var e;return(0,l.se)((0,l.Jj)(null===(e=this._editor)||void 0===e?void 0:e.getDomNode()),(()=>{this._instantiateSome(1)}),50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const e of t)this._instantiateById(e.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 e=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,e),"function"==typeof e.restoreViewState&&0!==t.instantiation&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(e){(0,d.dL)(e)}}}}var zn=i(92896),jn=i(30653),Un=i(96518),qn=i(29102),Kn=i(51381),$n=i(13961),Gn=i(71922),Zn=i(44906);class Qn{static create(e){return new Qn(e.get(133),e.get(132))}constructor(e,t){this.classifier=new Yn(e,t)}createLineBreaksComputer(e,t,i,n,o){const s=[],r=[],a=[];return{addRequest:(e,t,i)=>{s.push(e),r.push(t),a.push(i)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,d=[];for(let e=0,c=s.length;e=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 Jn=[],Xn=[];function eo(e,t,i,n,o,s,r,a){if(-1===o)return null;const l=i.length;if(l<=1)return null;const d="keepAll"===a,c=t.breakOffsets,h=t.breakOffsetsVisibleColumn,u=so(i,n,o,s,r),g=o-u,p=Jn,m=Xn;let f=0,v=0,_=0,b=o;const w=c.length;let y=0;if(y>=0){let e=Math.abs(h[y]-b);for(;y+1=e)break;e=t,y++}}for(;yt&&(t=v,o=_);let r=0,a=0,u=0,C=0;if(o<=b){let _=o,w=0===t?0:i.charCodeAt(t-1),y=0===t?0:e.get(w),S=!0;for(let o=t;ov&&oo(0,y,l,c,d)&&(r=t,a=_),_+=h,_>b){t>v?(u=t,C=_-h):(u=o+1,C=_),_-a>g&&(r=0),S=!1;break}w=l,y=c}if(S){f>0&&(p[f]=c[c.length-1],m[f]=h[c.length-1],f++);break}}if(0===r){let l=o,c=i.charCodeAt(t),h=e.get(c),p=!1;for(let n=t-1;n>=v;n--){const t=n+1,o=i.charCodeAt(n);if(9===o){p=!0;break}let m,f;if(We.YK(o)?(n--,m=0,f=2):(m=e.get(o),f=We.K7(o)?s:1),l<=b){if(0===u&&(u=t,C=l),l<=b-g)break;if(oo(0,m,c,h,d)){r=t,a=l;break}}l-=f,c=o,h=m}if(0!==r){const e=g-(C-a);if(e<=n){const t=i.charCodeAt(u);let o;o=We.ZG(t)?2:io(t,C,n,s),e-o<0&&(r=0)}}if(p){y--;continue}}if(0===r&&(r=u,a=C),r<=v){const e=i.charCodeAt(v);We.ZG(e)?(r=v+2,a=_+2):(r=v+1,a=_+io(e,_,n,s))}for(v=r,p[f]=r,_=a,m[f]=a,f++,b=a+g;y<0||y=S)break;S=e,y++}}return 0===f?null:(p.length=f,m.length=f,Jn=t.breakOffsets,Xn=t.breakOffsetsVisibleColumn,t.breakOffsets=p,t.breakOffsetsVisibleColumn=m,t.wrappedTextIndentLength=u,t)}function to(e,t,i,n,o,s,r,a){const l=An.gk.applyInjectedText(t,i);let d,c;if(i&&i.length>0?(d=i.map((e=>e.options)),c=i.map((e=>e.column-1))):(d=null,c=null),-1===o)return d?new In(c,d,[l.length],[],0):null;const h=l.length;if(h<=1)return d?new In(c,d,[l.length],[],0):null;const u="keepAll"===a,g=so(l,n,o,s,r),p=o-g,m=[],f=[];let v=0,_=0,b=0,w=o,y=l.charCodeAt(0),C=e.get(y),S=io(y,0,n,s),x=1;We.ZG(y)&&(S+=1,y=l.charCodeAt(1),C=e.get(y),x++);for(let t=x;tw&&((0===_||S-b>p)&&(_=i,b=S-a),m[v]=_,f[v]=b,v++,w=b+p,_=0),y=o,C=r}return 0!==v||i&&0!==i.length?(m[v]=h,f[v]=S,new In(c,d,m,f,g)):null}function io(e,t,i,n){return 9===e?i-t%i:We.K7(e)||e<32?n:1}function no(e,t){return t-e%t}function oo(e,t,i,n,o){return 32!==i&&(2===t&&2!==n||1!==t&&1===n||!o&&3===t&&2!==n||!o&&3===n&&1!==t)}function so(e,t,i,n,o){let s=0;if(0!==o){const r=We.LC(e);if(-1!==r){for(let i=0;ii&&(s=0)}}return s}var ro=i(35534),ao=i(55343);class lo{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new ao.rS(new re.e(1,1,1,1),0,0,new se.L(1,1),0),new ao.rS(new re.e(1,1,1,1),0,0,new se.L(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 ao.Vi(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?ke.Y.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):ke.Y.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(),o=t.selectionStart.getEndPosition(),s=e.normalizePosition(i,2),r=this._validatePositionWithCache(e,n,i,s),a=this._validatePositionWithCache(e,o,n,r);return i.equals(s)&&n.equals(r)&&o.equals(a)?t:new ao.rS(re.e.fromPositions(r,a),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-r.column,s,t.leftoverVisibleColumns+i.column-s.column)}_setState(e,t,i){if(i&&(i=lo._validateViewState(e.viewModel,i)),t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),s=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new ao.rS(i,t.selectionStartKind,n,o,s)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new ao.rS(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,o,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new ao.rS(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new se.L(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new se.L(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new re.e(n.lineNumber,n.column,o.lineNumber,o.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new ao.rS(s,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class co{constructor(e){this.context=e,this.cursors=[new lo(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(0,ro.Ph)(this.cursors,(0,E.tT)((e=>e.viewState.position),se.L.compare)).viewState.position}getBottomMostViewPosition(){return(0,ro.jV)(this.cursors,(0,E.tT)((e=>e.viewState.position),se.L.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(ao.Vi.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){null!==e&&(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 e=t-i;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(1===this.cursors.length)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ie.selection),re.e.compareRangesUsingStarts));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class ho{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}var uo=i(29436),go=i(51336);class po{constructor(){this.type=0}}class mo{constructor(){this.type=1}}class fo{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class vo{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class _o{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 bo{constructor(){this.type=5}}class wo{constructor(e){this.type=6,this.isFocused=e}}class yo{constructor(){this.type=7}}class Co{constructor(){this.type=8}}class So{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class xo{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class ko{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class Lo{constructor(e,t,i,n,o,s,r){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=o,this.revealHorizontal=s,this.scrollType=r,this.type=12}}class No{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 Do{constructor(e){this.theme=e,this.type=14}}class Eo{constructor(e){this.type=15,this.ranges=e}}class Io{constructor(){this.type=16}}class To{constructor(){this.type=17}}class Mo extends h.JT{constructor(){super(),this._onEvent=this._register(new c.Q5),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 Ro{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class Ao{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 Ao(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class Po{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 Po(this.oldHasFocus,e.hasFocus)}}class Oo{constructor(e,t,i,n,o,s,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=o,this.scrollLeft=s,this.scrollHeight=r,this.scrollTop=a,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 Oo(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class Fo{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class Bo{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class Wo{constructor(e,t,i,n,o,s,r){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=o,this.reason=s,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n0){const e=this._cursors.getSelections();for(let t=0;ts&&(n=n.slice(0,s),o=!0);const r=Go.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n,o,s){const r=this._cursors.getViewPositions();let a=null,l=null;r.length>1?l=this._cursors.getViewSelections():a=re.e.fromPositions(r[0],r[0]),e.emitViewEvent(new Lo(t,i,a,l,n,o,s))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const t=ao.Vi.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,t)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,ao.Vi.fromModelSelections(t))}}}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,ao.Vi.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let o=0,s=e.length;o0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,o){const s=Go.from(this._model,this);if(s.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new vo(a,r,i)),!n||n.cursorState.length!==s.cursorState.length||s.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new Wo(a,r,l,s.modelVersionId,t||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const o=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const s=o[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(s);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-o[2].length-1,d=n.text.lastIndexOf(a,l-1);if(-1===d)return null;t.push([d,l])}return t}executeEdits(e,t,i,n){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);const s=[],r=[],a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(o)for(let t=0,i=o.length;t0&&this._pushAutoClosedAction(s,r)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const o=Go.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){(0,d.dL)(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return Zo.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new Jo(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit((()=>{"keyboard"===t&&this._executeEditOperation(go.u6.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i{this._executeEditOperation(go.u6.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,o))}),e,s);else if(0!==o){const t=this.getSelections().map((e=>{const t=e.getPosition();return new ke.Y(t.lineNumber,t.column+o,t.lineNumber,t.column+o)}));this.setSelections(e,s,t,0)}}paste(e,t,i,n,o){this._executeEdit((()=>{this._executeEditOperation(go.u6.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(uo.A.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new ao.Tp(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new ao.Tp(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}class Go{static from(e,t){return new Go(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class Qo{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(n,i);for(let e=0,t=n.trackedRanges.length;e0&&(s[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,s,(i=>{const n=[];for(let t=0;te.identifier.minor-t.identifier.minor,s=[];for(let i=0;i0?(n[i].sort(o),s[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new ke.Y(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new ke.Y(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):s[i]=e.selectionsBefore[i];return s}));r||(r=e.selectionsBefore);const a=[];for(const e in o)o.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)r.splice(e,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{re.e.isEmpty(e)&&""===s||n.push({identifier:{major:t,minor:o++},range:e,text:s,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let r=!1;const a={addEditOperation:s,addTrackedEditOperation:(e,t,i)=>{r=!0,s(e,t,i)},trackSelection:(t,i)=>{const n=ke.Y.liftSelection(t);let o;if(n.isEmpty())if("boolean"==typeof i)o=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);o=n.startColumn===t?2:3}else o=1;const s=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,o);return e.trackedRanges[s]=r,e.trackedRangesDirection[s]=n.getDirection(),s.toString()}};try{i.getEditOperations(e.model,a)}catch(e){return(0,d.dL)(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-re.e.compareRangesUsingEnds(e.range,t.range)));const t={};for(let i=1;io.identifier.major?n.identifier.major:o.identifier.major,t[s.toString()]=!0;for(let t=0;t0&&i--}}return t}}class Yo{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class Jo{static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new Yo(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=Jo._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const i=Jo._capture(e,t);if(!i)return null;if(this._original.length!==i.length)return null;const n=[];for(let e=0,t=this._original.length;e>>1;t===e[s].afterLineNumber?i{t=!0,e|=0,i|=0,n|=0,o|=0;const s=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new ns(s,e,i,n,o)),s},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}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 t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const e of i)n.add(e.id);const o=new Map;for(const e of t)o.set(e.id,e);const s=e=>{const t=[];for(const i of e)if(!n.has(i.id)){if(o.has(i.id)){const e=o.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=s(this._arr).concat(s(e));r.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=os.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)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[o+1].afterLineNumber>=e)return o;i=o+1|0}else n=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0,i+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0))+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){return this._checkPendingChanges(),e|=0,this._lineHeight*e+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0))+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tthis.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=this.getLinesTotalHeight()-this._paddingBottom)}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,o=t;for(;n=s+i)n=t+1;else{if(e>=s)return t;o=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(n);let s=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,d;-1===r?(r=a,d=s+1,l=0):(d=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let c=o,h=c;const u=5e5;let g=0;o>=u&&(g=Math.floor(o/u)*u,g=Math.floor(g/i)*i,h-=g);const p=[],m=e+(t-e)/2;let f=-1;for(let e=n;e<=s;e++){for(-1===f&&(c<=m&&mm)&&(f=e),c+=i,p[e-n]=h,h+=i;d===e;)h+=l,c+=l,r++,r>=a?d=s+1:(d=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(c>=t){s=e;break}}-1===f&&(f=s);const v=0|this.getVerticalOffsetForLineNumber(s);let _=n,b=s;return _t&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:s,relativeVerticalOffset:p,centeredLineNumber:f,completelyVisibleStartLineNumber:_,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t=o+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=o)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const o=[];for(let e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;o.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}os.INSTANCE_COUNT=0;class ss{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<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 rs extends h.JT{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new c.Q5),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new ss(0,0,0,0),this._scrollable=this._register(new ts.Rm({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 Ao(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 as extends h.JT{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(144),s=n.get(84);this._linesLayout=new os(t,n.get(67),s.top,s.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new rs(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new ss(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(114)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(67)&&this._linesLayout.setLineHeight(t.get(67)),e.hasChanged(84)){const e=t.get(84);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(144)){const e=t.get(144),i=e.contentWidth,n=e.height,o=this._scrollable.getScrollDimensions(),s=o.contentWidth;this._scrollable.setScrollDimensions(new ss(i,o.contentWidth,n,this._getContentHeight(i,n,s)))}else this._updateHeight();e.hasChanged(114)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(103);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return n.get(105)?o+=Math.max(0,t-n.get(67)-n.get(84).bottom):n.get(103).ignoreHorizontalScrollbarInContentHeight||(o+=this._getHorizontalScrollbarHeight(e,i)),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new ss(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new xi.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new xi.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,i=e.get(145),n=e.get(50),o=e.get(144);if(i.isViewportWrapping){const i=e.get(73);return t>o.contentWidth+n.typicalHalfwidthCharacterWidth&&i.enabled&&"right"===i.side?t+o.verticalScrollbarWidth:t}{const i=e.get(104)*n.typicalHalfwidthCharacterWidth,s=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+i+o.verticalScrollbarWidth,s,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 ss(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(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)}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){1===t?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})}}var ls=i(30168),ds=i(77378);function cs(e,t){return null===e?t?us.INSTANCE:gs.INSTANCE:new hs(e,t)}class hs{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,o=this._projectionData.breakOffsets[i];let s;if(null!==this._projectionData.injectionOffsets){const i=this._projectionData.injectionOffsets.map(((e,t)=>new An.gk(0,0,e+1,this._projectionData.injectionOptions[t],0)));s=An.gk.applyInjectedText(e.getLineContent(t),i).substring(n,o)}else s=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(s=ms(this._projectionData.wrappedTextIndentLength)+s),s}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){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,o,s,r){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,d=a.injectionOptions;let c,h=null;if(l){h=[];let e=0,t=0;for(let i=0;i0?a.breakOffsets[i-1]:0,s=a.breakOffsets[i];for(;ts)break;if(o0?a.wrappedTextIndentLength:0,r=t+Math.max(c-o,0),l=t+Math.min(h-o,s-o);r!==l&&n.push(new xi.Wx(r,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(h<=s))break;e+=r,t++}}}c=l?e.tokenization.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:d[t].content,tokenMetadata:ds.A.defaultTokenMetadata})))):e.tokenization.getLineTokens(t);for(let e=i;e0?n.wrappedTextIndentLength:0,s=i>0?n.breakOffsets[i-1]:0,r=n.breakOffsets[i],a=e.sliceAndInflate(s,r,o);let l=a.getLineContent();i>0&&(l=ms(n.wrappedTextIndentLength)+l);const d=this._projectionData.getMinOutputOffset(i)+1,c=l.length+1,h=i+1=ps.length)for(let t=1;t<=e;t++)ps[t]=fs(t);return ps[e]}function fs(e){return new Array(e+1).join(" ")}var vs=i(90310);class _s{constructor(e,t,i,n,o,s,r,a,l,d){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=o,this.tabSize=s,this.wrappingStrategy=r,this.wrappingColumn=a,this.wrappingIndent=l,this.wordBreak=d,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new ys(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),o=i.length,s=this.createLineBreaksComputer(),r=new E.H9(An.gk.fromDecorations(n));for(let e=0;et.lineNumber===e+1));s.addRequest(i[e],n,t?t[e]:null)}const a=s.finalize(),l=[],d=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(re.e.compareRangesUsingStarts);let c=1,h=0,u=-1,g=u+1=c&&t<=h,n=cs(a[e],!i);l[e]=n.getViewLineCount(),this.modelLineProjections[e]=n}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new vs.Ck(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=function(e){if(0===e.length)return[];const t=e.slice();t.sort(re.e.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,o=t[0].endLineNumber;for(let e=1,s=t.length;eo+1?(i.push(new re.e(n,1,o,1)),n=s.startLineNumber,o=s.endLineNumber):s.endLineNumber>o&&(o=s.endLineNumber)}return i.push(new re.e(n,1,o,1)),i}(e.map((e=>this.model.validateRange(e)))),i=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(re.e.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n({range:e,options:$n.qx.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,n);const o=t;let s=1,r=0,a=-1,l=a+1=s&&t<=r?this.modelLineProjections[e].isVisible()&&(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!1),i=!0):(d=!0,this.modelLineProjections[e].isVisible()||(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!0),i=!0)),i){const t=this.modelLineProjections[e].getViewLineCount();this.projectedModelLineLineCounts.setValue(e,t)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.modelLineProjections.length)&&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&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,o){const s=this.fontInfo.equals(e),r=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n,d=this.wordBreak===o;if(s&&r&&a&&l&&d)return!1;const c=s&&r&&!a&&l&&d;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=o;let h=null;if(c){h=[];for(let e=0,t=this.modelLineProjections.length;e2&&!this.modelLineProjections[t-2].isVisible(),s=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let r=0;const a=[],l=[];for(let e=0,t=n.length;er?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,d=l+r-1,u=d+1,g=u+(o-r)-1,a=!0):ot?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.guides.getActiveIndentGuide(n.lineNumber,o.lineNumber,s.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new bs(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 se.L(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 se.L(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),o=new Array;let s=this.getModelStartPositionOfViewLine(i),r=new Array;for(let e=i.modelLineNumber;e<=n.modelLineNumber;e++){const t=this.modelLineProjections[e-1];if(t.isVisible()){const o=e===i.modelLineNumber?i.modelLineWrappedLineIdx:0,s=e===n.modelLineNumber?n.modelLineWrappedLineIdx+1:t.getViewLineCount();for(let t=o;t{if(-1!==e.forWrappedLinesAfterColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesAfterColumn).lineNumber>=n.modelLineWrappedLineIdx)return;if(-1!==e.forWrappedLinesBeforeOrAtColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesBeforeOrAtColumn).lineNumbern.modelLineWrappedLineIdx)return}const i=this.convertModelPositionToViewPosition(n.modelLineNumber,e.horizontalLine.endColumn),o=this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.horizontalLine.endColumn);return o.lineNumber===n.modelLineWrappedLineIdx?new ii.UO(e.visibleColumn,t,e.className,new ii.vW(e.horizontalLine.top,i.column),-1,-1):o.lineNumber!!e)))}}return s}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 o=[];const s=[],r=[],a=i.lineNumber-1,l=n.lineNumber-1;let d=null;for(let e=a;e<=l;e++){const t=this.modelLineProjections[e];if(t.isVisible()){const n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),o=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=o-n+1;let c=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,o)&&(c=0===n?1:2),s.push(l),r.push(c),null===d&&(d=new se.L(e+1,0))}else null!==d&&(o=o.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,e)),d=null)}null!==d&&(o=o.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,n.lineNumber)),d=null);const c=t-e+1,h=new Array(c);let u=0;for(let e=0,t=o.length;et&&(h=!0,c=t-o+1),l.getViewLinesData(this.model,n+1,d,c,o-e,i,a),o+=c,h)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),o=n.index,s=n.remainder,r=this.modelLineProjections[o],a=r.getViewLineMinColumn(this.model,o+1,s),l=r.getViewLineMaxColumn(this.model,o+1,s);tl&&(t=l);const d=r.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new se.L(o+1,d)).equals(i)?new se.L(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 re.e(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 se.L(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new re.e(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,o=!1){const s=this.model.validatePosition(new se.L(e,t)),r=s.lineNumber,a=s.column;let l=r-1,d=!1;if(o)for(;l0&&!this.modelLineProjections[l].isVisible();)l--,d=!0;if(0===l&&!this.modelLineProjections[l].isVisible())return new se.L(n?0:1,1);const c=1+this.projectedModelLineLineCounts.getPrefixSum(l);let h;return h=d?o?this.modelLineProjections[l].getViewPositionOfModelPosition(c,1,i):this.modelLineProjections[l].getViewPositionOfModelPosition(c,this.model.getLineMaxColumn(l+1),i):this.modelLineProjections[r-1].getViewPositionOfModelPosition(c,a,i),h}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return re.e.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new re.e(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const e=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(0===i&&!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,o){const s=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),r=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(r.lineNumber-s.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new re.e(s.lineNumber,1,r.lineNumber,r.column),t,i,n,o);let a=[];const l=s.lineNumber-1,d=r.lineNumber-1;let c=null;for(let e=l;e<=d;e++)if(this.modelLineProjections[e].isVisible())null===c&&(c=new se.L(e+1,e===l?s.column:1));else if(null!==c){const o=this.model.getLineMaxColumn(e);a=a.concat(this.model.getDecorationsInRange(new re.e(c.lineNumber,c.column,e,o),t,i,n)),c=null}null!==c&&(a=a.concat(this.model.getDecorationsInRange(new re.e(c.lineNumber,c.column,r.lineNumber,r.column),t,i,n)),c=null),a.sort(((e,t)=>{const i=re.e.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));const h=[];let u=0,g=null;for(const e of a){const t=e.id;g!==t&&(g=t,h[u++]=e)}return h}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 0===t.modelLineWrappedLineIdx?this.model.getLineIndentColumn(t.modelLineNumber):0}}class bs{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class ws{constructor(e,t){this.modelRange=e,this.viewLines=t}}class ys{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 Cs{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new Ss(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new xo(t,i)}onModelLinesInserted(e,t,i,n){return new ko(t,i)}onModelLineChanged(e,t,i){return[!1,new So(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 e=0;et)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}const xs=jt.U.Right;class ks{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*xs/8))}reset(e){const t=Math.ceil((e+1)*xs/8);this.lanes.length>>3]|=1<>>3]&1<>>3]&1<this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStart=Ns.create(this.model),this.glyphLanes=new ks(0),this.model.isTooLargeForTokenization())this._lines=new Cs(this.model);else{const e=this._configuration.options,t=e.get(50),i=e.get(138),s=e.get(145),r=e.get(137),a=e.get(129);this._lines=new _s(this._editorId,this.model,n,o,t,this.model.getOptions().tabSize,i,s.wrappingColumn,r,a)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new $o(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new as(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._handleVisibleLinesChanged(),e.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new No(e)),this._eventDispatcher.emitOutgoingEvent(new Oo(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new ls.CU(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(Si.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new Io)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new Do(e))}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new re.e(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 wo(e)),this._eventDispatcher.emitOutgoingEvent(new Po(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new po)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new mo)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new se.L(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new Ts(t,this._viewportStart.startLineDelta)}return new Ts(null,0)}_onConfigurationChanged(e,t){const i=this._captureStableViewport(),n=this._configuration.options,o=n.get(50),s=n.get(138),r=n.get(145),a=n.get(137),l=n.get(129);this._lines.setWrappingSettings(o,s,r.wrappingColumn,a,l)&&(e.emitViewEvent(new bo),e.emitViewEvent(new Co),e.emitViewEvent(new _o(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(91)&&(this._decorations.reset(),e.emitViewEvent(new _o(null))),t.hasChanged(98)&&(this._decorations.reset(),e.emitViewEvent(new _o(null))),e.emitViewEvent(new fo(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),ao.LM.shouldRecreate(t)&&(this.cursorConfig=new ao.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const o=e instanceof An.fV?e.rawContentChangedEvent.changes:e.changes,s=e instanceof An.fV?e.rawContentChangedEvent.versionId:null,r=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(let t=0;t!e.ownerId||e.ownerId===this._editorId))),r.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(e.detail,t,null);break}}const a=r.finalize(),l=new E.H9(a);for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new bo),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(s,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=l.takeCount(e.detail.length),o=this._lines.onModelLinesInserted(s,e.fromLineNumber,e.toLineNumber,n);null!==o&&(t.emitViewEvent(o),this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),i=!0;break}case 2:{const i=l.dequeue(),[o,r,a,d]=this._lines.onModelLineChanged(s,e.lineNumber,i);n=o,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),d&&(t.emitViewEvent(d),this.viewLayout.onLinesDeleted(d.fromLineNumber,d.toLineNumber));break}}null!==s&&this._lines.acceptVersionId(s),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new Co),t.emitViewEvent(new _o(null)),this._cursor.onLineMappingChanged(t),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 e=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStart.startLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();e instanceof An.fV&&t.emitOutgoingEvent(new Uo(e.contentChangedEvent)),this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new yo),this.cursorConfig=new ao.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new jo(e))}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new ao.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new zo(e))}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new bo),e.emitViewEvent(new Co),e.emitViewEvent(new _o(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new ao.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new qo(e))}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new _o(e)),this._eventDispatcher.emitOutgoingEvent(new Vo(e))})))}setHiddenAreas(e,t){var i;this.hiddenAreasModel.setHiddenAreas(t,e);const n=this.hiddenAreasModel.getMergedRanges();if(n===this.previousHiddenAreas)return;this.previousHiddenAreas=n;const o=this._captureStableViewport();let s=!1;try{const e=this._eventDispatcher.beginEmitViewEvents();s=this._lines.setHiddenAreas(n),s&&(e.emitViewEvent(new bo),e.emitViewEvent(new Co),e.emitViewEvent(new _o(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const t=null===(i=o.viewportStartModelPosition)||void 0===i?void 0:i.lineNumber;t&&n.some((e=>e.startLineNumber<=t&&t<=e.endLineNumber))||o.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),s&&this._eventDispatcher.emitOutgoingEvent(new Bo)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(144),t=this._configuration.options.get(67),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),o=Math.max(1,n.completelyVisibleStartLineNumber-i),s=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new re.e(o,this.getLineMinColumn(o),s,this.getLineMaxColumn(s)))}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(0===i.length)return[t];const n=[];let o=0,s=t.startLineNumber,r=t.startColumn;const a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;ea||(st.toInlineDecoration(e)))]),new xi.wA(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,i,n,s.tokens,t,o,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new xi.ud(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,(0,W.$J)(this._configuration.options)),i=new Ds;for(const n of t){const t=n.options,o=t.overviewRuler;if(!o)continue;const s=o.position;if(0===s)continue;const r=o.getColor(e.value),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(r,t.zIndex,a,l,s)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;null==e||e.invalidateCachedColor();const i=t.options.minimap;null==i||i.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);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const o=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(o)}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(re.e.compareRangesUsingStarts);let o=!1,s=!1;for(const t of e)t.isEmpty()?o=!0:s=!0;if(!s){if(!t)return"";const i=e.map((e=>e.startLineNumber));let o="";for(let e=0;e0&&i[e-1]===i[e]||(o+=this.model.getLineContent(i[e])+n);return o}if(o&&t){const t=[];let n=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,i?2:0)),n=e}return 1===t.length?t[0]:t}const r=[];for(const t of e)t.isEmpty()||r.push(this.model.getValueInRange(t,i?2:0));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===Xo.bd)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new re.e(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(50),s=this._getColorMap();let r;return/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===W.hL.fontFamily?r=W.hL.fontFamily:(r=o.fontFamily,r=r.replace(/"/g,"'"),/[,']/.test(r)||/[+ ]/.test(r)&&(r=`'${r}'`),r=`${r}, ${W.hL.fontFamily}`),{mode:i,html:`
    `+this._getHTMLToCopy(n,s)+"
    "}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn,r=this.getTabSize();let a="";for(let e=i;e<=o;e++){const l=this.model.tokenization.getLineTokens(e),d=l.getLineContent(),c=e===i?n-1:0,h=e===o?s-1:d.length;a+=""===d?"
    ":(0,es.Fq)(d,l.inflate(),t,c,h,r,T.ED)}return a}_getColorMap(){const e=et.RW.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){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new Ho):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}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,o){this._executeCursorEdit((s=>this._cursor.compositionType(s,e,t,i,n,o)))}paste(e,t,i,n){this._executeCursorEdit((o=>this._cursor.paste(o,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)))}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 re.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new Lo(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new re.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new Lo(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,o){this._withViewEventsCollector((s=>s.emitViewEvent(new Lo(e,!1,i,null,n,t,o))))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new To),this._eventDispatcher.emitOutgoingEvent(new Fo))}_withViewEventsCollector(e){try{return e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class Ns{static create(e){const t=e._setTrackedRange(null,new re.e(1,1,1,1),1);return new Ns(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,o){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=o}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new se.L(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new re.e(i.lineNumber,i.column,i.lineNumber,i.column),1),o=e.viewLayout.getVerticalOffsetForLineNumber(t),s=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=s-o}invalidate(){this._isValid=!1}}class Ds{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,o){const s=this._asMap[e];if(s){const e=s.data,t=e[e.length-3],r=e[e.length-1];if(t===o&&r+1>=i)return void(n>r&&(e[e.length-1]=n));e.push(o,i,n)}else{const s=new xi.SQ(e,t,[o,i,n]);this._asMap[e]=s,this.asArray.push(s)}}}class Es{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const i=this.hiddenAreas.get(e);i&&Is(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(((e,t)=>function(e,t){const i=[];let n=0,o=0;for(;n{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(144)){const e=t.get(144);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=u,this._codeEditorService=s,this._commandService=r,this._themeService=h,this._register(new js(this,this._contextKeyService)),this._register(new Us(this,this._contextKeyService,m)),this._instantiationService=n.createChild(new Ps.y([As.i6,this._contextKeyService])),this._modelData=null,this._focusTracker=new qs(e,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={},_=Array.isArray(i.contributions)?i.contributions:o.Uc.getEditorContributions(),this._contributions.initialize(this,_,this._instantiationService);for(const e of o.Uc.getEditorActions()){if(this._actions.has(e.id)){(0,d.dL)(new Error(`Cannot have two actions with the same id ${e.id}`));continue}const t=new jn.p(e.id,e.label,e.alias,e.metadata,null!==(f=e.precondition)&&void 0!==f?f:void 0,(t=>this._instantiationService.invokeFunction((i=>Promise.resolve(e.runEditorCommand(i,this,t))))),this._contextKeyService);this._actions.set(t.id,t)}const b=()=>!this._configuration.options.get(91)&&this._configuration.options.get(36).enabled;this._register(new l.eg(this._domElement,{onDragOver:e=>{if(!b())return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);(null==t?void 0:t.position)&&this.showDropIndicatorAt(t.position)},onDrop:async e=>{if(!b())return;if(this.removeDropIndicator(),!e.dataTransfer)return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);(null==t?void 0:t.position)&&this._onDropIntoEditor.fire({position:t.position,event:e})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var t;null===(t=this._modelData)||void 0===t||t.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i){return new U(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Un.g.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),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?zn.w.getWordAtPosition(this._modelData.model,this._configuration.options.get(130),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){var t;const i=e;if(null===this._modelData&&null===i)return;if(this._modelData&&this._modelData.model===i)return;const n={oldModelUrl:(null===(t=this._modelData)||void 0===t?void 0:t.model.uri)||null,newModelUrl:(null==i?void 0:i.uri)||null};this._onWillChangeModel.fire(n);const o=this.hasTextFocus(),s=this._detachModel();this._attachModel(i),o&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(n),this._postDetachModelCleanup(s),this._contributionsDisposable=this._contributions.onAfterModelAttached()}_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 o=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(s.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?Ms._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?Ms._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const o=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?Ms._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e,t){var i;null===(i=this._modelData)||void 0===i||i.viewModel.setHiddenAreas(e.map((e=>re.e.lift(e))),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return ae.i.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(!se.L.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(!re.e.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,s,t,n)}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("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new re.e(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(!se.L.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new re.e(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=ke.Y.isISelection(e),n=re.e.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new ke.Y(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("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new re.e(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(!re.e.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(re.e.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t0&&this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]),this._contributions.restoreViewState(t.contributionsState||{});const i=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(i)}}handleInitialized(){var e;null===(e=this._getViewModel())||void 0===e||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter((e=>e.isSupported())),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run(i)).then(void 0,d.dL):this._modelData&&(this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,o){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,o,e)}_paste(e,t,i,n,o){if(!this._modelData||0===t.length)return;const s=this._modelData.viewModel,r=s.getSelection().getStartPosition();s.paste(t,i,n,e);const a=s.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new re.e(r.lineNumber,r.column,a.lineNumber,a.column),languageId:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=o.Uc.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,d.dL)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&!this._configuration.options.get(91)&&(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!!this._modelData&&!this._configuration.options.get(91)&&(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(91))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!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 Ks(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,(0,W.$J)(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,(0,W.$J)(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){this._modelData&&0!==e.length&&this._modelData.model.changeDecorations((t=>{t.deltaDecorations(e,[])}))}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.changeDecorations((e=>e.deltaDecorations(t,[]))),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(144)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}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)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}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 e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}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 e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}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 e=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(144);return{top:Ms._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft(),height:i.get(67)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){(0,N.N)(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e)return void(this._modelData=null);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 Ls(this._id,this._configuration,e,On.create(l.Jj(this._domElement)),Qn.create(this._configuration.options),(e=>l.jL(l.Jj(this._domElement),e)),this.languageConfigurationService,this._themeService,i);t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(n.onEvent((t=>{switch(t.kind){case 0:this._onDidContentSizeChange.fire(t);break;case 1:this._editorTextFocus.setValue(t.hasFocus);break;case 2:this._onDidScrollChange.fire(t);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(t.reachedMaxCursorCount){const e=this.getOption(80),t=Be.NC("cursors.maximum","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.",e);this._notificationService.prompt(Os.zb.Warning,t,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:Be.NC("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const e=[];for(let i=0,n=t.selections.length;i{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const o={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const o={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",o)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new yt(e.coordinatesConverter);return i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e),[new Ln(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){null==e||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){var e;if(null===(e=this._contributionsDisposable)||void 0===e||e.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;const t=this._modelData.model,i=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),i&&this._domElement.contains(i)&&this._domElement.removeChild(i),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),t}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}showDropIndicatorAt(e){const t=[{range:new re.e(e.lineNumber,e.column,e.lineNumber,e.column),options:Ms.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}};Hs.dropIntoEditorDecorationOptions=$n.qx.register({description:"workbench-dnd-target",className:"dnd-target"}),Hs=Ms=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Fs(3,ot.TG),Fs(4,Q.$),Fs(5,Rs.H),Fs(6,As.i6),Fs(7,Ue.XE),Fs(8,Os.lT),Fs(9,z.F),Fs(10,Kn.c_),Fs(11,Gn.p)],Hs);class Vs extends h.JT{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new c.Q5(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new c.Q5(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class zs extends c.Q5{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class js extends h.JT{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=qn.u.editorSimpleInput.bindTo(t),this._editorFocus=qn.u.focus.bindTo(t),this._textInputFocus=qn.u.textInputFocus.bindTo(t),this._editorTextFocus=qn.u.editorTextFocus.bindTo(t),this._tabMovesFocus=qn.u.tabMovesFocus.bindTo(t),this._editorReadonly=qn.u.readOnly.bindTo(t),this._inDiffEditor=qn.u.inDiffEditor.bindTo(t),this._editorColumnSelection=qn.u.columnSelection.bindTo(t),this._hasMultipleSelections=qn.u.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=qn.u.hasNonEmptySelection.bindTo(t),this._canUndo=qn.u.canUndo.bindTo(t),this._canRedo=qn.u.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(B.n.onDidChangeTabFocus((e=>this._tabMovesFocus.set(e)))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(B.n.getTabFocusMode()),this._editorReadonly.set(e.get(91)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.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(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class Us extends h.JT{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=qn.u.languageId.bindTo(t),this._hasCompletionItemProvider=qn.u.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=qn.u.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=qn.u.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=qn.u.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=qn.u.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=qn.u.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=qn.u.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=qn.u.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=qn.u.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=qn.u.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=qn.u.hasReferenceProvider.bindTo(t),this._hasRenameProvider=qn.u.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=qn.u.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=qn.u.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=qn.u.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=qn.u.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=qn.u.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=qn.u.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInEmbeddedEditor=qn.u.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();e?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===u.lg.walkThroughSnippet||e.uri.scheme===u.lg.vscodeChatCodeBlock)})):this.reset()}}class qs extends h.JT{constructor(e,t){super(),this._onChange=this._register(new c.Q5),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(l.go(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(l.go(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(){var e;return null!==(e=this._hadFocus)&&void 0!==e&&e}}class Ks{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((i=>{this._isChangingDecorations||e.call(t,i)}),i)}getRange(e){return this._editor.hasModel()?e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e]):null}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(){0!==this._decorationIds.length&&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 $s=encodeURIComponent("");function Zs(e){return $s+encodeURIComponent(e.toString())+Gs}const Qs=encodeURIComponent('');(0,Ue.Ic)(((e,t)=>{const i=e.getColor(ki.lXJ);i&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${Zs(i)}") repeat-x bottom left; }`);const n=e.getColor(ki.uoC);n&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${Zs(n)}") repeat-x bottom left; }`);const o=e.getColor(ki.c63);o&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${Zs(o)}") repeat-x bottom left; }`);const s=e.getColor(ki.Dut);s&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return Qs+encodeURIComponent(e.toString())+Ys}(s)}") no-repeat bottom left; }`);const r=e.getColor(qe.zu);r&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`)}))},36865:(e,t,i)=>{"use strict";var n=i(65321),o=i(73046),s=i(16830),r=i(11640),a=i(48728),l=i(29102),d=i(63580),c=i(84144),h=i(94565),u=i(33108),g=i(93983);i(48354);class p extends c.Ke{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:(0,d.vv)("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:o.l.map,toggled:g.Ao.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:g.Ao.has("isInDiffEditor"),menu:{when:g.Ao.has("isInDiffEditor"),id:c.eH.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(u.Ui),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}(0,c.r1)(p);class m extends c.Ke{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:(0,d.vv)("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:g.Ao.has("isInDiffEditor")})}run(e,...t){const i=e.get(u.Ui),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}(0,c.r1)(m);class f extends c.Ke{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:(0,d.vv)("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:g.Ao.has("isInDiffEditor")})}run(e,...t){const i=e.get(u.Ui),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}(0,c.r1)(f),c.BH.appendMenuItem(c.eH.EditorTitle,{command:{id:(new f).desc.id,title:(0,d.NC)("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:g.Ao.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:g.Ao.has("isInDiffEditor")},order:11,group:"1_diff",when:g.Ao.and(l.u.diffEditorRenderSideBySideInlineBreakpointReached,g.Ao.has("isInDiffEditor"))}),c.BH.appendMenuItem(c.eH.EditorTitle,{command:{id:(new m).desc.id,title:(0,d.NC)("showMoves","Show Moved Code Blocks"),icon:o.l.move,toggled:g.cP.create("config.diffEditor.experimental.showMoves",!0),precondition:g.Ao.has("isInDiffEditor")},order:10,group:"1_diff",when:g.Ao.has("isInDiffEditor")});const v=(0,d.vv)("diffEditor","Diff Editor");class _ extends s.x1{constructor(){super({id:"diffEditor.switchSide",title:(0,d.vv)("switchSide","Switch Side"),icon:o.l.arrowSwap,precondition:g.Ao.has("isInDiffEditor"),f1:!0,category:v})}runEditorCommand(e,t,i){const n=k(e);if(n instanceof a.p){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}(0,c.r1)(_);class b extends s.x1{constructor(){super({id:"diffEditor.exitCompareMove",title:(0,d.vv)("exitCompareMove","Exit Compare Move"),icon:o.l.close,precondition:l.u.comparingMovedCode,f1:!1,category:v,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=k(e);n instanceof a.p&&n.exitCompareMove()}}(0,c.r1)(b);class w extends s.x1{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:(0,d.vv)("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:o.l.fold,precondition:g.Ao.has("isInDiffEditor"),f1:!0,category:v})}runEditorCommand(e,t,...i){const n=k(e);n instanceof a.p&&n.collapseAllUnchangedRegions()}}(0,c.r1)(w);class y extends s.x1{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:(0,d.vv)("showAllUnchangedRegions","Show All Unchanged Regions"),icon:o.l.unfold,precondition:g.Ao.has("isInDiffEditor"),f1:!0,category:v})}runEditorCommand(e,t,...i){const n=k(e);n instanceof a.p&&n.showAllUnchangedRegions()}}(0,c.r1)(y);const C=(0,d.vv)("accessibleDiffViewer","Accessible Diff Viewer");class S extends c.Ke{constructor(){super({id:S.id,title:(0,d.vv)("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:C,precondition:g.Ao.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=k(e);null==t||t.accessibleDiffViewerNext()}}S.id="editor.action.accessibleDiffViewer.next",c.BH.appendMenuItem(c.eH.EditorTitle,{command:{id:S.id,title:(0,d.NC)("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:g.Ao.has("isInDiffEditor")},order:10,group:"2_diff",when:g.Ao.and(l.u.accessibleDiffViewerVisible.negate(),g.Ao.has("isInDiffEditor"))});class x extends c.Ke{constructor(){super({id:x.id,title:(0,d.vv)("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:C,precondition:g.Ao.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=k(e);null==t||t.accessibleDiffViewerPrev()}}function k(e){const t=e.get(r.$).listDiffEditors(),i=(0,n.vY)();if(i)for(const e of t)if(L(e.getContainerDomNode(),i))return e;return null}function L(e,t){let i=t;for(;i;){if(i===e)return!0;i=i.parentElement}return!1}x.id="editor.action.accessibleDiffViewer.prev",h.P.registerCommandAlias("editor.action.diffReview.next",S.id),(0,c.r1)(S),h.P.registerCommandAlias("editor.action.diffReview.prev",x.id),(0,c.r1)(x)},48728:(e,t,i)=>{"use strict";i.d(t,{p:()=>Rt});var n=i(65321),o=i(35534),s=i(17301),r=i(4669),a=i(5976),l=i(21070),d=i(54282),c=i(93379),h=i.n(c),u=i(7795),g=i.n(u),p=i(90569),m=i.n(p),f=i(3565),v=i.n(f),_=i(19216),b=i.n(_),w=i(44589),y=i.n(w),C=i(73050),S={};S.styleTagTransform=y(),S.setAttributes=v(),S.insert=m().bind(null,"head"),S.domAPI=g(),S.insertStyleElement=b(),h()(C.Z,S),C.Z&&C.Z.locals&&C.Z.locals;var x=i(16830),k=i(11640),L=i(43407),N=i(15762),D=i(77514),E=i(90317),I=i(64117),T=i(74741),M=i(9488),R=i(73046),A=i(25670),P=i(52136),O=i(15512),F=i(64141),B=i(45463),W=i(19247),H=i(50187),V=i(24314),z=i(54648),j=i(72042),U=i(77378),q=i(91557),K=i(1118),$=i(63580),G=i(38832),Z=i(72065),Q=i(59554),Y=i(92106),J={};J.styleTagTransform=y(),J.setAttributes=v(),J.insert=m().bind(null,"head"),J.domAPI=g(),J.insertStyleElement=b(),h()(Y.Z,J),Y.Z&&Y.Z.locals&&Y.Z.locals;var X=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ee=function(e,t){return function(i,n){t(i,n,e)}};const te=(0,Q.q5)("diff-review-insert",R.l.add,(0,$.NC)("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),ie=(0,Q.q5)("diff-review-remove",R.l.remove,(0,$.NC)("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),ne=(0,Q.q5)("diff-review-close",R.l.close,(0,$.NC)("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));let oe=class extends a.JT{constructor(e,t,i,n,o,s,r,a,d){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=o,this._height=s,this._diffs=r,this._models=a,this._instantiationService=d,this._state=(0,l.Be)(this,((e,t)=>{const i=this._visible.read(e);if(this._parentNode.style.visibility=i?"visible":"hidden",!i)return null;const n=t.add(this._instantiationService.createInstance(se,this._diffs,this._models,this._setVisible,this._canClose));return{model:n,view:t.add(this._instantiationService.createInstance(ge,this._parentNode,n,this._width,this._height,this._models))}})).recomputeInitiallyAndOnChange(this._store)}next(){(0,l.PS)((e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)}))}prev(){(0,l.PS)((e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)}))}close(){(0,l.PS)((e=>{this._setVisible(!1,e)}))}};oe._ttPolicy=(0,D.Z)("diffReview",{createHTML:e=>e}),oe=X([ee(8,Z.TG)],oe);let se=class extends a.JT{constructor(e,t,i,n,o){super(),this._diffs=e,this._models=t,this._setVisible=i,this.canClose=n,this._accessibilitySignalService=o,this._groups=(0,l.uh)(this,[]),this._currentGroupIdx=(0,l.uh)(this,0),this._currentElementIdx=(0,l.uh)(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map(((e,t)=>this._groups.read(t)[e])),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map(((e,t)=>{var i;return null===(i=this.currentGroup.read(t))||void 0===i?void 0:i.lines[e]})),this._register((0,l.EH)((e=>{const t=this._diffs.read(e);if(!t)return void this._groups.set([],void 0);const i=function(e,t,i){const n=[];for(const o of(0,M.mw)(e,((e,t)=>t.modified.startLineNumber-e.modified.endLineNumberExclusive<2*re))){const e=[];e.push(new de);const s=new B.z(Math.max(1,o[0].original.startLineNumber-re),Math.min(o[o.length-1].original.endLineNumberExclusive+re,t+1)),r=new B.z(Math.max(1,o[0].modified.startLineNumber-re),Math.min(o[o.length-1].modified.endLineNumberExclusive+re,i+1));(0,M.zy)(o,((t,i)=>{const n=new B.z(t?t.original.endLineNumberExclusive:s.startLineNumber,i?i.original.startLineNumber:s.endLineNumberExclusive),o=new B.z(t?t.modified.endLineNumberExclusive:r.startLineNumber,i?i.modified.startLineNumber:r.endLineNumberExclusive);n.forEach((t=>{e.push(new ue(t,o.startLineNumber+(t-n.startLineNumber)))})),i&&(i.original.forEach((t=>{e.push(new ce(i,t))})),i.modified.forEach((t=>{e.push(new he(i,t))})))}));const a=o[0].modified.join(o[o.length-1].modified),l=o[0].original.join(o[o.length-1].original);n.push(new le(new z.f0(a,l),e))}return n}(t,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());(0,l.PS)((e=>{const t=this._models.getModifiedPosition();if(t){const n=i.findIndex((e=>(null==t?void 0:t.lineNumber){const t=this.currentElement.read(e);(null==t?void 0:t.type)===ae.Deleted?this._accessibilitySignalService.playSignal(G.iP.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):(null==t?void 0:t.type)===ae.Added&&this._accessibilitySignalService.playSignal(G.iP.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})}))),this._register((0,l.EH)((e=>{var t;const i=this.currentElement.read(e);if(i&&i.type!==ae.Header){const e=null!==(t=i.modifiedLineNumber)&&void 0!==t?t:i.diff.modified.startLineNumber;this._models.modifiedSetSelection(V.e.fromPositions(new H.L(e,1)))}})))}_goToGroupDelta(e,t){const i=this.groups.get();!i||i.length<=1||(0,l.c8)(t,(t=>{this._currentGroupIdx.set(W.q.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),t),this._currentElementIdx.set(0,t)}))}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||(0,l.PS)((i=>{this._currentElementIdx.set(W.q.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);-1!==i&&(0,l.PS)((e=>{this._currentElementIdx.set(i,e)}))}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===ae.Deleted?this._models.originalReveal(V.e.fromPositions(new H.L(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==ae.Header?V.e.fromPositions(new H.L(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};se=X([ee(4,G.IV)],se);const re=3;var ae;!function(e){e[e.Header=0]="Header",e[e.Unchanged=1]="Unchanged",e[e.Deleted=2]="Deleted",e[e.Added=3]="Added"}(ae||(ae={}));class le{constructor(e,t){this.range=e,this.lines=t}}class de{constructor(){this.type=ae.Header}}class ce{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=ae.Deleted,this.modifiedLineNumber=void 0}}class he{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=ae.Added,this.originalLineNumber=void 0}}class ue{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=ae.Unchanged}}let ge=class extends a.JT{constructor(e,t,i,o,s,r){super(),this._element=e,this._model=t,this._width=i,this._height=o,this._models=s,this._languageService=r,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";const d=document.createElement("div");d.className="diff-review-actions",this._actionBar=this._register(new E.o(d)),this._register((0,l.EH)((e=>{this._actionBar.clear(),this._model.canClose.read(e)&&this._actionBar.push(new T.aU("diffreview.close",(0,$.NC)("label.close","Close"),"close-diff-review "+A.k.asClassName(ne),!0,(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 I.s$(this._content,{})),(0,n.mc)(this.domNode,this._scrollbar.getDomNode(),d),this._register((0,l.EH)((e=>{this._height.read(e),this._width.read(e),this._scrollbar.scanDomNode()}))),this._register((0,a.OF)((()=>{(0,n.mc)(this.domNode)}))),this._register((0,O.bg)(this.domNode,{width:this._width,height:this._height})),this._register((0,O.bg)(this._content,{width:this._width,height:this._height})),this._register((0,l.gp)(((e,t)=>{this._model.currentGroup.read(e),this._render(t)}))),this._register((0,n.mu)(this.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._model.goToNextLine()),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._model.goToPreviousLine()),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this._model.close()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this._model.revealCurrentElementInEditor())})))}_render(e){const t=this._models.getOriginalOptions(),i=this._models.getModifiedOptions(),o=document.createElement("div");o.className="diff-review-table",o.setAttribute("role","list"),o.setAttribute("aria-label",(0,$.NC)("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),(0,P.N)(o,i.get(50)),(0,n.mc)(this._content,o);const s=this._models.getOriginalModel(),r=this._models.getModifiedModel();if(!s||!r)return;const a=s.getOptions(),d=r.getOptions(),c=i.get(67),h=this._model.currentGroup.get();for(const u of(null==h?void 0:h.lines)||[]){if(!h)break;let g;if(u.type===ae.Header){const e=document.createElement("div");e.className="diff-review-row",e.setAttribute("role","listitem");const t=h.range,i=this._model.currentGroupIndex.get(),n=this._model.groups.get().length,o=e=>0===e?(0,$.NC)("no_lines_changed","no lines changed"):1===e?(0,$.NC)("one_line_changed","1 line changed"):(0,$.NC)("more_lines_changed","{0} lines changed",e),s=o(t.original.length),r=o(t.modified.length);e.setAttribute("aria-label",(0,$.NC)({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",i+1,n,t.original.startLineNumber,s,t.modified.startLineNumber,r));const a=document.createElement("div");a.className="diff-review-cell diff-review-summary",a.appendChild(document.createTextNode(`${i+1}/${n}: @@ -${t.original.startLineNumber},${t.original.length} +${t.modified.startLineNumber},${t.modified.length} @@`)),e.appendChild(a),g=e}else g=this._createRow(u,c,this._width.get(),t,s,a,i,r,d);o.appendChild(g);const p=(0,l.nK)((e=>this._model.currentElement.read(e)===u));e.add((0,l.EH)((e=>{const t=p.read(e);g.tabIndex=t?0:-1,t&&g.focus()}))),e.add((0,n.nm)(g,"focus",(()=>{this._model.goToLine(u)})))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,o,s,r,a,l){const d=n.get(144),c=d.glyphMarginWidth+d.lineNumbersWidth,h=r.get(144),u=10+h.glyphMarginWidth+h.lineNumbersWidth;let g="diff-review-row",p="",m=null;switch(e.type){case ae.Added:g="diff-review-row line-insert",p=" char-insert",m=te;break;case ae.Deleted:g="diff-review-row line-delete",p=" char-delete",m=ie}const f=document.createElement("div");f.style.minWidth=i+"px",f.className=g,f.setAttribute("role","listitem"),f.ariaLevel="";const v=document.createElement("div");v.className="diff-review-cell",v.style.height=`${t}px`,f.appendChild(v);const _=document.createElement("span");_.style.width=c+"px",_.style.minWidth=c+"px",_.className="diff-review-line-number"+p,void 0!==e.originalLineNumber?_.appendChild(document.createTextNode(String(e.originalLineNumber))):_.innerText=" ",v.appendChild(_);const b=document.createElement("span");b.style.width=u+"px",b.style.minWidth=u+"px",b.style.paddingRight="10px",b.className="diff-review-line-number"+p,void 0!==e.modifiedLineNumber?b.appendChild(document.createTextNode(String(e.modifiedLineNumber))):b.innerText=" ",v.appendChild(b);const w=document.createElement("span");if(w.className="diff-review-spacer",m){const e=document.createElement("span");e.className=A.k.asClassName(m),e.innerText="  ",w.appendChild(e)}else w.innerText="  ";let y;if(v.appendChild(w),void 0!==e.modifiedLineNumber){let t=this._getLineHtml(a,r,l.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);oe._ttPolicy&&(t=oe._ttPolicy.createHTML(t)),v.insertAdjacentHTML("beforeend",t),y=a.getLineContent(e.modifiedLineNumber)}else{let t=this._getLineHtml(o,n,s.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);oe._ttPolicy&&(t=oe._ttPolicy.createHTML(t)),v.insertAdjacentHTML("beforeend",t),y=o.getLineContent(e.originalLineNumber)}0===y.length&&(y=(0,$.NC)("blankLine","blank"));let C="";switch(e.type){case ae.Unchanged:C=e.originalLineNumber===e.modifiedLineNumber?(0,$.NC)({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",y,e.originalLineNumber):(0,$.NC)("equalLine","{0} original line {1} modified line {2}",y,e.originalLineNumber,e.modifiedLineNumber);break;case ae.Added:C=(0,$.NC)("insertLine","+ {0} modified line {1}",y,e.modifiedLineNumber);break;case ae.Deleted:C=(0,$.NC)("deleteLine","- {0} original line {1}",y,e.originalLineNumber)}return f.setAttribute("aria-label",C),f}_getLineHtml(e,t,i,n,o){const s=e.getLineContent(n),r=t.get(50),a=U.A.createEmpty(s,o),l=K.wA.isBasicASCII(s,e.mightContainNonBasicASCII()),d=K.wA.containsRTL(s,l,e.mightContainRTL());return(0,q.tF)(new q.IJ(r.isMonospace&&!t.get(33),r.canUseHalfwidthRightwardsArrow,s,!1,l,d,0,a,[],i,0,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,t.get(117),t.get(99),t.get(94),t.get(51)!==F.n0.OFF,null)).html}};ge=X([ee(5,j.O)],ge);class pe{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(){var e;return null!==(e=this.editors.modified.getPosition())&&void 0!==e?e:void 0}}class me extends a.JT{constructor(e,t,i,n,o){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=o,this._originalScrollTop=(0,l.rD)(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=(0,l.rD)(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._viewZonesChanged=(0,l.aq)("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=(0,l.uh)(this,0),this._modifiedViewZonesChangedSignal=(0,l.aq)("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=(0,l.aq)("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=(0,l.Be)(this,((e,t)=>{var i;this._element.replaceChildren();const n=this._diffModel.read(e),o=null===(i=null==n?void 0:n.diff.read(e))||void 0===i?void 0:i.movedTexts;if(!o||0===o.length)return void this.width.set(0,void 0);this._viewZonesChanged.read(e);const s=this._originalEditorLayoutInfo.read(e),r=this._modifiedEditorLayoutInfo.read(e);if(!s||!r)return void this.width.set(0,void 0);this._modifiedViewZonesChangedSignal.read(e),this._originalViewZonesChangedSignal.read(e);const a=o.map((t=>{function i(e,t){return(t.getTopForLineNumber(e.startLineNumber,!0)+t.getTopForLineNumber(e.endLineNumberExclusive,!0))/2}const n=i(t.lineRangeMapping.original,this._editors.original),o=this._originalScrollTop.read(e),s=i(t.lineRangeMapping.modified,this._editors.modified),r=n-o,a=s-this._modifiedScrollTop.read(e),l=Math.min(n,s),d=Math.max(n,s);return{range:new W.q(l,d),from:r,to:a,fromWithoutScroll:n,toWithoutScroll:s,move:t}}));a.sort((0,M.f_)((0,M.tT)((e=>e.fromWithoutScroll>e.toWithoutScroll),M.nW),(0,M.tT)((e=>e.fromWithoutScroll>e.toWithoutScroll?e.fromWithoutScroll:-e.toWithoutScroll),M.fv)));const d=fe.compute(a.map((e=>e.range))),c=s.verticalScrollbarWidth,h=10*(d.getTrackCount()-1)+20,u=c+h+(r.contentLeft-me.movedCodeBlockPadding);let g=0;for(const e of a){const i=c+10+10*d.getTrack(g),o=15,s=15,a=u,h=r.glyphMarginWidth+r.lineNumbersWidth,p=18,m=document.createElementNS("http://www.w3.org/2000/svg","rect");m.classList.add("arrow-rectangle"),m.setAttribute("x",""+(a-h)),m.setAttribute("y",""+(e.to-p/2)),m.setAttribute("width",`${h}`),m.setAttribute("height",`${p}`),this._element.appendChild(m);const f=document.createElementNS("http://www.w3.org/2000/svg","g"),v=document.createElementNS("http://www.w3.org/2000/svg","path");v.setAttribute("d",`M 0 ${e.from} L ${i} ${e.from} L ${i} ${e.to} L ${a-s} ${e.to}`),v.setAttribute("fill","none"),f.appendChild(v);const _=document.createElementNS("http://www.w3.org/2000/svg","polygon");_.classList.add("arrow"),t.add((0,l.EH)((t=>{v.classList.toggle("currentMove",e.move===n.activeMovedText.read(t)),_.classList.toggle("currentMove",e.move===n.activeMovedText.read(t))}))),_.setAttribute("points",`${a-s},${e.to-o/2} ${a},${e.to} ${a-s},${e.to+o/2}`),f.appendChild(_),this._element.appendChild(f),g++}this.width.set(h,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((0,a.OF)((()=>this._element.remove()))),this._register((0,l.EH)((e=>{const t=this._originalEditorLayoutInfo.read(e),i=this._modifiedEditorLayoutInfo.read(e);t&&i&&(this._element.style.left=t.width-t.verticalScrollbarWidth+"px",this._element.style.height=`${t.height}px`,this._element.style.width=`${t.verticalScrollbarWidth+t.contentLeft-me.movedCodeBlockPadding+this.width.read(e)}px`)}))),this._register((0,l.jx)(this._state));const s=(0,l.nK)((e=>{const t=this._diffModel.read(e),i=null==t?void 0:t.diff.read(e);return i?i.movedTexts.map((e=>({move:e,original:new O.GD((0,l.Dz)(e.lineRangeMapping.original.startLineNumber-1),18),modified:new O.GD((0,l.Dz)(e.lineRangeMapping.modified.startLineNumber-1),18)}))):[]}));this._register((0,O.Sv)(this._editors.original,s.map((e=>e.map((e=>e.original)))))),this._register((0,O.Sv)(this._editors.modified,s.map((e=>e.map((e=>e.modified)))))),this._register((0,l.gp)(((e,t)=>{const i=s.read(e);for(const e of i)t.add(new ve(this._editors.original,e.original,e.move,"original",this._diffModel.get())),t.add(new ve(this._editors.modified,e.modified,e.move,"modified",this._diffModel.get()))})));const r=(0,l.aq)("original.onDidFocusEditorWidget",(e=>this._editors.original.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0))))),d=(0,l.aq)("modified.onDidFocusEditorWidget",(e=>this._editors.modified.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0)))));let c="modified";this._register((0,l.nJ)({createEmptyChangeSummary:()=>{},handleChange:(e,t)=>(e.didChange(r)&&(c="original"),e.didChange(d)&&(c="modified"),!0)},(e=>{r.read(e),d.read(e);const t=this._diffModel.read(e);if(!t)return;const i=t.diff.read(e);let n;if(i&&"original"===c){const t=this._editors.originalCursor.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.original.contains(t.lineNumber))))}if(i&&"modified"===c){const t=this._editors.modifiedCursor.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.modified.contains(t.lineNumber))))}n!==t.movedTextToCompare.get()&&t.movedTextToCompare.set(void 0,void 0),t.setActiveMovedText(n)})))}}me.movedCodeBlockPadding=4;class fe{static compute(e){const t=[],i=[];for(const n of e){let e=t.findIndex((e=>!e.intersectsStrict(n)));if(-1===e){const i=6;t.length>=i?e=(0,o.tQ)(t,(0,M.tT)((e=>e.intersectWithRangeLength(n)),M.fv)):(e=t.length,t.push(new W.M))}t[e].addRange(n),i.push(e)}return new fe(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class ve extends O.N9{constructor(e,t,i,o,s){const r=(0,n.h)("div.diff-hidden-lines-widget");super(e,t,r.root),this._editor=e,this._move=i,this._kind=o,this._diffModel=s,this._nodes=(0,n.h)("div.diff-moved-code-block",{style:{marginRight:"4px"}},[(0,n.h)("div.text-content@textContent"),(0,n.h)("div.action-bar@actionBar")]),r.root.appendChild(this._nodes.root);const a=(0,l.rD)(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));let d;this._register((0,O.bg)(this._nodes.root,{paddingRight:a.map((e=>e.verticalScrollbarWidth))})),d=i.changes.length>0?"original"===this._kind?(0,$.NC)("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,$.NC)("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):"original"===this._kind?(0,$.NC)("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,$.NC)("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const c=this._register(new E.o(this._nodes.actionBar,{highlightToggledItems:!0})),h=new T.aU("",d,"",!1);c.push(h,{icon:!1,label:!0});const u=new T.aU("","Compare",A.k.asClassName(R.l.compareChanges),!0,(()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)}));this._register((0,l.EH)((e=>{const t=this._diffModel.movedTextToCompare.read(e)===i;u.checked=t}))),c.push(u,{icon:!1,label:!0})}}var _e=i(48354);class be extends a.JT{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=(0,l.nK)(this,(e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.diff.read(e);if(!i)return null;const n=this._diffModel.read(e).movedTextToCompare.read(e),o=this._options.renderIndicators.read(e),s=this._options.showEmptyDecorations.read(e),r=[],a=[];if(!n)for(const e of i.mappings)if(e.lineRangeMapping.original.isEmpty||r.push({range:e.lineRangeMapping.original.toInclusiveRange(),options:o?_e.iq:_e.i_}),e.lineRangeMapping.modified.isEmpty||a.push({range:e.lineRangeMapping.modified.toInclusiveRange(),options:o?_e.vv:_e.rd}),e.lineRangeMapping.modified.isEmpty||e.lineRangeMapping.original.isEmpty)e.lineRangeMapping.original.isEmpty||r.push({range:e.lineRangeMapping.original.toInclusiveRange(),options:_e.W3}),e.lineRangeMapping.modified.isEmpty||a.push({range:e.lineRangeMapping.modified.toInclusiveRange(),options:_e.Jv});else for(const t of e.lineRangeMapping.innerChanges||[])e.lineRangeMapping.original.contains(t.originalRange.startLineNumber)&&r.push({range:t.originalRange,options:t.originalRange.isEmpty()&&s?_e.$F:_e.rq}),e.lineRangeMapping.modified.contains(t.modifiedRange.startLineNumber)&&a.push({range:t.modifiedRange,options:t.modifiedRange.isEmpty()&&s?_e.n_:_e.LE});if(n)for(const e of n.changes){const t=e.original.toInclusiveRange();t&&r.push({range:t,options:o?_e.iq:_e.i_});const i=e.modified.toInclusiveRange();i&&a.push({range:i,options:o?_e.vv:_e.rd});for(const t of e.innerChanges||[])r.push({range:t.originalRange,options:_e.rq}),a.push({range:t.modifiedRange,options:_e.LE})}const l=this._diffModel.read(e).activeMovedText.read(e);for(const e of i.movedTexts)r.push({range:e.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(e===l?" currentMove":""),blockPadding:[me.movedCodeBlockPadding,0,me.movedCodeBlockPadding,me.movedCodeBlockPadding]}}),a.push({range:e.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(e===l?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:r,modifiedDecorations:a}})),this._register((0,O.RP)(this._editors.original,this._decorations.map((e=>(null==e?void 0:e.originalDecorations)||[])))),this._register((0,O.RP)(this._editors.modified,this._decorations.map((e=>(null==e?void 0:e.modifiedDecorations)||[]))))}}var we=i(63841);class ye extends a.JT{constructor(e,t,i,n){super(),this._options=e,this._domNode=t,this._dimensions=i,this._sashes=n,this._sashRatio=(0,l.uh)(this,void 0),this.sashLeft=(0,l.nK)(this,(e=>{var t;const i=null!==(t=this._sashRatio.read(e))&&void 0!==t?t:this._options.splitViewDefaultRatio.read(e);return this._computeSashLeft(i,e)})),this._sash=this._register(new we.g(this._domNode,{getVerticalSashTop:e=>0,getVerticalSashLeft:e=>this.sashLeft.get(),getVerticalSashHeight:e=>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((e=>{const t=this._dimensions.width.get(),i=this._computeSashLeft((this._startSashPosition+(e.currentX-e.startX))/t,void 0);this._sashRatio.set(i/t,void 0)}))),this._register(this._sash.onDidEnd((()=>this._sash.layout()))),this._register(this._sash.onDidReset((()=>this._sashRatio.set(void 0,void 0)))),this._register((0,l.EH)((e=>{const t=this._sashes.read(e);t&&(this._sash.orthogonalEndSash=t.bottom)}))),this._register((0,l.EH)((e=>{const t=this._options.enableSplitViewResizing.read(e);this._sash.state=t?3:0,this.sashLeft.read(e),this._dimensions.height.read(e),this._sash.layout()})))}_computeSashLeft(e,t){const i=this._dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),o=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n,s=100;return i<=200?n:oi-s?i-s:o}}var Ce,Se=i(78713),xe=i(15393),ke=i(98401),Le=i(71050),Ne=i(65026),De=i(84013),Ee=i(85215),Ie=i(10829),Te=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Me=function(e,t){return function(i,n){t(i,n,e)}};const Re=(0,Z.yh)("diffProviderFactoryService");let Ae=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(Pe,e)}};Ae=Te([Me(0,Z.TG)],Ae),(0,Ne.z)(Re,Ae,1);let Pe=Ce=class{constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new r.Q5,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;null===(e=this.diffAlgorithmOnDidChangeSubscription)||void 0===e||e.dispose()}async computeDiff(e,t,i,n){var o,s;if("string"!=typeof this.diffAlgorithm)return this.diffAlgorithm.computeDiff(e,t,i,n);if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return 1===t.getLineCount()&&1===t.getLineMaxColumn(1)?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new z.gB(new B.z(1,2),new B.z(1,t.getLineCount()+1),[new z.iy(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const r=JSON.stringify([e.uri.toString(),t.uri.toString()]),a=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),l=Ce.diffCache.get(r);if(l&&l.context===a)return l.result;const d=De.G.create(),c=await this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),h=d.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:h,timedOut:null===(o=null==c?void 0:c.quitEarly)||void 0===o||o,detectedMoves:i.computeMoves?null!==(s=null==c?void 0:c.moves.length)&&void 0!==s?s:0:-1}),n.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!c)throw new Error("no diff result available");return Ce.diffCache.size>10&&Ce.diffCache.delete(Ce.diffCache.keys().next().value),Ce.diffCache.set(r,{result:c,context:a}),c}setOptions(e){var t;let i=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(null===(t=this.diffAlgorithmOnDidChangeSubscription)||void 0===t||t.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,"string"!=typeof e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange((()=>this.onDidChangeEventEmitter.fire()))),i=!0),i&&this.onDidChangeEventEmitter.fire()}};Pe.diffCache=new Map,Pe=Ce=Te([Me(1,Ee.p),Me(2,Ie.b)],Pe);var Oe=i(25580),Fe=i(2442),Be=i(41574),We=i(39156),He=i(35146);let Ve=class extends a.JT{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=(0,l.uh)(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,l.uh)(this,void 0),this.diff=this._diff,this._unchangedRegions=(0,l.uh)(this,void 0),this.unchangedRegions=(0,l.nK)(this,(e=>{var t,i;return this._options.hideUnchangedRegions.read(e)?null!==(i=null===(t=this._unchangedRegions.read(e))||void 0===t?void 0:t.regions)&&void 0!==i?i:[]:((0,l.PS)((e=>{var t;for(const i of(null===(t=this._unchangedRegions.get())||void 0===t?void 0:t.regions)||[])i.collapseAll(e)})),[])})),this.movedTextToCompare=(0,l.uh)(this,void 0),this._activeMovedText=(0,l.uh)(this,void 0),this._hoveredMovedText=(0,l.uh)(this,void 0),this.activeMovedText=(0,l.nK)(this,(e=>{var t,i;return null!==(i=null!==(t=this.movedTextToCompare.read(e))&&void 0!==t?t:this._hoveredMovedText.read(e))&&void 0!==i?i:this._activeMovedText.read(e)})),this._cancellationTokenSource=new Le.A,this._diffProvider=(0,l.nK)(this,(e=>{const t=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(e)});return{diffProvider:t,onChangeSignal:(0,l.aq)("onDidChange",t.onDidChange)}})),this._register((0,a.OF)((()=>this._cancellationTokenSource.cancel())));const n=(0,l.GN)("contentChangedSignal"),o=this._register(new xe.pY((()=>n.trigger(void 0)),200));this._register((0,l.EH)((t=>{const i=this._unchangedRegions.read(t);if(!i||i.regions.some((e=>e.isDragged.read(t))))return;const n=i.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).map((e=>e?B.z.fromRangeInclusive(e):void 0)),o=i.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).map((e=>e?B.z.fromRangeInclusive(e):void 0)),s=i.regions.map(((e,i)=>n[i]&&o[i]?new Ke(n[i].startLineNumber,o[i].startLineNumber,n[i].length,e.visibleLineCountTop.read(t),e.visibleLineCountBottom.read(t)):void 0)).filter(ke.$K),r=[];let a=!1;for(const e of(0,M.mw)(s,((e,i)=>e.getHiddenModifiedRange(t).endLineNumberExclusive===i.getHiddenModifiedRange(t).startLineNumber)))if(e.length>1){a=!0;const t=e.reduce(((e,t)=>e+t.lineCount),0),i=new Ke(e[0].originalLineNumber,e[0].modifiedLineNumber,t,e[0].visibleLineCountTop.get(),e[e.length-1].visibleLineCountBottom.get());r.push(i)}else r.push(e[0]);if(a){const t=e.original.deltaDecorations(i.originalDecorationIds,r.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),n=e.modified.deltaDecorations(i.modifiedDecorationIds,r.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));(0,l.PS)((e=>{this._unchangedRegions.set({regions:r,originalDecorationIds:t,modifiedDecorationIds:n},e)}))}})));const s=(t,i,n)=>{const o=Ke.fromDiffs(t.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(n),this._options.hideUnchangedRegionsContextLineCount.read(n));let s;const r=this._unchangedRegions.get();if(r){const t=r.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).map((e=>e?B.z.fromRangeInclusive(e):void 0)),i=r.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).map((e=>e?B.z.fromRangeInclusive(e):void 0));let o=(0,O.W7)(r.regions.map(((e,n)=>{if(!t[n]||!i[n])return;const o=t[n].length;return new Ke(t[n].startLineNumber,i[n].startLineNumber,o,Math.min(e.visibleLineCountTop.get(),o),Math.min(e.visibleLineCountBottom.get(),o-e.visibleLineCountTop.get()))})).filter(ke.$K),((e,t)=>!t||e.modifiedLineNumber>=t.modifiedLineNumber+t.lineCount&&e.originalLineNumber>=t.originalLineNumber+t.lineCount)).map((e=>new z.f0(e.getHiddenOriginalRange(n),e.getHiddenModifiedRange(n))));o=z.f0.clip(o,B.z.ofLength(1,e.original.getLineCount()),B.z.ofLength(1,e.modified.getLineCount())),s=z.f0.inverse(o,e.original.getLineCount(),e.modified.getLineCount())}const a=[];if(s)for(const e of o){const t=s.filter((t=>t.original.intersectsStrict(e.originalUnchangedRange)&&t.modified.intersectsStrict(e.modifiedUnchangedRange)));a.push(...e.setVisibleRanges(t,i))}else a.push(...o);const l=e.original.deltaDecorations((null==r?void 0:r.originalDecorationIds)||[],a.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),d=e.modified.deltaDecorations((null==r?void 0:r.modifiedDecorationIds)||[],a.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));this._unchangedRegions.set({regions:a,originalDecorationIds:l,modifiedDecorationIds:d},i)};this._register(e.modified.onDidChangeContent((t=>{if(this._diff.get()){Fe.Q.fromModelContentChanges(t.changes);const i=(this._lastDiff,e.original,void e.modified);i&&(this._lastDiff=i,(0,l.PS)((e=>{this._diff.set(Ue.fromDiffResult(this._lastDiff),e),s(i,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}this._isDiffUpToDate.set(!1,void 0),o.schedule()}))),this._register(e.original.onDidChangeContent((t=>{if(this._diff.get()){Fe.Q.fromModelContentChanges(t.changes);const i=(this._lastDiff,e.original,void e.modified);i&&(this._lastDiff=i,(0,l.PS)((e=>{this._diff.set(Ue.fromDiffResult(this._lastDiff),e),s(i,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}this._isDiffUpToDate.set(!1,void 0),o.schedule()}))),this._register((0,l.gp)((async(t,i)=>{var r,a;this._options.hideUnchangedRegionsMinimumLineCount.read(t),this._options.hideUnchangedRegionsContextLineCount.read(t),o.cancel(),n.read(t);const d=this._diffProvider.read(t);d.onChangeSignal.read(t),(0,O.NW)(Oe.DW,t),(0,O.NW)(We.xG,t),this._isDiffUpToDate.set(!1,void 0);let c=[];i.add(e.original.onDidChangeContent((e=>{const t=Fe.Q.fromModelContentChanges(e.changes);c=(0,Be.o)(c,t)})));let h=[];i.add(e.modified.onDidChangeContent((e=>{const t=Fe.Q.fromModelContentChanges(e.changes);h=(0,Be.o)(h,t)})));let u=await d.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(t),maxComputationTimeMs:this._options.maxComputationTimeMs.read(t),computeMoves:this._options.showMoves.read(t)},this._cancellationTokenSource.token);var g,p,m;this._cancellationTokenSource.token.isCancellationRequested||(g=u,p=e.original,m=e.modified,u={changes:g.changes.map((e=>new z.gB(e.original,e.modified,e.innerChanges?e.innerChanges.map((e=>function(e,t,i){let n=e.originalRange,o=e.modifiedRange;return(1!==n.endColumn||1!==o.endColumn)&&n.endColumn===t.getLineMaxColumn(n.endLineNumber)&&o.endColumn===i.getLineMaxColumn(o.endLineNumber)&&n.endLineNumber{s(u,e),this._lastDiff=u;const t=Ue.fromDiffResult(u);this._diff.set(t,e),this._isDiffUpToDate.set(!0,e);const i=this.movedTextToCompare.get();this.movedTextToCompare.set(i?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(i.lineRangeMapping.modified))):void 0,e)})))})))}ensureModifiedLineIsVisible(e,t,i){var n,o;if(0===(null===(n=this.diff.get())||void 0===n?void 0:n.mappings.length))return;const s=(null===(o=this._unchangedRegions.get())||void 0===o?void 0:o.regions)||[];for(const n of s)if(n.getHiddenModifiedRange(void 0).contains(e))return void n.showModifiedLine(e,t,i)}ensureOriginalLineIsVisible(e,t,i){var n,o;if(0===(null===(n=this.diff.get())||void 0===n?void 0:n.mappings.length))return;const s=(null===(o=this._unchangedRegions.get())||void 0===o?void 0:o.regions)||[];for(const n of s)if(n.getHiddenOriginalRange(void 0).contains(e))return void n.showOriginalLine(e,t,i)}async waitForDiff(){await(0,l.F_)(this.isDiffUpToDate,(e=>e))}serializeState(){const e=this._unchangedRegions.get();return{collapsedRegions:null==e?void 0:e.regions.map((e=>({range:e.getHiddenModifiedRange(void 0).serialize()})))}}restoreSerializedState(e){var t;const i=null===(t=e.collapsedRegions)||void 0===t?void 0:t.map((e=>B.z.deserialize(e.range))),n=this._unchangedRegions.get();n&&i&&(0,l.PS)((e=>{for(const t of n.regions)for(const n of i)if(t.modifiedUnchangedRange.intersect(n)){t.setHiddenModifiedRange(n,e);break}}))}};var ze,je;Ve=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(ze=2,je=Re,function(e,t){je(e,t,ze)})],Ve);class Ue{static fromDiffResult(e){return new Ue(e.changes.map((e=>new qe(e))),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class qe{constructor(e){this.lineRangeMapping=e}}class Ke{static fromDiffs(e,t,i,n,o){const s=z.gB.inverse(e,t,i),r=[];for(const e of s){let s=e.original.startLineNumber,a=e.modified.startLineNumber,l=e.original.length;const d=1===s&&1===a,c=s+l===t+1&&a+l===i+1;(d||c)&&l>=o+n?(d&&!c&&(l-=o),c&&!d&&(s+=o,a+=o,l-=o),r.push(new Ke(s,a,l,0,0))):l>=2*o+n&&(s+=o,a+=o,l-=2*o,r.push(new Ke(s,a,l,0,0)))}return r}get originalUnchangedRange(){return B.z.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return B.z.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,o){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=(0,l.uh)(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,l.uh)(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,l.nK)(this,(e=>this.visibleLineCountTop.read(e)+this.visibleLineCountBottom.read(e)===this.lineCount&&!this.isDragged.read(e))),this.isDragged=(0,l.uh)(this,void 0);const s=Math.max(Math.min(n,this.lineCount),0),r=Math.max(Math.min(o,this.lineCount-n),0);(0,He.wN)(n===s),(0,He.wN)(o===r),this._visibleLineCountTop.set(s,void 0),this._visibleLineCountBottom.set(r,void 0)}setVisibleRanges(e,t){const i=[],n=new B.i(e.map((e=>e.modified))).subtractFrom(this.modifiedUnchangedRange);let o=this.originalLineNumber,s=this.modifiedLineNumber;const r=this.modifiedLineNumber+this.lineCount;if(0===n.ranges.length)this.showAll(t),i.push(this);else{let e=0;for(const a of n.ranges){const l=e===n.ranges.length-1;e++;const d=(l?r:a.endLineNumberExclusive)-s,c=new Ke(o,s,d,0,0);c.setHiddenModifiedRange(a,t),i.push(c),o=c.originalUnchangedRange.endLineNumberExclusive,s=c.modifiedUnchangedRange.endLineNumberExclusive}}return i}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return B.z.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return B.z.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()),o=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;0===t&&n{var n;this._contextMenuService.showContextMenu({domForShadowRoot:u&&null!==(n=i.getDomNode())&&void 0!==n?n:void 0,getAnchor:()=>({x:e,y:t}),getActions:()=>{const e=[],t=o.modified.isEmpty;return e.push(new T.aU("diff.clipboard.copyDeletedContent",t?o.original.length>1?(0,$.NC)("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):(0,$.NC)("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):o.original.length>1?(0,$.NC)("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):(0,$.NC)("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,(async()=>{const e=this._originalTextModel.getValueInRange(o.original.toExclusiveRange());await this._clipboardService.writeText(e)}))),o.original.length>1&&e.push(new T.aU("diff.clipboard.copyDeletedLineContent",t?(0,$.NC)("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",o.original.startLineNumber+h):(0,$.NC)("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",o.original.startLineNumber+h),void 0,!0,(async()=>{let e=this._originalTextModel.getLineContent(o.original.startLineNumber+h);""===e&&(e=0===this._originalTextModel.getEndOfLineSequence()?"\n":"\r\n"),await this._clipboardService.writeText(e)}))),i.getOption(91)||e.push(new T.aU("diff.inline.revertChange",(0,$.NC)("diff.inline.revertChange.label","Revert this change"),void 0,!0,(async()=>{this._editor.revert(this._diff)}))),e},autoSelectFirstItem:!0})};this._register((0,n.mu)(this._diffActions,"mousedown",(e=>{if(!e.leftButton)return;const{top:t,height:i}=(0,n.i)(this._diffActions),o=Math.floor(c/3);e.preventDefault(),g(e.posx,t+i+o)}))),this._register(i.onMouseMove((e=>{8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId!==this._getViewZoneId()?this.visibility=!1:(h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,c),this.visibility=!0)}))),this._register(i.onMouseDown((e=>{!e.event.leftButton||8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===this._getViewZoneId()&&(e.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,c),g(e.event.posx,e.event.posy+c))})))}_updateLightBulbPosition(e,t,i){const{top:o}=(0,n.i)(e),s=t-o,r=Math.floor(s/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let e=0;for(let t=0;te});function Je(e,t,i,n){(0,P.N)(n,t.fontInfo);const o=i.length>0,s=new Ze.HT(1e4);let r=0,a=0;const l=[];for(let n=0;n');const l=t.getLineContent(),d=K.wA.isBasicASCII(l,o),c=K.wA.containsRTL(l,d,s),h=(0,q.d1)(new q.IJ(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,d,c,0,t,i,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==F.n0.OFF,null),a);return a.appendString(""),h.characterMapping.getHorizontalOffset(h.characterMapping.length)}var it=i(84972),nt=i(5606),ot=function(e,t){return function(i,n){t(i,n,e)}};let st=class extends a.JT{constructor(e,t,i,o,s,r,d,c,h,u){super(),this._targetWindow=e,this._editors=t,this._diffModel=i,this._options=o,this._diffEditorWidget=s,this._canIgnoreViewZoneUpdateEvent=r,this._origViewZonesToIgnore=d,this._modViewZonesToIgnore=c,this._clipboardService=h,this._contextMenuService=u,this._originalTopPadding=(0,l.uh)(this,0),this._originalScrollOffset=(0,l.uh)(this,0),this._originalScrollOffsetAnimated=(0,O.Vm)(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=(0,l.uh)(this,0),this._modifiedScrollOffset=(0,l.uh)(this,0),this._modifiedScrollOffsetAnimated=(0,O.Vm)(this._targetWindow,this._modifiedScrollOffset,this._store);const g=(0,l.uh)("invalidateAlignmentsState",0),p=this._register(new xe.pY((()=>{g.set(g.get()+1,void 0)}),0));this._register(this._editors.original.onDidChangeViewZones((e=>{this._canIgnoreViewZoneUpdateEvent()||p.schedule()}))),this._register(this._editors.modified.onDidChangeViewZones((e=>{this._canIgnoreViewZoneUpdateEvent()||p.schedule()}))),this._register(this._editors.original.onDidChangeConfiguration((e=>{(e.hasChanged(145)||e.hasChanged(67))&&p.schedule()}))),this._register(this._editors.modified.onDidChangeConfiguration((e=>{(e.hasChanged(145)||e.hasChanged(67))&&p.schedule()})));const m=this._diffModel.map((e=>e?(0,l.rD)(e.model.original.onDidChangeTokens,(()=>2===e.model.original.tokenization.backgroundTokenizationState)):void 0)).map(((e,t)=>null==e?void 0:e.read(t))),f=(0,l.nK)((e=>{const t=this._diffModel.read(e),i=null==t?void 0:t.diff.read(e);if(!t||!i)return null;g.read(e);const n=this._options.renderSideBySide.read(e);return rt(this._editors.original,this._editors.modified,i.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,n)})),v=(0,l.nK)((e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e);if(!i)return null;g.read(e);const n=i.changes.map((e=>new qe(e)));return rt(this._editors.original,this._editors.modified,n,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)}));function _(){const e=document.createElement("div");return e.className="diagonal-fill",e}const b=this._register(new a.SL);this.viewZones=(0,l.Be)(this,((e,t)=>{var i,o,r,a,l,d,c,h;b.clear();const u=f.read(e)||[],g=[],p=[],w=this._modifiedTopPadding.read(e);w>0&&p.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:w,showInHiddenAreas:!0,suppressMouseDown:!0});const y=this._originalTopPadding.read(e);y>0&&g.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:y,showInHiddenAreas:!0,suppressMouseDown:!0});const C=this._options.renderSideBySide.read(e),S=C||null===(i=this._editors.modified._getViewModel())||void 0===i?void 0:i.createLineBreaksComputer();if(S){const T=this._editors.original.getModel();for(const M of u)if(M.diff)for(let O=M.originalRange.startLineNumber;OT.getLineCount())return{orig:g,mod:p};null==S||S.addRequest(T.getLineContent(O),null,null)}}const x=null!==(o=null==S?void 0:S.finalize())&&void 0!==o?o:[];let k=0;const L=this._editors.modified.getOption(67),N=null===(r=this._diffModel.read(e))||void 0===r?void 0:r.movedTextToCompare.read(e),D=null!==(l=null===(a=this._editors.original.getModel())||void 0===a?void 0:a.mightContainNonBasicASCII())&&void 0!==l&&l,E=null!==(c=null===(d=this._editors.original.getModel())||void 0===d?void 0:d.mightContainRTL())&&void 0!==c&&c,I=et.fromEditor(this._editors.modified);for(const F of u)if(F.diff&&!C){if(!F.originalRange.isEmpty){m.read(e);const W=document.createElement("div");W.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const H=this._editors.original.getModel();if(F.originalRange.endLineNumberExclusive-1>H.getLineCount())return{orig:g,mod:p};const V=new Xe(F.originalRange.mapToLineArray((e=>H.tokenization.getLineTokens(e))),F.originalRange.mapToLineArray((e=>x[k++])),D,E),z=[];for(const $ of F.diff.innerChanges||[])z.push(new K.$t($.originalRange.delta(-(F.diff.original.startLineNumber-1)),_e.rq.className,0));const j=Je(V,I,z,W),U=document.createElement("div");if(U.className="inline-deleted-margin-view-zone",(0,P.N)(U,I.fontInfo),this._options.renderIndicators.read(e))for(let G=0;G(0,ke.cW)(q)),U,this._editors.modified,F.diff,this._diffEditorWidget,j.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let Q=0;Q1&&g.push({afterLineNumber:F.originalRange.startLineNumber+Q,domNode:_(),heightInPx:(Y-1)*L,showInHiddenAreas:!0,suppressMouseDown:!0})}p.push({afterLineNumber:F.modifiedRange.startLineNumber-1,domNode:W,heightInPx:j.heightInLines*L,minWidthInPx:j.minWidthInPx,marginDomNode:U,setZoneId(e){q=e},showInHiddenAreas:!0,suppressMouseDown:!0})}const B=document.createElement("div");B.className="gutter-delete",g.push({afterLineNumber:F.originalRange.endLineNumberExclusive-1,domNode:_(),heightInPx:F.modifiedHeightInPx,marginDomNode:B,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const J=F.modifiedHeightInPx-F.originalHeightInPx;if(J>0){if(null==N?void 0:N.lineRangeMapping.original.delta(-1).deltaLength(2).contains(F.originalRange.endLineNumberExclusive-1))continue;g.push({afterLineNumber:F.originalRange.endLineNumberExclusive-1,domNode:_(),heightInPx:J,showInHiddenAreas:!0,suppressMouseDown:!0})}else{if(null==N?void 0:N.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(F.modifiedRange.endLineNumberExclusive-1))continue;function X(){const e=document.createElement("div");return e.className="arrow-revert-change "+A.k.asClassName(R.l.arrowRight),t.add((0,n.nm)(e,"mousedown",(e=>e.stopPropagation()))),t.add((0,n.nm)(e,"click",(e=>{e.stopPropagation(),s.revert(F.diff)}))),(0,n.$)("div",{},e)}let ee;F.diff&&F.diff.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(e)&&(ee=X()),p.push({afterLineNumber:F.modifiedRange.endLineNumberExclusive-1,domNode:_(),heightInPx:-J,marginDomNode:ee,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const te of null!==(h=v.read(e))&&void 0!==h?h:[]){if(!(null==N?void 0:N.lineRangeMapping.original.intersect(te.originalRange))||!(null==N?void 0:N.lineRangeMapping.modified.intersect(te.modifiedRange)))continue;const ie=te.modifiedHeightInPx-te.originalHeightInPx;ie>0?g.push({afterLineNumber:te.originalRange.endLineNumberExclusive-1,domNode:_(),heightInPx:ie,showInHiddenAreas:!0,suppressMouseDown:!0}):p.push({afterLineNumber:te.modifiedRange.endLineNumberExclusive-1,domNode:_(),heightInPx:-ie,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:g,mod:p}}));let w=!1;this._register(this._editors.original.onDidScrollChange((e=>{e.scrollLeftChanged&&!w&&(w=!0,this._editors.modified.setScrollLeft(e.scrollLeft),w=!1)}))),this._register(this._editors.modified.onDidScrollChange((e=>{e.scrollLeftChanged&&!w&&(w=!0,this._editors.original.setScrollLeft(e.scrollLeft),w=!1)}))),this._originalScrollTop=(0,l.rD)(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=(0,l.rD)(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._register((0,l.EH)((e=>{const t=this._originalScrollTop.read(e)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(e))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(e));t!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(t,1)}))),this._register((0,l.EH)((e=>{const t=this._modifiedScrollTop.read(e)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(e))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(e));t!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(t,1)}))),this._register((0,l.EH)((e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e);let n=0;if(i){const e=this._editors.original.getTopForLineNumber(i.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();n=this._editors.modified.getTopForLineNumber(i.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-e}n>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(n,void 0)):n<0?(this._modifiedTopPadding.set(-n,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.get()-n,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+n,void 0,!0)})))}};function rt(e,t,i,n,o,s){const r=new M.H9(at(e,n)),a=new M.H9(at(t,o)),l=e.getOption(67),d=t.getOption(67),c=[];let h=0,u=0;function g(e,t){for(;;){let i=r.peek(),n=a.peek();if(i&&i.lineNumber>=e&&(i=void 0),n&&n.lineNumber>=t&&(n=void 0),!i&&!n)break;const o=i?i.lineNumber-h:Number.MAX_VALUE,s=n?n.lineNumber-u:Number.MAX_VALUE;os?(a.dequeue(),i={lineNumber:n.lineNumber-u+h,heightInPx:0}):(r.dequeue(),a.dequeue()),c.push({originalRange:B.z.ofLength(i.lineNumber,1),modifiedRange:B.z.ofLength(n.lineNumber,1),originalHeightInPx:l+i.heightInPx,modifiedHeightInPx:d+n.heightInPx,diff:void 0})}}for(const p of i){const m=p.lineRangeMapping;g(m.original.startLineNumber,m.modified.startLineNumber);let f=!0,v=m.modified.startLineNumber,_=m.original.startLineNumber;function b(e,t){var i,n,o,s;if(e<_||tt.lineNumbere+t.heightInPx),0))&&void 0!==n?n:0,m=null!==(s=null===(o=a.takeWhile((e=>e.lineNumbere+t.heightInPx),0))&&void 0!==s?s:0;c.push({originalRange:h,modifiedRange:u,originalHeightInPx:h.length*l+g,modifiedHeightInPx:u.length*d+m,diff:p.lineRangeMapping}),_=e,v=t}if(s)for(const w of m.innerChanges||[]){w.originalRange.startColumn>1&&w.modifiedRange.startColumn>1&&b(w.originalRange.startLineNumber,w.modifiedRange.startLineNumber);const y=e.getModel(),C=w.originalRange.endLineNumber<=y.getLineCount()?y.getLineMaxColumn(w.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;w.originalRange.endColumn1&&n.push({lineNumber:t,heightInPx:r*(e-1)})}for(const n of e.getWhitespaces()){if(t.has(n.id))continue;const e=0===n.afterLineNumber?0:s.convertViewPositionToModelPosition(new H.L(n.afterLineNumber,1)).lineNumber;i.push({lineNumber:e,heightInPx:n.height})}return(0,O.Ap)(i,n,(e=>e.lineNumber),((e,t)=>({lineNumber:e.lineNumber,heightInPx:e.heightInPx+t.heightInPx})))}st=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ot(8,it.p),ot(9,nt.i)],st);var lt,dt=i(38626),ct=i(51203),ht=i(30665),ut=i(73910),gt=i(97781);let pt=lt=class extends a.JT{constructor(e,t,i,o,s,r,a){super(),this._editors=e,this._rootElement=t,this._diffModel=i,this._rootWidth=o,this._rootHeight=s,this._modifiedEditorLayoutInfo=r,this._themeService=a,this.width=lt.ENTIRE_DIFF_OVERVIEW_WIDTH;const d=(0,l.rD)(this._themeService.onDidColorThemeChange,(()=>this._themeService.getColorTheme())),c=(0,l.nK)((e=>{const t=d.read(e);return{insertColor:t.getColor(ut.P6Y)||(t.getColor(ut.ypS)||ut.CzK).transparent(2),removeColor:t.getColor(ut.F9q)||(t.getColor(ut.P4M)||ut.keg).transparent(2)}})),h=(0,dt.X)(document.createElement("div"));h.setClassName("diffViewport"),h.setPosition("absolute");const u=(0,n.h)("div.diffOverview",{style:{position:"absolute",top:"0px",width:lt.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register((0,O.xx)(u,h.domNode)),this._register((0,n.mu)(u,n.tw.POINTER_DOWN,(e=>{this._editors.modified.delegateVerticalScrollbarPointerDown(e)}))),this._register((0,n.nm)(u,n.tw.MOUSE_WHEEL,(e=>{this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1})),this._register((0,O.xx)(this._rootElement,u)),this._register((0,l.gp)(((e,t)=>{const i=this._diffModel.read(e),n=this._editors.original.createOverviewRuler("original diffOverviewRuler");n&&(t.add(n),t.add((0,O.xx)(u,n.getDomNode())));const o=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(o&&(t.add(o),t.add((0,O.xx)(u,o.getDomNode()))),!n||!o)return;const s=(0,l.aq)("viewZoneChanged",this._editors.original.onDidChangeViewZones),r=(0,l.aq)("viewZoneChanged",this._editors.modified.onDidChangeViewZones),a=(0,l.aq)("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),d=(0,l.aq)("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);t.add((0,l.EH)((e=>{var t;s.read(e),r.read(e),a.read(e),d.read(e);const l=c.read(e),h=null===(t=null==i?void 0:i.diff.read(e))||void 0===t?void 0:t.mappings;function u(e,t,i){const n=i._getViewModel();return n?e.filter((e=>e.length>0)).map((e=>{const i=n.coordinatesConverter.convertModelPositionToViewPosition(new H.L(e.startLineNumber,1)),o=n.coordinatesConverter.convertModelPositionToViewPosition(new H.L(e.endLineNumberExclusive,1)),s=o.lineNumber-i.lineNumber;return new ht.EY(i.lineNumber,o.lineNumber,s,t.toString())})):[]}const g=u((h||[]).map((e=>e.lineRangeMapping.original)),l.removeColor,this._editors.original),p=u((h||[]).map((e=>e.lineRangeMapping.modified)),l.insertColor,this._editors.modified);null==n||n.setZones(g),null==o||o.setZones(p)}))),t.add((0,l.EH)((e=>{const t=this._rootHeight.read(e),i=this._rootWidth.read(e),s=this._modifiedEditorLayoutInfo.read(e);if(s){const i=lt.ENTIRE_DIFF_OVERVIEW_WIDTH-2*lt.ONE_OVERVIEW_WIDTH;n.setLayout({top:0,height:t,right:i+lt.ONE_OVERVIEW_WIDTH,width:lt.ONE_OVERVIEW_WIDTH}),o.setLayout({top:0,height:t,right:0,width:lt.ONE_OVERVIEW_WIDTH});const r=this._editors.modifiedScrollTop.read(e),a=this._editors.modifiedScrollHeight.read(e),l=this._editors.modified.getOption(103),d=new ct.M(l.verticalHasArrows?l.arrowSize:0,l.verticalScrollbarSize,0,s.height,a,r);h.setTop(d.getSliderPosition()),h.setHeight(d.getSliderSize())}else h.setTop(0),h.setHeight(0);u.style.height=t+"px",u.style.left=i-lt.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",h.setWidth(lt.ENTIRE_DIFF_OVERVIEW_WIDTH)})))})))}};pt.ONE_OVERVIEW_WIDTH=15,pt.ENTIRE_DIFF_OVERVIEW_WIDTH=2*lt.ONE_OVERVIEW_WIDTH,pt=lt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(6,gt.XE)],pt);var mt=i(96518),ft=i(29102),vt=i(93983),_t=i(60972),bt=i(90535);class wt extends a.JT{constructor(){super(...arguments),this._id=++wt.idCounter,this._onDidDispose=this._register(new r.Q5),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)}}wt.idCounter=0;var yt=i(91847),Ct=function(e,t){return function(i,n){t(i,n,e)}};let St=class extends a.JT{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,i,n,o,s,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._createInnerEditor=o,this._instantiationService=s,this._keybindingService=a,this._onDidContentSizeChange=this._register(new r.Q5),this.original=this._register(this._createLeftHandSideEditor(i.editorOptions.get(),n.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(i.editorOptions.get(),n.modifiedEditor||{})),this.modifiedModel=(0,l.rD)(this.modified.onDidChangeModel,(()=>this.modified.getModel())),this.modifiedScrollTop=(0,l.rD)(this.modified.onDidScrollChange,(()=>this.modified.getScrollTop())),this.modifiedScrollHeight=(0,l.rD)(this.modified.onDidScrollChange,(()=>this.modified.getScrollHeight())),this.modifiedSelections=(0,l.rD)(this.modified.onDidChangeCursorSelection,(()=>{var e;return null!==(e=this.modified.getSelections())&&void 0!==e?e:[]})),this.modifiedCursor=(0,l.bk)({owner:this,equalityComparer:H.L.equals},(e=>{var t,i;return null!==(i=null===(t=this.modifiedSelections.read(e)[0])||void 0===t?void 0:t.getPosition())&&void 0!==i?i:new H.L(1,1)})),this.originalCursor=(0,l.rD)(this.original.onDidChangeCursorPosition,(()=>{var e;return null!==(e=this.original.getPosition())&&void 0!==e?e:new H.L(1,1)})),this._register((0,l.nJ)({createEmptyChangeSummary:()=>({}),handleChange:(e,t)=>(e.didChange(i.editorOptions)&&Object.assign(t,e.change.changedOptions),!0)},((e,t)=>{i.editorOptions.read(e),this._options.renderSideBySide.read(e),this.modified.updateOptions(this._adjustOptionsForRightHandSide(e,t)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(e,t))})))}_createLeftHandSideEditor(e,t){const i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t);return n.setContextValue("isInDiffLeftEditor",!0),n}_createRightHandSideEditor(e,t){const i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t);return n.setContextValue("isInDiffRightEditor",!0),n}_constructInnerEditor(e,t,i,n){const o=this._createInnerEditor(e,t,i,n);return this._register(o.onDidContentSizeChange((e=>{const t=this.original.getContentWidth()+this.modified.getContentWidth()+pt.ENTIRE_DIFF_OVERVIEW_WIDTH,i=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:t,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})}))),o}_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=F.BH.revealHorizontalRightPadding.defaultValue+pt.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.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){var t;e||(e="");const i=(0,$.NC)("diff-aria-navigation-tip"," use {0} to open the accessibility help.",null===(t=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))||void 0===t?void 0:t.getAriaLabel());return this._options.accessibilityVerbose.get()?e+i:e?e.replaceAll(i,""):""}};St=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ct(5,Z.TG),Ct(6,yt.d)],St);var xt=i(15115);class kt{get editorOptions(){return this._options}constructor(e){this._diffEditorWidth=(0,l.uh)(this,0),this.couldShowInlineViewBecauseOfSize=(0,l.nK)(this,(e=>this._options.read(e).renderSideBySide&&this._diffEditorWidth.read(e)<=this._options.read(e).renderSideBySideInlineBreakpoint)),this.renderOverviewRuler=(0,l.nK)(this,(e=>this._options.read(e).renderOverviewRuler)),this.renderSideBySide=(0,l.nK)(this,(e=>this._options.read(e).renderSideBySide&&!(this._options.read(e).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(e)))),this.readOnly=(0,l.nK)(this,(e=>this._options.read(e).readOnly)),this.shouldRenderRevertArrows=(0,l.nK)(this,(e=>!!this._options.read(e).renderMarginRevertIcon&&!!this.renderSideBySide.read(e)&&!this.readOnly.read(e))),this.renderIndicators=(0,l.nK)(this,(e=>this._options.read(e).renderIndicators)),this.enableSplitViewResizing=(0,l.nK)(this,(e=>this._options.read(e).enableSplitViewResizing)),this.splitViewDefaultRatio=(0,l.nK)(this,(e=>this._options.read(e).splitViewDefaultRatio)),this.ignoreTrimWhitespace=(0,l.nK)(this,(e=>this._options.read(e).ignoreTrimWhitespace)),this.maxComputationTimeMs=(0,l.nK)(this,(e=>this._options.read(e).maxComputationTime)),this.showMoves=(0,l.nK)(this,(e=>this._options.read(e).experimental.showMoves&&this.renderSideBySide.read(e))),this.isInEmbeddedEditor=(0,l.nK)(this,(e=>this._options.read(e).isInEmbeddedEditor)),this.diffWordWrap=(0,l.nK)(this,(e=>this._options.read(e).diffWordWrap)),this.originalEditable=(0,l.nK)(this,(e=>this._options.read(e).originalEditable)),this.diffCodeLens=(0,l.nK)(this,(e=>this._options.read(e).diffCodeLens)),this.accessibilityVerbose=(0,l.nK)(this,(e=>this._options.read(e).accessibilityVerbose)),this.diffAlgorithm=(0,l.nK)(this,(e=>this._options.read(e).diffAlgorithm)),this.showEmptyDecorations=(0,l.nK)(this,(e=>this._options.read(e).experimental.showEmptyDecorations)),this.onlyShowAccessibleDiffViewer=(0,l.nK)(this,(e=>this._options.read(e).onlyShowAccessibleDiffViewer)),this.hideUnchangedRegions=(0,l.nK)(this,(e=>this._options.read(e).hideUnchangedRegions.enabled)),this.hideUnchangedRegionsRevealLineCount=(0,l.nK)(this,(e=>this._options.read(e).hideUnchangedRegions.revealLineCount)),this.hideUnchangedRegionsContextLineCount=(0,l.nK)(this,(e=>this._options.read(e).hideUnchangedRegions.contextLineCount)),this.hideUnchangedRegionsMinimumLineCount=(0,l.nK)(this,(e=>this._options.read(e).hideUnchangedRegions.minimumLineCount));const t={...e,...Lt(e,xt.k)};this._options=(0,l.uh)(this,t)}updateOptions(e){const t=Lt(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)}}function Lt(e,t){var i,n,o,s,r,a,l,d;return{enableSplitViewResizing:(0,F.O7)(e.enableSplitViewResizing,t.enableSplitViewResizing),splitViewDefaultRatio:(0,F.L_)(e.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,F.O7)(e.renderSideBySide,t.renderSideBySide),renderMarginRevertIcon:(0,F.O7)(e.renderMarginRevertIcon,t.renderMarginRevertIcon),maxComputationTime:(0,F.Zc)(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:(0,F.Zc)(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,F.O7)(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:(0,F.O7)(e.renderIndicators,t.renderIndicators),originalEditable:(0,F.O7)(e.originalEditable,t.originalEditable),diffCodeLens:(0,F.O7)(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:(0,F.O7)(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(0,F.NY)(e.diffWordWrap,t.diffWordWrap,["off","on","inherit"]),diffAlgorithm:(0,F.NY)(e.diffAlgorithm,t.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,F.O7)(e.accessibilityVerbose,t.accessibilityVerbose),experimental:{showMoves:(0,F.O7)(null===(i=e.experimental)||void 0===i?void 0:i.showMoves,t.experimental.showMoves),showEmptyDecorations:(0,F.O7)(null===(n=e.experimental)||void 0===n?void 0:n.showEmptyDecorations,t.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:(0,F.O7)(null!==(s=null===(o=e.hideUnchangedRegions)||void 0===o?void 0:o.enabled)&&void 0!==s?s:null===(r=e.experimental)||void 0===r?void 0:r.collapseUnchangedRegions,t.hideUnchangedRegions.enabled),contextLineCount:(0,F.Zc)(null===(a=e.hideUnchangedRegions)||void 0===a?void 0:a.contextLineCount,t.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:(0,F.Zc)(null===(l=e.hideUnchangedRegions)||void 0===l?void 0:l.minimumLineCount,t.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:(0,F.Zc)(null===(d=e.hideUnchangedRegions)||void 0===d?void 0:d.revealLineCount,t.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:(0,F.O7)(e.isInEmbeddedEditor,t.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:(0,F.O7)(e.onlyShowAccessibleDiffViewer,t.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:(0,F.Zc)(e.renderSideBySideInlineBreakpoint,t.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:(0,F.O7)(e.useInlineViewWhenSpaceIsLimited,t.useInlineViewWhenSpaceIsLimited)}}var Nt=i(56811),Dt=i(84973);const Et=[];class It extends a.JT{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._widget=n,this._selectedDiffs=(0,l.nK)(this,(e=>{const t=this._diffModel.read(e),i=null==t?void 0:t.diff.read(e);if(!i)return Et;const n=this._editors.modifiedSelections.read(e);if(n.every((e=>e.isEmpty())))return Et;const o=new B.i(n.map((e=>B.z.fromRangeInclusive(e)))),s=i.mappings.filter((e=>e.lineRangeMapping.innerChanges&&o.intersects(e.lineRangeMapping.modified))).map((e=>({mapping:e,rangeMappings:e.lineRangeMapping.innerChanges.filter((e=>n.some((t=>V.e.areIntersecting(e.modifiedRange,t)))))})));return 0===s.length||s.every((e=>0===e.rangeMappings.length))?Et:s})),this._register((0,l.gp)(((e,t)=>{if(!this._options.shouldRenderRevertArrows.read(e))return;const i=this._diffModel.read(e),n=null==i?void 0:i.diff.read(e);if(!i||!n)return;if(i.movedTextToCompare.read(e))return;const o=[],s=this._selectedDiffs.read(e),r=new Set(s.map((e=>e.mapping)));if(s.length>0){const i=this._editors.modifiedSelections.read(e),n=t.add(new Tt(i[i.length-1].positionLineNumber,this._widget,s.flatMap((e=>e.rangeMappings)),!0));this._editors.modified.addGlyphMarginWidget(n),o.push(n)}for(const e of n.mappings)if(!r.has(e)&&!e.lineRangeMapping.modified.isEmpty&&e.lineRangeMapping.innerChanges){const i=t.add(new Tt(e.lineRangeMapping.modified.startLineNumber,this._widget,e.lineRangeMapping.innerChanges,!1));this._editors.modified.addGlyphMarginWidget(i),o.push(i)}t.add((0,a.OF)((()=>{for(const e of o)this._editors.modified.removeGlyphMarginWidget(e)})))})))}}class Tt extends a.JT{getId(){return this._id}constructor(e,t,i,o){super(),this._lineNumber=e,this._widget=t,this._diffs=i,this._revertSelection=o,this._id="revertButton"+Tt.counter++,this._domNode=(0,n.h)("div.revertButton",{title:this._revertSelection?(0,$.NC)("revertSelectedChanges","Revert Selected Changes"):(0,$.NC)("revertChange","Revert Change")},[(0,Nt.h)(R.l.arrowRight)]).root,this._register((0,n.nm)(this._domNode,n.tw.MOUSE_DOWN,(e=>{2!==e.button&&(e.stopPropagation(),e.preventDefault())}))),this._register((0,n.nm)(this._domNode,n.tw.MOUSE_UP,(e=>{e.stopPropagation(),e.preventDefault()}))),this._register((0,n.nm)(this._domNode,n.tw.CLICK,(e=>{this._widget.revertRangeMappings(this._diffs),e.stopPropagation(),e.preventDefault()})))}getDomNode(){return this._domNode}getPosition(){return{lane:Dt.U.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}Tt.counter=0;var Mt=function(e,t){return function(i,n){t(i,n,e)}};let Rt=class extends wt{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,i,o,s,c,h,u){var g;super(),this._domElement=e,this._parentContextKeyService=o,this._parentInstantiationService=s,this._accessibilitySignalService=h,this._editorProgressService=u,this.elements=(0,n.h)("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[(0,n.h)("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[(0,n.$)("span",{},"No Changes")]),(0,n.h)("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),(0,n.h)("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),(0,n.h)("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=(0,l.uh)(this,void 0),this._shouldDisposeDiffModel=!1,this.onDidChangeModel=r.ju.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new _t.y([vt.i6,this._contextKeyService])),this._boundarySashes=(0,l.uh)(this,void 0),this._accessibleDiffViewerShouldBeVisible=(0,l.uh)(this,!1),this._accessibleDiffViewerVisible=(0,l.nK)(this,(e=>!!this._options.onlyShowAccessibleDiffViewer.read(e)||this._accessibleDiffViewerShouldBeVisible.read(e))),this._movedBlocksLinesPart=(0,l.uh)(this,void 0),this._layoutInfo=(0,l.nK)(this,(e=>{var t,i,n,o,s;const r=this._rootSizeObserver.width.read(e),a=this._rootSizeObserver.height.read(e),l=null===(t=this._sash.read(e))||void 0===t?void 0:t.sashLeft.read(e),d=null!=l?l:Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),c=r-d-(null!==(n=null===(i=this._overviewRulerPart.read(e))||void 0===i?void 0:i.width)&&void 0!==n?n:0),h=d-(null!==(s=null===(o=this._movedBlocksLinesPart.read(e))||void 0===o?void 0:o.width.read(e))&&void 0!==s?s:0);return this.elements.original.style.width=h+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=c+"px",this.elements.modified.style.left=d+"px",this._editors.original.layout({width:h,height:a},!0),this._editors.modified.layout({width:c,height:a},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}})),this._diffValue=this._diffModel.map(((e,t)=>null==e?void 0:e.diff.read(t))),this.onDidUpdateDiff=r.ju.fromObservableLight(this._diffValue),c.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register((0,a.OF)((()=>this._domElement.removeChild(this.elements.root)))),this._rootSizeObserver=this._register(new O.DU(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(null!==(g=t.automaticLayout)&&void 0!==g&&g),this._options=new kt(t),this._register((0,l.EH)((e=>{this._options.setWidth(this._rootSizeObserver.width.read(e))}))),this._contextKeyService.createKey(ft.u.isEmbeddedDiffEditor.key,!1),this._register((0,O.GU)(ft.u.isEmbeddedDiffEditor,this._contextKeyService,(e=>this._options.isInEmbeddedEditor.read(e)))),this._register((0,O.GU)(ft.u.comparingMovedCode,this._contextKeyService,(e=>{var t;return!!(null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e))}))),this._register((0,O.GU)(ft.u.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,(e=>this._options.couldShowInlineViewBecauseOfSize.read(e)))),this._register((0,O.GU)(ft.u.hasChanges,this._contextKeyService,(e=>{var t,i,n;return(null!==(n=null===(i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.diff.read(e))||void 0===i?void 0:i.mappings.length)&&void 0!==n?n:0)>0}))),this._editors=this._register(this._instantiationService.createInstance(St,this.elements.original,this.elements.modified,this._options,i,((e,t,i,n)=>this._createInnerEditor(e,t,i,n)))),this._overviewRulerPart=(0,d.kA)(this,(e=>this._options.renderOverviewRuler.read(e)?this._instantiationService.createInstance((0,O.NW)(pt,e),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map((e=>e.modifiedEditor))):void 0)).recomputeInitiallyAndOnChange(this._store),this._sash=(0,d.kA)(this,(e=>{const t=this._options.renderSideBySide.read(e);return this.elements.root.classList.toggle("side-by-side",t),t?new ye(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map(((e,t)=>{var i,n;return e-(null!==(n=null===(i=this._overviewRulerPart.read(t))||void 0===i?void 0:i.width)&&void 0!==n?n:0)}))},this._boundarySashes):void 0})).recomputeInitiallyAndOnChange(this._store);const p=(0,d.kA)(this,(e=>this._instantiationService.createInstance((0,O.NW)(Se.O,e),this._editors,this._diffModel,this._options))).recomputeInitiallyAndOnChange(this._store);(0,d.kA)(this,(e=>this._instantiationService.createInstance((0,O.NW)(be,e),this._editors,this._diffModel,this._options,this))).recomputeInitiallyAndOnChange(this._store);const m=new Set,f=new Set;let v=!1;const _=(0,d.kA)(this,(e=>this._instantiationService.createInstance((0,O.NW)(st,e),(0,n.Jj)(this._domElement),this._editors,this._diffModel,this._options,this,(()=>v||p.get().isUpdatingHiddenAreas),m,f))).recomputeInitiallyAndOnChange(this._store),b=(0,l.nK)(this,(e=>{const t=_.read(e).viewZones.read(e).orig,i=p.read(e).viewZones.read(e).origViewZones;return t.concat(i)})),w=(0,l.nK)(this,(e=>{const t=_.read(e).viewZones.read(e).mod,i=p.read(e).viewZones.read(e).modViewZones;return t.concat(i)}));let y;this._register((0,O.Sv)(this._editors.original,b,(e=>{v=e}),m)),this._register((0,O.Sv)(this._editors.modified,w,(e=>{v=e,v?y=L.Z.capture(this._editors.modified):(null==y||y.restore(this._editors.modified),y=void 0)}),f)),this._accessibleDiffViewer=(0,d.kA)(this,(e=>this._instantiationService.createInstance((0,O.NW)(oe,e),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,((e,t)=>this._accessibleDiffViewerShouldBeVisible.set(e,t)),this._options.onlyShowAccessibleDiffViewer.map((e=>!e)),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map(((e,t)=>{var i;return null===(i=null==e?void 0:e.diff.read(t))||void 0===i?void 0:i.mappings.map((e=>e.lineRangeMapping))})),new pe(this._editors)))).recomputeInitiallyAndOnChange(this._store);const C=this._accessibleDiffViewerVisible.map((e=>e?"hidden":"visible"));this._register((0,O.bg)(this.elements.modified,{visibility:C})),this._register((0,O.bg)(this.elements.original,{visibility:C})),this._createDiffEditorContributions(),c.addDiffEditor(this),this._register((0,l.jx)(this._layoutInfo)),(0,d.kA)(this,(e=>new((0,O.NW)(me,e))(this.elements.root,this._diffModel,this._layoutInfo.map((e=>e.originalEditor)),this._layoutInfo.map((e=>e.modifiedEditor)),this._editors))).recomputeInitiallyAndOnChange(this._store,(e=>{this._movedBlocksLinesPart.set(e,void 0)})),this._register((0,O.bg)(this.elements.overlay,{width:this._layoutInfo.map(((e,t)=>e.originalEditor.width+(this._options.renderSideBySide.read(t)?0:e.modifiedEditor.width))),visibility:(0,l.nK)((e=>{var t,i;return this._options.hideUnchangedRegions.read(e)&&0===(null===(i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.diff.read(e))||void 0===i?void 0:i.mappings.length)?"visible":"hidden"}))})),this._register(r.ju.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,(e=>{var t,i;if(3===(null==e?void 0:e.reason)){const n=null===(i=null===(t=this._diffModel.get())||void 0===t?void 0:t.diff.get())||void 0===i?void 0:i.mappings.find((t=>t.lineRangeMapping.modified.contains(e.position.lineNumber)));(null==n?void 0:n.lineRangeMapping.modified.isEmpty)?this._accessibilitySignalService.playSignal(G.iP.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):(null==n?void 0:n.lineRangeMapping.original.isEmpty)?this._accessibilitySignalService.playSignal(G.iP.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):n&&this._accessibilitySignalService.playSignal(G.iP.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}})));const S=this._diffModel.map(this,((e,t)=>{if(e)return void 0===e.diff.read(t)&&!e.isDiffUpToDate.read(t)}));this._register((0,l.gp)(((e,t)=>{if(!0===S.read(e)){const e=this._editorProgressService.show(!0,1e3);t.add((0,a.OF)((()=>e.done())))}}))),this._register((0,a.OF)((()=>{var e;this._shouldDisposeDiffModel&&(null===(e=this._diffModel.get())||void 0===e||e.dispose())}))),this._register(new It(this._editors,this._diffModel,this._options,this))}_createInnerEditor(e,t,i,n){return e.createInstance(N.Gm,t,i,n)}_createDiffEditorContributions(){const e=x.Uc.getDiffEditorContributions();for(const t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(e){(0,s.dL)(e)}}get _targetEditor(){return this._editors.modified}getEditorType(){return mt.g.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var e;return{original:this._editors.original.saveViewState(),modified:this._editors.modified.saveViewState(),modelState:null===(e=this._diffModel.get())||void 0===e?void 0:e.serializeState()}}restoreViewState(e){var t;if(e&&e.original&&e.modified){const i=e;this._editors.original.restoreViewState(i.original),this._editors.modified.restoreViewState(i.modified),i.modelState&&(null===(t=this._diffModel.get())||void 0===t||t.restoreSerializedState(i.modelState))}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(Ve,e,this._options)}getModel(){var e,t;return null!==(t=null===(e=this._diffModel.get())||void 0===e?void 0:e.model)&&void 0!==t?t:null}setModel(e,t){!e&&this._diffModel.get()&&this._accessibleDiffViewer.get().close();const i=e?"model"in e?{model:e,shouldDispose:!1}:{model:this.createViewModel(e),shouldDispose:!0}:void 0;this._diffModel.get()!==(null==i?void 0:i.model)&&(0,l.c8)(t,(e=>{var t;l.rD.batchEventsGlobally(e,(()=>{this._editors.original.setModel(i?i.model.model.original:null),this._editors.modified.setModel(i?i.model.model.modified:null)}));const n=this._diffModel.get(),o=this._shouldDisposeDiffModel;this._shouldDisposeDiffModel=null!==(t=null==i?void 0:i.shouldDispose)&&void 0!==t&&t,this._diffModel.set(null==i?void 0:i.model,e),o&&(null==n||n.dispose())}))}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var e;const t=null===(e=this._diffModel.get())||void 0===e?void 0:e.diff.get();return t?t.mappings.map((e=>{const t=e.lineRangeMapping;let i,n,o,s,r=t.innerChanges;return t.original.isEmpty?(i=t.original.startLineNumber-1,n=0,r=void 0):(i=t.original.startLineNumber,n=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(o=t.modified.startLineNumber-1,s=0,r=void 0):(o=t.modified.startLineNumber,s=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:o,modifiedEndLineNumber:s,charChanges:null==r?void 0:r.map((e=>({originalStartLineNumber:e.originalRange.startLineNumber,originalStartColumn:e.originalRange.startColumn,originalEndLineNumber:e.originalRange.endLineNumber,originalEndColumn:e.originalRange.endColumn,modifiedStartLineNumber:e.modifiedRange.startLineNumber,modifiedStartColumn:e.modifiedRange.startColumn,modifiedEndLineNumber:e.modifiedRange.endLineNumber,modifiedEndColumn:e.modifiedRange.endColumn})))}})):null}revert(e){if(e.innerChanges)return void this.revertRangeMappings(e.innerChanges);const t=this._diffModel.get();t&&t.isDiffUpToDate.get()&&this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){const t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;const i=e.map((e=>({range:e.modifiedRange,text:t.model.original.getValueInRange(e.originalRange)})));this._editors.modified.executeEdits("diffEditor",i)}_goTo(e){this._editors.modified.setPosition(new H.L(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){var t,i,n,s;const r=null===(i=null===(t=this._diffModel.get())||void 0===t?void 0:t.diff.get())||void 0===i?void 0:i.mappings;if(!r||0===r.length)return;const a=this._editors.modified.getPosition().lineNumber;let l;l="next"===e?null!==(n=r.find((e=>e.lineRangeMapping.modified.startLineNumber>a)))&&void 0!==n?n:r[0]:null!==(s=(0,o.dF)(r,(e=>e.lineRangeMapping.modified.startLineNumber{var t;const i=null===(t=e.diff.get())||void 0===t?void 0:t.mappings;i&&0!==i.length&&this._goTo(i[0])}))}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){var e,t;const i=this._editors.modified.hasWidgetFocus(),n=i?this._editors.modified:this._editors.original,o=i?this._editors.original:this._editors.modified;let s;const r=n.getSelection();if(r){const n=null===(t=null===(e=this._diffModel.get())||void 0===e?void 0:e.diff.get())||void 0===t?void 0:t.mappings.map((e=>i?e.lineRangeMapping.flip():e.lineRangeMapping));if(n){const e=(0,O.cV)(r.getStartPosition(),n),t=(0,O.cV)(r.getEndPosition(),n);s=V.e.plusRange(e,t)}}return{destination:o,destinationSelection:s}}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(){var e;const t=null===(e=this._diffModel.get())||void 0===e?void 0:e.unchangedRegions.get();t&&(0,l.PS)((e=>{for(const i of t)i.collapseAll(e)}))}showAllUnchangedRegions(){var e;const t=null===(e=this._diffModel.get())||void 0===e?void 0:e.unchangedRegions.get();t&&(0,l.PS)((e=>{for(const i of t)i.showAll(e)}))}};Rt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Mt(3,vt.i6),Mt(4,Z.TG),Mt(5,k.$),Mt(6,G.IV),Mt(7,bt.ek)],Rt)},78713:(e,t,i)=>{"use strict";i.d(t,{O:()=>w});var n,o=i(65321),s=i(56811),r=i(73046),a=i(59365),l=i(5976),d=i(21070),c=i(54282),h=i(25670),u=i(98401),g=i(15512),p=i(45463),m=i(50187),f=i(24314),v=i(96887),_=i(63580),b=i(72065);let w=n=class extends l.JT{static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,i,o){super(),this._editors=e,this._diffModel=t,this._options=i,this._instantiationService=o,this._modifiedOutlineSource=(0,c.kA)(this,(e=>{const t=this._editors.modifiedModel.read(e),i=n._breadcrumbsSourceFactory.read(e);return t&&i?i(t,this._instantiationService):void 0})),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition((e=>{if(3===e.reason){const e=this._diffModel.get();(0,d.PS)((t=>{for(const i of this._editors.original.getSelections()||[])null==e||e.ensureOriginalLineIsVisible(i.getStartPosition().lineNumber,0,t),null==e||e.ensureOriginalLineIsVisible(i.getEndPosition().lineNumber,0,t)}))}}))),this._register(this._editors.modified.onDidChangeCursorPosition((e=>{if(3===e.reason){const e=this._diffModel.get();(0,d.PS)((t=>{for(const i of this._editors.modified.getSelections()||[])null==e||e.ensureModifiedLineIsVisible(i.getStartPosition().lineNumber,0,t),null==e||e.ensureModifiedLineIsVisible(i.getEndPosition().lineNumber,0,t)}))}})));const s=this._diffModel.map(((e,t)=>{var i,n;const o=null!==(i=null==e?void 0:e.unchangedRegions.read(t))&&void 0!==i?i:[];return 1===o.length&&1===o[0].modifiedLineNumber&&o[0].lineCount===(null===(n=this._editors.modifiedModel.read(t))||void 0===n?void 0:n.getLineCount())?[]:o}));this.viewZones=(0,d.Be)(this,((e,t)=>{const i=this._modifiedOutlineSource.read(e);if(!i)return{origViewZones:[],modViewZones:[]};const n=[],o=[],r=this._options.renderSideBySide.read(e),a=s.read(e);for(const s of a)if(!s.shouldHideControls(e)){{const e=(0,d.nK)(this,(e=>s.getHiddenOriginalRange(e).startLineNumber-1)),o=new g.GD(e,24);n.push(o),t.add(new S(this._editors.original,o,s,s.originalUnchangedRange,!r,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0)),this._options))}{const e=(0,d.nK)(this,(e=>s.getHiddenModifiedRange(e).startLineNumber-1)),n=new g.GD(e,24);o.push(n),t.add(new S(this._editors.modified,n,s,s.modifiedUnchangedRange,!1,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0)),this._options))}}return{origViewZones:n,modViewZones:o}}));const l={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},v={description:"Fold Unchanged",glyphMarginHoverMessage:new a.W5(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,_.NC)("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+h.k.asClassName(r.l.fold),zIndex:10001};this._register((0,g.RP)(this._editors.original,(0,d.nK)(this,(e=>{const t=s.read(e),i=t.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:l})));for(const n of t)n.shouldHideControls(e)&&i.push({range:f.e.fromPositions(new m.L(n.originalLineNumber,1)),options:v});return i})))),this._register((0,g.RP)(this._editors.modified,(0,d.nK)(this,(e=>{const t=s.read(e),i=t.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:l})));for(const n of t)n.shouldHideControls(e)&&i.push({range:p.z.ofLength(n.modifiedLineNumber,1).toInclusiveRange(),options:v});return i})))),this._register((0,d.EH)((e=>{const t=s.read(e);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(t.map((t=>t.getHiddenOriginalRange(e).toInclusiveRange())).filter(u.$K)),this._editors.modified.setHiddenAreas(t.map((t=>t.getHiddenModifiedRange(e).toInclusiveRange())).filter(u.$K))}finally{this._isUpdatingHiddenAreas=!1}}))),this._register(this._editors.modified.onMouseUp((e=>{var t;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("fold-unchanged"))){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.modifiedUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}}))),this._register(this._editors.original.onMouseUp((e=>{var t;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("fold-unchanged"))){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.originalUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}})))}};var y,C;w._breadcrumbsSourceFactory=(0,d.uh)("breadcrumbsSourceFactory",void 0),w=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(y=3,C=b.TG,function(e,t){C(e,t,y)})],w);class S extends g.N9{constructor(e,t,i,n,a,l,c,h){const u=(0,o.h)("div.diff-hidden-lines-widget");super(e,t,u.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this._hide=a,this._modifiedOutlineSource=l,this._revealModifiedHiddenLine=c,this._options=h,this._nodes=(0,o.h)("div.diff-hidden-lines",[(0,o.h)("div.top@top",{title:(0,_.NC)("diff.hiddenLines.top","Click or drag to show more above")}),(0,o.h)("div.center@content",{style:{display:"flex"}},[(0,o.h)("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[(0,o.$)("a",{title:(0,_.NC)("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...(0,s.T)("$(unfold)"))]),(0,o.h)("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),(0,o.h)("div.bottom@bottom",{title:(0,_.NC)("diff.bottom","Click or drag to show more below"),role:"button"})]),u.root.appendChild(this._nodes.root);const p=(0,d.rD)(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));this._hide?(0,o.mc)(this._nodes.first):this._register((0,g.bg)(this._nodes.first,{width:p.map((e=>e.contentLeft))})),this._register((0,d.EH)((e=>{const t=this._unchangedRegion.visibleLineCountTop.read(e)+this._unchangedRegion.visibleLineCountBottom.read(e)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!t),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),this._nodes.top.classList.toggle("canMoveBottom",!t);const i=this._unchangedRegion.isDragged.read(e),n=this._editor.getDomNode();n&&(n.classList.toggle("draggingUnchangedRegion",!!i),"top"===i?(n.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),n.classList.toggle("canMoveBottom",!t)):"bottom"===i?(n.classList.toggle("canMoveTop",!t),n.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0)):(n.classList.toggle("canMoveTop",!1),n.classList.toggle("canMoveBottom",!1)))})));const m=this._editor;this._register((0,o.nm)(this._nodes.top,"mousedown",(e=>{if(0!==e.button)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const s=(0,o.Jj)(this._nodes.top),r=(0,o.nm)(s,"mousemove",(e=>{const o=e.clientY-t;i=i||Math.abs(o)>2;const s=Math.round(o/m.getOption(67)),r=Math.max(0,Math.min(n+s,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(r,void 0)})),a=(0,o.nm)(s,"mouseup",(e=>{i||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),r.dispose(),a.dispose()}))}))),this._register((0,o.nm)(this._nodes.bottom,"mousedown",(e=>{if(0!==e.button)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const s=(0,o.Jj)(this._nodes.bottom),r=(0,o.nm)(s,"mousemove",(e=>{const o=e.clientY-t;i=i||Math.abs(o)>2;const s=Math.round(o/m.getOption(67)),r=Math.max(0,Math.min(n-s,this._unchangedRegion.getMaxVisibleLineCountBottom())),a=m.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(r,void 0);const l=m.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);m.setScrollTop(m.getScrollTop()+(l-a))})),a=(0,o.nm)(s,"mouseup",(e=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!i){const e=m.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const t=m.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);m.setScrollTop(m.getScrollTop()+(t-e))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),r.dispose(),a.dispose()}))}))),this._register((0,d.EH)((e=>{const t=[];if(!this._hide){const n=i.getHiddenModifiedRange(e).length,a=(0,_.NC)("hiddenLines","{0} hidden lines",n),l=(0,o.$)("span",{title:(0,_.NC)("diff.hiddenLines.expandAll","Double click to unfold")},a);l.addEventListener("dblclick",(e=>{0===e.button&&(e.preventDefault(),this._unchangedRegion.showAll(void 0))})),t.push(l);const d=this._unchangedRegion.getHiddenModifiedRange(e),c=this._modifiedOutlineSource.getBreadcrumbItems(d,e);if(c.length>0){t.push((0,o.$)("span",void 0,"  |  "));for(let e=0;e{this._revealModifiedHiddenLine(i.startLineNumber)}}}}(0,o.mc)(this._nodes.others,...t)})))}}},48354:(e,t,i)=>{"use strict";i.d(t,{$F:()=>w,Jv:()=>f,LE:()=>m,W3:()=>b,fO:()=>c,i_:()=>p,iq:()=>u,n_:()=>v,rd:()=>g,rq:()=>_,vv:()=>h});var n=i(73046),o=i(25670),s=i(13961),r=i(63580),a=i(73910),l=i(59554);(0,a.P6G)("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},(0,r.NC)("diffEditor.move.border","The border color for text that got moved in the diff editor.")),(0,a.P6G)("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},(0,r.NC)("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor.")),(0,a.P6G)("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},(0,r.NC)("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets."));const d=(0,l.q5)("diff-insert",n.l.add,(0,r.NC)("diffInsertIcon","Line decoration for inserts in the diff editor.")),c=(0,l.q5)("diff-remove",n.l.remove,(0,r.NC)("diffRemoveIcon","Line decoration for removals in the diff editor.")),h=s.qx.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+o.k.asClassName(d),marginClassName:"gutter-insert"}),u=s.qx.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+o.k.asClassName(c),marginClassName:"gutter-delete"}),g=s.qx.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),p=s.qx.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),m=s.qx.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),f=s.qx.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),v=s.qx.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),_=s.qx.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),b=s.qx.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),w=s.qx.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"})},15512:(e,t,i)=>{"use strict";i.d(t,{t2:()=>L,DU:()=>_,GD:()=>y,N9:()=>w,Vm:()=>b,xx:()=>v,RP:()=>f,bg:()=>S,Sv:()=>k,GU:()=>D,W7:()=>E,Ap:()=>m,NW:()=>x,cV:()=>N});var n=i(35534),o=i(71050),s=i(76648);function r(){return s.OB&&!!s.OB.VSCODE_DEV}function a(e){if(r()){const t=function(){l||(l=new Set);const e=globalThis;return e.$hotReload_applyNewExports||(e.$hotReload_applyNewExports=e=>{const t={config:{mode:void 0},...e};for(const e of l){const i=e(t);if(i)return i}}),l}();return t.add(e),{dispose(){t.delete(e)}}}return{dispose(){}}}let l;r()&&a((({oldExports:e,newSrc:t,config:i})=>{if("patch-prototype"===i.mode)return t=>{var i,n;for(const o in t){const s=t[o];if(console.log(`[hot-reload] Patching prototype methods of '${o}'`,{exportedItem:s}),"function"==typeof s&&s.prototype){const r=e[o];if(r){for(const e of Object.getOwnPropertyNames(s.prototype)){const t=Object.getOwnPropertyDescriptor(s.prototype,e),a=Object.getOwnPropertyDescriptor(r.prototype,e);(null===(i=null==t?void 0:t.value)||void 0===i?void 0:i.toString())!==(null===(n=null==a?void 0:a.value)||void 0===n?void 0:n.toString())&&console.log(`[hot-reload] Patching prototype method '${o}.${e}'`),Object.defineProperty(r.prototype,e,t)}t[o]=r}}}return!0}}));var d=i(5976),c=i(21070),h=i(54534),u=i(50187),g=i(24314),p=i(45035);function m(e,t,i,n){if(0===e.length)return t;if(0===t.length)return e;const o=[];let s=0,r=0;for(;sc?(o.push(l),r++):(o.push(n(a,l)),s++,r++)}for(;s`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function v(e,t){return e.appendChild(t),(0,d.OF)((()=>{e.removeChild(t)}))}class _ extends d.JT{get width(){return this._width}get height(){return this._height}constructor(e,t){super(),this.elementSizeObserver=this._register(new h.I(e,t)),this._width=(0,c.uh)(this,this.elementSizeObserver.getWidth()),this._height=(0,c.uh)(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange((e=>(0,c.PS)((e=>{this._width.set(this.elementSizeObserver.getWidth(),e),this._height.set(this.elementSizeObserver.getHeight(),e)})))))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function b(e,t,i){let n=t.get(),o=n,s=n;const r=(0,c.uh)("animatedValue",n);let a,l=-1;function d(){const t=Date.now()-l;var i,c,h;s=Math.floor((c=o,h=n-o,(i=t)===300?c+h:h*(1-Math.pow(2,-10*i/300))+c)),t<300?a=e.requestAnimationFrame(d):s=n,r.set(s,void 0)}return i.add((0,c.nJ)({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(e,i)=>(e.didChange(t)&&(i.animate=i.animate||e.change),!0)},((i,r)=>{void 0!==a&&(e.cancelAnimationFrame(a),a=void 0),o=s,n=t.read(i),l=Date.now()-(r.animate?0:300),d()}))),r}class w extends d.JT{constructor(e,t,i){super(),this._register(new C(e,i)),this._register(S(i,{height:t.actualHeight,top:t.actualTop}))}}class y{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=(0,c.uh)(this,void 0),this._actualHeight=(0,c.uh)(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=e=>{this._actualTop.set(e,void 0)},this.onComputedHeight=e=>{this._actualHeight.set(e,void 0)}}}class C{constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId="managedOverlayWidget-"+C._counter++,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}function S(e,t){return(0,c.EH)((i=>{for(let[n,o]of Object.entries(t))o&&"object"==typeof o&&"read"in o&&(o=o.read(i)),"number"==typeof o&&(o=`${o}px`),n=n.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),e.style[n]=o}))}function x(e,t){return function(e,t){r()&&(0,c.aq)("reload",(t=>a((({oldExports:i})=>{if([...Object.values(i)].some((t=>e.includes(t))))return e=>(t(void 0),!0)})))).read(t)}([e],t),e}function k(e,t,i,n){const o=new d.SL,s=[];return o.add((0,c.gp)(((o,r)=>{const a=t.read(o),l=new Map,d=new Map;i&&i(!0),e.changeViewZones((e=>{for(const t of s)e.removeZone(t),null==n||n.delete(t);s.length=0;for(const t of a){const i=e.addZone(t);t.setZoneId&&t.setZoneId(i),s.push(i),null==n||n.add(i),l.set(t,i)}})),i&&i(!1),r.add((0,c.nJ)({createEmptyChangeSummary:()=>({zoneIds:[]}),handleChange(e,t){const i=d.get(e.changedObservable);return void 0!==i&&t.zoneIds.push(i),!0}},((t,n)=>{for(const e of a)e.onChange&&(d.set(e.onChange,l.get(e)),e.onChange.read(t));i&&i(!0),e.changeViewZones((e=>{for(const t of n.zoneIds)e.layoutZone(t)})),i&&i(!1)})))}))),o.add({dispose(){i&&i(!0),e.changeViewZones((e=>{for(const t of s)e.removeZone(t)})),null==n||n.clear(),i&&i(!1)}}),o}C._counter=0;class L extends o.A{dispose(){super.dispose(!0)}}function N(e,t){const i=(0,n.dF)(t,(t=>t.original.startLineNumber<=e.lineNumber));if(!i)return g.e.fromPositions(e);if(i.original.endLineNumberExclusive<=e.lineNumber){const t=e.lineNumber-i.original.endLineNumberExclusive+i.modified.endLineNumberExclusive;return g.e.fromPositions(new u.L(t,e.column))}if(!i.innerChanges)return g.e.fromPositions(new u.L(i.modified.startLineNumber,1));const o=(0,n.dF)(i.innerChanges,(t=>t.originalRange.getStartPosition().isBeforeOrEqual(e)));if(!o){const t=e.lineNumber-i.original.startLineNumber+i.modified.startLineNumber;return g.e.fromPositions(new u.L(t,e.column))}if(o.originalRange.containsPosition(e))return o.modifiedRange;{const t=(a=o.originalRange.getEndPosition(),l=e,a.lineNumber===l.lineNumber?new p.OE(0,l.column-a.column):new p.OE(l.lineNumber-a.lineNumber,l.column-1));return g.e.fromPositions((s=o.modifiedRange.getEndPosition(),0===(r=t).lineCount?new u.L(s.lineNumber,s.column+r.columnCount):new u.L(s.lineNumber+r.lineCount,r.columnCount+1)))}var s,r,a,l}function D(e,t,i){const n=e.bindTo(t);return(0,c.UV)({debugName:()=>`Set Context Key "${e.key}"`},(e=>{n.set(i(e))}))}function E(e,t){let i;return e.filter((e=>{const n=t(e,i);return i=e,n}))}},84527:(e,t,i)=>{"use strict";i.d(t,{H:()=>m});var n=i(36248),o=i(11640),s=i(15762),r=i(51381),a=i(71922),l=i(31106),d=i(94565),c=i(93983),h=i(72065),u=i(59422),g=i(97781),p=function(e,t){return function(i,n){t(i,n,e)}};let m=class extends s.Gm{constructor(e,t,i,n,o,s,r,a,l,d,c,h,u){super(e,{...n.getRawOptions(),overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()},i,o,s,r,a,l,d,c,h,u),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){n.jB(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([p(4,h.TG),p(5,o.$),p(6,d.H),p(7,c.i6),p(8,g.XE),p(9,u.lT),p(10,l.F),p(11,r.c_),p(12,a.p)],m)},92467:(e,t,i)=>{"use strict";i.d(t,{$:()=>E,N:()=>I});var n=i(77352),o=i(77514),s=i(17301),r=i(4669),a=i(5976),l=i(93379),d=i.n(l),c=i(7795),h=i.n(c),u=i(90569),g=i.n(u),p=i(3565),m=i.n(p),f=i(19216),v=i.n(f),_=i(44589),b=i.n(_),w=i(73044),y={};y.styleTagTransform=b(),y.setAttributes=m(),y.insert=g().bind(null,"head"),y.domAPI=h(),y.insertStyleElement=v(),d()(w.Z,y),w.Z&&w.Z.locals&&w.Z.locals;var C,S=i(52136),x=i(72042),k=i(68801),L=i(82963),N=i(50988),D=function(e,t){return function(i,n){t(i,n,e)}};let E=C=class{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new r.Q5,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const o=new a.SL,s=o.add((0,n.ap)(e,{...this._getRenderOptions(e,o),...t},i));return s.element.classList.add("rendered-markdown"),{element:s.element,dispose:()=>o.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:async(e,t)=>{var i,n,o;let s;e?s=this._languageService.getLanguageIdByLanguageName(e):this._options.editor&&(s=null===(i=this._options.editor.getModel())||void 0===i?void 0:i.getLanguageId()),s||(s=k.bd);const r=await(0,L.C2)(this._languageService,t,s),a=document.createElement("span");if(a.innerHTML=null!==(o=null===(n=C._ttpTokenizer)||void 0===n?void 0:n.createHTML(r))&&void 0!==o?o:r,this._options.editor){const e=this._options.editor.getOption(50);(0,S.N)(a,e)}else this._options.codeBlockFontFamily&&(a.style.fontFamily=this._options.codeBlockFontFamily);return void 0!==this._options.codeBlockFontSize&&(a.style.fontSize=this._options.codeBlockFontSize),a},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:t=>I(this._openerService,t,e.isTrusted),disposables:t}}}};async function I(e,t,i){try{return await e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:T(i)})}catch(e){return(0,s.dL)(e),!1}}function T(e){return!0===e||!(!e||!Array.isArray(e.enabledCommands))&&e.enabledCommands}E._ttpTokenizer=(0,o.Z)("tokenizeToString",{createHTML:e=>e}),E=C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([D(1,x.O),D(2,N.v)],E)},61329:(e,t,i)=>{"use strict";i.d(t,{OY:()=>s,Sj:()=>r,T4:()=>o,Uo:()=>a,hP:()=>l});var n=i(3860);class o{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromPositions(i.getEndPosition())}}class s{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromRange(i,0)}}class r{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromPositions(i.getStartPosition())}}class a{constructor(e,t,i,n,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class l{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},10291:(e,t,i)=>{"use strict";i.d(t,{U:()=>u});var n,o=i(97295),s=i(7988),r=i(24314),a=i(3860),l=i(1615),d=i(51381);const c=Object.create(null);function h(e,t){if(t<=0)return"";c[e]||(c[e]=["",e]);const i=c[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let u=n=class{static unshiftIndent(e,t,i,n,o){const r=s.i.visibleColumnFromColumn(e,t,i);if(o){const e=h(" ",n);return h(e,s.i.prevIndentTabStop(r,n)/n)}return h("\t",s.i.prevRenderTabStop(r,i)/i)}static shiftIndent(e,t,i,n,o){const r=s.i.visibleColumnFromColumn(e,t,i);if(o){const e=h(" ",n);return h(e,s.i.nextIndentTabStop(r,n)/n)}return h("\t",s.i.nextRenderTabStop(r,i)/i)}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let a=this._selection.endLineNumber;1===this._selection.endColumn&&i!==a&&(a-=1);const{tabSize:d,indentSize:c,insertSpaces:u}=this._opts,g=i===a;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let h=0,p=0;for(let m=i;m<=a;m++,h=p){p=0;const a=e.getLineContent(m);let f,v=o.LC(a);if((!this._opts.isUnshift||0!==a.length&&0!==v)&&(g||this._opts.isUnshift||0!==a.length)){if(-1===v&&(v=a.length),m>1&&s.i.visibleColumnFromColumn(a,v+1,d)%c!=0&&e.tokenization.isCheapToTokenize(m-1)){const t=(0,l.A)(this._opts.autoIndent,e,new r.e(m-1,e.getLineMaxColumn(m-1),m-1,e.getLineMaxColumn(m-1)),this._languageConfigurationService);if(t){if(p=h,t.appendText)for(let e=0,i=t.appendText.length;e=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(g=2,p=d.c_,function(e,t){p(e,t,g)})],u)},15115:(e,t,i)=>{"use strict";i.d(t,{k:()=>n});const n={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!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},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0}},800:(e,t,i)=>{"use strict";i.d(t,{Pe:()=>m,ei:()=>p,wk:()=>d});var n=i(15115),o=i(64141),s=i(22075),r=i(63580),a=i(23193),l=i(89872);const d=Object.freeze({id:"editor",order:5,type:"object",title:r.NC("editorConfigurationTitle","Editor"),scope:5}),c={...d,properties:{"editor.tabSize":{type:"number",default:s.D.tabSize,minimum:1,markdownDescription:r.NC("tabSize","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:r.NC("indentSize",'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:s.D.insertSpaces,markdownDescription:r.NC("insertSpaces","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:s.D.detectIndentation,markdownDescription:r.NC("detectIndentation","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:s.D.trimAutoWhitespace,description:r.NC("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:s.D.largeFileOptimizations,description:r.NC("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[r.NC("wordBasedSuggestions.off","Turn off Word Based Suggestions."),r.NC("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),r.NC("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),r.NC("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:r.NC("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[r.NC("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),r.NC("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),r.NC("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:r.NC("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:r.NC("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:r.NC("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:r.NC("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:r.NC("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:r.NC("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:r.NC("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:r.NC("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.NC("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:r.NC("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:r.NC("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.NC("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:n.k.maxComputationTime,description:r.NC("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:n.k.maxFileSize,description:r.NC("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:n.k.renderSideBySide,description:r.NC("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:n.k.renderSideBySideInlineBreakpoint,description:r.NC("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:n.k.useInlineViewWhenSpaceIsLimited,description:r.NC("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:n.k.renderMarginRevertIcon,description:r.NC("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:n.k.ignoreTrimWhitespace,description:r.NC("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:n.k.renderIndicators,description:r.NC("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:n.k.diffCodeLens,description:r.NC("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:n.k.diffWordWrap,markdownEnumDescriptions:[r.NC("wordWrap.off","Lines will never wrap."),r.NC("wordWrap.on","Lines will wrap at the viewport width."),r.NC("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:n.k.diffAlgorithm,markdownEnumDescriptions:[r.NC("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),r.NC("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:n.k.hideUnchangedRegions.enabled,markdownDescription:r.NC("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:n.k.hideUnchangedRegions.revealLineCount,markdownDescription:r.NC("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:n.k.hideUnchangedRegions.minimumLineCount,markdownDescription:r.NC("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:n.k.hideUnchangedRegions.contextLineCount,markdownDescription:r.NC("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:n.k.experimental.showMoves,markdownDescription:r.NC("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:n.k.experimental.showEmptyDecorations,description:r.NC("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")}}};for(const e of o.Bc){const t=e.schema;if(void 0!==t)if(void 0!==(h=t).type||void 0!==h.anyOf)c.properties[`editor.${e.name}`]=t;else for(const e in t)Object.hasOwnProperty.call(t,e)&&(c.properties[e]=t[e])}var h;let u=null;function g(){return null===u&&(u=Object.create(null),Object.keys(c.properties).forEach((e=>{u[e]=!0}))),u}function p(e){return g()[`editor.${e}`]||!1}function m(e){return g()[`diffEditor.${e}`]||!1}l.B.as(a.IP.Configuration).registerConfiguration(c)},64141:(e,t,i)=>{"use strict";i.d(t,{$J:()=>R,$r:()=>D,Av:()=>P,BH:()=>V,Bb:()=>c,Bc:()=>W,Bo:()=>I,LJ:()=>h,L_:()=>y,NY:()=>x,O7:()=>v,Zc:()=>b,d2:()=>N,gk:()=>M,hL:()=>B,n0:()=>E,qt:()=>O,rk:()=>g,y0:()=>d});var n=i(9488),o=i(36248),s=i(1432),r=i(22075),a=i(270),l=i(63580);const d=8;class c{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class h{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class u{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}compute(e,t,i){return i}}class g{constructor(e,t){this.newValue=e,this.didChange=t}}function p(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new g(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&n.fS(e,t);return new g(t,!i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const o=p(e[n],t[n]);o.didChange&&(e[n]=o.newValue,i=!0)}return new g(e,i)}class m{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return p(e,t)}validate(e){return this.defaultValue}}class f{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function v(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class _ extends f{constructor(e,t,i,n=void 0){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return v(e,this.defaultValue)}}function b(e,t,i,n){if(void 0===e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),o=Math.min(n,o),0|o)}class w extends f{static clampedInt(e,t,i,n){return b(e,t,i,n)}constructor(e,t,i,n,o,s=void 0){void 0!==s&&(s.type="integer",s.default=i,s.minimum=n,s.maximum=o),super(e,t,i,s),this.minimum=n,this.maximum=o}validate(e){return w.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function y(e,t,i,n){if(void 0===e)return t;const o=C.float(e,t);return C.clamp(o,i,n)}class C extends f{static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,o){void 0!==o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}validate(e){return this.validationFn(C.float(e,this.defaultValue))}}class S extends f{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n=void 0){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return S.string(e,this.defaultValue)}}function x(e,t,i,n){return"string"!=typeof e?t:n&&e in n?n[e]:-1===i.indexOf(e)?t:e}class k extends f{constructor(e,t,i,n,o=void 0){void 0!==o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return x(e,this.defaultValue,this._allowedValues)}}class L extends u{constructor(e,t,i,n,o,s,r=void 0){void 0!==r&&(r.type="string",r.enum=o,r.default=n),super(e,t,i,r),this._allowedValues=o,this._convert=s}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var N,D;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(N||(N={}));class E extends u{constructor(){super(51,"fontLigatures",E.OFF,{anyOf:[{type:"boolean",description:l.NC("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:l.NC("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:l.NC("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e||0===e.length?E.OFF:"true"===e?E.ON:e:Boolean(e)?E.ON:E.OFF}}E.OFF='"liga" off, "calt" off',E.ON='"liga" on, "calt" on';class I extends u{constructor(){super(54,"fontVariations",I.OFF,{anyOf:[{type:"boolean",description:l.NC("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:l.NC("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:l.NC("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?I.OFF:"true"===e?I.TRANSLATE:e:Boolean(e)?I.TRANSLATE:I.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}I.OFF="normal",I.TRANSLATE="translate";class T extends u{constructor(){super(53,"fontWeight",B.fontWeight,{anyOf:[{type:"number",minimum:T.MINIMUM_VALUE,maximum:T.MAXIMUM_VALUE,errorMessage:l.NC("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:T.SUGGESTION_VALUES}],default:B.fontWeight,description:l.NC("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(w.clampedInt(e,B.fontWeight,T.MINIMUM_VALUE,T.MAXIMUM_VALUE))}}T.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],T.MINIMUM_VALUE=1,T.MAXIMUM_VALUE=1e3;class M extends m{constructor(){super(144)}compute(e,t,i){return M.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const o=(i+e.viewLineCount+n)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:o,minimapLineCount:Math.floor(e.viewLineCount/o)}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const s=t.stableMinimapLayoutInput,r=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.paddingTop===s.paddingTop&&e.paddingBottom===s.paddingBottom&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let u=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const g=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,f=e.verticalScrollbarWidth,v=e.viewLineCount,_=e.remainingWidth,b=e.isViewportWrapping,w=h?2:3;let y=Math.floor(o*n);const C=y/o;let S=!1,x=!1,k=w*u,L=u/o,N=1;if("fill"===p||"fit"===p){const{typicalViewportLineCount:i,extraLinesBeforeFirstLine:s,extraLinesBeyondLastLine:l,desiredRatio:d,minimapLineCount:h}=M.computeContainedMinimapLineCount({viewLineCount:v,scrollBeyondLastLine:c,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:a,pixelRatio:o});if(v/h>1)S=!0,x=!0,u=1,k=1,L=u/o;else{let n=!1,c=u+1;if("fit"===p){const e=Math.ceil((s+v+l)*k);b&&r&&_<=t.stableFitRemainingWidth?(n=!0,c=t.stableFitMaxMinimapScale):n=e>y}if("fill"===p||n){S=!0;const n=u;k=Math.min(a*o,Math.max(1,Math.floor(1/d))),b&&r&&_<=t.stableFitRemainingWidth&&(c=t.stableFitMaxMinimapScale),u=Math.min(c,Math.max(1,Math.floor(k/w))),u>n&&(N=Math.min(2,u/n)),L=u/o/N,y=Math.ceil(Math.max(i,s+v+l)*k),b?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=_,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const D=Math.floor(g*L),E=Math.min(D,Math.max(0,Math.floor((_-f-2)*L/(l+L)))+d);let I=Math.floor(o*E);const T=I/o;return I=Math.floor(I*N),{renderMinimap:h?1:2,minimapLeft:"left"===m?0:i-E-f,minimapWidth:E,minimapHeightIsEditorHeight:S,minimapIsSampling:x,minimapScale:u,minimapLineHeight:k,minimapCanvasInnerWidth:I,minimapCanvasInnerHeight:y,minimapCanvasOuterWidth:T,minimapCanvasOuterHeight:C}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,o=0|t.lineHeight,s=0|t.lineNumbersDigitCount,r=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,d=t.viewLineCount,c=e.get(136),u="inherit"===c?e.get(135):c,g="inherit"===u?e.get(131):u,p=e.get(134),m=t.isDominatedByLongLines,f=e.get(57),v=0!==e.get(68).renderType,_=e.get(69),b=e.get(105),w=e.get(84),y=e.get(73),C=e.get(103),S=C.verticalScrollbarSize,x=C.verticalHasArrows,k=C.arrowSize,L=C.horizontalScrollbarSize,N=e.get(43),D="never"!==e.get(110);let E=e.get(66);N&&D&&(E+=16);let I=0;if(v){const e=Math.max(s,_);I=Math.round(e*a)}let T=0;f&&(T=o*t.glyphMarginDecorationLaneCount);let R=0,A=R+T,P=A+I,O=P+E;const F=i-T-I-E;let B=!1,W=!1,H=-1;"inherit"===u&&m?(B=!0,W=!0):"on"===g||"bounded"===g?W=!0:"wordWrapColumn"===g&&(H=p);const V=M._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:b,paddingTop:w.top,paddingBottom:w.bottom,minimap:y,verticalScrollbarWidth:S,viewLineCount:d,remainingWidth:F,isViewportWrapping:W},t.memory||new h);0!==V.renderMinimap&&0===V.minimapLeft&&(R+=V.minimapWidth,A+=V.minimapWidth,P+=V.minimapWidth,O+=V.minimapWidth);const z=F-V.minimapWidth,j=Math.max(1,Math.floor((z-S-2)/r)),U=x?k:0;return W&&(H=Math.max(1,j),"bounded"===g&&(H=Math.min(H,p))),{width:i,height:n,glyphMarginLeft:R,glyphMarginWidth:T,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:A,lineNumbersWidth:I,decorationsLeft:P,decorationsWidth:E,contentLeft:O,contentWidth:z,minimap:V,viewportColumn:j,isWordWrapMinified:B,isViewportWrapping:W,wrappingColumn:H,verticalScrollbarWidth:S,horizontalScrollbarHeight:L,overviewRuler:{top:U,width:S,height:n-2*U,right:0}}}}function R(e){const t=e.get(98);return"editable"===t?e.get(91):"on"!==t}function A(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}!function(e){e.Off="off",e.OnCode="onCode",e.On="on"}(D||(D={}));const P="inUntrustedWorkspace",O={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};function F(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const B={fontFamily:s.dz?"Menlo, Monaco, 'Courier New', monospace":s.IJ?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:s.dz?12:14,lineHeight:0,letterSpacing:0},W=[];function H(e){return W[e.id]=e,e}const V={acceptSuggestionOnCommitCharacter:H(new _(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:l.NC("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:H(new k(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",l.NC("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:l.NC("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:H(new class extends u{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[l.NC("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),l.NC("accessibilitySupport.on","Optimize for usage with a Screen Reader."),l.NC("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:l.NC("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:H(new w(3,"accessibilityPageSize",10,1,1073741824,{description:l.NC("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:H(new S(4,"ariaLabel",l.NC("editorViewAccessibleLabel","Editor content"))),ariaRequired:H(new _(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:H(new _(8,"screenReaderAnnounceInlineSuggestion",!0,{description:l.NC("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:H(new k(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.NC("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),l.NC("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:l.NC("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:H(new k(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.NC("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),l.NC("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:l.NC("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:H(new k(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",l.NC("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:l.NC("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:H(new k(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",l.NC("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:l.NC("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:H(new k(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.NC("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),l.NC("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:l.NC("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:H(new L(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[l.NC("editor.autoIndent.none","The editor will not insert indentation automatically."),l.NC("editor.autoIndent.keep","The editor will keep the current line's indentation."),l.NC("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),l.NC("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),l.NC("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:l.NC("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:H(new _(13,"automaticLayout",!1)),autoSurround:H(new k(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[l.NC("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),l.NC("editor.autoSurround.quotes","Surround with quotes but not brackets."),l.NC("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:l.NC("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:H(new class extends u{constructor(){const e={enabled:r.D.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:r.D.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.NC("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:l.NC("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:v(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:v(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}),bracketPairGuides:H(new class extends u{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[l.NC("editor.guides.bracketPairs.true","Enables bracket pair guides."),l.NC("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),l.NC("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:l.NC("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[l.NC("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),l.NC("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),l.NC("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:l.NC("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:l.NC("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:l.NC("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[l.NC("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),l.NC("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),l.NC("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:l.NC("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{bracketPairs:F(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:F(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:v(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:v(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:F(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}),stickyTabStops:H(new _(116,"stickyTabStops",!1,{description:l.NC("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:H(new _(17,"codeLens",!0,{description:l.NC("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:H(new S(18,"codeLensFontFamily","",{description:l.NC("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:H(new w(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:l.NC("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:H(new _(20,"colorDecorators",!0,{description:l.NC("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:H(new k(147,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[l.NC("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),l.NC("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),l.NC("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:l.NC("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:H(new w(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:l.NC("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:H(new _(22,"columnSelection",!1,{description:l.NC("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:H(new class extends u{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:l.NC("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:l.NC("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:v(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:v(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:H(new _(24,"contextmenu",!0)),copyWithSyntaxHighlighting:H(new _(25,"copyWithSyntaxHighlighting",!0,{description:l.NC("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:H(new L(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:l.NC("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:H(new k(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[l.NC("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),l.NC("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),l.NC("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:l.NC("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:H(new L(28,"cursorStyle",N.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return N.Line;case"block":return N.Block;case"underline":return N.Underline;case"line-thin":return N.LineThin;case"block-outline":return N.BlockOutline;case"underline-thin":return N.UnderlineThin}}),{description:l.NC("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:H(new w(29,"cursorSurroundingLines",0,0,1073741824,{description:l.NC("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:H(new k(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[l.NC("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),l.NC("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:l.NC("cursorSurroundingLinesStyle","Controls when `#cursorSurroundingLines#` should be enforced.")})),cursorWidth:H(new w(31,"cursorWidth",0,0,1073741824,{markdownDescription:l.NC("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:H(new _(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:H(new _(33,"disableMonospaceOptimizations",!1)),domReadOnly:H(new _(34,"domReadOnly",!1)),dragAndDrop:H(new _(35,"dragAndDrop",!0,{description:l.NC("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:H(new class extends _{constructor(){super(37,"emptySelectionClipboard",!0,{description:l.NC("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),dropIntoEditor:H(new class extends u{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.NC("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:l.NC("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[l.NC("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),l.NC("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:v(t.enabled,this.defaultValue.enabled),showDropSelector:x(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}),stickyScroll:H(new class extends u{constructor(){const e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(115,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:l.NC("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:l.NC("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:l.NC("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:l.NC("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:v(t.enabled,this.defaultValue.enabled),maxLineCount:w.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:x(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:v(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}),experimentalWhitespaceRendering:H(new k(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[l.NC("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),l.NC("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),l.NC("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:l.NC("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:H(new S(39,"extraEditorClassName","")),fastScrollSensitivity:H(new C(40,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:l.NC("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:H(new class extends u{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:l.NC("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[l.NC("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),l.NC("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),l.NC("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:l.NC("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[l.NC("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),l.NC("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),l.NC("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:l.NC("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:l.NC("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:s.dz},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:l.NC("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:l.NC("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:v(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":x(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":x(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:v(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:v(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:v(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:H(new _(42,"fixedOverflowWidgets",!1)),folding:H(new _(43,"folding",!0,{description:l.NC("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:H(new k(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[l.NC("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),l.NC("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:l.NC("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:H(new _(45,"foldingHighlight",!0,{description:l.NC("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:H(new _(46,"foldingImportsByDefault",!1,{description:l.NC("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:H(new w(47,"foldingMaximumRegions",5e3,10,65e3,{description:l.NC("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:H(new _(48,"unfoldOnClickAfterEndOfLine",!1,{description:l.NC("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:H(new S(49,"fontFamily",B.fontFamily,{description:l.NC("fontFamily","Controls the font family.")})),fontInfo:H(new class extends m{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:H(new E),fontSize:H(new class extends f{constructor(){super(52,"fontSize",B.fontSize,{type:"number",minimum:6,maximum:100,default:B.fontSize,description:l.NC("fontSize","Controls the font size in pixels.")})}validate(e){const t=C.float(e,this.defaultValue);return 0===t?B.fontSize:C.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:H(new T),fontVariations:H(new I),formatOnPaste:H(new _(55,"formatOnPaste",!1,{description:l.NC("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:H(new _(56,"formatOnType",!1,{description:l.NC("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:H(new _(57,"glyphMargin",!0,{description:l.NC("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:H(new class extends u{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[l.NC("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),l.NC("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),l.NC("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:l.NC("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:l.NC("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:l.NC("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:l.NC("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:l.NC("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:l.NC("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:l.NC("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:l.NC("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:l.NC("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:l.NC("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:l.NC("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,s;if(!e||"object"!=typeof e)return this.defaultValue;const r=e;return{multiple:x(r.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=r.multipleDefinitions)&&void 0!==t?t:x(r.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=r.multipleTypeDefinitions)&&void 0!==i?i:x(r.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=r.multipleDeclarations)&&void 0!==n?n:x(r.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=r.multipleImplementations)&&void 0!==o?o:x(r.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(s=r.multipleReferences)&&void 0!==s?s:x(r.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:S.string(r.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:S.string(r.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:S.string(r.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:S.string(r.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:S.string(r.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:H(new _(59,"hideCursorInOverviewRuler",!1,{description:l.NC("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:H(new class extends u{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:l.NC("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:l.NC("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:l.NC("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:l.NC("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:l.NC("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:v(t.enabled,this.defaultValue.enabled),delay:w.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:v(t.sticky,this.defaultValue.sticky),hidingDelay:w.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:v(t.above,this.defaultValue.above)}}}),inDiffEditor:H(new _(61,"inDiffEditor",!1)),letterSpacing:H(new C(64,"letterSpacing",B.letterSpacing,(e=>C.clamp(e,-5,20)),{description:l.NC("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:H(new class extends u{constructor(){const e={enabled:D.OnCode};super(65,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[D.Off,D.OnCode,D.On],default:e.enabled,enumDescriptions:[l.NC("editor.lightbulb.enabled.off","Disable the code action menu."),l.NC("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),l.NC("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:l.NC("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:x(e.enabled,this.defaultValue.enabled,[D.Off,D.OnCode,D.On])}:this.defaultValue}}),lineDecorationsWidth:H(new class extends u{constructor(){super(66,"lineDecorationsWidth",10)}validate(e){return"string"==typeof e&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):w.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?w.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}),lineHeight:H(new class extends C{constructor(){super(67,"lineHeight",B.lineHeight,(e=>C.clamp(e,0,150)),{markdownDescription:l.NC("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:H(new class extends u{constructor(){super(68,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[l.NC("lineNumbers.off","Line numbers are not rendered."),l.NC("lineNumbers.on","Line numbers are rendered as absolute number."),l.NC("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),l.NC("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:l.NC("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:H(new w(69,"lineNumbersMinChars",5,1,300)),linkedEditing:H(new _(70,"linkedEditing",!1,{description:l.NC("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:H(new _(71,"links",!0,{description:l.NC("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:H(new k(72,"matchBrackets","always",["always","near","never"],{description:l.NC("matchBrackets","Highlight matching brackets.")})),minimap:H(new class extends u{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(73,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:l.NC("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:l.NC("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[l.NC("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),l.NC("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),l.NC("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:l.NC("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:l.NC("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:l.NC("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:l.NC("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:l.NC("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:l.NC("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:v(t.enabled,this.defaultValue.enabled),autohide:v(t.autohide,this.defaultValue.autohide),size:x(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:x(t.side,this.defaultValue.side,["right","left"]),showSlider:x(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:v(t.renderCharacters,this.defaultValue.renderCharacters),scale:w.clampedInt(t.scale,1,1,3),maxColumn:w.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:H(new k(74,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:H(new C(75,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:l.NC("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:H(new _(76,"mouseWheelZoom",!1,{markdownDescription:s.dz?l.NC("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):l.NC("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:H(new _(77,"multiCursorMergeOverlapping",!0,{description:l.NC("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:H(new L(78,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?s.dz?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[l.NC("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),l.NC("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:l.NC({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:H(new k(79,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[l.NC("multiCursorPaste.spread","Each cursor pastes a single line of the text."),l.NC("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:l.NC("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:H(new w(80,"multiCursorLimit",1e4,1,1e5,{markdownDescription:l.NC("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:H(new k(81,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[l.NC("occurrencesHighlight.off","Does not highlight occurrences."),l.NC("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),l.NC("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:l.NC("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:H(new _(82,"overviewRulerBorder",!0,{description:l.NC("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:H(new w(83,"overviewRulerLanes",3,0,3)),padding:H(new class extends u{constructor(){super(84,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:l.NC("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:l.NC("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:w.clampedInt(t.top,0,0,1e3),bottom:w.clampedInt(t.bottom,0,0,1e3)}}}),pasteAs:H(new class extends u{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(85,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.NC("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:l.NC("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[l.NC("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),l.NC("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:v(t.enabled,this.defaultValue.enabled),showPasteSelector:x(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}),parameterHints:H(new class extends u{constructor(){const e={enabled:!0,cycle:!0};super(86,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:l.NC("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:l.NC("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:v(t.enabled,this.defaultValue.enabled),cycle:v(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:H(new k(87,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[l.NC("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),l.NC("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:l.NC("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:H(new _(88,"definitionLinkOpensInPeek",!1,{description:l.NC("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:H(new class extends u{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[l.NC("on","Quick suggestions show inside the suggest widget"),l.NC("inline","Quick suggestions show as ghost text"),l.NC("off","Quick suggestions are disabled")]}];super(89,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:l.NC("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:l.NC("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:l.NC("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:l.NC("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if("boolean"==typeof e){const t=e?"on":"off";return{comments:t,strings:t,other:t}}if(!e||"object"!=typeof e)return this.defaultValue;const{other:t,comments:i,strings:n}=e,o=["on","inline","off"];let s,r,a;return s="boolean"==typeof t?t?"on":"off":x(t,this.defaultValue.other,o),r="boolean"==typeof i?i?"on":"off":x(i,this.defaultValue.comments,o),a="boolean"==typeof n?n?"on":"off":x(n,this.defaultValue.strings,o),{other:s,comments:r,strings:a}}}),quickSuggestionsDelay:H(new w(90,"quickSuggestionsDelay",10,0,1073741824,{description:l.NC("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:H(new _(91,"readOnly",!1)),readOnlyMessage:H(new class extends u{constructor(){super(92,"readOnlyMessage",void 0)}validate(e){return e&&"object"==typeof e?e:this.defaultValue}}),renameOnType:H(new _(93,"renameOnType",!1,{description:l.NC("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:l.NC("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:H(new _(94,"renderControlCharacters",!0,{description:l.NC("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:H(new k(95,"renderFinalNewline",s.IJ?"dimmed":"on",["off","on","dimmed"],{description:l.NC("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:H(new k(96,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",l.NC("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:l.NC("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:H(new _(97,"renderLineHighlightOnlyWhenFocus",!1,{description:l.NC("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:H(new k(98,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:H(new k(99,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",l.NC("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),l.NC("renderWhitespace.selection","Render whitespace characters only on selected text."),l.NC("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:l.NC("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:H(new w(100,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:H(new _(101,"roundedSelection",!0,{description:l.NC("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:H(new class extends u{constructor(){const e=[],t={type:"number",description:l.NC("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(102,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:l.NC("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:l.NC("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if("number"==typeof i)t.push({column:w.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:w.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:H(new class extends u{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(103,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[l.NC("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),l.NC("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),l.NC("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:l.NC("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[l.NC("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),l.NC("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),l.NC("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:l.NC("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:l.NC("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:l.NC("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:l.NC("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:l.NC("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=w.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=w.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:w.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:A(t.vertical,this.defaultValue.vertical),horizontal:A(t.horizontal,this.defaultValue.horizontal),useShadows:v(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:v(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:v(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:v(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:v(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:w.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:w.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:v(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:v(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}}),scrollBeyondLastColumn:H(new w(104,"scrollBeyondLastColumn",4,0,1073741824,{description:l.NC("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:H(new _(105,"scrollBeyondLastLine",!0,{description:l.NC("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:H(new _(106,"scrollPredominantAxis",!0,{description:l.NC("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:H(new _(107,"selectionClipboard",!0,{description:l.NC("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:s.IJ})),selectionHighlight:H(new _(108,"selectionHighlight",!0,{description:l.NC("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:H(new _(109,"selectOnLineNumbers",!0)),showFoldingControls:H(new k(110,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[l.NC("showFoldingControls.always","Always show the folding controls."),l.NC("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),l.NC("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:l.NC("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:H(new _(111,"showUnused",!0,{description:l.NC("showUnused","Controls fading out of unused code.")})),showDeprecated:H(new _(139,"showDeprecated",!0,{description:l.NC("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:H(new class extends u{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(140,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:l.NC("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[l.NC("editor.inlayHints.on","Inlay hints are enabled"),l.NC("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",s.dz?"Ctrl+Option":"Ctrl+Alt"),l.NC("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",s.dz?"Ctrl+Option":"Ctrl+Alt"),l.NC("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:l.NC("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:l.NC("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:l.NC("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return"boolean"==typeof t.enabled&&(t.enabled=t.enabled?"on":"off"),{enabled:x(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:w.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily),padding:v(t.padding,this.defaultValue.padding)}}}),snippetSuggestions:H(new k(112,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[l.NC("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),l.NC("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),l.NC("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),l.NC("snippetSuggestions.none","Do not show snippet suggestions.")],description:l.NC("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:H(new class extends u{constructor(){super(113,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:l.NC("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:l.NC("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:v(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:v(e.selectSubwords,this.defaultValue.selectSubwords)}:this.defaultValue}}),smoothScrolling:H(new _(114,"smoothScrolling",!1,{description:l.NC("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:H(new w(117,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:H(new class extends u{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(118,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[l.NC("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),l.NC("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:l.NC("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:l.NC("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:l.NC("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:l.NC("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[l.NC("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),l.NC("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),l.NC("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),l.NC("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:l.NC("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:l.NC("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:l.NC("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:l.NC("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:l.NC("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:l.NC("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:l.NC("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:l.NC("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:x(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:v(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:v(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:v(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:v(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:x(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:v(t.showIcons,this.defaultValue.showIcons),showStatusBar:v(t.showStatusBar,this.defaultValue.showStatusBar),preview:v(t.preview,this.defaultValue.preview),previewMode:x(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:v(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:v(t.showMethods,this.defaultValue.showMethods),showFunctions:v(t.showFunctions,this.defaultValue.showFunctions),showConstructors:v(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:v(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:v(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:v(t.showFields,this.defaultValue.showFields),showVariables:v(t.showVariables,this.defaultValue.showVariables),showClasses:v(t.showClasses,this.defaultValue.showClasses),showStructs:v(t.showStructs,this.defaultValue.showStructs),showInterfaces:v(t.showInterfaces,this.defaultValue.showInterfaces),showModules:v(t.showModules,this.defaultValue.showModules),showProperties:v(t.showProperties,this.defaultValue.showProperties),showEvents:v(t.showEvents,this.defaultValue.showEvents),showOperators:v(t.showOperators,this.defaultValue.showOperators),showUnits:v(t.showUnits,this.defaultValue.showUnits),showValues:v(t.showValues,this.defaultValue.showValues),showConstants:v(t.showConstants,this.defaultValue.showConstants),showEnums:v(t.showEnums,this.defaultValue.showEnums),showEnumMembers:v(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:v(t.showKeywords,this.defaultValue.showKeywords),showWords:v(t.showWords,this.defaultValue.showWords),showColors:v(t.showColors,this.defaultValue.showColors),showFiles:v(t.showFiles,this.defaultValue.showFiles),showReferences:v(t.showReferences,this.defaultValue.showReferences),showFolders:v(t.showFolders,this.defaultValue.showFolders),showTypeParameters:v(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:v(t.showSnippets,this.defaultValue.showSnippets),showUsers:v(t.showUsers,this.defaultValue.showUsers),showIssues:v(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:H(new class extends u{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:l.NC("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[l.NC("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),l.NC("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),l.NC("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:l.NC("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:l.NC("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:l.NC("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:v(t.enabled,this.defaultValue.enabled),mode:x(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:x(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:v(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:v(t.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily)}}}),inlineEdit:H(new class extends u{constructor(){const e={enabled:!1,showToolbar:"onHover",fontFamily:"default",keepOnBlur:!1,backgroundColoring:!1};super(63,"experimentalInlineEdit",e,{"editor.experimentalInlineEdit.enabled":{type:"boolean",default:e.enabled,description:l.NC("inlineEdit.enabled","Controls whether to show inline edits in the editor.")},"editor.experimentalInlineEdit.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[l.NC("inlineEdit.showToolbar.always","Show the inline edit toolbar whenever an inline suggestion is shown."),l.NC("inlineEdit.showToolbar.onHover","Show the inline edit toolbar when hovering over an inline suggestion."),l.NC("inlineEdit.showToolbar.never","Never show the inline edit toolbar.")],description:l.NC("inlineEdit.showToolbar","Controls when to show the inline edit toolbar.")},"editor.experimentalInlineEdit.fontFamily":{type:"string",default:e.fontFamily,description:l.NC("inlineEdit.fontFamily","Controls the font family of the inline edit.")},"editor.experimentalInlineEdit.backgroundColoring":{type:"boolean",default:e.backgroundColoring,description:l.NC("inlineEdit.backgroundColoring","Controls whether to color the background of inline edits.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:v(t.enabled,this.defaultValue.enabled),showToolbar:x(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily),keepOnBlur:v(t.keepOnBlur,this.defaultValue.keepOnBlur),backgroundColoring:v(t.backgroundColoring,this.defaultValue.backgroundColoring)}}}),inlineCompletionsAccessibilityVerbose:H(new _(148,"inlineCompletionsAccessibilityVerbose",!1,{description:l.NC("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:H(new w(119,"suggestFontSize",0,0,1e3,{markdownDescription:l.NC("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:H(new w(120,"suggestLineHeight",0,0,1e3,{markdownDescription:l.NC("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:H(new _(121,"suggestOnTriggerCharacters",!0,{description:l.NC("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:H(new k(122,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[l.NC("suggestSelection.first","Always select the first suggestion."),l.NC("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),l.NC("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:l.NC("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:H(new k(123,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[l.NC("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),l.NC("tabCompletion.off","Disable tab completions."),l.NC("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:l.NC("tabCompletion","Enables tab completions.")})),tabIndex:H(new w(124,"tabIndex",0,-1,1073741824)),unicodeHighlight:H(new class extends u{constructor(){const e={nonBasicASCII:P,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:P,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(125,"unicodeHighlight",e,{[O.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,P],default:e.nonBasicASCII,description:l.NC("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[O.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:l.NC("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[O.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:l.NC("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[O.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,P],default:e.includeComments,description:l.NC("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[O.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,P],default:e.includeStrings,description:l.NC("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[O.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:l.NC("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[O.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:l.NC("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(o.fS(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},i=!0)),t.allowedLocales&&e&&(o.fS(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},i=!0));const n=super.applyUpdate(e,t);return i?new g(n.newValue,!0):n}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:F(t.nonBasicASCII,P,[!0,!1,P]),invisibleCharacters:v(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:v(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:F(t.includeComments,P,[!0,!1,P]),includeStrings:F(t.includeStrings,P,[!0,!1,P]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if("object"!=typeof e||!e)return t;const i={};for(const[t,n]of Object.entries(e))!0===n&&(i[t]=!0);return i}}),unusualLineTerminators:H(new k(126,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[l.NC("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),l.NC("unusualLineTerminators.off","Unusual line terminators are ignored."),l.NC("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:l.NC("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:H(new _(127,"useShadowDOM",!0)),useTabStops:H(new _(128,"useTabStops",!0,{description:l.NC("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:H(new k(129,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[l.NC("wordBreak.normal","Use the default line break rule."),l.NC("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:l.NC("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:H(new S(130,"wordSeparators",a.vu,{description:l.NC("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:H(new k(131,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[l.NC("wordWrap.off","Lines will never wrap."),l.NC("wordWrap.on","Lines will wrap at the viewport width."),l.NC({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),l.NC({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:l.NC({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:H(new S(132,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:H(new S(133,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:H(new w(134,"wordWrapColumn",80,1,1073741824,{markdownDescription:l.NC({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:H(new k(135,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:H(new k(136,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:H(new class extends m{constructor(){super(141)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(74)?n.push("mouse-default"):"copy"===t.get(74)&&n.push("mouse-copy"),t.get(111)&&n.push("showUnused"),t.get(139)&&n.push("showDeprecated"),n.join(" ")}}),defaultColorDecorators:H(new _(146,"defaultColorDecorators",!1,{markdownDescription:l.NC("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:H(new class extends m{constructor(){super(142)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:H(new _(143,"tabFocusMode",!1,{markdownDescription:l.NC("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:H(new M),wrappingInfo:H(new class extends m{constructor(){super(145)}compute(e,t,i){const n=t.get(144);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}),wrappingIndent:H(new class extends u{constructor(){super(137,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[l.NC("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),l.NC("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),l.NC("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),l.NC("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:l.NC("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,i){return 2===t.get(2)?0:i}}),wrappingStrategy:H(new class extends u{constructor(){super(138,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[l.NC("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),l.NC("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:l.NC("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return x(e,"simple",["simple","advanced"])}compute(e,t,i){return 2===t.get(2)?"advanced":i}})}},82334:(e,t,i)=>{"use strict";i.d(t,{C:()=>o});var n=i(4669);const o=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},27374:(e,t,i)=>{"use strict";i.d(t,{E4:()=>a,pR:()=>l});var n=i(1432),o=i(64141),s=i(82334);const r=n.dz?1.5:1.35;class a{static createFromValidatedSettings(e,t,i){const n=e.get(49),o=e.get(53),s=e.get(52),r=e.get(51),l=e.get(54),d=e.get(67),c=e.get(64);return a._create(n,o,s,r,l,d,c,t,i)}static _create(e,t,i,n,l,d,c,h,u){0===d?d=r*i:d<8&&(d*=i),(d=Math.round(d))<8&&(d=8);const g=1+(u?0:.1*s.C.getZoomLevel());return i*=g,d*=g,l===o.Bo.TRANSLATE&&("normal"===t||"bold"===t?l=o.Bo.OFF:(l=`'wght' ${parseInt(t,10)}`,t="normal")),new a({pixelRatio:h,fontFamily:e,fontWeight:t,fontSize:i,fontFeatureSettings:n,fontVariationSettings:l,lineHeight:d,letterSpacing:c})}constructor(e){this._bareFontInfoBrand=void 0,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.fontVariationSettings=e.fontVariationSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const e=o.hL.fontFamily,t=a._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}class l extends a{constructor(e,t){super(e),this._editorStylingBrand=void 0,this.version=2,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.fontVariationSettings===e.fontVariationSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}},44906:(e,t,i)=>{"use strict";i.d(t,{N:()=>o,q:()=>s});var n=i(85427);class o{constructor(e){const t=(0,n.K)(e);this._defaultValue=t,this._asciiMap=o._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const i=(0,n.K)(t);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 s{constructor(){this._actual=new o(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}clear(){return this._actual.clear()}}},7988:(e,t,i)=>{"use strict";i.d(t,{i:()=>o});var n=i(97295);class o{static _nextVisibleColumn(e,t,i){return 9===e?o.nextRenderTabStop(t,i):n.K7(e)||n.C8(e)?t+2:t+1}static visibleColumnFromColumn(e,t,i){const o=Math.min(t-1,e.length),s=e.substring(0,o),r=new n.W1(s);let a=0;for(;!r.eol();){const e=n.ZH(s,o,r.offset);r.nextGraphemeLength(),a=this._nextVisibleColumn(e,a,i)}return a}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const o=e.length,s=new n.W1(e);let r=0,a=1;for(;!s.eol();){const l=n.ZH(e,o,s.offset);s.nextGraphemeLength();const d=this._nextVisibleColumn(l,r,i),c=s.offset+1;if(d>=t)return d-t{"use strict";i.d(t,{h:()=>o});var n=i(24314);class o{static insert(e,t){return{range:new n.e(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}}}},8625:(e,t,i)=>{"use strict";i.d(t,{Bj:()=>D,CE:()=>W,DS:()=>K,HV:()=>ee,H_:()=>v,Jn:()=>G,Kh:()=>a,L7:()=>X,Mm:()=>l,N8:()=>x,Qb:()=>Q,Re:()=>P,Tf:()=>f,To:()=>J,UP:()=>H,Vs:()=>B,Xy:()=>C,YF:()=>Z,cK:()=>S,dI:()=>h,e9:()=>w,eS:()=>O,e_:()=>I,f9:()=>te,fY:()=>c,gS:()=>m,h1:()=>_,hw:()=>u,lK:()=>A,lS:()=>$,ll:()=>L,m$:()=>q,m1:()=>z,m3:()=>Y,m9:()=>R,n0:()=>d,oV:()=>U,qe:()=>y,r0:()=>V,ts:()=>j,vP:()=>b,zJ:()=>F,zd:()=>k,zu:()=>T,zw:()=>E});var n=i(63580),o=i(41264),s=i(73910),r=i(97781);const a=(0,s.P6G)("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},n.NC("lineHighlight","Background color for the highlight of line at the cursor position.")),l=(0,s.P6G)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:s.lRK},n.NC("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),d=((0,s.P6G)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},n.NC("rangeHighlight","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),(0,s.P6G)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:s.xL1,hcLight:s.xL1},n.NC("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),(0,s.P6G)("editor.symbolHighlightBackground",{dark:s.MUv,light:s.MUv,hcDark:null,hcLight:null},n.NC("symbolHighlight","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),(0,s.P6G)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:s.xL1,hcLight:s.xL1},n.NC("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),(0,s.P6G)("editorCursor.foreground",{dark:"#AEAFAD",light:o.Il.black,hcDark:o.Il.white,hcLight:"#0F4A85"},n.NC("caret","Color of the editor cursor."))),c=(0,s.P6G)("editorCursor.background",null,n.NC("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),h=(0,s.P6G)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},n.NC("editorWhitespaces","Color of whitespace characters in the editor.")),u=(0,s.P6G)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:o.Il.white,hcLight:"#292929"},n.NC("editorLineNumbers","Color of editor line numbers.")),g=(0,s.P6G)("editorIndentGuide.background",{dark:h,light:h,hcDark:h,hcLight:h},n.NC("editorIndentGuides","Color of the editor indentation guides."),!1,n.NC("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),p=(0,s.P6G)("editorIndentGuide.activeBackground",{dark:h,light:h,hcDark:h,hcLight:h},n.NC("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,n.NC("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),m=(0,s.P6G)("editorIndentGuide.background1",{dark:g,light:g,hcDark:g,hcLight:g},n.NC("editorIndentGuides1","Color of the editor indentation guides (1).")),f=(0,s.P6G)("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorIndentGuides2","Color of the editor indentation guides (2).")),v=(0,s.P6G)("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorIndentGuides3","Color of the editor indentation guides (3).")),_=(0,s.P6G)("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorIndentGuides4","Color of the editor indentation guides (4).")),b=(0,s.P6G)("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorIndentGuides5","Color of the editor indentation guides (5).")),w=(0,s.P6G)("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorIndentGuides6","Color of the editor indentation guides (6).")),y=(0,s.P6G)("editorIndentGuide.activeBackground1",{dark:p,light:p,hcDark:p,hcLight:p},n.NC("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),C=(0,s.P6G)("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),S=(0,s.P6G)("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),x=(0,s.P6G)("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),k=(0,s.P6G)("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),L=(0,s.P6G)("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),N=(0,s.P6G)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:s.xL1,hcLight:s.xL1},n.NC("editorActiveLineNumber","Color of editor active line number"),!1,n.NC("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),D=((0,s.P6G)("editorLineNumber.activeForeground",{dark:N,light:N,hcDark:N,hcLight:N},n.NC("editorActiveLineNumber","Color of editor active line number")),(0,s.P6G)("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},n.NC("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed."))),E=((0,s.P6G)("editorRuler.foreground",{dark:"#5A5A5A",light:o.Il.lightgrey,hcDark:o.Il.white,hcLight:"#292929"},n.NC("editorRuler","Color of the editor rulers.")),(0,s.P6G)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},n.NC("editorCodeLensForeground","Foreground color of editor CodeLens")),(0,s.P6G)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},n.NC("editorBracketMatchBackground","Background color behind matching brackets")),(0,s.P6G)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:s.lRK,hcLight:s.lRK},n.NC("editorBracketMatchBorder","Color for matching brackets boxes")),(0,s.P6G)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},n.NC("editorOverviewRulerBorder","Color of the overview ruler border."))),I=(0,s.P6G)("editorOverviewRuler.background",null,n.NC("editorOverviewRulerBackground","Background color of the editor overview ruler.")),T=((0,s.P6G)("editorGutter.background",{dark:s.cvW,light:s.cvW,hcDark:s.cvW,hcLight:s.cvW},n.NC("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,s.P6G)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:o.Il.fromHex("#fff").transparent(.8),hcLight:s.lRK},n.NC("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),(0,s.P6G)("editorUnnecessaryCode.opacity",{dark:o.Il.fromHex("#000a"),light:o.Il.fromHex("#0007"),hcDark:null,hcLight:null},n.NC("unnecessaryCodeOpacity","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."))),M=((0,s.P6G)("editorGhostText.border",{dark:null,light:null,hcDark:o.Il.fromHex("#fff").transparent(.8),hcLight:o.Il.fromHex("#292929").transparent(.8)},n.NC("editorGhostTextBorder","Border color of ghost text in the editor.")),(0,s.P6G)("editorGhostText.foreground",{dark:o.Il.fromHex("#ffffff56"),light:o.Il.fromHex("#0007"),hcDark:null,hcLight:null},n.NC("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),(0,s.P6G)("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},n.NC("editorGhostTextBackground","Background color of the ghost text in the editor.")),new o.Il(new o.VS(0,122,204,.6))),R=(0,s.P6G)("editorOverviewRuler.rangeHighlightForeground",{dark:M,light:M,hcDark:M,hcLight:M},n.NC("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),A=(0,s.P6G)("editorOverviewRuler.errorForeground",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hcDark:new o.Il(new o.VS(255,50,50,1)),hcLight:"#B5200D"},n.NC("overviewRuleError","Overview ruler marker color for errors.")),P=(0,s.P6G)("editorOverviewRuler.warningForeground",{dark:s.uoC,light:s.uoC,hcDark:s.pW3,hcLight:s.pW3},n.NC("overviewRuleWarning","Overview ruler marker color for warnings.")),O=(0,s.P6G)("editorOverviewRuler.infoForeground",{dark:s.c63,light:s.c63,hcDark:s.T83,hcLight:s.T83},n.NC("overviewRuleInfo","Overview ruler marker color for infos.")),F=(0,s.P6G)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},n.NC("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),B=(0,s.P6G)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},n.NC("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),W=(0,s.P6G)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},n.NC("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),H=(0,s.P6G)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),V=(0,s.P6G)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),z=(0,s.P6G)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),j=(0,s.P6G)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new o.Il(new o.VS(255,18,18,.8)),light:new o.Il(new o.VS(255,18,18,.8)),hcDark:new o.Il(new o.VS(255,50,50,1)),hcLight:""},n.NC("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),U=(0,s.P6G)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),q=(0,s.P6G)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),K=(0,s.P6G)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),$=(0,s.P6G)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),G=(0,s.P6G)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),Z=(0,s.P6G)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Q=(0,s.P6G)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),Y=(0,s.P6G)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),J=(0,s.P6G)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),X=(0,s.P6G)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),ee=(0,s.P6G)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),te=(0,s.P6G)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));(0,s.P6G)("editorUnicodeHighlight.border",{dark:s.uoC,light:s.uoC,hcDark:s.uoC,hcLight:s.uoC},n.NC("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),(0,s.P6G)("editorUnicodeHighlight.background",{dark:s.gpD,light:s.gpD,hcDark:s.gpD,hcLight:s.gpD},n.NC("editorUnicodeHighlight.background","Background color used to highlight unicode characters.")),(0,r.Ic)(((e,t)=>{const i=e.getColor(s.cvW),n=e.getColor(a),o=n&&!n.isTransparent()?n:i;o&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${o}; }`)}))},23795:(e,t,i)=>{"use strict";function n(e){let t=0,i=0,n=0,o=0;for(let s=0,r=e.length;sn})},83158:(e,t,i)=>{"use strict";i.d(t,{x:()=>s});var n=i(97295),o=i(7988);function s(e,t,i){let s=n.LC(e);return-1===s&&(s=e.length),function(e,t,i){let n=0;for(let i=0;i{"use strict";i.d(t,{i:()=>l,z:()=>a});var n=i(17301),o=i(19247),s=i(24314),r=i(35534);class a{static fromRangeInclusive(e){return new a(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(0===e.length)return[];let t=new l(e[0].slice());for(let i=1;it)throw new n.he(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber)),i=(0,r.Jw)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)this._normalizedRanges.splice(t,0,e);else if(t===i-1){const i=this._normalizedRanges[t];this._normalizedRanges[t]=i.join(e)}else{const n=this._normalizedRanges[t].join(this._normalizedRanges[i-1]).join(e);this._normalizedRanges.splice(t,i-t,n)}}contains(e){const t=(0,r.ti)(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=(0,r.ti)(this._normalizedRanges,(t=>t.startLineNumbere.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let i=0,n=0,o=null;for(;i=s.startLineNumber?o=new a(o.startLineNumber,Math.max(o.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(o),o=s)}return null!==o&&t.push(o),new l(t)}subtractFrom(e){const t=(0,r.J_)(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),i=(0,r.Jw)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)return new l([e]);const n=[];let o=e.startLineNumber;for(let e=t;eo&&n.push(new a(o,t.startLineNumber)),o=t.endLineNumberExclusive}return oe.toString())).join(", ")}getIntersection(e){const t=[];let i=0,n=0;for(;it.delta(e))))}}},19247:(e,t,i)=>{"use strict";i.d(t,{M:()=>s,q:()=>o});var n=i(17301);class o{static addRange(e,t){let i=0;for(;it)throw new n.he(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new o(this.start+e,this.endExclusive+e)}deltaStart(e){return new o(this.start+e,this.endExclusive)}deltaEnd(e){return new o(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new n.he(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new n.he(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString())).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length),0)}}},50187:(e,t,i)=>{"use strict";i.d(t,{L:()=>n});class n{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new n(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return n.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return n.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{"use strict";i.d(t,{e:()=>o});var n=i(50187);class o{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return o.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return o.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return o.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return o.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return o.plusRange(this,e)}static plusRange(e,t){let i,n,s,r;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,r=e.endColumn),new o(i,n,s,r)}intersectRanges(e){return o.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;const a=t.startLineNumber,l=t.startColumn,d=t.endLineNumber,c=t.endColumn;return id?(s=d,r=c):s===d&&(r=Math.min(r,c)),i>s||i===s&&n>r?null:new o(i,n,s,r)}equalsRange(e){return o.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return o.getEndPosition(this)}static getEndPosition(e){return new n.L(e.endLineNumber,e.endColumn)}getStartPosition(){return o.getStartPosition(this)}static getStartPosition(e){return new n.L(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new o(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new o(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return o.collapseToStart(this)}static collapseToStart(e){return new o(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return o.collapseToEnd(this)}static collapseToEnd(e){return new o(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new o(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}},3860:(e,t,i)=>{"use strict";i.d(t,{Y:()=>s});var n=i(50187),o=i(24314);class s extends o.e{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return s.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new s(this.startLineNumber,this.startColumn,e,t):new s(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n.L(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new n.L(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new s(e,t,this.endLineNumber,this.endColumn):new s(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new s(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new s(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i{"use strict";i.d(t,{HT:()=>u,kH:()=>h,oe:()=>c});var n=i(97295),o=i(1432),s=i(53060);let r,a,l;function d(){return r||(r=new TextDecoder("UTF-16LE")),r}function c(){return l||(l=o.r()?d():(a||(a=new TextDecoder("UTF-16BE")),a)),l}function h(e,t,i){const n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?function(e,t,i){const n=[];let o=0;for(let r=0;r=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i{"use strict";i.d(t,{b:()=>a,q:()=>r});var n=i(53060),o=i(50072);function s(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class r{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 0===this.oldText.length?`(insert@${this.oldPosition} "${s(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${s(this.oldText)}")`:`(replace@${this.oldPosition} "${s(this.oldText)}" with "${s(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const o=t.length;n.T4(e,o,i),i+=4;for(let s=0;s{"use strict";i.d(t,{D:()=>n});const n={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}},24929:(e,t,i)=>{"use strict";i.d(t,{u:()=>s});var n=i(44906);class o extends n.N{constructor(e){super(0);for(let t=0,i=e.length;t(t.hasOwnProperty(e)||(t[e]=(e=>new o(e))(e)),t[e])}()},270:(e,t,i)=>{"use strict";i.d(t,{Af:()=>r,eq:()=>a,t2:()=>d,vu:()=>s});var n=i(53725),o=i(91741);const s="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",r=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of s)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function a(e){let t=r;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const l=new o.S;function d(e,t,i,o,s){if(t=a(t),s||(s=n.$.first(l)),i.length>s.maxLen){let n=e-s.maxLen/2;return n<0?n=0:o+=n,d(e,t,i=i.substring(n,e+s.maxLen/2),o,s)}const r=Date.now(),h=e-1-o;let u=-1,g=null;for(let e=1;!(Date.now()-r>=s.timeBudget);e++){const n=h-s.windowSize*e;t.lastIndex=Math.max(0,n);const o=c(t,i,h,u);if(!o&&g)break;if(g=o,n<=0)break;u=n}if(g){const e={word:g[0],startColumn:o+1+g.index,endColumn:o+1+g.index+g[0].length};return t.lastIndex=0,e}return null}function c(e,t,i,n){let o;for(;o=e.exec(t);){const t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)return null}return null}l.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},47128:(e,t,i)=>{"use strict";i.d(t,{l:()=>o});var n=i(7988);class o{static whitespaceVisibleColumn(e,t,i){const o=e.length;let s=0,r=-1,a=-1;for(let l=0;l{"use strict";i.d(t,{A:()=>c});var n=i(97295),o=i(61329),s=i(55343),r=i(7988),a=i(10839),l=i(24314),d=i(50187);class c{static deleteRight(e,t,i,n){const s=[];let r=3!==e;for(let e=0,d=n.length;e=h.length+1)return!1;const u=h.charAt(c.column-2),g=n.get(u);if(!g)return!1;if((0,s.LN)(u)){if("never"===i)return!1}else if("never"===t)return!1;const p=h.charAt(c.column-1);let m=!1;for(const e of g)e.open===u&&e.close===p&&(m=!0);if(!m)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t1){const e=t.getLineContent(o.lineNumber),s=n.LC(e),a=-1===s?e.length+1:s+1;if(o.column<=a){const e=i.visibleColumnFromColumn(t,o),n=r.i.prevIndentTabStop(e,i.indentSize),s=i.columnFromVisibleColumn(t,o.lineNumber,n);return new l.e(o.lineNumber,s,o.lineNumber,o.column)}}return l.e.fromPositions(c.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=n.oH(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new d.L(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let r=null;i.sort(((e,t)=>d.L.compare(e.getStartPosition(),t.getEndPosition())));for(let s=0,a=i.length;s1&&(null==r?void 0:r.endLineNumber)!==e.lineNumber?(i=e.lineNumber-1,d=t.getLineMaxColumn(e.lineNumber-1),c=e.lineNumber,h=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,d=1,c=e.lineNumber,h=t.getLineMaxColumn(e.lineNumber));const u=new l.e(i,d,c,h);r=u,u.isEmpty()?n[s]=null:n[s]=new o.T4(u,"")}else n[s]=null;else n[s]=new o.T4(a,"")}return new s.Tp(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},28108:(e,t,i)=>{"use strict";i.d(t,{N:()=>n,P:()=>c});var n,o=i(98401),s=i(55343),r=i(10839),a=i(92896),l=i(50187),d=i(24314);class c{static addCursorDown(e,t,i){const n=[];let o=0;for(let a=0,l=t.length;at&&(i=t,n=e.model.getLineMaxColumn(i)),s.Vi.fromModelState(new s.rS(new d.e(r.lineNumber,1,i,n),2,0,new l.L(i,n),0))}const c=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumberc){const i=e.getLineCount();let n=a.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),s.Vi.fromViewState(t.viewState.move(!0,n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return s.Vi.fromModelState(t.modelState.move(!0,e.lineNumber,e.column,0))}}static word(e,t,i,n){const o=e.model.validatePosition(n);return s.Vi.fromModelState(a.w.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new s.Vi(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return s.Vi.fromViewState(new s.rS(new d.e(i,n,i,n),0,0,new l.L(i,n),0))}static moveTo(e,t,i,n,o){if(i){if(1===t.modelState.selectionStartKind)return this.word(e,t,i,n);if(2===t.modelState.selectionStartKind)return this.line(e,t,i,n,o)}const r=e.model.validatePosition(n),a=o?e.coordinatesConverter.validateViewPosition(new l.L(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return s.Vi.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,o,a){switch(i){case 0:return 4===a?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===a?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===a?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===a?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return 2===a?t.map((t=>s.Vi.fromViewState(r.o.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>s.Vi.fromModelState(r.o.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===a?t.map((t=>s.Vi.fromViewState(r.o.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>s.Vi.fromModelState(r.o.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){const s=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 13:{const i=this._lastLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 12:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 14:{const i=[];for(let o=0,r=t.length;oi.endLineNumber-1?i.endLineNumber-1:os.Vi.fromViewState(r.o.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let o=0,a=t.length;os.Vi.fromViewState(r.o.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let o=0,a=t.length;o{"use strict";i.d(t,{o:()=>c});var n=i(97295),o=i(7988),s=i(50187),r=i(24314),a=i(47128),l=i(55343);class d{constructor(e,t,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class c{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-n.HO(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new s.L(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),o=e.getLineContent(t.lineNumber),r=a.l.atomicPosition(o,t.column-1,i,0);if(-1!==r&&r+1>=n)return new s.L(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?c.leftPositionAtomicSoftTabs(t,i,e.tabSize):c.leftPosition(t,i);return new d(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,o){let s,r;if(i.hasSelection()&&!n)s=i.selection.startLineNumber,r=i.selection.startColumn;else{const n=i.position.delta(void 0,-(o-1)),a=t.normalizePosition(c.clipPositionColumn(n,t),0),l=c.left(e,t,a);s=l.lineNumber,r=l.column}return i.move(n,s,r,0)}static clipPositionColumn(e,t){return new s.L(e.lineNumber,c.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return iu?(i=u,n=l?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,h),r=m?0:h-o.i.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==c){const e=new s.L(i,n),o=t.normalizePosition(e,c);r+=n-o.column,i=o.lineNumber,n=o.column}return new d(i,n,r)}static down(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i+s,r,4)}static moveDown(e,t,i,n,o){let r,a;i.hasSelection()&&!n?(r=i.selection.endLineNumber,a=i.selection.endColumn):(r=i.position.lineNumber,a=i.position.column);let l,d=0;do{if(l=c.down(e,t,r+d,a,i.leftoverVisibleColumns,o,!0),t.normalizePosition(new s.L(l.lineNumber,l.column),2).lineNumber>r)break}while(d++<10&&r+d1&&this._isBlankLine(t,o);)o--;for(;o>1&&!this._isBlankLine(t,o);)o--;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,i,n){const o=t.getLineCount();let s=i.position.lineNumber;for(;s{"use strict";i.d(t,{Nu:()=>y,u6:()=>b,g_:()=>w});var n=i(17301),o=i(97295),s=i(61329),r=i(10291),a=i(24314),l=i(3860);class d{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new a.e(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new a.e(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range,o=i[1].range;return new l.Y(n.endLineNumber,n.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}class c{constructor(e,t,i){this._position=e,this._text=t,this._charAfter=i}getEditOperations(e,t){t.addTrackedEditOperation(new a.e(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return new l.Y(i.endLineNumber,i.startColumn,i.endLineNumber,i.endColumn-this._charAfter.length)}}var h=i(55343),u=i(24929),g=i(50187),p=i(49119),m=i(51381),f=i(19111),v=i(75383),_=i(1615);class b{static indent(e,t,i){if(null===t||null===i)return[];const n=[];for(let t=0,o=i.length;t1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n);if(o.ow(e)>=0)break}if(n<1)return null;const r=t.getLineMaxColumn(n),l=(0,_.A)(e.autoIndent,t,new a.e(n,r,n,r),e.languageConfigurationService);l&&(s=l.indentation+l.appendText)}return n&&(n===p.wU.Indent&&(s=b.shiftIndent(e,s)),n===p.wU.Outdent&&(s=b.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let o="";const r=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,r),n=e.indentSize,s=n-i%n;for(let e=0;ethis._compositionType(i,e,o,s,r,a)));return new h.Tp(4,l,{shouldPushStackElementBefore:S(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,r){if(!t.isEmpty())return null;const l=t.getPosition(),d=Math.max(1,l.column-n),c=Math.min(e.getLineMaxColumn(l.lineNumber),l.column+o),h=new a.e(l.lineNumber,d,l.lineNumber,c);return e.getValueInRange(h)===i&&0===r?null:new s.Uo(h,i,0,r)}static _typeCommand(e,t,i){return i?new s.Sj(e,t,!0):new s.T4(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return b._typeCommand(n,"\n",i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){const s=t.getLineContent(n.startLineNumber),r=o.V8(s).substring(0,n.startColumn-1);return b._typeCommand(n,"\n"+e.normalizeIndentation(r),i)}const r=(0,_.A)(e.autoIndent,t,n,e.languageConfigurationService);if(r){if(r.indentAction===p.wU.None)return b._typeCommand(n,"\n"+e.normalizeIndentation(r.indentation+r.appendText),i);if(r.indentAction===p.wU.Indent)return b._typeCommand(n,"\n"+e.normalizeIndentation(r.indentation+r.appendText),i);if(r.indentAction===p.wU.IndentOutdent){const t=e.normalizeIndentation(r.indentation),o=e.normalizeIndentation(r.indentation+r.appendText),a="\n"+o+"\n"+t;return i?new s.Sj(n,a,!0):new s.Uo(n,a,-1,o.length-t.length,!0)}if(r.indentAction===p.wU.Outdent){const t=b.unshiftIndent(e,r.indentation);return b._typeCommand(n,"\n"+e.normalizeIndentation(t+r.appendText),i)}}const a=t.getLineContent(n.startLineNumber),l=o.V8(a).substring(0,n.startColumn-1);if(e.autoIndent>=4){const r=(0,v.UF)(e.autoIndent,t,n,{unshiftIndent:t=>b.unshiftIndent(e,t),shiftIndent:t=>b.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(r){let a=e.visibleColumnFromColumn(t,n.getEndPosition());const l=n.endColumn,d=t.getLineContent(n.endLineNumber),c=o.LC(d);if(n=c>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,c+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new s.Sj(n,"\n"+e.normalizeIndentation(r.afterEnter),!0);{let t=0;return l<=c+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(r.afterEnter).length-1,0)),new s.Uo(n,"\n"+e.normalizeIndentation(r.afterEnter),0,t,!0)}}}return b._typeCommand(n,"\n"+e.normalizeIndentation(l),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;eb.shiftIndent(e,t),unshiftIndent:t=>b.unshiftIndent(e,t)},e.languageConfigurationService);if(null===s)return null;if(s!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?b._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+n,!1):b._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+t.getLineContent(i.startLineNumber).substring(o-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let s=0,r=i.length;s2?l.charCodeAt(a.column-2):0)&&d)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;tt.startsWith(e.open))),r=o.some((e=>t.startsWith(e.close)));return!s&&r}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let s=null;for(const e of o)if(null===s||e.open.length>s.open.length){let o=!0;for(const s of i)if(t.getValueInRange(new a.e(s.lineNumber,s.column-e.open.length+1,s.lineNumber,s.column))+n!==e.open){o=!1;break}o&&(s=e)}return s}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let o=null;for(const e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!o||e.open.length>o.open.length)&&(o=e);return o}static _getAutoClosingPairClose(e,t,i,n,o){for(const e of i)if(!e.isEmpty())return null;const s=i.map((e=>{const t=e.getPosition();return o?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}})),r=this._findAutoClosingPairOpen(e,t,s.map((e=>new g.L(e.lineNumber,e.beforeColumn))),n);if(!r)return null;let a,l;if((0,h.LN)(n)?(a=e.autoClosingQuotes,l=e.shouldAutoCloseBefore.quote):e.blockCommentStartToken&&r.open.includes(e.blockCommentStartToken)?(a=e.autoClosingComments,l=e.shouldAutoCloseBefore.comment):(a=e.autoClosingBrackets,l=e.shouldAutoCloseBefore.bracket),"never"===a)return null;const d=this._findContainedAutoClosingPair(e,r),c=d?d.close:"";let p=!0;for(const i of s){const{lineNumber:o,beforeColumn:s,afterColumn:d}=i,h=t.getLineContent(o),g=h.substring(0,s-1),m=h.substring(d-1);if(m.startsWith(c)||(p=!1),m.length>0){const t=m.charAt(0);if(!b._isBeforeClosingBrace(e,m)&&!l(t))return null}if(1===r.open.length&&("'"===n||'"'===n)&&"always"!==a){const t=(0,u.u)(e.wordSeparators);if(g.length>0){const e=g.charCodeAt(g.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(o))return null;t.tokenization.forceTokenization(o);const v=t.tokenization.getLineTokens(o),_=(0,f.wH)(v,s-1);if(!r.shouldAutoClose(_,s-_.firstCharOffset))return null;const w=r.findNeutralCharacter();if(w){const e=t.tokenization.getTokenTypeIfInsertingCharacter(o,s,w);if(!r.isOK(e))return null}}return p?r.close.substring(0,r.close.length-c.length):r.close}static _runAutoClosingOpenCharType(e,t,i,n,o,s,r){const a=[];for(let e=0,t=n.length;enew s.T4(new a.e(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new h.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const g=this._getAutoClosingPairClose(t,i,o,d,!0);return null!==g?this._runAutoClosingOpenCharType(e,t,i,o,d,!0,g):null}static typeWithInterceptors(e,t,i,n,o,r,a){if(!e&&"\n"===a){const e=[];for(let t=0,s=o.length;t{"use strict";i.d(t,{L:()=>c,w:()=>d});var n=i(97295),o=i(55343),s=i(29436),r=i(24929),a=i(50187),l=i(24314);class d{static _createWord(e,t,i,n,o){return{start:n,end:o,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let o=i.column-2;o>=0;o--){const i=e.charCodeAt(o),s=t.get(i);if(0===s){if(2===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===s){if(1===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===s&&0!==n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const o=e.length;for(let s=n;s=0;o--){const n=e.charCodeAt(o),s=t.get(n);if(1===s)return o+1;if(1===i&&2===s)return o+1;if(2===i&&0===s)return o+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,s=i.column;1===s&&o>1&&(o-=1,s=t.getLineMaxColumn(o));let r=d._findPreviousWordOnLine(e,t,new a.L(o,s));if(0===n)return new a.L(o,r?r.start+1:1);if(1===n)return r&&2===r.wordType&&r.end-r.start==1&&0===r.nextCharClass&&(r=d._findPreviousWordOnLine(e,t,new a.L(o,r.start+1))),new a.L(o,r?r.start+1:1);if(3===n){for(;r&&2===r.wordType;)r=d._findPreviousWordOnLine(e,t,new a.L(o,r.start+1));return new a.L(o,r?r.start+1:1)}return r&&s<=r.end+1&&(r=d._findPreviousWordOnLine(e,t,new a.L(o,r.start+1))),new a.L(o,r?r.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(1===t.column)return i>1?new a.L(i-1,e.getLineMaxColumn(i-1)):t;const s=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=s.charCodeAt(e-2),r=s.charCodeAt(e-1);if(95===t&&95!==r)return new a.L(i,e);if(45===t&&45!==r)return new a.L(i,e);if((n.mK(t)||n.T5(t))&&n.df(r))return new a.L(i,e);if(n.df(t)&&n.df(r)&&e+1=l.start+1&&(l=d._findNextWordOnLine(e,t,new a.L(o,l.end+1))),s=l?l.start+1:t.getLineMaxColumn(o);return new a.L(o,s)}static _moveWordPartRight(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(t.column===o)return i1?u=1:(h--,u=n.getLineMaxColumn(h)):(g&&u<=g.end+1&&(g=d._findPreviousWordOnLine(i,n,new a.L(h,g.start+1))),g?u=g.end+1:u>1?u=1:(h--,u=n.getLineMaxColumn(h))),new l.e(h,u,c.lineNumber,c.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new a.L(i.positionLineNumber,i.positionColumn);return this._deleteInsideWordWhitespace(t,n)||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,o))return null;let s=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,s))return null;for(;o>0&&this._charAtIsWhitespace(i,o-1);)o--;for(;s+11?new l.e(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumbere.start+1<=i.column&&i.column<=e.end+1,r=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new l.e(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,s=!1;for(;i-11&&this._charAtIsWhitespace(n,t-2);)t--;return r(t,i)},c=d._findPreviousWordOnLine(e,t,i);if(c&&s(c))return a(c);const h=d._findNextWordOnLine(e,t,i);return h&&s(h)?a(h):c&&h?r(c.end+1,h.start+1):c?r(c.start+1,c.end+1):h?r(h.start+1,h.end+1):r(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=d._moveWordPartLeft(e,i);return new l.e(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=p.start+1&&(p=d._findNextWordOnLine(i,n,new a.L(c,p.end+1))),p?h=p.start+1:hBoolean(e)))}},55343:(e,t,i)=>{"use strict";i.d(t,{LM:()=>u,LN:()=>_,Tp:()=>v,Vi:()=>g,rS:()=>f});var n=i(50187),o=i(24314),s=i(3860),r=i(19111),a=i(7988),l=i(83158);const d=()=>!0,c=()=>!1,h=e=>" "===e||"\t"===e;class u{static shouldRecreate(e){return e.hasChanged(144)||e.hasChanged(130)||e.hasChanged(37)||e.hasChanged(77)||e.hasChanged(79)||e.hasChanged(80)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(128)||e.hasChanged(50)||e.hasChanged(91)}constructor(e,t,i,n){var o;this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const s=i.options,r=s.get(144),a=s.get(50);this.readOnly=s.get(91),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=s.get(116),this.lineHeight=a.lineHeight,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(r.height/this.lineHeight)-2),this.useTabStops=s.get(128),this.wordSeparators=s.get(130),this.emptySelectionClipboard=s.get(37),this.copyWithSyntaxHighlighting=s.get(25),this.multiCursorMergeOverlapping=s.get(77),this.multiCursorPaste=s.get(79),this.multiCursorLimit=s.get(80),this.autoClosingBrackets=s.get(6),this.autoClosingComments=s.get(7),this.autoClosingQuotes=s.get(11),this.autoClosingDelete=s.get(9),this.autoClosingOvertype=s.get(10),this.autoSurround=s.get(14),this.autoIndent=s.get(12),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const l=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(l)for(const e of l)this.surroundingPairs[e.open]=e.close;const d=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=null!==(o=null==d?void 0:d.blockCommentStartToken)&&void 0!==o?o:null}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=null===(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)||void 0===e?void 0:e.getElectricCharacters();if(t)for(const e of t)this._electricChars[e]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=(0,r.wH)(t,i-1),o=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return(0,l.x)(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return h;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return d;case"never":return c}}_getLanguageDefinedShouldAutoClose(e,t){const i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return e=>-1!==i.indexOf(e)}visibleColumnFromColumn(e,t){return a.i.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=a.i.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),o=e.getLineMinColumn(t);if(ns?s:n}}class g{static fromModelState(e){return new p(e)}static fromViewState(e){return new m(e)}static fromModelSelection(e){const t=s.Y.liftSelection(e),i=new f(o.e.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return g.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;i{"use strict";i.d(t,{KU:()=>r,NT:()=>c,i8:()=>a,n0:()=>d,zl:()=>l});var n=i(9488),o=i(17301),s=i(19247);class r{static trivial(e,t){return new r([new a(s.q.ofLength(e.length),s.q.ofLength(t.length))],!1)}static trivialTimedOut(e,t){return new r([new a(s.q.ofLength(e.length),s.q.ofLength(t.length))],!0)}constructor(e,t){this.diffs=e,this.hitTimeout=t}}class a{static invert(e,t){const i=[];return(0,n.zy)(e,((e,n)=>{i.push(a.fromOffsetPairs(e?e.getEndExclusives():l.zero,n?n.getStarts():new l(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),i}static fromOffsetPairs(e,t){return new a(new s.q(e.offset1,t.offset1),new s.q(e.offset2,t.offset2))}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new a(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new a(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new a(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new a(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new a(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),i=this.seq2Range.intersect(e.seq2Range);if(t&&i)return new a(t,i)}getStarts(){return new l(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new l(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class l{constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new l(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}l.zero=new l(0,0),l.max=new l(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class d{isValid(){return!0}}d.instance=new d;class c{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new o.he("timeout must be positive")}isValid(){return!(Date.now()-this.startTime{"use strict";i.d(t,{DW:()=>T});var n=i(9488),o=i(35146),s=i(45463),r=i(19247),a=i(24314),l=i(25919);class d{constructor(e,t){this.width=e,this.height=t,this.array=[],this.array=new Array(e*t)}get(e,t){return this.array[e+t*this.width]}set(e,t,i){this.array[e+t*this.width]=i}}function c(e){return 32===e||9===e}class h{static getKey(e){let t=this.chrKeys.get(e);return void 0===t&&(t=this.chrKeys.size,this.chrKeys.set(e,t)),t}constructor(e,t,i){this.range=e,this.lines=t,this.source=i,this.histogram=[];let n=0;for(let i=e.startLineNumber-1;i0&&d>0&&3===s.get(r-1,d-1)&&(u+=a.get(r-1,d-1)),u+=n?n(r,d):1):u=-1;const g=Math.max(c,h,u);if(g===u){const e=r>0&&d>0?a.get(r-1,d-1):0;a.set(r,d,e+1),s.set(r,d,3)}else g===c?(a.set(r,d,0),s.set(r,d,1)):g===h&&(a.set(r,d,0),s.set(r,d,2));o.set(r,d,g)}const c=[];let h=e.length,u=t.length;function g(e,t){e+1===h&&t+1===u||c.push(new l.i8(new r.q(e+1,h),new r.q(t+1,u))),h=e,u=t}let p=e.length-1,m=t.length-1;for(;p>=0&&m>=0;)3===s.get(p,m)?(g(p,m),p--,m--):1===s.get(p,m)?p--:m--;return g(-1,-1),c.reverse(),new l.KU(c,!1)}}class g{compute(e,t,i=l.n0.instance){if(0===e.length||0===t.length)return l.KU.trivial(e,t);const n=e,o=t;function s(e,t){for(;en.length||u>o.length)continue;const g=s(l,u);d.set(h,g);const m=l===r?c.get(h+1):c.get(h-1);if(c.set(h,g!==l?new p(m,l,u,g-l):m),d.get(h)===n.length&&d.get(h)-h===o.length)break e}}let u=c.get(h);const g=[];let v=n.length,_=o.length;for(;;){const e=u?u.x+u.length:0,t=u?u.y+u.length:0;if(e===v&&t===_||g.push(new l.i8(new r.q(e,v),new r.q(t,_))),!u)break;v=u.x,_=u.y,u=u.prev}return g.reverse(),new l.KU(g,!1)}}class p{constructor(e,t,i,n){this.prev=e,this.x=t,this.y=i,this.length=n}}class m{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,t){if(e<0){if((e=-e-1)>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class f{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var v=i(54648),_=i(35534),b=i(43702),w=i(50187);class y{constructor(e,t,i){this.lines=e,this.considerWhitespaceChanges=i,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let n=!1;t.start>0&&t.endExclusive>=e.length&&(t=new r.q(t.start-1,t.endExclusive),n=!0),this.lineRange=t,this.firstCharOffsetByLine[0]=0;for(let t=this.lineRange.start;tString.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=k(e>0?this.elements[e-1]:-1),i=k(et<=e));return new w.L(this.lineRange.start+t+1,e-this.firstCharOffsetByLine[t]+this.additionalOffsetByLine[t]+1)}translateRange(e){return a.e.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!C(this.elements[e]))return;let t=e;for(;t>0&&C(this.elements[t-1]);)t--;let i=e;for(;it<=e.start)))&&void 0!==t?t:0,o=null!==(i=(0,_.cn)(this.firstCharOffsetByLine,(t=>e.endExclusive<=t)))&&void 0!==i?i:this.elements.length;return new r.q(n,o)}}function C(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const S={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function x(e){return S[e]}function k(e){return 10===e?8:13===e?7:c(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function L(e,t,i){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const n=(new g).compute(new y([e],new r.q(0,1),!1),new y([t],new r.q(0,1),!1),i);let o=0;const s=l.i8.invert(n.diffs,e.length);for(const t of s)t.seq1Range.forEach((t=>{c(e.charCodeAt(t))||o++}));const a=function(t){let i=0;for(let n=0;nt.length?e:t);return o/a>.6&&a>10}var N=i(39156),D=i(60652);class E{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){return 1e3-((0===e?0:I(this.lines[e-1]))+(e===this.lines.length?0:I(this.lines[e])))}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function I(e){let t=0;for(;te===t)))return new D.h([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new D.h([new v.gB(new s.z(1,e.length+1),new s.z(1,t.length+1),[new v.iy(new a.e(1,1,e.length,e[0].length+1),new a.e(1,1,t.length,t[0].length+1))])],[],!1);const d=0===i.maxComputationTimeMs?l.n0.instance:new l.NT(i.maxComputationTimeMs),c=!i.ignoreTrimWhitespace,h=new Map;function u(e){let t=h.get(e);return void 0===t&&(t=h.size,h.set(e,t)),t}const g=e.map((e=>u(e.trim()))),p=t.map((e=>u(e.trim()))),m=new E(g,e),f=new E(p,t),_=(()=>m.length+f.length<1700?this.dynamicProgrammingDiffing.compute(m,f,d,((i,n)=>e[i]===t[n]?0===t[n].length?.1:1+Math.log(1+t[n].length):.99)):this.myersDiffingAlgorithm.compute(m,f))();let b=_.diffs,w=_.hitTimeout;b=(0,N.xG)(m,f,b),b=(0,N.rh)(m,f,b);const y=[],C=i=>{if(c)for(let n=0;ni.seq1Range.start-S==i.seq2Range.start-x)),C(i.seq1Range.start-S),S=i.seq1Range.endExclusive,x=i.seq2Range.endExclusive;const n=this.refineDiff(e,t,i,d,c);n.hitTimeout&&(w=!0);for(const e of n.mappings)y.push(e)}C(e.length-S);const k=M(y,e,t);let L=[];return i.computeMoves&&(L=this.computeMoves(k,e,t,g,p,d,c)),(0,o.eZ)((()=>{function i(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const i=t[e.lineNumber-1];return!(e.column<1||e.column>i.length+1)}function n(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1||e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const o of k){if(!o.innerChanges)return!1;for(const n of o.innerChanges)if(!(i(n.modifiedRange.getStartPosition(),t)&&i(n.modifiedRange.getEndPosition(),t)&&i(n.originalRange.getStartPosition(),e)&&i(n.originalRange.getEndPosition(),e)))return!1;if(!n(o.modified,t)||!n(o.original,e))return!1}return!0})),new D.h(k,L,w)}computeMoves(e,t,i,o,r,a,d){return function(e,t,i,o,r,a){let{moves:l,excludedChanges:d}=function(e,t,i,n){const o=[],s=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new h(e.original,t,e))),r=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new h(e.modified,i,e)))),a=new Set;for(const e of s){let t,i=-1;for(const n of r){const o=e.computeSimilarity(n);o>i&&(i=o,t=n)}if(i>.9&&t&&(r.delete(t),o.push(new v.f0(e.range,t.range)),a.add(e.source),a.add(t.source)),!n.isValid())return{moves:o,excludedChanges:a}}return{moves:o,excludedChanges:a}}(e,t,i,a);if(!a.isValid())return[];const c=function(e,t,i,o,r,a){const l=[],d=new b.ri;for(const i of e)for(let e=i.original.startLineNumber;ee.modified.startLineNumber),n.fv));for(const t of e){let e=[];for(let n=t.modified.startLineNumber;n{for(const i of e)if(i.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&i.modifiedLineRange.endLineNumberExclusive+1===o.endLineNumberExclusive)return i.originalLineRange=new s.z(i.originalLineRange.startLineNumber,t.endLineNumberExclusive),i.modifiedLineRange=new s.z(i.modifiedLineRange.startLineNumber,o.endLineNumberExclusive),void r.push(i);const i={modifiedLineRange:o,originalLineRange:t};c.push(i),r.push(i)})),e=r}if(!a.isValid())return[]}c.sort((0,n.BV)((0,n.tT)((e=>e.modifiedLineRange.length),n.fv)));const h=new s.i,u=new s.i;for(const e of c){const t=e.modifiedLineRange.startLineNumber-e.originalLineRange.startLineNumber,i=h.subtractFrom(e.modifiedLineRange),n=u.subtractFrom(e.originalLineRange).getWithDelta(t),o=i.getIntersection(n);for(const e of o.ranges){if(e.length<3)continue;const i=e,n=e.delta(-t);l.push(new v.f0(n,i)),h.addRange(i),u.addRange(n)}}l.sort((0,n.tT)((e=>e.original.startLineNumber),n.fv));const g=new _.b1(e);for(let t=0;te.original.startLineNumber<=i.original.startLineNumber)),d=(0,_.ti)(e,(e=>e.modified.startLineNumber<=i.modified.startLineNumber)),c=Math.max(i.original.startLineNumber-n.original.startLineNumber,i.modified.startLineNumber-d.modified.startLineNumber),p=g.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumbero.length||t>r.length)break;if(h.contains(t)||u.contains(e))break;if(!L(o[e-1],r[t-1],a))break}for(b>0&&(u.addRange(new s.z(i.original.startLineNumber-b,i.original.startLineNumber)),h.addRange(new s.z(i.modified.startLineNumber-b,i.modified.startLineNumber))),w=0;wo.length||t>r.length)break;if(h.contains(t)||u.contains(e))break;if(!L(o[e-1],r[t-1],a))break}w>0&&(u.addRange(new s.z(i.original.endLineNumberExclusive,i.original.endLineNumberExclusive+w)),h.addRange(new s.z(i.modified.endLineNumberExclusive,i.modified.endLineNumberExclusive+w))),(b>0||w>0)&&(l[t]=new v.f0(new s.z(i.original.startLineNumber-b,i.original.endLineNumberExclusive+w),new s.z(i.modified.startLineNumber-b,i.modified.endLineNumberExclusive+w)))}return l}(e.filter((e=>!d.has(e))),o,r,t,i,a);return(0,n.vA)(l,c),l=function(e){if(0===e.length)return e;e.sort((0,n.tT)((e=>e.original.startLineNumber),n.fv));const t=[e[0]];for(let i=1;i=0&&r>=0&&s+r<=2?t[t.length-1]=n.join(o):t.push(o)}return t}(l),l=l.filter((e=>{const i=e.original.toOffsetRange().slice(t).map((e=>e.trim()));return i.join("\n").length>=15&&function(e,t){let i=0;for(const t of e)t.length>=2&&i++;return i}(i)>=2})),l=function(e,t){const i=new _.b1(e);return t.filter((t=>(i.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumber{const n=M(this.refineDiff(t,i,new l.i8(e.original.toOffsetRange(),e.modified.toOffsetRange()),a,d).mappings,t,i,!0);return new D.y(e,n)}))}refineDiff(e,t,i,n,o){const s=new y(e,i.seq1Range,o),r=new y(t,i.seq2Range,o),a=s.length+r.length<500?this.dynamicProgrammingDiffing.compute(s,r,n):this.myersDiffingAlgorithm.compute(s,r,n);let l=a.diffs;return l=(0,N.xG)(s,r,l),l=(0,N.g0)(s,r,l),l=(0,N.oK)(s,r,l),l=(0,N.DI)(s,r,l),{mappings:l.map((e=>new v.iy(s.translateRange(e.seq1Range),r.translateRange(e.seq2Range)))),hitTimeout:a.hitTimeout}}}function M(e,t,i,r=!1){const a=[];for(const o of(0,n.mw)(e.map((e=>function(e,t,i){let n=0,o=0;1===e.modifiedRange.endColumn&&1===e.originalRange.endColumn&&e.originalRange.startLineNumber+n<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+n<=e.modifiedRange.endLineNumber&&(o=-1),e.modifiedRange.startColumn-1>=i[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+o&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+o&&(n=1);const r=new s.z(e.originalRange.startLineNumber+n,e.originalRange.endLineNumber+1+o),a=new s.z(e.modifiedRange.startLineNumber+n,e.modifiedRange.endLineNumber+1+o);return new v.gB(r,a,[e])}(e,t,i))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=o[0],t=o[o.length-1];a.push(new v.gB(e.original.join(t.original),e.modified.join(t.modified),o.map((e=>e.innerChanges[0]))))}return(0,o.eZ)((()=>!(!r&&a.length>0&&a[0].original.startLineNumber!==a[0].modified.startLineNumber)&&(0,o.DM)(a,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive{"use strict";i.d(t,{DI:()=>u,g0:()=>c,oK:()=>d,rh:()=>h,xG:()=>r});var n=i(9488),o=i(19247),s=i(25919);function r(e,t,i){let n=i;return n=a(e,t,n),n=a(e,t,n),n=function(e,t,i){if(!e.getBoundaryScore||!t.getBoundaryScore)return i;for(let n=0;n0?i[n-1]:void 0,r=i[n],a=n+10&&(l=l.delta(d))}r.push(l)}return n.length>0&&r.push(n[n.length-1]),r}function l(e,t,i,n,o){let s=1;for(;e.seq1Range.start-s>=n.start&&e.seq2Range.start-s>=o.start&&i.isStronglyEqual(e.seq2Range.start-s,e.seq2Range.endExclusive-s)&&s<100;)s++;s--;let r=0;for(;e.seq1Range.start+rl&&(l=d,a=n)}return e.delta(a)}function d(e,t,i){const n=[];for(const e of i){const t=n[n.length-1];t&&(e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2)?n[n.length-1]=new s.i8(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):n.push(e)}return n}function c(e,t,i){const n=s.i8.invert(i,e.length),o=[];let r=new s.zl(0,0);function a(i,a){if(i.offset10;){const i=n[0];if(!i.seq1Range.intersects(l)&&!i.seq2Range.intersects(d))break;const o=e.findWordContaining(i.seq1Range.start),r=t.findWordContaining(i.seq2Range.start),a=new s.i8(o,r),h=a.intersect(i);if(u+=h.seq1Range.length,g+=h.seq2Range.length,c=c.join(a),!(c.seq1Range.endExclusive>=i.seq1Range.endExclusive))break;n.shift()}u+g<2*(c.seq1Range.length+c.seq2Range.length)/3&&o.push(c),r=c.getEndExclusives()}for(;n.length>0;){const e=n.shift();e.seq1Range.isEmpty||(a(e.getStarts(),e),a(e.getEndExclusives().delta(-1),e))}return function(e,t){const i=[];for(;e.length>0||t.length>0;){const n=e[0],o=t[0];let s;s=n&&(!o||n.seq1Range.start0&&i[i.length-1].seq1Range.endExclusive>=s.seq1Range.start?i[i.length-1]=i[i.length-1].join(s):i.push(s)}return i}(i,o)}function h(e,t,i){let n=i;if(0===n.length)return n;let s,r=0;do{s=!1;const a=[n[0]];for(let l=1;l5||i.seq1Range.length+i.seq2Range.length>5)}h(c,d)?(s=!0,a[a.length-1]=a[a.length-1].join(d)):a.push(d)}n=a}while(r++<10&&s);return n}function u(e,t,i){let r=i;if(0===r.length)return r;let a,l=0;do{a=!1;const c=[r[0]];for(let h=1;h5||s.length>500)return!1;const r=e.getText(s).trim();if(r.length>20||r.split(/\r\n|\r|\n/).length>1)return!1;const a=e.countLinesIn(i.seq1Range),l=i.seq1Range.length,d=t.countLinesIn(i.seq2Range),c=i.seq2Range.length,h=e.countLinesIn(n.seq1Range),p=n.seq1Range.length,m=t.countLinesIn(n.seq2Range),f=n.seq2Range.length;function v(e){return Math.min(e,130)}return Math.pow(Math.pow(v(40*a+l),1.5)+Math.pow(v(40*d+c),1.5),1.5)+Math.pow(Math.pow(v(40*h+p),1.5)+Math.pow(v(40*m+f),1.5),1.5)>74184.96480721243}p(g,u)?(a=!0,c[c.length-1]=c[c.length-1].join(u)):c.push(u)}r=c}while(l++<10&&a);const d=[];return(0,n.KO)(r,((t,i,n)=>{let r=i;function a(e){return e.length>0&&e.trim().length<=3&&i.seq1Range.length+i.seq2Range.length>100}const l=e.extendToFullLines(i.seq1Range),c=e.getText(new o.q(l.start,i.seq1Range.start));a(c)&&(r=r.deltaStart(-c.length));const h=e.getText(new o.q(i.seq1Range.endExclusive,l.endExclusive));a(h)&&(r=r.deltaEnd(h.length));const u=s.i8.fromOffsetPairs(t?t.getEndExclusives():s.zl.zero,n?n.getStarts():s.zl.max),g=r.intersect(u);d.length>0&&g.getStarts().equals(d[d.length-1].getEndExclusives())?d[d.length-1]=d[d.length-1].join(g):d.push(g)})),d}},60652:(e,t,i)=>{"use strict";i.d(t,{h:()=>n,y:()=>o});class n{constructor(e,t,i){this.changes=e,this.moves=t,this.hitTimeout=i}}class o{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}},54648:(e,t,i)=>{"use strict";i.d(t,{f0:()=>o,gB:()=>s,iy:()=>r});var n=i(45463);class o{static inverse(e,t,i){const s=[];let r=1,a=1;for(const t of e){const e=new o(new n.z(r,t.original.startLineNumber),new n.z(a,t.modified.startLineNumber));e.modified.isEmpty||s.push(e),r=t.original.endLineNumberExclusive,a=t.modified.endLineNumberExclusive}const l=new o(new n.z(r,t+1),new n.z(a,i+1));return l.modified.isEmpty||s.push(l),s}static clip(e,t,i){const n=[];for(const s of e){const e=s.original.intersect(t),r=s.modified.intersect(i);e&&!e.isEmpty&&r&&!r.isEmpty&&n.push(new o(e,r))}return n}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new o(this.modified,this.original)}join(e){return new o(this.original.join(e.original),this.modified.join(e.modified))}}class s extends o{constructor(e,t,i){super(e,t),this.innerChanges=i}flip(){var e;return new s(this.modified,this.original,null===(e=this.innerChanges)||void 0===e?void 0:e.map((e=>e.flip())))}}class r{constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new r(this.modifiedRange,this.originalRange)}}},30653:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});class n{constructor(e,t,i,n,o,s,r){this.id=e,this.label=t,this.alias=i,this.metadata=n,this._precondition=o,this._run=s,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}},96518:(e,t,i)=>{"use strict";i.d(t,{g:()=>n});const n={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},29102:(e,t,i)=>{"use strict";i.d(t,{u:()=>n});var n,o=i(63580),s=i(93983);!function(e){e.editorSimpleInput=new s.uy("editorSimpleInput",!1,!0),e.editorTextFocus=new s.uy("editorTextFocus",!1,o.NC("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new s.uy("editorFocus",!1,o.NC("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new s.uy("textInputFocus",!1,o.NC("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new s.uy("editorReadonly",!1,o.NC("editorReadonly","Whether the editor is read-only")),e.inDiffEditor=new s.uy("inDiffEditor",!1,o.NC("inDiffEditor","Whether the context is a diff editor")),e.isEmbeddedDiffEditor=new s.uy("isEmbeddedDiffEditor",!1,o.NC("isEmbeddedDiffEditor","Whether the context is an embedded diff editor")),e.inMultiDiffEditor=new s.uy("inMultiDiffEditor",!1,o.NC("inMultiDiffEditor","Whether the context is a multi diff editor")),e.multiDiffEditorAllCollapsed=new s.uy("multiDiffEditorAllCollapsed",void 0,o.NC("multiDiffEditorAllCollapsed","Whether all files in multi diff editor are collapsed")),e.hasChanges=new s.uy("diffEditorHasChanges",!1,o.NC("diffEditorHasChanges","Whether the diff editor has changes")),e.comparingMovedCode=new s.uy("comparingMovedCode",!1,o.NC("comparingMovedCode","Whether a moved code block is selected for comparison")),e.accessibleDiffViewerVisible=new s.uy("accessibleDiffViewerVisible",!1,o.NC("accessibleDiffViewerVisible","Whether the accessible diff viewer is visible")),e.diffEditorRenderSideBySideInlineBreakpointReached=new s.uy("diffEditorRenderSideBySideInlineBreakpointReached",!1,o.NC("diffEditorRenderSideBySideInlineBreakpointReached","Whether the diff editor render side by side inline breakpoint is reached")),e.columnSelection=new s.uy("editorColumnSelection",!1,o.NC("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new s.uy("editorHasSelection",!1,o.NC("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new s.uy("editorHasMultipleSelections",!1,o.NC("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new s.uy("editorTabMovesFocus",!1,o.NC("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInEmbeddedEditor=new s.uy("isInEmbeddedEditor",!1,!0),e.canUndo=new s.uy("canUndo",!1,!0),e.canRedo=new s.uy("canRedo",!1,!0),e.hoverVisible=new s.uy("editorHoverVisible",!1,o.NC("editorHoverVisible","Whether the editor hover is visible")),e.hoverFocused=new s.uy("editorHoverFocused",!1,o.NC("editorHoverFocused","Whether the editor hover is focused")),e.stickyScrollFocused=new s.uy("stickyScrollFocused",!1,o.NC("stickyScrollFocused","Whether the sticky scroll is focused")),e.stickyScrollVisible=new s.uy("stickyScrollVisible",!1,o.NC("stickyScrollVisible","Whether the sticky scroll is visible")),e.standaloneColorPickerVisible=new s.uy("standaloneColorPickerVisible",!1,o.NC("standaloneColorPickerVisible","Whether the standalone color picker is visible")),e.standaloneColorPickerFocused=new s.uy("standaloneColorPickerFocused",!1,o.NC("standaloneColorPickerFocused","Whether the standalone color picker is focused")),e.inCompositeEditor=new s.uy("inCompositeEditor",void 0,o.NC("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new s.uy("editorLangId","",o.NC("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new s.uy("editorHasCompletionItemProvider",!1,o.NC("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new s.uy("editorHasCodeActionsProvider",!1,o.NC("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new s.uy("editorHasCodeLensProvider",!1,o.NC("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new s.uy("editorHasDefinitionProvider",!1,o.NC("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new s.uy("editorHasDeclarationProvider",!1,o.NC("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new s.uy("editorHasImplementationProvider",!1,o.NC("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new s.uy("editorHasTypeDefinitionProvider",!1,o.NC("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new s.uy("editorHasHoverProvider",!1,o.NC("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new s.uy("editorHasDocumentHighlightProvider",!1,o.NC("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new s.uy("editorHasDocumentSymbolProvider",!1,o.NC("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new s.uy("editorHasReferenceProvider",!1,o.NC("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new s.uy("editorHasRenameProvider",!1,o.NC("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new s.uy("editorHasSignatureHelpProvider",!1,o.NC("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new s.uy("editorHasInlayHintsProvider",!1,o.NC("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new s.uy("editorHasDocumentFormattingProvider",!1,o.NC("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new s.uy("editorHasDocumentSelectionFormattingProvider",!1,o.NC("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new s.uy("editorHasMultipleDocumentFormattingProvider",!1,o.NC("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new s.uy("editorHasMultipleDocumentSelectionFormattingProvider",!1,o.NC("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))}(n||(n={}))},10637:(e,t,i)=>{"use strict";i.d(t,{n:()=>s,y:()=>o});const n=[];function o(e){n.push(e)}function s(){return n.slice(0)}},45797:(e,t,i)=>{"use strict";i.d(t,{N:()=>n});class n{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return 0!=(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e);const i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),8&i&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let o=`color: ${t[i]};`;1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;");let s="";return 4&n&&(s+=" underline"),8&n&&(s+=" line-through"),s&&(o+=`text-decoration:${s};`),o}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&i),bold:Boolean(2&i),underline:Boolean(4&i),strikethrough:Boolean(8&i)}}}},22970:(e,t,i)=>{"use strict";i.d(t,{G:()=>s});var n=i(14118),o=i(82663);function s(e,t,i,r,a,l){if(Array.isArray(e)){let n=0;for(const o of e){const e=s(o,t,i,r,a,l);if(10===e)return e;e>n&&(n=e)}return n}if("string"==typeof e)return r?"*"===e?5:e===i?10:0:0;if(e){const{language:s,pattern:d,scheme:c,hasAccessToAllModels:h,notebookType:u}=e;if(!r&&!h)return 0;u&&a&&(t=a);let g=0;if(c)if(c===t.scheme)g=10;else{if("*"!==c)return 0;g=5}if(s)if(s===i)g=10;else{if("*"!==s)return 0;g=Math.max(g,5)}if(u)if(u===l)g=10;else{if("*"!==u||void 0===l)return 0;g=Math.max(g,5)}if(d){let e;if(e="string"==typeof d?d:{...d,base:(0,o.Fv)(d.base)},e!==t.fsPath&&!(0,n.EQ)(e,t.fsPath))return 0;g=10}return g}return 0}},96887:(e,t,i)=>{"use strict";i.d(t,{mY:()=>S,gX:()=>d,MY:()=>u,DI:()=>f,AD:()=>k,gl:()=>x,bw:()=>c,rn:()=>D,MO:()=>L,w:()=>C,ln:()=>v,WW:()=>h,uZ:()=>y,WU:()=>p,RW:()=>N,hG:()=>m,R4:()=>w,vx:()=>_});var n=i(73046),o=i(70666),s=i(24314),r=i(4669),a=i(5976);class l extends a.JT{get isResolved(){return this._isResolved}constructor(e,t,i){super(),this._registry=e,this._languageId=t,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))}}var d,c,h,u,g=i(63580);class p{constructor(e,t,i){this.offset=e,this.type=t,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class m{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class f{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}!function(e){const t=new Map;t.set(0,n.l.symbolMethod),t.set(1,n.l.symbolFunction),t.set(2,n.l.symbolConstructor),t.set(3,n.l.symbolField),t.set(4,n.l.symbolVariable),t.set(5,n.l.symbolClass),t.set(6,n.l.symbolStruct),t.set(7,n.l.symbolInterface),t.set(8,n.l.symbolModule),t.set(9,n.l.symbolProperty),t.set(10,n.l.symbolEvent),t.set(11,n.l.symbolOperator),t.set(12,n.l.symbolUnit),t.set(13,n.l.symbolValue),t.set(15,n.l.symbolEnum),t.set(14,n.l.symbolConstant),t.set(15,n.l.symbolEnum),t.set(16,n.l.symbolEnumMember),t.set(17,n.l.symbolKeyword),t.set(27,n.l.symbolSnippet),t.set(18,n.l.symbolText),t.set(19,n.l.symbolColor),t.set(20,n.l.symbolFile),t.set(21,n.l.symbolReference),t.set(22,n.l.symbolCustomColor),t.set(23,n.l.symbolFolder),t.set(24,n.l.symbolTypeParameter),t.set(25,n.l.account),t.set(26,n.l.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=n.l.symbolProperty),i};const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),e.fromString=function(e,t){let n=i.get(e);return void 0!==n||t||(n=9),n}}(d||(d={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(c||(c={}));class v{constructor(e,t,i,n){this.range=e,this.text=t,this.completionKind=i,this.isSnippetText=n}equals(e){return s.e.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}function _(e){return e&&o.o.isUri(e.uri)&&s.e.isIRange(e.range)&&(s.e.isIRange(e.originSelectionRange)||s.e.isIRange(e.targetSelectionRange))}!function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(h||(h={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(u||(u={}));const b={17:(0,g.NC)("Array","array"),16:(0,g.NC)("Boolean","boolean"),4:(0,g.NC)("Class","class"),13:(0,g.NC)("Constant","constant"),8:(0,g.NC)("Constructor","constructor"),9:(0,g.NC)("Enum","enumeration"),21:(0,g.NC)("EnumMember","enumeration member"),23:(0,g.NC)("Event","event"),7:(0,g.NC)("Field","field"),0:(0,g.NC)("File","file"),11:(0,g.NC)("Function","function"),10:(0,g.NC)("Interface","interface"),19:(0,g.NC)("Key","key"),5:(0,g.NC)("Method","method"),1:(0,g.NC)("Module","module"),2:(0,g.NC)("Namespace","namespace"),20:(0,g.NC)("Null","null"),15:(0,g.NC)("Number","number"),18:(0,g.NC)("Object","object"),24:(0,g.NC)("Operator","operator"),3:(0,g.NC)("Package","package"),6:(0,g.NC)("Property","property"),14:(0,g.NC)("String","string"),22:(0,g.NC)("Struct","struct"),25:(0,g.NC)("TypeParameter","type parameter"),12:(0,g.NC)("Variable","variable")};function w(e,t){return(0,g.NC)("symbolAriaLabel","{0} ({1})",e,b[t])}var y,C,S,x;!function(e){const t=new Map;t.set(0,n.l.symbolFile),t.set(1,n.l.symbolModule),t.set(2,n.l.symbolNamespace),t.set(3,n.l.symbolPackage),t.set(4,n.l.symbolClass),t.set(5,n.l.symbolMethod),t.set(6,n.l.symbolProperty),t.set(7,n.l.symbolField),t.set(8,n.l.symbolConstructor),t.set(9,n.l.symbolEnum),t.set(10,n.l.symbolInterface),t.set(11,n.l.symbolFunction),t.set(12,n.l.symbolVariable),t.set(13,n.l.symbolConstant),t.set(14,n.l.symbolString),t.set(15,n.l.symbolNumber),t.set(16,n.l.symbolBoolean),t.set(17,n.l.symbolArray),t.set(18,n.l.symbolObject),t.set(19,n.l.symbolKey),t.set(20,n.l.symbolNull),t.set(21,n.l.symbolEnumMember),t.set(22,n.l.symbolStruct),t.set(23,n.l.symbolEvent),t.set(24,n.l.symbolOperator),t.set(25,n.l.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=n.l.symbolProperty),i}}(y||(y={}));class k{static fromValue(e){switch(e){case"comment":return k.Comment;case"imports":return k.Imports;case"region":return k.Region}return new k(e)}constructor(e){this.value=e}}k.Comment=new k("comment"),k.Imports=new k("imports"),k.Region=new k("region"),function(e){e[e.AIGenerated=1]="AIGenerated"}(C||(C={})),function(e){e.is=function(e){return!(!e||"object"!=typeof e)&&"string"==typeof e.id&&"string"==typeof e.title}}(S||(S={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(x||(x={}));class L{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 N=new class{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new r.Q5,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),(0,a.OF)((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){var i;null===(i=this._factories.get(e))||void 0===i||i.dispose();const n=new l(this,e,t);return this._factories.set(e,n),(0,a.OF)((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}async getOrCreate(e){const t=this.get(e);if(t)return t;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 t=this._factories.get(e);return!(t&&!t.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}};var D;!function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(D||(D={}))},75383:(e,t,i)=>{"use strict";i.d(t,{$9:()=>c,UF:()=>d,n8:()=>l,r7:()=>a,tI:()=>h});var n=i(97295),o=i(49119),s=i(19111),r=i(51381);function a(e,t,i,s=!0,r){if(e<4)return null;const a=r.getLanguageConfiguration(t.tokenization.getLanguageId()).indentRulesSupport;if(!a)return null;if(i<=1)return{indentation:"",action:null};for(let e=i-1;e>0&&""===t.getLineContent(e);e--)if(1===e)return{indentation:"",action:null};const l=function(e,t,i){const n=e.tokenization.getLanguageIdAtPosition(t,0);if(t>1){let o,s=-1;for(o=t-1;o>=1;o--){if(e.tokenization.getLanguageIdAtPosition(o,0)!==n)return s;const t=e.getLineContent(o);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return o;s=o}}return-1}(t,i,a);if(l<0)return null;if(l<1)return{indentation:"",action:null};const d=t.getLineContent(l);if(a.shouldIncrease(d)||a.shouldIndentNextLine(d))return{indentation:n.V8(d),action:o.wU.Indent,line:l};if(a.shouldDecrease(d))return{indentation:n.V8(d),action:null,line:l};{if(1===l)return{indentation:n.V8(t.getLineContent(l)),action:null,line:l};const e=l-1,i=a.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!a.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:n.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(s)return{indentation:n.V8(t.getLineContent(l)),action:null,line:l};for(let e=l;e>0;e--){const i=t.getLineContent(e);if(a.shouldIncrease(i))return{indentation:n.V8(i),action:o.wU.Indent,line:e};if(a.shouldIndentNextLine(i)){let i=0;for(let n=e-1;n>0;n--)if(!a.shouldIndentNextLine(t.getLineContent(e))){i=n;break}return{indentation:n.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(a.shouldDecrease(i))return{indentation:n.V8(i),action:null,line:e}}return{indentation:n.V8(t.getLineContent(1)),action:null,line:1}}}function l(e,t,i,s,r,l){if(e<4)return null;const d=l.getLanguageConfiguration(i);if(!d)return null;const c=l.getLanguageConfiguration(i).indentRulesSupport;if(!c)return null;const h=a(e,t,s,void 0,l),u=t.getLineContent(s);if(h){const i=h.line;if(void 0!==i){let a=!0;for(let e=i;e0&&c.getLanguageId(0)!==h.languageId?(m=!0,g=u.substr(0,i.startColumn-1-h.firstCharOffset)):g=c.getLineContent().substring(0,i.startColumn-1),p=i.isEmpty()?u.substr(i.startColumn-1-h.firstCharOffset):(0,r.n2)(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-h.firstCharOffset);const f=d.getLanguageConfiguration(h.languageId).indentRulesSupport;if(!f)return null;const v=g,_=n.V8(g),b={tokenization:{getLineTokens:e=>t.tokenization.getLineTokens(e),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i)},getLineContent:e=>e===i.startLineNumber?v:t.getLineContent(e)},w=n.V8(c.getLineContent()),y=a(e,b,i.startLineNumber+1,void 0,d);if(!y){const e=m?w:_;return{beforeEnter:e,afterEnter:e}}let C=m?w:y.indentation;return y.action===o.wU.Indent&&(C=l.shiftIndent(C)),f.shouldDecrease(p)&&(C=l.unshiftIndent(C)),{beforeEnter:m?w:_,afterEnter:C}}function c(e,t,i,n,s,l){if(e<4)return null;const d=(0,r.n2)(t,i.startLineNumber,i.startColumn);if(d.firstCharOffset)return null;const c=l.getLanguageConfiguration(d.languageId).indentRulesSupport;if(!c)return null;const h=d.getLineContent(),u=h.substr(0,i.startColumn-1-d.firstCharOffset);let g;if(g=i.isEmpty()?h.substr(i.startColumn-1-d.firstCharOffset):(0,r.n2)(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-d.firstCharOffset),!c.shouldDecrease(u+g)&&c.shouldDecrease(u+n+g)){const n=a(e,t,i.startLineNumber,!1,l);if(!n)return null;let r=n.indentation;return n.action!==o.wU.Indent&&(r=s.unshiftIndent(r)),r}return null}function h(e,t,i){const n=i.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}},1615:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(49119),o=i(51381);function s(e,t,i,s){const r=(0,o.n2)(t,i.startLineNumber,i.startColumn),a=s.getLanguageConfiguration(r.languageId);if(!a)return null;const l=r.getLineContent(),d=l.substr(0,i.startColumn-1-r.firstCharOffset);let c;c=i.isEmpty()?l.substr(i.startColumn-1-r.firstCharOffset):(0,o.n2)(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-r.firstCharOffset);let h="";if(i.startLineNumber>1&&0===r.firstCharOffset){const e=(0,o.n2)(t,i.startLineNumber-1);e.languageId===r.languageId&&(h=e.getLineContent())}const u=a.onEnter(e,h,d,c);if(!u)return null;const g=u.indentAction;let p=u.appendText;const m=u.removeText||0;p?g===n.wU.Indent&&(p="\t"+p):p=g===n.wU.Indent||g===n.wU.IndentOutdent?"\t":"";let f=(0,o.u0)(t,i.startLineNumber,i.startColumn);return m&&(f=f.substring(0,f.length-m)),{indentAction:g,appendText:p,removeText:m,indentation:f}}},72042:(e,t,i)=>{"use strict";i.d(t,{O:()=>n});const n=(0,i(72065).yh)("languageService")},49119:(e,t,i)=>{"use strict";var n;i.d(t,{V6:()=>o,c$:()=>s,wU:()=>n}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(n||(n={}));class o{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t{"use strict";i.d(t,{c_:()=>I,u0:()=>A,n2:()=>P});var n=i(4669),o=i(5976),s=i(97295),r=i(270),a=i(49119),l=i(19111);class d{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new a.V6(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new a.V6({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.V6({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"==typeof e.autoCloseBefore?e.autoCloseBefore:d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"==typeof e.autoCloseBefore?e.autoCloseBefore:d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=";:.,=}])> \n\t",d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS="'\"`;:.,=}])> \n\t";var c=i(9488),h=i(34302);class u{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return(0,c.EB)(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if((0,l.Bu)(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,i-1)+e,r=h.Vr.findPrevBracketInRange(o,1,s,0,s.length);if(!r)return null;const a=s.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const d=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:a}:null}}function g(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var m=i(17301);class f{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=f._createOpenBracketRegExp(e[0]),i=f._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,o=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return o.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e=2&&i.length>0)for(let e=0,t=this._brackets.length;e{const t=new Set;return{info:new L(this,e,t),closing:t}})),o=new C.b((e=>{const t=new Set,i=new Set;return{info:new N(this,e,t,i),opening:t,openingColorized:i}}));for(const[e,t]of i){const i=n.get(e),s=o.get(t);i.closing.add(s.info),s.opening.add(i.info)}const s=t.colorizedBracketPairs?x(t.colorizedBracketPairs):i.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[e,t]of s){const i=n.get(e),s=o.get(t);i.closing.add(s.info),s.openingColorized.add(i.info),s.opening.add(i.info)}this._openingBrackets=new Map([...n.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...o.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}}function x(e){return e.filter((([e,t])=>""!==e&&""!==t))}class k{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class L extends k{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class N extends k{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e.config===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var D=function(e,t){return function(i,n){t(i,n,e)}};class E{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const I=(0,v.yh)("languageConfigurationService");let T=class extends o.JT{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new H),this.onDidChangeEmitter=this._register(new n.Q5),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(M));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>i.has(e))),n=e.change.overrides.filter((([e,t])=>t.some((e=>i.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new E(void 0));else for(const e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new E(e)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new E(e.languageId))})))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i,n){let o=t.getLanguageConfiguration(e);if(!o){if(!n.isRegisteredLanguageId(e))return new V(e,{});o=new V(e,{})}const s=function(e,t){const i=t.getValue(M.brackets,{overrideIdentifier:e}),n=t.getValue(M.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:R(i),colorizedBracketPairs:R(n)}}(o.languageId,i),r=F([o.underlyingConfig,s]);return new V(o.languageId,r)}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};T=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([D(0,_.Ui),D(1,b.O)],T);const M={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function R(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}function A(e,t,i){const n=e.getLineContent(t);let o=s.V8(n);return o.length>i-1&&(o=o.substring(0,i-1)),o}function P(e,t,i){e.tokenization.forceTokenization(t);const n=e.tokenization.getLineTokens(t),o=void 0===i?e.getLineMaxColumn(t)-1:i-1;return(0,l.wH)(n,o)}class O{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new B(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,o.OF)((()=>{for(let e=0;ee.configuration))))}}function F(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class B{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class W{constructor(e){this.languageId=e}}class H extends o.JT{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._register(this.register(y.bd,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new O(e),this._entries.set(e,n));const s=n.register(t,i);return this._onDidChange.fire(new W(e)),(0,o.OF)((()=>{s.dispose(),this._onDidChange.fire(new W(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return(null==t?void 0:t.getResolvedConfiguration())||null}}class V{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new f(this.underlyingConfig):null,this.comments=V._handleComments(this.underlyingConfig),this.characterPair=new d(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||r.Af,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new S(e,this.underlyingConfig)}getWordDefinition(){return(0,r.eq)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new h.EA(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new u(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new a.c$(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,w.z)(I,T,1)},68801:(e,t,i)=>{"use strict";i.d(t,{bd:()=>d,dQ:()=>l});var n=i(63580),o=i(4669),s=i(89872),r=i(81170),a=i(23193);const l=new class{constructor(){this._onDidChangeLanguages=new o.Q5,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t{"use strict";i.d(t,{Dy:()=>r,Ri:()=>s,TJ:()=>o});var n=i(96887);const o=new class{clone(){return this}equals(e){return this===e}};function s(e,t){return new n.hG([new n.WU(0,"",e)],t)}function r(e,t){const i=new Uint32Array(2);return i[0]=0,i[1]=(32768|e<<0|2<<24)>>>0,new n.DI(i,null===t?o:t)}},19111:(e,t,i)=>{"use strict";function n(e,t){const i=e.getCount(),n=e.findTokenIndexAtOffset(t),s=e.getLanguageId(n);let r=n;for(;r+10&&e.getLanguageId(a-1)===s;)a--;return new o(e,s,a,r+1,e.getStartOffset(a),e.getEndOffset(r))}i.d(t,{Bu:()=>s,wH:()=>n});class o{constructor(e,t,i,n,o,s){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=s}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function s(e){return 0!=(3&e)}},34302:(e,t,i)=>{"use strict";i.d(t,{EA:()=>a,Vr:()=>p});var n=i(97295),o=i(50072),s=i(24314);class r{constructor(e,t,i,n,o,s){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=o,this.reversedRegex=s,this._openSet=r._toSet(this.open),this._closeSet=r._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}class a{constructor(e,t){this._richEditBracketsBrand=void 0;const i=function(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let e=0;e{const[i,n]=e,[o,s]=t;return i===o||i===s||n===o||n===s},o=(e,n)=>{const o=Math.min(e,n),s=Math.max(e,n);for(let e=0;e0&&s.push({open:o,close:r})}return s}(t);this.brackets=i.map(((t,n)=>new r(e,n,t.open,t.close,function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e=0&&n.push(t);for(const t of s.close)t.indexOf(e)>=0&&n.push(t)}}function d(e,t){return e.length-t.length}function c(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function h(e){const t=/^[\w ]+$/.test(e);return e=n.ec(e),t?`\\b${e}\\b`:e}function u(e){const t=`(${e.map(h).join(")|(")})`;return n.GF(t,!0)}const g=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return o.oe().decode(t)}(e)),t}}();class p{static _findPrevBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const r=i.length-(o.index||0),a=o[0].length,l=n+r;return new s.e(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,o){const s=g(i).substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,s,n)}static findNextBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const r=o.index||0,a=o[0].length;if(0===a)return null;const l=n+r;return new s.e(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,o){const s=i.substring(n,o);return this.findNextBracketInText(e,t,s,n)}}},82963:(e,t,i)=>{"use strict";i.d(t,{C2:()=>l,Fq:()=>d});var n=i(97295),o=i(77378),s=i(96887),r=i(276);const a={getInitialState:()=>r.TJ,tokenizeEncoded:(e,t,i)=>(0,r.Dy)(0,i)};async function l(e,t,i){if(!i)return c(t,e.languageIdCodec,a);const n=await s.RW.getOrCreate(i);return c(t,e.languageIdCodec,n||a)}function d(e,t,i,n,o,s,r){let a="
    ",l=n,d=0,c=!0;for(let h=0,u=t.getCount();h0;)r&&c?(g+=" ",c=!1):(g+=" ",c=!0),e--;break}case 60:g+="<",c=!1;break;case 62:g+=">",c=!1;break;case 38:g+="&",c=!1;break;case 0:g+="�",c=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",c=!1;break;case 13:g+="​",c=!1;break;case 32:r&&c?(g+=" ",c=!1):(g+=" ",c=!0);break;default:g+=String.fromCharCode(t),c=!1}}if(a+=`${g}`,u>o||l>=o)break}return a+="
    ",a}function c(e,t,i){let s='
    ';const r=n.uq(e);let a=i.getInitialState();for(let e=0,l=r.length;e0&&(s+="
    ");const d=i.tokenizeEncoded(l,!0,a);o.A.convertToEndOffset(d.tokens,l.length);const c=new o.A(d.tokens,l,t).inflate();let h=0;for(let e=0,t=c.getCount();e${n.YU(l.substring(h,i))}`,h=i}a=d.endState}return s+="
    ",s}},84973:(e,t,i)=>{"use strict";i.d(t,{F5:()=>s,Hf:()=>c,Qi:()=>h,RM:()=>r,Tx:()=>u,U:()=>o,dJ:()=>l,je:()=>g,pt:()=>p,sh:()=>n,tk:()=>d});var n,o,s,r,a=i(36248);!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(n||(n={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(o||(o={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(s||(s={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(r||(r={}));class l{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,a.fS)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class d{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function c(e){return e&&"function"==typeof e.read}class h{constructor(e,t,i,n,o,s){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=o,this._isTracked=s}}class u{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class g{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function p(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},41720:(e,t,i)=>{"use strict";i.d(t,{BH:()=>f,Dm:()=>_,Kd:()=>l,Y0:()=>d,n2:()=>v});var n=i(17301),o=i(7988),s=i(45035),r=i(61761);class a{get length(){return this._length}constructor(e){this._length=e}}class l extends a{static create(e,t,i){let n=e.length;return t&&(n=(0,s.Ii)(n,t.length)),i&&(n=(0,s.Ii)(n,i.length)),new l(n,e,t,i,t?t.missingOpeningBracketIds:r.tS.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,i,n,o){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=o}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new l(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation((0,s.Ii)(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class d extends a{static create23(e,t,i,n=!1){let o=e.length,r=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(o=(0,s.Ii)(o,t.length),r=r.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");o=(0,s.Ii)(o,i.length),r=r.merge(i.missingOpeningBracketIds)}return n?new h(o,e.listHeight+1,e,t,i,r):new c(o,e.listHeight+1,e,t,i,r)}static getEmpty(){return new g(s.xl,0,[],r.tS.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),0===this.childrenLength)return;const e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;if(0===this.childrenLength)return!1;let t=this;for(;4===t.kind;){const e=t.childrenLength;if(0===e)throw new n.he;t=t.getChild(e-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n{"use strict";i.d(t,{Q:()=>s,Y:()=>r});var n=i(24314),o=i(45035);class s{static fromModelContentChanges(e){return e.map((e=>{const t=n.e.lift(e.range);return new s((0,o.PZ)(t.getStartPosition()),(0,o.PZ)(t.getEndPosition()),(0,o.oR)(e.text))})).reverse()}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${(0,o.Hw)(this.startOffset)}...${(0,o.Hw)(this.endOffset)}) -> ${(0,o.Hw)(this.newLength)}`}}class r{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>a.from(e)))}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 null===i?null:(0,o.BE)(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?(0,o.Hg)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):(0,o.Hg)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=(0,o.Hw)(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,o.Hg)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):(0,o.Hg)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx{"use strict";i.d(t,{Z:()=>d});var n=i(97295),o=i(41720),s=i(45035),r=i(61761),a=i(6735);class l{static createFromLanguage(e,t){function i(e){return t.getKey(`${e.languageId}:::${e.bracketText}`)}const n=new Map;for(const t of e.bracketsNew.openingBrackets){const e=(0,s.Hg)(0,t.bracketText.length),l=i(t),d=r.tS.getEmpty().add(l,r.Qw);n.set(t.bracketText,new a.WU(e,1,l,d,o.n2.create(e,t,d)))}for(const t of e.bracketsNew.closingBrackets){const e=(0,s.Hg)(0,t.bracketText.length);let l=r.tS.getEmpty();const d=t.getOpeningBrackets();for(const e of d)l=l.add(i(e),r.Qw);n.set(t.bracketText,new a.WU(e,2,i(d[0]),l,o.n2.create(e,t,l)))}return new l(n)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map((e=>function(e){let t=(0,n.ec)(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}(e))).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(2===i.kind&&i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class d{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=l.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}},41574:(e,t,i)=>{"use strict";i.d(t,{o:()=>r});var n=i(9488),o=i(2442),s=i(45035);function r(e,t){if(0===e.length)return t;if(0===t.length)return e;const i=new n.H9(l(e)),r=l(t);r.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let d=i.dequeue();function c(e){if(void 0===e){const e=i.takeWhile((e=>!0))||[];return d&&e.unshift(d),e}const t=[];for(;d&&!(0,s.xd)(e);){const[n,o]=d.splitAt(e);t.push(n),e=(0,s.BE)(n.lengthAfter,e),d=null!=o?o:i.dequeue()}return(0,s.xd)(e)||t.push(new a(!1,e,e)),t}const h=[];function u(e,t,i){if(h.length>0&&(0,s.rM)(h[h.length-1].endOffset,e)){const e=h[h.length-1];h[h.length-1]=new o.Q(e.startOffset,t,(0,s.Ii)(e.newLength,i))}else h.push({startOffset:e,endOffset:t,newLength:i})}let g=s.xl;for(const e of r){const t=c(e.lengthBefore);if(e.modified){const i=(0,s.tQ)(t,(e=>e.lengthBefore)),n=(0,s.Ii)(g,i);u(g,n,e.lengthAfter),g=n}else for(const e of t){const t=g;g=(0,s.Ii)(g,e.lengthBefore),e.modified&&u(t,g,e.lengthAfter)}}return h}class a{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){const t=(0,s.BE)(e,this.lengthAfter);return(0,s.rM)(t,s.xl)?[this,void 0]:this.modified?[new a(this.modified,this.lengthBefore,e),new a(this.modified,s.xl,t)]:[new a(this.modified,e,e),new a(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${(0,s.Hw)(this.lengthBefore)} -> ${(0,s.Hw)(this.lengthAfter)}`}}function l(e){const t=[];let i=s.xl;for(const n of e){const e=(0,s.BE)(i,n.startOffset);(0,s.xd)(e)||t.push(new a(!1,e,e));const o=(0,s.BE)(n.startOffset,n.endOffset);t.push(new a(!0,o,n.newLength)),i=n.endOffset}return t}},45035:(e,t,i)=>{"use strict";i.d(t,{BE:()=>v,By:()=>b,F_:()=>g,Hg:()=>c,Hw:()=>h,Ii:()=>p,OE:()=>s,PZ:()=>y,Qw:()=>C,VR:()=>_,W9:()=>u,Zq:()=>w,av:()=>r,oR:()=>S,rM:()=>f,tQ:()=>m,xd:()=>l,xl:()=>a});var n=i(97295),o=i(24314);class s{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}function r(e,t,i,n){return e!==i?c(i-e,n):c(0,n-t)}s.zero=new s(0,0);const a=0;function l(e){return 0===e}const d=2**26;function c(e,t){return e*d+t}function h(e){const t=e,i=Math.floor(t/d);return new s(i,t-i*d)}function u(e){return Math.floor(e/d)}function g(e){return e}function p(e,t){let i=e+t;return t>=d&&(i-=e%d),i}function m(e,t){return e.reduce(((e,i)=>p(e,t(i))),a)}function f(e,t){return e===t}function v(e,t){const i=e,n=t;if(n-i<=0)return a;const o=Math.floor(i/d),s=Math.floor(n/d),r=n-s*d;return o===s?c(0,r-(i-o*d)):c(s-o,r)}function _(e,t){return e=t}function y(e){return c(e.lineNumber-1,e.column-1)}function C(e,t){const i=e,n=Math.floor(i/d),s=i-n*d,r=t,a=Math.floor(r/d),l=r-a*d;return new o.e(n+1,s+1,a+1,l+1)}function S(e){const t=(0,n.uq)(e);return c(t.length-1,t[t.length-1].length)}},13883:(e,t,i)=>{"use strict";i.d(t,{w:()=>g});var n=i(41720),o=i(2442),s=i(61761),r=i(45035);function a(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){const o=i>>1;for(let s=0;s=3?e[2]:null,t)}function l(e,t){return Math.abs(e.listHeight-t.listHeight)}function d(e,t){return e.listHeight===t.listHeight?n.Y0.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i=e=e.toMutable();const o=[];let s;for(;;){if(t.listHeight===i.listHeight){s=t;break}if(4!==i.kind)throw new Error("unexpected");o.push(i),i=i.makeLastElementMutable()}for(let e=o.length-1;e>=0;e--){const t=o[e];s?t.childrenLength>=3?s=n.Y0.create23(t.unappendChild(),s,null,!1):(t.appendChildOfSameHeight(s),s=void 0):t.handleChildrenChanged()}return s?n.Y0.create23(e,s,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable();const o=[];for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw new Error("unexpected");o.push(i),i=i.makeFirstElementMutable()}let s=t;for(let e=o.length-1;e>=0;e--){const t=o[e];s?t.childrenLength>=3?s=n.Y0.create23(s,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(s),s=void 0):t.handleChildrenChanged()}return s?n.Y0.create23(s,e,null,!1):e}(t,e)}class c{constructor(e){this.lastOffset=r.xl,this.nextNodes=[e],this.offsets=[r.xl],this.idxs=[]}readLongestNodeAt(e,t){if((0,r.VR)(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=u(this.nextNodes);if(!i)return;const n=u(this.offsets);if((0,r.VR)(e,n))return;if((0,r.VR)(n,e))if((0,r.Ii)(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=h(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const e=h(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=u(this.offsets),t=u(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=u(this.nextNodes),n=h(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push((0,r.Ii)(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function h(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function u(e){return e.length>0?e[e.length-1]:void 0}function g(e,t,i,n){return new p(e,t,i,n).parseDocument()}class p{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 c(i):void 0,this.positionMapper=new o.Y(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(s.tS.getEmpty(),0);return e||(e=n.Y0.getEmpty()),e}parseList(e,t){const i=[];for(;;){let n=this.tryReadChildFromCache(e);if(!n){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;n=this.parseChild(e,t+1)}4===n.kind&&0===n.childrenLength||i.push(n)}const n=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;const i=t,n=e[i].listHeight;for(t++;t=2?a(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),o=i();if(!o)return n;for(let e=i();e;e=i())l(n,o)<=l(o,e)?(n=d(n,o),o=e):o=d(o,e);return d(n,o)}(i):a(i,this.createImmutableLists);return n}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!(0,r.xd)(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>!(null!==t&&!(0,r.VR)(i.length,t))&&i.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 n.Dm(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new n.BH(i.length);const o=e.merge(i.bracketIds),s=this.parseList(o,t+1),r=this.tokenizer.peek();return r&&2===r.kind&&(r.bracketId===i.bracketId||r.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),n.Kd.create(i.astNode,s,r.astNode)):n.Kd.create(i.astNode,s,null)}default:throw new Error("unexpected")}}}},61761:(e,t,i)=>{"use strict";i.d(t,{FE:()=>r,Qw:()=>s,tS:()=>o});const n=[];class o{static create(e,t){if(e<=128&&0===t.length){let i=o.cache[e];return i||(i=new o(e,t),o.cache[e]=i),i}return new o(e,t)}static getEmpty(){return this.empty}constructor(e,t){this.items=e,this.additionalItems=t}add(e,t){const i=t.getKey(e);let n=i>>5;if(0===n){const e=1<e};class r{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}},6735:(e,t,i)=>{"use strict";i.d(t,{WU:()=>l,g:()=>h,xH:()=>d});var n=i(17301),o=i(45797),s=i(41720),r=i(45035),a=i(61761);class l{constructor(e,t,i,n,o){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=o}}class d{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new c(this.textModel,this.bracketTokens),this._offset=r.xl,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,r.Hg)(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=(0,r.Ii)(this._offset,e);const t=(0,r.Hw)(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=(0,r.Ii)(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class c{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,null!==this.line&&(this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,r.F_)(e.length),e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const n=this.lineTokens,s=n.getCount();let a=null;if(this.lineTokenOffset1e3)break}if(i>1500)break}const n=(0,r.av)(e,t,this.lineIdx,this.lineCharOffset);return new l(n,0,-1,a.tS.getEmpty(),new s.BH(n))}}class h{constructor(e,t){this.text=e,this._offset=r.xl,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+"|\n","gi"):null,o=[];let d,c=0,h=0,u=0,g=0;const p=[];for(let e=0;e<60;e++)p.push(new l((0,r.Hg)(0,e),0,-1,a.tS.getEmpty(),new s.BH((0,r.Hg)(0,e))));const m=[];for(let e=0;e<60;e++)m.push(new l((0,r.Hg)(1,e),0,-1,a.tS.getEmpty(),new s.BH((0,r.Hg)(1,e))));if(n)for(n.lastIndex=0;null!==(d=n.exec(e));){const e=d.index,i=d[0];if("\n"===i)c++,h=e+1;else{if(u!==e){let t;if(g===c){const i=e-u;if(i{"use strict";i.d(t,{NL:()=>f,e9:()=>m});var n=i(63580),o=i(17301),s=i(3860),r=i(70666),a=i(93033),l=i(53060),d=i(95935);function c(e){return e.toString()}class h{static create(e,t){const i=e.getAlternativeVersionId(),n=p(e);return new h(i,i,n,n,t,t,[])}constructor(e,t,i,n,o,s,r){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=o,this.afterCursorState=s,this.changes=r}append(e,t,i,n,o){t.length>0&&(this.changes=(0,a.b)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.T4(e,t?t.length:0,i),i+=4,t)for(const n of t)l.T4(e,n.selectionStartLineNumber,i),i+=4,l.T4(e,n.selectionStartColumn,i),i+=4,l.T4(e,n.positionLineNumber,i),i+=4,l.T4(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=l.Ag(e,t);t+=4;for(let o=0;oe.toString())).join(", ")}matchesResource(e){return(r.o.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 h}append(e,t,i,n,o){this._data instanceof h&&this._data.append(e,t,i,n,o)}close(){this._data instanceof h&&(this._data=this._data.serialize())}open(){this._data instanceof h||(this._data=h.deserialize(this._data))}undo(){if(r.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof h&&(this._data=this._data.serialize());const e=h.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(r.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof h&&(this._data=this._data.serialize());const e=h.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof h&&(this._data=this._data.serialize()),this._data.byteLength+168}}class g{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 e of this._editStackElementsArr){const t=c(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=c(e);return this._editStackElementsMap.has(t)}setModel(e){const t=c(r.o.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=c(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,o){const s=c(e.uri);this._editStackElementsMap.get(s).append(e,t,i,n,o)}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=c(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(`${(0,d.EZ)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function p(e){return"\n"===e.getEOL()?0:1}function m(e){return!!e&&(e instanceof u||e instanceof g)}class f{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);m(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);m(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(m(i)&&i.canAppend(this._model))return i;const o=new u(n.NC("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(o,t),o}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],p(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n){const o=this._getOrCreateEditStackElement(e,n),s=this._model.applyEdits(t,!0),r=f._computeCursorState(i,s),a=s.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),o.append(this._model,a.map((e=>e.textChange)),p(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,o.dL)(e),null}}}},1516:(e,t,i)=>{"use strict";i.d(t,{W:()=>u,l:()=>h});var n=i(35534),o=i(97295),s=i(7988),r=i(24314),a=i(94954),l=i(59616),d=i(65094),c=i(17301);class h extends a.U{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return(0,l.q)(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new c.he("Illegal value for lineNumber");const o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide);let r=-2,a=-1,l=-2,d=-1;const h=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,d=-1;for(let t=e;t=0){l=t,d=e;break}}}};let u=-2,g=-1,p=-2,m=-1;const f=e=>{if(-2===u){u=-1,g=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){u=t,g=e;break}}}if(-1!==p&&(-2===p||p=0){p=t,m=e;break}}}};let v=0,_=!0,b=0,w=!0,y=0,C=0;for(let o=0;_||w;o++){const r=e-o,c=e+o;o>1&&(r<1||r1&&(c>n||c>i)&&(w=!1),o>5e4&&(_=!1,w=!1);let p=-1;if(_&&r>=1){const e=this._computeIndentLevel(r-1);e>=0?(l=r-1,d=e,p=Math.ceil(e/this.textModel.getOptions().indentSize)):(h(r),p=this._getIndentLevelForWhitespaceLine(s,a,d))}let S=-1;if(w&&c<=n){const e=this._computeIndentLevel(c-1);e>=0?(u=c-1,g=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(f(c),S=this._getIndentLevelForWhitespaceLine(s,g,m))}if(0!==o){if(1===o){if(c<=n&&S>=0&&C+1===S){_=!1,v=c,b=c,y=S;continue}if(r>=1&&p>=0&&p-1===C){w=!1,v=r,b=r,y=p;continue}if(v=e,b=e,y=C,0===y)return{startLineNumber:v,endLineNumber:b,indent:y}}_&&(p>=y?v=r:_=!1),w&&(S>=y?b=c:w=!1)}else C=p}return{startLineNumber:v,endLineNumber:b,indent:y}}getLinesBracketGuides(e,t,i,s){var a;const l=[];for(let i=e;i<=t;i++)l.push([]);const c=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new r.e(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let h;if(i&&c.length>0){const o=(e<=i.lineNumber&&i.lineNumber<=t?c:this.textModel.bracketPairs.getBracketPairsInRange(r.e.fromPositions(i)).toArray()).filter((e=>r.e.strictContainsPosition(e.range,i)));h=null===(a=(0,n.dF)(o,(e=>!0)))||void 0===a?void 0:a.range}const g=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,p=new u;for(const i of c){if(!i.closingBracketRange)continue;const n=h&&i.range.equalsRange(h);if(!n&&!s.includeInactive)continue;const r=p.getInlineClassName(i.nestingLevel,i.nestingLevelOfEqualBracketType,g)+(s.highlightActive&&n?" "+p.activeClassName:""),a=i.openingBracketRange.getStartPosition(),c=i.closingBracketRange.getStartPosition(),u=s.horizontalGuides===d.s6.Enabled||s.horizontalGuides===d.s6.EnabledForActive&&n;if(i.range.startLineNumber===i.range.endLineNumber){u&&l[i.range.startLineNumber-e].push(new d.UO(-1,i.openingBracketRange.getEndPosition().column,r,new d.vW(!1,c.column),-1,-1));continue}const m=this.getVisibleColumnFromPosition(c),f=this.getVisibleColumnFromPosition(i.openingBracketRange.getStartPosition()),v=Math.min(f,m,i.minVisibleColumnIndentation+1);let _=!1;o.LC(this.textModel.getLineContent(i.closingBracketRange.startLineNumber))=e&&f>v&&l[a.lineNumber-e].push(new d.UO(v,-1,r,new d.vW(!1,a.column),-1,-1)),c.lineNumber<=t&&m>v&&l[c.lineNumber-e].push(new d.UO(v,-1,r,new d.vW(!_,c.column),-1,-1)))}for(const e of l)e.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return l}getVisibleColumnFromPosition(e){return s.i.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(),o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide),r=new Array(t-e+1);let a=-2,l=-1,d=-2,c=-1;for(let o=e;o<=t;o++){const t=o-e,h=this._computeIndentLevel(o-1);if(h>=0)a=o-1,l=h,r[t]=Math.ceil(h/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=o-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==d&&(-2===d||d=0){d=e,c=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(s,l,c)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:t{"use strict";i.d(t,{Ck:()=>r,oQ:()=>s});var n=i(9488),o=i(85427);class s{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,o.A)(e);const i=this.values,n=this.prefixSum,s=t.length;return 0!==s&&(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+s),this.values.set(t,e),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,o.A)(e),t=(0,o.A)(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;const s=i.length-e;return t>=s&&(t=s),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,o.A)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;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 t=0,i=this.values.length-1,n=0,o=0,s=0;for(;t<=i;)if(n=t+(i-t)/2|0,o=this.prefixSum[n],s=o-this.values[n],e=o))break;t=n+1}return new a(n,e-s)}}class r{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(),0===e?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new a(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=(0,n.Zv)(this._values,e,t),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,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;n{"use strict";i.d(t,{HS:()=>Wt,qx:()=>Ht,yO:()=>It});var n=i(9488),o=i(41264),s=i(17301),r=i(4669),a=i(5976),l=i(97295),d=i(70666),c=i(23795),h=i(83158),u=i(45463),g=i(50187),p=i(24314),m=i(3860),f=i(22075),v=i(72042),_=i(51381),b=i(84973),w=i(19111),y=i(34302);class C{constructor(e,t,i,n){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=i,this.isInvalid=n}}class S{constructor(e,t,i,n,o,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n,this.nestingLevelOfEqualBracketType=o,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class x extends S{constructor(e,t,i,n,o,s,r){super(e,t,i,n,o,s),this.minVisibleColumnIndentation=r}}var k=i(2442),L=i(35382),N=i(45035),D=i(13883),E=i(61761),I=i(6735),T=i(41574);class M extends a.JT{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new r.Q5,this.denseKeyProvider=new E.FE,this.brackets=new L.Z(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new I.g(this.textModel.getValue(),e);this.initialAstWithoutTokens=(0,D.w)(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new k.Q((0,N.Hg)(e.fromLineNumber-1,0),(0,N.Hg)(e.toLineNumber,0),(0,N.Hg)(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=k.Q.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const i=(0,T.o)(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=(0,T.o)(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,o=new I.xH(this.textModel,this.brackets);return(0,D.w)(o,e,n,i)}getBracketsInRange(e,t){this.flushQueue();const i=(0,N.Hg)(e.startLineNumber-1,e.startColumn-1),o=(0,N.Hg)(e.endLineNumber-1,e.endColumn-1);return new n.W$((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens;P(n,N.xl,n.length,i,o,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const i=(0,N.PZ)(e.getStartPosition()),o=(0,N.PZ)(e.getEndPosition());return new n.W$((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens,s=new O(e,t,this.textModel);F(n,N.xl,n.length,i,o,s,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return A(t,N.xl,t.length,(0,N.PZ)(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return R(t,N.xl,t.length,(0,N.PZ)(e))}}function R(e,t,i,n){if(4===e.kind||2===e.kind){const o=[];for(const n of e.children)i=(0,N.Ii)(t,n.length),o.push({nodeOffsetStart:t,nodeOffsetEnd:i}),t=i;for(let t=o.length-1;t>=0;t--){const{nodeOffsetStart:i,nodeOffsetEnd:s}=o[t];if((0,N.VR)(i,n)){const o=R(e.children[t],i,s,n);if(o)return o}}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,N.Qw)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function A(e,t,i,n){if(4===e.kind||2===e.kind){for(const o of e.children){if(i=(0,N.Ii)(t,o.length),(0,N.VR)(n,i)){const e=A(o,t,i,n);if(e)return e}t=i}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,N.Qw)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function P(e,t,i,n,o,s,r,a,l,d,c=!1){if(r>200)return!0;e:for(;;)switch(e.kind){case 4:{const a=e.childrenLength;for(let c=0;c200)return!0;let d=!0;if(2===e.kind){let c=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),c=t,t++,a.set(e.openingBracket.text,t)}const h=(0,N.Ii)(t,e.openingBracket.length);let u=-1;if(s.includeMinIndentation&&(u=e.computeMinIndentation(t,s.textModel)),d=s.push(new x((0,N.Qw)(t,i),(0,N.Qw)(t,h),e.closingBracket?(0,N.Qw)((0,N.Ii)(h,(null===(l=e.child)||void 0===l?void 0:l.length)||N.xl),i):void 0,r,c,e,u)),t=h,d&&e.child){const l=e.child;if(i=(0,N.Ii)(t,l.length),(0,N.By)(t,o)&&(0,N.Zq)(i,n)&&(d=F(l,t,i,n,o,s,r+1,a),!d))return!1}null==a||a.set(e.openingBracket.text,c)}else{let i=t;for(const t of e.children){const e=i;if(i=(0,N.Ii)(i,t.length),(0,N.By)(e,o)&&(0,N.By)(n,i)&&(d=F(t,e,i,n,o,s,r,a),!d))return!1}}return d}class B extends a.JT{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new a.XK),this.onDidChangeEmitter=new r.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange((e=>{var t;e.languageId&&!(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.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){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;null===(e=this.bracketPairsTree.value)||void 0===e||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const i=new a.SL;this.bracketPairsTree.value=(e=i.add(new M(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),t=i,{object:e,dispose:()=>null==t?void 0:t.dispose()}),i.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire());var e,t}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!1))||n.W$.empty}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!0))||n.W$.empty}getBracketsInRange(e,t=!1){var i;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(i=this.bracketPairsTree.value)||void 0===i?void 0:i.object.getBracketsInRange(e,t))||n.W$.empty}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),o=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const i=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew.getClosingBracketInfo(e);if(!i)return null;const n=this.getBracketPairsInRange(p.e.fromPositions(t,t)).findLast((e=>i.closes(e.openingBracketInfo)));return n?n.openingBracketRange:null}{const t=e.toLowerCase(),s=this.languageConfigurationService.getLanguageConfiguration(o).brackets;if(!s)return null;const r=s.textIsBracket[t];return r?V(this._findMatchingBracketUp(r,n,W(i))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(p.e.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy((0,n.tT)((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),p.e.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const i=W(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const o=t.getCount(),s=t.getLanguageId(n);let r=Math.max(0,e.column-1-i.maxBracketLength);for(let e=n-1;e>=0;e--){const i=t.getEndOffset(e);if(i<=r)break;if((0,w.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){r=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e=a)break;if((0,w.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){a=i;break}}return{searchStartOffset:r,searchEndOffset:a}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),o=this.textModel.getLineContent(i),s=n.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const r=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(s)).brackets;if(r&&!(0,w.Bu)(n.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,r,s),d=null;for(;;){const n=y.Vr.findNextBracketInRange(r.forwardRegex,i,o,a,l);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=o.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),i=this._matchFoundBracket(n,r.textIsBracket[e],r.textIsOpenBracket[e],t);if(i){if(i instanceof H)return null;d=i}}a=n.endColumn-1}if(d)return d}if(s>0&&n.getStartOffset(s)===e.column-1){const r=s-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!(0,w.Bu)(n.getStandardTokenType(r))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,r),d=y.Vr.findPrevBracketInRange(a.reversedRegex,i,o,s,l);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn){const e=o.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),i=this._matchFoundBracket(d,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof H?null:i}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof H?o:[e,o]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,o=e.reversedRegex;let s=-1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return H.INSTANCE;const d=y.Vr.findPrevBracketInRange(o,t,n,a,l);if(!d)break;const c=n.substring(d.startColumn-1,d.endColumn-1).toLowerCase();if(e.isOpen(c)?s++:e.isClose(c)&&s--,0===s)return d;l=d.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=o-1,l=s.length,d=s.length;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1);let c=!0;for(;r>=0;r--){const t=i.getLanguageId(r)===n&&!(0,w.Bu)(i.getStandardTokenType(r));if(t)c?l=i.getStartOffset(r):(l=i.getStartOffset(r),d=i.getEndOffset(r));else if(c&&l!==d){const t=a(e,s,l,d);if(t)return t}c=t}if(c&&l!==d){const t=a(e,s,l,d);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,o=e.forwardRegex;let s=1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return H.INSTANCE;const d=y.Vr.findNextBracketInRange(o,t,n,a,l);if(!d)break;const c=n.substring(d.startColumn-1,d.endColumn-1).toLowerCase();if(e.isOpen(c)?s++:e.isClose(c)&&s--,0===s)return d;a=d.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=0,l=0,d=0;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1);let c=!0;for(;r=1;e--){const t=this.textModel.tokenization.getLineTokens(e),r=t.getCount(),a=this.textModel.getLineContent(e);let l=r-1,d=a.length,c=a.length;if(e===i.lineNumber){l=t.findTokenIndexAtOffset(i.column-1),d=i.column-1,c=i.column-1;const e=t.getLanguageId(l);n!==e&&(n=e,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,s=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let h=!0;for(;l>=0;l--){const i=t.getLanguageId(l);if(n!==i){if(o&&s&&h&&d!==c){const t=y.Vr.findPrevBracketInRange(o.reversedRegex,e,a,d,c);if(t)return this._toFoundBracket(s,t);h=!1}n=i,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,s=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const r=!!o&&!(0,w.Bu)(t.getStandardTokenType(l));if(r)h?d=t.getStartOffset(l):(d=t.getStartOffset(l),c=t.getEndOffset(l));else if(s&&o&&h&&d!==c){const t=y.Vr.findPrevBracketInRange(o.reversedRegex,e,a,d,c);if(t)return this._toFoundBracket(s,t)}h=r}if(s&&o&&h&&d!==c){const t=y.Vr.findPrevBracketInRange(o.reversedRegex,e,a,d,c);if(t)return this._toFoundBracket(s,t)}}return null}findNextBracket(e){var t;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getFirstBracketAfter(i))||null;const n=this.textModel.getLineCount();let o=null,s=null,r=null;for(let e=i.lineNumber;e<=n;e++){const t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),a=this.textModel.getLineContent(e);let l=0,d=0,c=0;if(e===i.lineNumber){l=t.findTokenIndexAtOffset(i.column-1),d=i.column-1,c=i.column-1;const e=t.getLanguageId(l);o!==e&&(o=e,s=this.languageConfigurationService.getLanguageConfiguration(o).brackets,r=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew)}let h=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const n=W(t),o=this.textModel.getLineCount(),s=new Map;let r=[];const a=(e,t)=>{if(!s.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(n&&++l%100==0&&!n())return H.INSTANCE;const a=y.Vr.findNextBracketInRange(e.forwardRegex,t,i,o,s);if(!a)break;const d=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),c=e.textIsBracket[d];if(c&&(c.isOpen(d)?r[c.index]++:c.isClose(d)&&r[c.index]--,-1===r[c.index]))return this._matchFoundBracket(a,c,!1,n);o=a.endColumn-1}return null};let c=null,h=null;for(let e=i.lineNumber;e<=o;e++){const t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),o=this.textModel.getLineContent(e);let s=0,r=0,l=0;if(e===i.lineNumber){s=t.findTokenIndexAtOffset(i.column-1),r=i.column-1,l=i.column-1;const e=t.getLanguageId(s);c!==e&&(c=e,h=this.languageConfigurationService.getLanguageConfiguration(c).brackets,a(c,h))}let u=!0;for(;s!0;{const t=Date.now();return()=>Date.now()-t<=e}}class H{constructor(){this._searchCanceledBrand=void 0}}function V(e){return e instanceof H?null:e}H.INSTANCE=new H;var z=i(8625),j=i(97781);class U extends a.JT{constructor(e){super(),this.textModel=e,this.colorProvider=new q,this.onDidChangeEmitter=new r.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n){return n||void 0===t?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray():[]}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new p.e(1,1,this.textModel.getLineCount(),1),e,t):[]}}class q{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}}(0,j.Ic)(((e,t)=>{const i=[z.zJ,z.Vs,z.CE,z.UP,z.r0,z.m1],n=new q;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(z.ts)}; }`);const o=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }`)}}));var K=i(95215),$=i(1516);class G{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function Z(e,t,i,n,o){let s;for(o.spacesDiff=0,o.looksLikeAlignment=!1,s=0;s0&&a>0)return;if(l>0&&d>0)return;const c=Math.abs(a-d),h=Math.abs(r-l);if(0===c)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?o++:m>1&&s++,Z(r,a,h,p,c),c.looksLikeAlignment&&(!i||t!==c.spacesDiff))continue;const v=c.spacesDiff;v<=8&&d[v]++,r=h,a=p}let h=i;o!==s&&(h=o{const i=d[t];i>e&&(e=i,u=t)})),4===u&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(u=2)}return{insertSpaces:h,tabSize:u}}function Y(e){return(1&e.metadata)>>>0}function J(e,t){e.metadata=254&e.metadata|t<<0}function X(e){return(2&e.metadata)>>>1==1}function ee(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function te(e){return(4&e.metadata)>>>2==1}function ie(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function ne(e){return(64&e.metadata)>>>6==1}function oe(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function se(e,t){e.metadata=231&e.metadata|t<<3}function re(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class ae{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,J(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,ie(this,!1),oe(this,!1),se(this,1),re(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,ee(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;ie(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),oe(this,null!==this.options.glyphMarginClassName),se(this,this.options.stickiness),re(this,this.options.collapseOnReplaceEdit)}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 le=new ae(null,0,0);le.parent=le,le.left=le,le.right=le,J(le,0);class de{constructor(){this.root=le,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o,s){return this.root===le?[]:function(e,t,i,n,o,s,r){let a=e.root,l=0,d=0,c=0,h=0;const u=[];let g=0;for(;a!==le;)if(X(a))ee(a.left,!1),ee(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!X(a.left)){if(d=l+a.maxEnd,di)ee(a,!0);else{if(h=l+a.end,h>=t){a.setCachedOffsets(c,h,s);let e=!0;n&&a.ownerId&&a.ownerId!==n&&(e=!1),o&&te(a)&&(e=!1),r&&!ne(a)&&(e=!1),e&&(u[g++]=a)}ee(a,!0),a.right===le||X(a.right)||(l+=a.delta,a=a.right)}}return ee(e.root,!1),u}(this,e,t,i,n,o,s)}search(e,t,i,n){return this.root===le?[]:function(e,t,i,n,o){let s=e.root,r=0,a=0,l=0;const d=[];let c=0;for(;s!==le;){if(X(s)){ee(s.left,!1),ee(s.right,!1),s===s.parent.right&&(r-=s.parent.delta),s=s.parent;continue}if(s.left!==le&&!X(s.left)){s=s.left;continue}a=r+s.start,l=r+s.end,s.setCachedOffsets(a,l,n);let e=!0;t&&s.ownerId&&s.ownerId!==t&&(e=!1),i&&te(s)&&(e=!1),o&&!ne(s)&&(e=!1),e&&(d[c++]=s),ee(s,!0),s.right===le||X(s.right)||(r+=s.delta,s=s.right)}return ee(e.root,!1),d}(this,e,t,i,n)}collectNodesFromOwner(e){return function(e,t){let i=e.root;const n=[];let o=0;for(;i!==le;)X(i)?(ee(i.left,!1),ee(i.right,!1),i=i.parent):i.left===le||X(i.left)?(i.ownerId===t&&(n[o++]=i),ee(i,!0),i.right===le||X(i.right)||(i=i.right)):i=i.left;return ee(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const i=[];let n=0;for(;t!==le;)X(t)?(ee(t.left,!1),ee(t.right,!1),t=t.parent):t.left===le||X(t.left)?t.right===le||X(t.right)?(i[n++]=t,ee(t,!0)):t=t.right:t=t.left;return ee(e.root,!1),i}(this)}insert(e){ue(this,e),this._normalizeDeltaIfNecessary()}delete(e){ge(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 o=i.start+n,s=i.end+n;i.setCachedOffsets(o,s,t)}acceptReplace(e,t,i,n){const o=function(e,t,i){let n=e.root,o=0,s=0,r=0,a=0;const l=[];let d=0;for(;n!==le;)if(X(n))ee(n.left,!1),ee(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!X(n.left)){if(s=o+n.maxEnd,si?ee(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[d++]=n),ee(n,!0),n.right===le||X(n.right)||(o+=n.delta,n=n.right))}return ee(e.root,!1),l}(this,e,e+t);for(let e=0,t=o.length;ei?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),ee(o,!0)):(ee(o,!0),o.right===le||X(o.right)||(s+=o.delta,o=o.right))}ee(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let s=0,r=o.length;si)&&1!==n&&(2===n||t)}function he(e,t,i,n,o){const s=function(e){return(24&e.metadata)>>>3}(e),r=0===s||2===s,a=1===s||2===s,l=i-t,d=n,c=Math.min(l,d),h=e.start;let u=!1;const g=e.end;let p=!1;t<=h&&g<=i&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,p=!0);{const e=o?1:l>0?2:0;!u&&ce(h,r,t,e)&&(u=!0),!p&&ce(g,a,t,e)&&(p=!0)}if(c>0&&!o){const e=l>d?2:0;!u&&ce(h,r,t+c,e)&&(u=!0),!p&&ce(g,a,t+c,e)&&(p=!0)}{const n=o?1:0;!u&&ce(h,r,i,n)&&(e.start=t+d,u=!0),!p&&ce(g,a,i,n)&&(e.end=t+d,p=!0)}const m=d-l;u||(e.start=Math.max(0,h+m)),p||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function ue(e,t){if(e.root===le)return t.parent=le,t.left=le,t.right=le,J(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const o=t.start,s=t.end;for(;;)if(r=o,a=s,l=n.start+i,d=n.end+i,(r===l?a-d:r-l)<0){if(n.left===le){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===le){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}var r,a,l,d;t.parent=n,t.left=le,t.right=le,J(t,1)}(e,t),be(t.parent);let i=t;for(;i!==e.root&&1===Y(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===Y(t)?(J(i.parent,0),J(t,0),J(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,me(e,i)),J(i.parent,0),J(i.parent.parent,1),fe(e,i.parent.parent))}else{const t=i.parent.parent.left;1===Y(t)?(J(i.parent,0),J(t,0),J(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,fe(e,i)),J(i.parent,0),J(i.parent.parent,1),me(e,i.parent.parent))}return J(e.root,0),t}function ge(e,t){let i,n;if(t.left===le?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===le?(i=t.left,n=t):(n=function(e){for(;e.left!==le;)e=e.left;return e}(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,J(i,0),t.detach(),pe(),_e(i),void(e.root.parent=le);const o=1===Y(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,J(n,Y(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==le&&(n.left.parent=n),n.right!==le&&(n.right.parent=n)),t.detach(),o)return be(i.parent),n!==t&&(be(n),be(n.parent)),void pe();let s;for(be(i),be(i.parent),n!==t&&(be(n),be(n.parent));i!==e.root&&0===Y(i);)i===i.parent.left?(s=i.parent.right,1===Y(s)&&(J(s,0),J(i.parent,1),me(e,i.parent),s=i.parent.right),0===Y(s.left)&&0===Y(s.right)?(J(s,1),i=i.parent):(0===Y(s.right)&&(J(s.left,0),J(s,1),fe(e,s),s=i.parent.right),J(s,Y(i.parent)),J(i.parent,0),J(s.right,0),me(e,i.parent),i=e.root)):(s=i.parent.left,1===Y(s)&&(J(s,0),J(i.parent,1),fe(e,i.parent),s=i.parent.left),0===Y(s.left)&&0===Y(s.right)?(J(s,1),i=i.parent):(0===Y(s.left)&&(J(s.right,0),J(s,1),me(e,s),s=i.parent.left),J(s,Y(i.parent)),J(i.parent,0),J(s.left,0),fe(e,i.parent),i=e.root));J(i,0),pe()}function pe(){le.parent=le,le.delta=0,le.start=0,le.end=0}function me(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==le&&(i.left.parent=t),i.parent=t.parent,t.parent===le?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,_e(t),_e(i)}function fe(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==le&&(i.right.parent=t),i.parent=t.parent,t.parent===le?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,_e(t),_e(i)}function ve(e){let t=e.end;if(e.left!==le){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==le){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function _e(e){e.maxEnd=ve(e)}function be(e){for(;e!==le;){const t=ve(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class we{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!==ye)return Ce(this.right);let e=this;for(;e.parent!==ye&&e.parent.left!==e;)e=e.parent;return e.parent===ye?ye:e.parent}prev(){if(this.left!==ye)return Se(this.left);let e=this;for(;e.parent!==ye&&e.parent.right!==e;)e=e.parent;return e.parent===ye?ye:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const ye=new we(null,0);function Ce(e){for(;e.left!==ye;)e=e.left;return e}function Se(e){for(;e.right!==ye;)e=e.right;return e}function xe(e){return e===ye?0:e.size_left+e.piece.length+xe(e.right)}function ke(e){return e===ye?0:e.lf_left+e.piece.lineFeedCnt+ke(e.right)}function Le(){ye.parent=ye}function Ne(e,t){const i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==ye&&(i.left.parent=t),i.parent=t.parent,t.parent===ye?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function De(e,t){const i=t.left;t.left=i.right,i.right!==ye&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===ye?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function Ee(e,t){let i,n;if(t.left===ye?(n=t,i=n.right):t.right===ye?(n=t,i=n.left):(n=Ce(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),Le(),void(e.root.parent=ye);const o=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,Me(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,Me(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==ye&&(n.left.parent=n),n.right!==ye&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Me(e,n)),t.detach(),i.parent.left===i){const t=xe(i),n=ke(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){const o=t-i.parent.size_left,s=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,Te(e,i.parent,o,s)}}if(Me(e,i.parent),o)return void Le();let s;for(;i!==e.root&&0===i.color;)i===i.parent.left?(s=i.parent.right,1===s.color&&(s.color=0,i.parent.color=1,Ne(e,i.parent),s=i.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.right.color&&(s.left.color=0,s.color=1,De(e,s),s=i.parent.right),s.color=i.parent.color,i.parent.color=0,s.right.color=0,Ne(e,i.parent),i=e.root)):(s=i.parent.left,1===s.color&&(s.color=0,i.parent.color=1,De(e,i.parent),s=i.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.left.color&&(s.right.color=0,s.color=1,Ne(e,s),s=i.parent.left),s.color=i.parent.color,i.parent.color=0,s.left.color=0,De(e,i.parent),i=e.root));i.color=0,Le()}function Ie(e,t){for(Me(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Ne(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,De(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&De(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Ne(e,t.parent.parent))}e.root.color=0}function Te(e,t,i,n){for(;t!==e.root&&t!==ye;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function Me(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=xe((t=t.parent).left)-t.size_left,n=ke(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}ye.parent=ye,ye.left=ye,ye.right=ye,ye.color=0;var Re=i(77277);const Ae=65535;function Pe(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class Oe{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function Fe(e,t=!0){const i=[0];let n=1;for(let t=0,o=e.length;t(e!==ye&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class Ve{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)}if(t){const e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class ze{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new We("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=ye,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t0){e[t].lineStarts||(e[t].lineStarts=Fe(e[t].buffer));const i=new Be(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new Ve(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=65535-Math.floor(21845),i=2*t;let n="",o=0;const s=[];if(this.iterate(this.root,(r=>{const a=this.getNodeContent(r),l=a.length;if(o<=t||o+l0){const t=n.replace(/\r\n|\r|\n/g,e);s.push(new We(t,Fe(t)))}this.create(s,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new He(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==ye;)if(n.left!==ye&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return i+=n.size_left,i+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1);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!==ye;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const o=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+o.index,0===o.index){const e=n-this.getOffsetAt(i+1,1);return new g.L(i+1,e+1)}return new g.L(i+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===ye){const t=n-e-this.getOffsetAt(i+1,1);return new g.L(i+1,t+1)}t=t.right}return new g.L(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),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){const i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let s=n.substring(o+e.remainder,o+i.piece.length);for(i=i.next();i!==ye;){const e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){s+=e.substring(n,n+t.remainder);break}s+=e.substr(n,i.piece.length),i=i.next()}return s}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,(o=>{if(o===ye)return!0;const s=o.piece;let r=s.length;if(0===r)return!0;const a=this._buffers[s.bufferIndex].buffer,l=this._buffers[s.bufferIndex].lineStarts,d=s.start.line,c=s.end.line;let h=l[d]+s.start.column;if(n&&(10===a.charCodeAt(h)&&(h++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(d===c)return this._EOLNormalized||13!==a.charCodeAt(h+r-1)?i+=a.substr(h,r):(n=!0,i+=a.substr(h,r-1)),!0;i+=this._EOLNormalized?a.substring(h,Math.max(h,l[d+1]-this._EOLLength)):a.substring(h,l[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=d+1;ne+g,t.reset(0)):(_=h.buffer,b=e=>e,t.reset(g));do{if(f=t.next(_),f){if(b(f.index)>=m)return d;this.positionInBuffer(e,b(f.index)-u,v);const t=this.getLineFeedCnt(e.piece.bufferIndex,o,v),s=v.line===o.line?v.column-o.column+n:v.column+1,r=s+f[0].length;if(c[d++]=(0,Re.iE)(new p.e(i+t,s,i+t,r),f,a),b(f.index)+f[0].length>=m)return d;if(d>=l)return d}}while(f);return d}findMatchesLineByLine(e,t,i,n){const o=[];let s=0;const r=new Re.sz(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let d=this.positionInBuffer(a.node,a.remainder);const c=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,d,c,t,i,n,s,o),o;let h=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,d,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,c=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[d.line+l],p=h===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(u,r,h,p,d,this.positionInBuffer(u,g-c),t,i,n,s,o),s>=n)return o;h+=l}const c=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const a=this.getLineContent(h).substring(c,e.endColumn-1);return s=this._findMatchesInLine(t,r,a,e.endLineNumber,c,s,o,i,n),o}if(s=this._findMatchesInLine(t,r,this.getLineContent(h).substr(c),h,c,s,o,i,n),s>=n)return o;h++,a=this.nodeAt2(h,1),u=a.node,d=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){const a=h===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(h).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,r,l,e.endLineNumber,a,s,o,i,n),o}const g=h===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,r,h,g,d,c,t,i,n,s,o),o}_findMatchesInLine(e,t,i,n,o,s,r,a,l){const d=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,c=i.length;let h=-a;for(;-1!==(h=i.indexOf(t,h+a));)if((!d||(0,Re.cM)(d,i,c,h,a))&&(r[s++]=new b.tk(new p.e(n,h+1+o,n,h+1+a+o),null),s>=l))return s;return s}let c;t.reset(0);do{if(c=t.next(i),c&&(r[s++]=(0,Re.iE)(new p.e(n,c.index+1+o,n,c.index+1+c[0].length+o),c,a),s>=l))return s}while(c);return s}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==ye){const{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),s=i.piece,r=s.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&o+s.length===e&&t.lengthe){const e=[];let o=new Be(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(r,s.end)-this.offsetInBuffer(r,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(i,n)){const e={line:o.start.line+1,column:0};o=new Be(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(i,n-1)){const o=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,o),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a);else this.deleteNodeTail(i,a);const l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(i,o);let d=i;for(let e=0;e=0;e--)o=this.rbInsertLeft(o,n[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let o=n;for(let e=1;e=c))break;a=d+1}return i?(i.line=d,i.column=r-h,null):{line:d,column:r-h}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const o=n[i.line+1],s=n[i.line]+i.column;if(o>s+1)return i.line-t.line;const r=s-1;return 13===this._buffers[e].buffer.charCodeAt(r)?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;tAe){const t=[];for(;e.length>Ae;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,Ae),e=e.substring(Ae));const o=Fe(n);t.push(new Be(this._buffers.length,{line:0,column:0},{line:o.length-1,column:n.length-o[o.length-1]},o.length-1,n.length)),this._buffers.push(new We(n,o))}const i=Fe(e);return t.push(new Be(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new We(e,i)),t}let t=this._buffers[0].buffer.length;const i=Fe(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&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 e=0;e=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const n=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:s-(e-1-i.lf_left)}),a.substring(l+n,l+r-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(s+t,s+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==ye;){const e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const o=this.getAccumulatedValue(i,0),s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(s,s+o-t),n}{const t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==ye;)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),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),s=t,r=this.offsetInBuffer(i.bufferIndex,s),a=this.getLineFeedCnt(i.bufferIndex,i.start,s),l=a-n,d=r-o,c=i.length+d;e.piece=new Be(i.bufferIndex,i.start,s,a,c),Te(this,e,d,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),s=t,r=this.getLineFeedCnt(i.bufferIndex,s,i.end),a=r-n,l=o-this.offsetInBuffer(i.bufferIndex,s),d=i.length+l;e.piece=new Be(i.bufferIndex,s,i.end,r,d),Te(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,o=n.start,s=n.end,r=n.length,a=n.lineFeedCnt,l=t,d=this.getLineFeedCnt(n.bufferIndex,n.start,l),c=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new Be(n.bufferIndex,n.start,l,d,c),Te(this,e,c-r,d-a);const h=new Be(n.bufferIndex,i,s,this.getLineFeedCnt(n.bufferIndex,i,s),this.offsetInBuffer(n.bufferIndex,s)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=Fe(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;const i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}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!==ye;)if(i.left!==ye&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,s),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==ye;){if(i.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1)return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)};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&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===ye||0===e.piece.lineFeedCnt)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;return n!==i.length-1&&(!(i[n+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o))}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==ye&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}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 o;o=0===e.piece.end.column?{line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,r=e.piece.lineFeedCnt-1;e.piece=new Be(e.piece.bufferIndex,e.piece.start,o,r,s),Te(this,e,-1,-1),0===e.piece.length&&i.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Be(t.piece.bufferIndex,a,t.piece.end,d,l),Te(this,t,-1,-1),0===t.piece.length&&i.push(t);const c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(let e=0;ee.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=s;const p=this._doApplyEdits(a);let m=null;if(t&&u.length>0){u.sort(((e,t)=>t.lineNumber-e.lineNumber)),m=[];for(let e=0,t=u.length;e0&&u[e-1].lineNumber===t)continue;const i=u[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===l.LC(n)&&m.push(t)}}return this._onDidChangeContent.fire(),new b.je(g,p,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,o=new p.e(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let s=i.startLineNumber,r=i.startColumn;const a=[];for(let i=0,n=e.length;i0&&a.push(n.text),s=o.endLineNumber,r=o.endColumn}const l=a.join(""),[d,h,u]=(0,c.Q)(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:d,firstLineLength:h,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(Ue._sortOpsDescending);const t=[];for(let i=0;i0){const e=r.eolCount+1;d=1===e?new p.e(a,l,a,l+r.firstLineLength):new p.e(a,l,a+e-1,r.lastLineLength+1)}else d=new p.e(a,l,a,l);i=d.endLineNumber,n=d.endColumn,t.push(d),o=r}return t}static _sortOpsAscending(e,t){const i=p.e.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=p.e.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class qe{constructor(e,t,i,n,o,s,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=s,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e=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||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,o=0,s=0,r=!0;for(let a=0,l=t.length;a126)&&(r=!1)}const a=new Oe(Pe(e),n,o,s,r);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new We(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.Ut(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=l.ab(e)))}finish(e=!0){return this._finish(),new qe(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=Fe(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var $e=i(15393),Ge=i(270),Ze=i(96887),Qe=i(94954),Ye=i(1432),Je=i(84013),Xe=i(19247),et=i(276);class tt{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(0===t)return void this.insert(e,i);if(0===i)return void this.delete(e,t);const n=this._store.slice(0,e),o=this._store.slice(e+t),s=function(e,t){const i=[];for(let n=0;n=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const i=[];for(let e=0;e0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new it(e,[t]))}finalize(){return this._tokens}}var ot=i(77378);class st{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new at(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class rt extends st{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 o=this._textModel.getLineContent(n.lineNumber),s=ct(this._languageIdCodec,i,this.tokenizationSupport,o,!0,n.startState);e.add(n.lineNumber,s.tokens),this.store.setEndState(n.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){const i=this.getStartState(e.lineNumber);if(!i)return 0;const n=this._textModel.getLanguageId(),o=this._textModel.getLineContent(e.lineNumber),s=o.substring(0,e.column-1)+t+o.substring(e.column-1),r=ct(this._languageIdCodec,n,this.tokenizationSupport,s,!0,i),a=new ot.A(r.tokens,s,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,o=e.column,s=this.getStartState(n);if(!s)return null;const r=this._textModel.getLineContent(n),a=r.substring(0,o-1)+i+r.substring(o-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),d=ct(this._languageIdCodec,l,this.tokenizationSupport,a,!0,s);return new ot.A(d.tokens,a,this._languageIdCodec)}isCheapToTokenize(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&o>=1;o--){const e=this._textModel.getLineFirstNonWhitespaceColumn(o);if(0!==e&&e0&&i>0&&(i--,t--),this._lineEndStates.replace(e.startLineNumber,i,t)}}class dt{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const i=this._ranges[t];i.start===e?i.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Xe.q(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[t]=new Xe.q(i.start,e):this._ranges.splice(t,1,new Xe.q(i.start,e),new Xe.q(e+1,i.endExclusive))}}addRange(e){Xe.q.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 ct(e,t,i,n,o,r){let a=null;if(i)try{a=i.tokenizeEncoded(n,o,r.clone())}catch(e){(0,s.dL)(e)}return a||(a=(0,et.Dy)(e.encodeLanguageId(t),r)),ot.A.convertToEndOffset(a.tokens,n.length),a}class ht{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,(0,$e.jg)((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)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){var t;const i=null===(t=this._tokenizerWithStateStore)||void 0===t?void 0:t.getFirstInvalidLine();return i?(this._tokenizerWithStateStore.updateTokensUntilLine(e,i.lineNumber),i.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new u.z(e,t))}}const ut=new Uint32Array(0).buffer;class gt{static deleteBeginning(e,t){return null===e||e===ut?e:gt.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===ut)return e;const i=pt(e),n=i[i.length-2];return gt.delete(e,t,n)}static delete(e,t,i){if(null===e||e===ut||t===i)return e;const n=pt(e),o=n.length>>>1;if(0===t&&n[n.length-2]===i)return ut;const s=ot.A.findIndexInTokensArray(n,t),r=s>0?n[s-1<<1]:0;if(il&&(n[a++]=t,n[a++]=n[1+(e<<1)],l=t)}if(a===n.length)return e;const c=new Uint32Array(a);return c.set(n.subarray(0,a),0),c.buffer}static append(e,t){if(t===ut)return e;if(e===ut)return t;if(null===e)return e;if(null===t)return null;const i=pt(e),n=pt(t),o=n.length>>>1,s=new Uint32Array(i.length+n.length);s.set(i,0);let r=i.length;const a=i[i.length-2];for(let e=0;e>>1;let s=ot.A.findIndexInTokensArray(n,t);s>0&&n[s-1<<1]===t&&s--;for(let e=s;e0}getTokens(e,t,i){let n=null;if(t1&&(t=mt.N.getLanguageId(n[1])!==e),!t)return ut}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=vt(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const i=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=gt.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=gt.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=gt.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=gt.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=gt.insert(this._lineTokens[n],e.column-1,i))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const i=[];for(let n=0,o=e.length;n>>0}class _t{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),o=t[t.length-1].getRange();if(!n||!o)return e;i=e.plusRange(n).plusRange(o)}let o=null;for(let e=0,t=this._pieces.length;ei.endLineNumber){o=o||{index:e};break}if(n.removeTokens(i),n.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(n.endLineNumberi.endLineNumber){o=o||{index:e};continue}const[s,r]=n.split(i);s.isEmpty()?o=o||{index:e}:r.isEmpty()||(this._pieces.splice(e,1,s,r),e++,t++,o=o||{index:e})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=n.Zv(this._pieces,o.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const i=this._pieces;if(0===i.length)return t;const n=i[_t._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const o=t.getCount(),s=n.getCount();let r=0;const a=[];let l=0,d=0;const c=(e,t)=>{e!==d&&(d=e,a[l++]=e,a[l++]=t)};for(let e=0;e>>0,d=~l>>>0;for(;rt)){for(;o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber;)o--;return o}n=o-1}}return i}acceptEdit(e,t,i,n,o){for(const s of this._pieces)s.acceptEdit(e,t,i,n,o)}}class bt extends Qe.U{constructor(e,t,i,n,o,s){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=i,this._bracketPairsTextModelPart=n,this._languageId=o,this._attachedViews=s,this._semanticTokens=new _t(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new r.Q5),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new r.Q5),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new r.Q5),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new wt(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews)),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(this.grammarTokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()})))}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,i,n]=(0,c.Q)(t.text);this._semanticTokens.acceptEdit(t.range,e,i,n,t.text.length>0?t.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(e)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this.grammarTokens.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 s.he("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.grammarTokens.forceTokenization(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.grammarTokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.grammarTokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,i){return this.grammarTokens.getTokenTypeIfInsertingCharacter(e,t,i)}tokenizeLineWithEdit(e,t,i){return this.grammarTokens.tokenizeLineWithEdit(e,t,i)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,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),o=n.findTokenIndexAtOffset(t.column-1),[s,r]=bt._findLanguageBoundaries(n,o),a=(0,Ge.t2)(t.column,this.getLanguageConfiguration(n.getLanguageId(o)).getWordDefinition(),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&s===t.column-1){const[s,r]=bt._findLanguageBoundaries(n,o-1),a=(0,Ge.t2)(t.column,this.getLanguageConfiguration(n.getLanguageId(o-1)).getWordDefinition(),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let o=e.getLineContent().length;for(let n=t,s=e.getCount();n{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(n.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let i=this._attachedViewStates.get(e);i||(i=new yt((()=>this.refreshRanges(i.lineRanges))),this._attachedViewStates.set(e,i)),i.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){var t;this._tokens.flush(),null===(t=this._debugBackgroundTokens)||void 0===t||t.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new at(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const[i,n]=(()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=Ze.RW.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(e){return(0,s.dL)(e),[null,null]}return[e,t]})();if(this._tokenizer=i&&n?new rt(this._textModel.getLineCount(),i,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{2!==this._backgroundTokenizationState&&(this._backgroundTokenizationState=2,this._onDidChangeBackgroundTokenizationState.fire())},setEndState:(e,t)=>{var i;if(!this._tokenizer)return;const n=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==n&&e>=n&&(null===(i=this._tokenizer)||void 0===i||i.store.setEndState(e,t))}};i&&i.createBackgroundTokenizer&&!i.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||this._textModel.isTooLargeForTokenization()||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new ht(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),(null==i?void 0:i.backgroundTokenizerShouldOnlyVerifyTokens)&&i.createBackgroundTokenizer?(this._debugBackgroundTokens=new ft(this._languageIdCodec),this._debugBackgroundStates=new at(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,{setTokens:e=>{var t;null===(t=this._debugBackgroundTokens)||void 0===t||t.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{var i;null===(i=this._debugBackgroundStates)||void 0===i||i.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;null===(e=this._defaultBackgroundTokenizer)||void 0===e||e.handleChanges()}handleDidChangeContent(e){var t,i,n;if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const i of e.changes){const[e,n]=(0,c.Q)(i.text);this._tokens.acceptEdit(i.range,e,n),null===(t=this._debugBackgroundTokens)||void 0===t||t.acceptEdit(i.range,e,n)}null===(i=this._debugBackgroundStates)||void 0===i||i.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),null===(n=this._defaultBackgroundTokenizer)||void 0===n||n.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}}refreshAllVisibleLineTokens(){const e=u.z.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){var i,n;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const o=new nt,{heuristicTokens:s}=this._tokenizer.tokenizeHeuristically(o,e,t),r=this.setTokens(o.finalize());if(s)for(const e of r.changes)null===(i=this._backgroundTokenizer.value)||void 0===i||i.requestTokens(e.fromLineNumber,e.toLineNumber+1);null===(n=this._defaultBackgroundTokenizer)||void 0===n||n.checkFinished()}forceTokenization(e){var t,i;const n=new nt;null===(t=this._tokenizer)||void 0===t||t.updateTokensUntilLine(n,e),this.setTokens(n.finalize()),null===(i=this._defaultBackgroundTokenizer)||void 0===i||i.checkFinished()}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){var t;const i=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,i);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const o=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,i);!n.equals(o)&&(null===(t=this._debugBackgroundTokenizer.value)||void 0===t?void 0:t.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,i){if(!this._tokenizer)return 0;const n=this._textModel.validatePosition(new g.L(e,t));return this.forceTokenization(n.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){if(!this._tokenizer)return null;const n=this._textModel.validatePosition(e);return this.forceTokenization(n.lineNumber),this._tokenizer.tokenizeLineWithEdit(n,t,i)}get hasTokens(){return this._tokens.hasTokens}}class yt extends a.JT{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new $e.pY((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,n.fS)(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()}}var Ct,St=i(14706),xt=i(64862),kt=function(e,t){return function(i,n){t(i,n,e)}};function Lt(e,t){let i;return i="string"==typeof e?function(e){const t=new Ke;return t.acceptChunk(e),t.finish()}(e):b.Hf(e)?function(e){const t=new Ke;let i;for(;"string"==typeof(i=e.read());)t.acceptChunk(i);return t.finish()}(e):e,i.create(t)}let Nt=0;class Dt{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;for(;;){const n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const Et=()=>{throw new Error("Invalid change accessor")};let It=Ct=class extends a.JT{static resolveOptions(e,t){if(t.detectIndentation){const i=Q(e,t.tabSize,t.insertSpaces);return new b.dJ({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new b.dJ(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return(0,a.F8)(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_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,o,s,c){super(),this._undoRedoService=o,this._languageService=s,this._languageConfigurationService=c,this._onWillDispose=this._register(new r.Q5),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new jt((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new r.Q5),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new r.Q5),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new r.Q5),this._eventEmitter=this._register(new Ut),this._languageSelectionListener=this._register(new a.XK),this._deltaDecorationCallCnt=0,this._attachedViews=new qt,Nt++,this.id="$model"+Nt,this.isForSimpleWidget=i.isForSimpleWidget,this._associatedResource=null==n?d.o.parse("inmemory://model/"+Nt):n,this._attachedEditorCount=0;const{textBuffer:h,disposable:u}=Lt(e,i.defaultEOL);this._buffer=h,this._bufferDisposable=u,this._options=Ct.resolveOptions(this._buffer,i);const g="string"==typeof t?t:t.languageId;"string"!=typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new B(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new $.l(this,this._languageConfigurationService)),this._decorationProvider=this._register(new U(this)),this._tokenizationTextModelPart=new bt(this._languageService,this._languageConfigurationService,this,this._bracketPairs,g,this._attachedViews);const m=this._buffer.getLineCount(),f=this._buffer.getValueLengthInRange(new p.e(1,1,m,this._buffer.getLineLength(m)+1),0);i.largeFileOptimizations?(this._isTooLargeForTokenization=f>Ct.LARGE_FILE_SIZE_THRESHOLD||m>Ct.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=f>Ct.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=f>Ct._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=l.PJ(Nt),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Rt,this._commandManager=new K.NL(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._languageService.requestRichLanguageFeatures(g)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new Ue([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=a.JT.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new St.fV(e,t)))}setValue(e){if(this._assertNotDisposed(),null==e)throw(0,s.b1)();const{textBuffer:t,disposable:i}=Lt(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,s,r,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:o,isRedoing:s,isFlush:r}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Rt,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new St.dQ([new St.Jx],this._versionId,!1,!1),this._createContentChanged2(new p.e(1,1,o,s),0,n,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new St.dQ([new St.CZ],this._versionId,!1,!1),this._createContentChanged2(new p.e(1,1,o,s),0,n,this.getValue(),!1,!1,!1,!0))}_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 i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}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=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.originalIndentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,r=new b.dJ({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:s});if(this._options.equals(r))return;const a=this._options.createChangeEvent(r);this._options=r,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=Q(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),(0,h.x)(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.Qe.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.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 s.he("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 Dt(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 s.he("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.he("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new s.he("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.he("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.he("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.he("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let o=Math.floor("number"!=typeof i||isNaN(i)?1:i),s=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(o<1)o=1,s=1;else if(o>t)o=t,s=this.getLineMaxColumn(o);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(o);s>=e&&(s=e)}const r=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof r||isNaN(r)?1:r),d=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,d=1;else if(l>t)l=t,d=this.getLineMaxColumn(l);else if(d<=1)d=1;else{const e=this.getLineMaxColumn(l);d>=e&&(d=e)}return i===o&&n===s&&r===l&&a===d&&e instanceof p.e&&!(e instanceof m.Y)?e:new p.e(o,s,l,d)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(l.ZG(i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(n<1)return new g.L(1,1);if(n>s)return new g.L(s,this.getLineMaxColumn(s));if(o<=1)return new g.L(n,1);const r=this.getLineMaxColumn(n);if(o>=r)return new g.L(n,r);if(1===i){const e=this._buffer.getLineCharCode(n,o-2);if(l.ZG(e))return new g.L(n,o-1)}return new g.L(n,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof g.L&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(o,s,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=s>1&&s<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,s-2):0,r=l.ZG(e),a=l.ZG(t);return!r&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof p.e&&!(e instanceof m.Y)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,o=t.column,s=i.lineNumber,r=i.column;{const e=o>1?this._buffer.getLineCharCode(n,o-2):0,t=r>1&&r<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,r-2):0,i=l.ZG(e),a=l.ZG(t);return i||a?n===s&&o===r?new p.e(n,o-1,s,r-1):i&&a?new p.e(n,o-1,s,r+1):i?new p.e(n,o-1,s,r):new p.e(n,o,s,r+1):new p.e(n,o,s,r)}}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 p.e(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,s,r=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>p.e.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let d;if(l.push(a.reduce(((e,t)=>p.e.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new Re.bc(e,i,n,o).parseSearchRequest();if(!t)return[];d=e=>this.findMatchesLineByLine(e,t,s,r)}else d=t=>Re.pM.findMatches(this,new Re.bc(e,i,n,o),t,s,r);return l.map(d).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new Re.bc(e,i,n,o).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new p.e(r.lineNumber,r.column,a,this.getLineMaxColumn(a)),d=this.findMatchesLineByLine(l,t,s,1);return Re.pM.findNextMatch(this,new Re.bc(e,i,n,o),r,s),d.length>0?d[0]:(l=new p.e(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),d=this.findMatchesLineByLine(l,t,s,1),d.length>0?d[0]:null)}return Re.pM.findNextMatch(this,new Re.bc(e,i,n,o),r,s)}findPreviousMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);return Re.pM.findPreviousMatch(this,new Re.bc(e,i,n,o),r,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof b.Qi?e:new b.Qi(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text})));let n=!0;if(e)for(let t=0,o=e.length;to.endLineNumber,r=o.startLineNumber>t.endLineNumber;if(!n&&!r){s=!0;break}}if(!s){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;et.endLineNumber||n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1))){s=!1;break}}if(s){const e=new p.e(n,1,n,o);t.push(new b.Qi(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n)}_applyUndo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new p.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new p.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),o=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),r=o.changes;if(this._trimAutoWhitespaceLines=o.trimAutoWhitespaceLineNumbers,0!==r.length){for(let e=0,t=r.length;e=0;t--){const i=l+t,n=f+t;y.takeFromEndWhile((e=>e.lineNumber>n));const o=y.takeFromEndWhile((e=>e.lineNumber===n));e.push(new St.rU(i,this.getLineContent(n),o))}if(pe.lineNumbere.lineNumber===t))}e.push(new St.Tx(o+1,l+u,c,d))}t+=m}this._emitContentChangedEvent(new St.dQ(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===o.reverseEdits?void 0:o.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e).map((e=>new St.rU(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new St.D8(t))}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:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,zt(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)};let n=null;try{n=t(i)}catch(e){(0,s.dL)(e)}return i.addDecoration=Et,i.changeDecoration=Et,i.changeDecorationOptions=Et,i.removeDecoration=Et,i.deltaDecorations=Et,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,s.dL)(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:Vt[i]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const o=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),r=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),s,r,o),n.setOptions(Vt[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,o=!1,s=!1){const r=this.getLineCount(),a=Math.min(r,Math.max(1,e)),l=Math.min(r,Math.max(1,t)),d=this.getLineMaxColumn(l),c=new p.e(a,1,l,d),h=this._getDecorationsInRange(c,i,o,s);return(0,n.vA)(h,this._decorationProvider.getDecorationsInRange(c,i,o)),h}getDecorationsInRange(e,t=0,i=!1,o=!1,s=!1){const r=this.validateRange(e),a=this._getDecorationsInRange(r,t,i,s);return(0,n.vA)(a,this._decorationProvider.getDecorationsInRange(r,t,i,o)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return St.gk.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,i,n){const o=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,o,s,t,i,n)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),s=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,s,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),o=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}const s=n!==o,r=function(e){return!!e.after||!!e.before}(t)!==Mt(i);s||r?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i,n=!1){const o=this.getVersionId(),s=t.length;let r=0;const a=i.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const d=new Array(a);for(;rthis._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 function(e){let t=0;for(const i of e){if(" "!==i&&"\t"!==i)break;t++}return t}(this.getLineContent(e))+1}};function Tt(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function Mt(e){return!!e.options.after||!!e.options.before}It._MODEL_SYNC_LIMIT=52428800,It.LARGE_FILE_SIZE_THRESHOLD=20971520,It.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5,It.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456,It.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:f.D.tabSize,indentSize:f.D.indentSize,insertSpaces:f.D.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:f.D.trimAutoWhitespace,largeFileOptimizations:f.D.largeFileOptimizations,bracketPairColorizationOptions:f.D.bracketPairColorizationOptions},It=Ct=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([kt(4,xt.tJ),kt(5,v.O),kt(6,_.c_)],It);class Rt{constructor(){this._decorationsTree0=new de,this._decorationsTree1=new de,this._injectedTextDecorationsTree=new de}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,o,s){const r=e.getVersionId(),a=this._intervalSearch(t,i,n,o,r,s);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,i,n,o,s){const r=this._decorationsTree0.intervalSearch(e,t,i,n,o,s),a=this._decorationsTree1.intervalSearch(e,t,i,n,o,s),l=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,o,s);return r.concat(a).concat(l)}getInjectedTextInInterval(e,t,i,n){const o=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,o,!1);return this._ensureNodesHaveRanges(e,s).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n,o){const s=e.getVersionId(),r=this._search(t,i,n,s,o);return this._ensureNodesHaveRanges(e,r)}_search(e,t,i,n,o){if(i)return this._decorationsTree1.search(e,t,n,o);{const i=this._decorationsTree0.search(e,t,n,o),s=this._decorationsTree1.search(e,t,n,o),r=this._injectedTextDecorationsTree.search(e,t,n,o);return i.concat(s).concat(r)}}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){Mt(e)?this._injectedTextDecorationsTree.insert(e):Tt(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Mt(e)?this._injectedTextDecorationsTree.delete(e):Tt(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Mt(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Tt(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 At(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class Pt{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Ot extends Pt{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:b.sh.Center}getColor(e){return this._resolvedColor||("light"!==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("string"==typeof e)return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class Ft{constructor(e){var t;this.position=null!==(t=null==e?void 0:e.position)&&void 0!==t?t:b.U.Center,this.persistLane=null==e?void 0:e.persistLane}}class Bt extends Pt{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||("light"!==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"string"==typeof e?o.Il.fromHex(e):t.getColor(e.id)}}class Wt{static from(e){return e instanceof Wt?e:new Wt(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Ht{static register(e){return new Ht(e)}static createDynamic(e){return new Ht(e)}constructor(e){var t,i,n,o,s,r;this.description=e.description,this.blockClassName=e.blockClassName?At(e.blockClassName):null,this.blockDoesNotCollapse=null!==(t=e.blockDoesNotCollapse)&&void 0!==t?t:null,this.blockIsAfterEnd=null!==(i=e.blockIsAfterEnd)&&void 0!==i?i:null,this.blockPadding=null!==(n=e.blockPadding)&&void 0!==n?n:null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?At(e.className):null,this.shouldFillLineOnLineBreak=null!==(o=e.shouldFillLineOnLineBreak)&&void 0!==o?o:null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Ot(e.overviewRuler):null,this.minimap=e.minimap?new Bt(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Ft(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?At(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?At(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?At(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?l.fA(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?At(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?At(e.marginClassName):null,this.inlineClassName=e.inlineClassName?At(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?At(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?At(e.afterContentClassName):null,this.after=e.after?Wt.from(e.after):null,this.before=e.before?Wt.from(e.before):null,this.hideInCommentTokens=null!==(s=e.hideInCommentTokens)&&void 0!==s&&s,this.hideInStringTokens=null!==(r=e.hideInStringTokens)&&void 0!==r&&r}}Ht.EMPTY=Ht.register({description:"empty"});const Vt=[Ht.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Ht.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Ht.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Ht.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function zt(e){return e instanceof Ht?e:Ht.createDynamic(e)}class jt extends a.JT{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new r.Q5),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),null===(e=this._affectedInjectedTextLines)||void 0===e||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){var t,i;this._affectsMinimap||(this._affectsMinimap=!!(null===(t=e.minimap)||void 0===t?void 0:t.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(null===(i=e.overviewRuler)||void 0===i?void 0:i.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this._affectsLineNumber||(this._affectsLineNumber=!!e.lineNumberClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);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 Ut extends a.JT{constructor(){super(),this._fastEmitter=this._register(new r.Q5),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new r.Q5),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}class qt{constructor(){this._onDidChangeVisibleRanges=new r.Q5,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Kt((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Kt{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const i=e.map((e=>new u.z(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:i,stabilized:t})}}},94954:(e,t,i)=>{"use strict";i.d(t,{U:()=>o});var n=i(5976);class o extends n.JT{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}},77277:(e,t,i)=>{"use strict";i.d(t,{bc:()=>l,cM:()=>u,iE:()=>d,pM:()=>h,sz:()=>g});var n=i(97295),o=i(24929),s=i(50187),r=i(24314),a=i(84973);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.GF(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new a.Tx(t,this.wordSeparators?(0,o.u)(this.wordSeparators):null,i?this.searchString:null)}}function d(e,t,i){if(!i)return new a.tk(e,null);const n=[];for(let e=0,i=t.length;e>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class h{static findMatches(e,t,i,n,o){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,i,new g(s.wordSeparators,s.regex),n,o):this._doFindMatchesLineByLine(e,i,s,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,s){let a,l,d=0;if(n?(d=n.findLineFeedCountBeforeOffset(o),a=t+o+d):a=t+o,n){const e=n.findLineFeedCountBeforeOffset(o+s.length)-d;l=a+s.length+e}else l=a+s.length;const c=e.getPositionAt(a),h=e.getPositionAt(l);return new r.e(c.lineNumber,c.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(e,t,i,n,o){const s=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new c(r):null,l=[];let h,u=0;for(i.reset(0);h=i.next(r);)if(l[u++]=d(this._getMultilineMatchRange(e,s,r,a,h.index,h[0]),h,n),u>=o)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,o){const s=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o);for(let a=t.startLineNumber+1;a=c))return o;return o}const p=new g(e.wordSeparators,e.regex);let m;p.reset(0);do{if(m=p.next(t),m&&(s[o++]=d(new r.e(i,m.index+1+n,i,m.index+1+m[0].length+n),m,l),o>=c))return o}while(m);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new g(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,s,n):this._doFindNextMatchLineByLine(e,i,s,n)}static _doFindNextMatchMultiline(e,t,i,n){const o=new s.L(t.lineNumber,1),a=e.getOffsetAt(o),l=e.getLineCount(),h=e.getValueInRange(new r.e(o.lineNumber,o.column,l,e.getLineMaxColumn(l)),1),u="\r\n"===e.getEOL()?new c(h):null;i.reset(t.column-1);const g=i.next(h);return g?d(this._getMultilineMatchRange(e,a,h,u,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new s.L(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s),a=this._findFirstMatchInLine(i,r,s,t.column,n);if(a)return a;for(let t=1;t<=o;t++){const r=(s+t-1)%o,a=e.getLineContent(r+1),l=this._findFirstMatchInLine(i,a,r+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const s=e.next(t);return s?d(new r.e(i,s.index+1,i,s.index+1+s[0].length),s,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new g(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,s,n):this._doFindPreviousMatchLineByLine(e,i,s,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const o=this._doFindMatchesMultiline(e,new r.e(1,1,t.lineNumber,t.column),i,n,9990);if(o.length>0)return o[o.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new s.L(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,s,n);if(a)return a;for(let t=1;t<=o;t++){const r=(o+s-t-1)%o,a=e.getLineContent(r+1),l=this._findLastMatchInLine(i,a,r+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let o,s=null;for(e.reset(0);o=e.next(t);)s=d(new r.e(i,o.index+1,i,o.index+1+o[0].length),o,n);return s}}function u(e,t,i,n,o){return function(e,t,i,n,o){if(0===n)return!0;const s=t.charCodeAt(n-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,o)&&function(e,t,i,n,o){if(n+o===i)return!0;const s=t.charCodeAt(n+o);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,o)}class g{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const o=i.index,s=i[0].length;if(o===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){n.ZH(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=s,!this._wordSeparators||u(this._wordSeparators,e,t,o,s))return i}while(i);return null}}},59616:(e,t,i)=>{"use strict";function n(e,t){let i=0,n=0;const o=e.length;for(;nn})},20927:(e,t,i)=>{"use strict";i.d(t,{O:()=>g});var n=i(71050),o=i(4669),s=i(22258),r=i(70666),a=i(50187),l=i(24314),d=i(3860),c=i(96887),h=i(70902);class u{static chord(e,t){return(0,s.gx)(e,t)}}function g(){return{editor:void 0,languages:void 0,CancellationTokenSource:n.A,Emitter:o.Q5,KeyCode:h.VD,KeyMod:u,Position:a.L,Range:l.e,Selection:d.Y,SelectionDirection:h.a$,MarkerSeverity:h.ZL,MarkerTag:h.eB,Uri:r.o,Token:c.WU}}u.CtrlCmd=2048,u.Shift=1024,u.Alt=512,u.WinCtrl=256},85215:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});const n=(0,i(72065).yh)("editorWorkerService")},88191:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var n=i(89954),o=i(43702),s=i(59870),r=i(48814),a=i(65026),l=i(72065),d=i(43557),c=i(66663),h=function(e,t){return function(i,n){t(i,n,e)}};const u=(0,l.yh)("ILanguageFeatureDebounceService");var g;!function(e){const t=new WeakMap;let i=0;e.of=function(e){let n=t.get(e);return void 0===n&&(n=++i,t.set(e,n)),n}}(g||(g={}));class p{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class m{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 o.z6(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>(0,n.SP)(g.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?(0,s.uZ)(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 s.N(6),this._cache.set(i,n));const o=(0,s.uZ)(n.update(t),this._min,this._max);return(0,c.xn)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${o}ms`),o}_overall(){const e=new s.nM;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=0|this._overall()||this._default;return(0,s.uZ)(e,this._min,this._max)}}let f=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){var n,o,s;const r=null!==(n=null==i?void 0:i.min)&&void 0!==n?n:50,a=null!==(o=null==i?void 0:i.max)&&void 0!==o?o:r**2,l=null!==(s=null==i?void 0:i.key)&&void 0!==s?s:void 0,d=`${g.of(e)},${r}${l?","+l:""}`;let c=this._data.get(d);return c||(this._isDev?c=new m(this._logService,t,e,0|this._overallAverage()||1.5*r,r,a):(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),c=new p(1.5*r)),this._data.set(d,c)),c}_overallAverage(){const e=new s.nM;for(const t of this._data.values())e.update(t.default());return e.value}};f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([h(0,d.VZ),h(1,r.Y)],f),(0,a.z)(u,f,1)},71922:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});const n=(0,i(72065).yh)("ILanguageFeaturesService")},36357:(e,t,i)=>{"use strict";i.d(t,{i:()=>n});const n=(0,i(72065).yh)("markerDecorationsService")},73733:(e,t,i)=>{"use strict";i.d(t,{q:()=>n});const n=(0,i(72065).yh)("modelService")},88216:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const n=(0,i(72065).yh)("textModelService")},26909:(e,t,i)=>{"use strict";i.d(t,{$:()=>p,h:()=>m});var n=i(45797),o=i(97781),s=i(43557),r=i(50187),a=i(24314),l=i(23795);class d{static create(e,t){return new d(e,new c(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 a.e(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}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,o,s]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new d(this._startLineNumber,n),new d(this._startLineNumber+s,o)]}applyEdit(e,t){const[i,n,o]=(0,l.Q)(t);this.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,o){this._acceptDeleteRange(e),this._acceptInsertText(new r.L(e.startLineNumber,e.startColumn),t,i,n,o),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 e=i-t;return void(this._startLineNumber-=e)}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const n=-t;this._startLineNumber-=n,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,o){if(0===t&&0===i)return;const s=e.lineNumber-this._startLineNumber;s<0?this._startLineNumber+=t:s>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(s,e.column-1,t,i,n,o)}}class c{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)){let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let s=n;for(;se||c===e&&u>=t)&&(ce||c===e&&g>=t){if(co?p-=o-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>o)){d=!0;continue}p-=o-i}else if(uo)){d=!0;continue}u=t,g=i,p=g+(p-o)}else if(u>n){if(0===a&&!d){l=r;break}u-=a}else{if(!(u===n&&g>=o))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=o-i,p-=o-i}const f=4*l;s[f]=u,s[f+1]=g,s[f+2]=p,s[f+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,s){const r=0===i&&1===n&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let s=0;s0&&t>=1;e>0&&this._logService.getLevel()===s.in.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(r,l,i);void 0===n?a=2147483647:(a=0,void 0!==n.italic&&(a|=1|(n.italic?1:0)<<11),void 0!==n.bold&&(a|=2|(n.bold?2:0)<<11),void 0!==n.underline&&(a|=4|(n.underline?4:0)<<11),void 0!==n.strikethrough&&(a|=8|(n.strikethrough?8:0)<<11),n.foreground&&(a|=16|n.foreground<<15),0===a&&(a=2147483647))}else this._logService.getLevel()===s.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,r="not-in-legend";this._hashTable.add(e,t,o,a),this._logService.getLevel()===s.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${r}) / ${t} (${l.join(" ")}): foreground ${n.N.getForeground(a)}, fontStyle ${n.N.getFontStyle(a).toString(2)}`)}return a}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,o){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 ${o}).`))}};function m(e,t,i){const n=e.data,o=e.data.length/5|0,s=Math.max(Math.ceil(o/1024),400),r=[];let a=0,l=1,c=0;for(;ae&&0===n[5*t];)t--;if(t-1===e){let e=h;for(;e+1d)t.warnOverlappingSemanticTokens(r,d+1);else{const e=t.getMetadata(v,_,i);2147483647!==e&&(0===p&&(p=r),u[g]=r-p,u[g+1]=d,u[g+2]=h,u[g+3]=e,g+=4,m=r,f=h)}l=r,c=d,a++}g!==u.length&&(u=u.subarray(0,g));const v=d.create(p,u);r.push(v)}return r}p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([g(1,o.XE),g(2,u.O),g(3,s.VZ)],p);class f{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class v{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=v._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=v._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{"use strict";i.d(t,{s:()=>n});const n=(0,i(72065).yh)("semanticTokensStylingService")},71765:(e,t,i)=>{"use strict";i.d(t,{V:()=>o,y:()=>s});var n=i(72065);const o=(0,n.yh)("textResourceConfigurationService"),s=(0,n.yh)("textResourcePropertiesService")},31446:(e,t,i)=>{"use strict";i.d(t,{a:()=>l});var n=i(24314),o=i(77277),s=i(97295),r=i(35146),a=i(270);class l{static computeUnicodeHighlights(e,t,i){const l=i?i.startLineNumber:1,c=i?i.endLineNumber:e.getLineCount(),h=new d(t),u=h.getCandidateCodePoints();let g;var p;g="allNonBasicAscii"===u?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp((p=Array.from(u),`[${s.ec(p.map((e=>String.fromCodePoint(e))).join(""))}]`),"g");const m=new o.sz(null,g),f=[];let v,_=!1,b=0,w=0,y=0;e:for(let t=l,i=c;t<=i;t++){const i=e.getLineContent(t),o=i.length;m.reset(0);do{if(v=m.next(i),v){let e=v.index,l=v.index+v[0].length;if(e>0){const t=i.charCodeAt(e-1);s.ZG(t)&&e--}if(l+1=i){_=!0;break e}f.push(new n.e(t,e+1,t,l+1))}}}while(v)}return{ranges:f,hasMore:_,ambiguousCharacterCount:b,invisibleCharacterCount:w,nonBasicAsciiCharacterCount:y}}static computeUnicodeHighlightReason(e,t){const i=new d(t);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const n=e.codePointAt(0),o=i.ambiguousCharacters.getPrimaryConfusable(n),r=s.ZK.getLocales().filter((e=>!s.ZK.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n)));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:r}}case 1:return{kind:2}}}}class d{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=s.ZK.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of s.vU.codePoints)c(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,o=!1;if(t)for(const e of t){const t=e.codePointAt(0),i=s.$i(e);n=n||i,i||this.ambiguousCharacters.isAmbiguous(t)||s.vU.isInvisibleCharacter(t)||(o=!0)}return!n&&o?0:this.options.invisibleCharacters&&!c(e)&&s.vU.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function c(e){return" "===e||"\n"===e||"\t"===e}},70902:(e,t,i)=>{"use strict";var n,o,s,r,a,l,d,c,h,u,g,p,m,f,v,_,b,w,y,C,S,x,k,L,N,D,E,I,T,M,R,A,P,O,F,B,W,H,V,z,j,U;i.d(t,{$r:()=>F,E$:()=>E,F5:()=>L,Ij:()=>l,In:()=>V,Lu:()=>M,MG:()=>N,MY:()=>u,OI:()=>j,RM:()=>b,U:()=>v,VD:()=>S,Vi:()=>c,WW:()=>B,ZL:()=>x,_x:()=>h,a$:()=>O,a7:()=>s,ao:()=>n,bw:()=>y,cR:()=>W,cm:()=>r,d2:()=>z,eB:()=>k,g4:()=>A,g_:()=>P,gl:()=>w,gm:()=>m,jl:()=>f,np:()=>o,py:()=>T,r3:()=>d,r4:()=>H,rf:()=>g,rn:()=>C,sh:()=>I,up:()=>U,vQ:()=>R,w:()=>D,wT:()=>p,wU:()=>_,we:()=>a}),function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(n||(n={})),function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"}(o||(o={})),function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(s||(s={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(r||(r={})),function(e){e[e.Deprecated=1]="Deprecated"}(a||(a={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(l||(l={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(d||(d={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(c||(c={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(h||(h={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(u||(u={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(g||(g={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=88]="definitionLinkOpensInPeek",e[e.quickSuggestions=89]="quickSuggestions",e[e.quickSuggestionsDelay=90]="quickSuggestionsDelay",e[e.readOnly=91]="readOnly",e[e.readOnlyMessage=92]="readOnlyMessage",e[e.renameOnType=93]="renameOnType",e[e.renderControlCharacters=94]="renderControlCharacters",e[e.renderFinalNewline=95]="renderFinalNewline",e[e.renderLineHighlight=96]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=97]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=98]="renderValidationDecorations",e[e.renderWhitespace=99]="renderWhitespace",e[e.revealHorizontalRightPadding=100]="revealHorizontalRightPadding",e[e.roundedSelection=101]="roundedSelection",e[e.rulers=102]="rulers",e[e.scrollbar=103]="scrollbar",e[e.scrollBeyondLastColumn=104]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=105]="scrollBeyondLastLine",e[e.scrollPredominantAxis=106]="scrollPredominantAxis",e[e.selectionClipboard=107]="selectionClipboard",e[e.selectionHighlight=108]="selectionHighlight",e[e.selectOnLineNumbers=109]="selectOnLineNumbers",e[e.showFoldingControls=110]="showFoldingControls",e[e.showUnused=111]="showUnused",e[e.snippetSuggestions=112]="snippetSuggestions",e[e.smartSelect=113]="smartSelect",e[e.smoothScrolling=114]="smoothScrolling",e[e.stickyScroll=115]="stickyScroll",e[e.stickyTabStops=116]="stickyTabStops",e[e.stopRenderingLineAfter=117]="stopRenderingLineAfter",e[e.suggest=118]="suggest",e[e.suggestFontSize=119]="suggestFontSize",e[e.suggestLineHeight=120]="suggestLineHeight",e[e.suggestOnTriggerCharacters=121]="suggestOnTriggerCharacters",e[e.suggestSelection=122]="suggestSelection",e[e.tabCompletion=123]="tabCompletion",e[e.tabIndex=124]="tabIndex",e[e.unicodeHighlighting=125]="unicodeHighlighting",e[e.unusualLineTerminators=126]="unusualLineTerminators",e[e.useShadowDOM=127]="useShadowDOM",e[e.useTabStops=128]="useTabStops",e[e.wordBreak=129]="wordBreak",e[e.wordSeparators=130]="wordSeparators",e[e.wordWrap=131]="wordWrap",e[e.wordWrapBreakAfterCharacters=132]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=133]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=134]="wordWrapColumn",e[e.wordWrapOverride1=135]="wordWrapOverride1",e[e.wordWrapOverride2=136]="wordWrapOverride2",e[e.wrappingIndent=137]="wrappingIndent",e[e.wrappingStrategy=138]="wrappingStrategy",e[e.showDeprecated=139]="showDeprecated",e[e.inlayHints=140]="inlayHints",e[e.editorClassName=141]="editorClassName",e[e.pixelRatio=142]="pixelRatio",e[e.tabFocusMode=143]="tabFocusMode",e[e.layoutInfo=144]="layoutInfo",e[e.wrappingInfo=145]="wrappingInfo",e[e.defaultColorDecorators=146]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=147]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=148]="inlineCompletionsAccessibilityVerbose"}(p||(p={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(m||(m={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(f||(f={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(v||(v={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(_||(_={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(b||(b={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(w||(w={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(y||(y={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(C||(C={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"}(S||(S={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(x||(x={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(k||(k={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(L||(L={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(N||(N={})),function(e){e[e.AIGenerated=1]="AIGenerated"}(D||(D={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(E||(E={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(I||(I={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"}(T||(T={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(M||(M={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(R||(R={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(A||(A={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(P||(P={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(O||(O={})),function(e){e.Off="off",e.OnCode="onCode",e.On="on"}(F||(F={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(B||(B={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(W||(W={})),function(e){e[e.Deprecated=1]="Deprecated"}(H||(H={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(V||(V={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(z||(z={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(j||(j={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(U||(U={}))},20913:(e,t,i)=>{"use strict";i.d(t,{B8:()=>l,UX:()=>r,aq:()=>a,iN:()=>c,ld:()=>s,qq:()=>o,ug:()=>n,xi:()=>d});var n,o,s,r,a,l,d,c,h=i(63580);!function(e){e.inspectTokensAction=h.NC("inspectTokens","Developer: Inspect Tokens")}(n||(n={})),function(e){e.gotoLineActionLabel=h.NC("gotoLineActionLabel","Go to Line/Column...")}(o||(o={})),function(e){e.helpQuickAccessActionLabel=h.NC("helpQuickAccess","Show all Quick Access Providers")}(s||(s={})),function(e){e.quickCommandActionLabel=h.NC("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=h.NC("quickCommandActionHelp","Show And Run Commands")}(r||(r={})),function(e){e.quickOutlineActionLabel=h.NC("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=h.NC("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(a||(a={})),function(e){e.editorViewAccessibleLabel=h.NC("editorViewAccessibleLabel","Editor content"),e.accessibilityHelpMessage=h.NC("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")}(l||(l={})),function(e){e.toggleHighContrast=h.NC("toggleHighContrast","Toggle High Contrast Theme")}(d||(d={})),function(e){e.bulkEditServiceSummary=h.NC("bulkEditServiceSummary","Made {0} edits in {1} files")}(c||(c={}))},14706:(e,t,i)=>{"use strict";i.d(t,{CZ:()=>l,D8:()=>c,Jx:()=>n,Tx:()=>a,dQ:()=>d,fV:()=>h,gk:()=>o,lN:()=>r,rU:()=>s});class n{constructor(){this.changeType=1}}class o{static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(const o of t)i+=e.substring(n,o.column-1),n=o.column-1,i+=o.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 o(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new o(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,i,n,o){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=o}}class s{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class r{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class a{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class l{constructor(){this.changeType=5}}class d{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;t{"use strict";var n;i.d(t,{UO:()=>o,s6:()=>n,vW:()=>s}),function(e){e[e.Disabled=0]="Disabled",e[e.EnabledForActive=1]="EnabledForActive",e[e.Enabled=2]="Enabled"}(n||(n={}));class o{constructor(e,t,i,n,o,s){if(this.visibleColumn=e,this.column=t,this.className=i,this.horizontalLine=n,this.forWrappedLinesAfterColumn=o,this.forWrappedLinesBeforeOrAtColumn=s,-1!==e==(-1!==t))throw new Error}}class s{constructor(e,t){this.top=e,this.endColumn=t}}},77378:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(45797);class o{static createEmpty(e,t){const i=o.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new o(n,e,t)}constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}equals(e){return e instanceof o&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,o=n+(i<<1);for(let t=n;t0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=n.N.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return n.N.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return n.N.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return n.N.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return n.N.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return n.N.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return o.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new s(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let t=0;t>>1)-1;for(;it&&(n=o)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const s=new Array;let r=0;for(;;){const o=tr){n+=this._text.substring(r,a.offset);const e=this._tokens[1+(t<<1)];s.push(n.length,e),r=a.offset}n+=a.text,s.push(n.length,a.tokenMetadata),i++}}return new o(new Uint32Array(s),n,this._languageIdCodec)}}o.defaultTokenMetadata=33587200;class s{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let t=this._firstTokenIndex,n=e.getCount();t=i);t++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof s&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},92550:(e,t,i)=>{"use strict";i.d(t,{Kp:()=>o,k:()=>a});var n=i(97295);class o{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length;if(i!==t.length)return!1;for(let n=0;n=s||(a[l++]=new o(Math.max(1,t.startColumn-n+1),Math.min(r+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];const s=[];let r=0;for(let a=0,l=e.length;at)continue;if(d.isEmpty()&&(0===l.type||3===l.type))continue;const c=d.startLineNumber===t?d.startColumn:i,h=d.endLineNumber===t?d.endColumn:n;s[r++]=new o(c,h,l.inlineClassName,l.type)}return s}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=o._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];const i=[],o=new r;let s=0;for(let r=0,a=t.length;r1){const t=e.charCodeAt(l-2);n.ZG(t)&&l--}if(d>1){const t=e.charCodeAt(d-2);n.ZG(t)&&d--}const u=l-1,g=d-2;s=o.consumeLowerThan(u,s,i),0===o.count&&(s=u),o.insert(g,c,h)}return o.consumeLowerThan(1073741824,s,i),i}}},91557:(e,t,i)=>{"use strict";i.d(t,{Nd:()=>c,zG:()=>l,IJ:()=>d,d1:()=>g,tF:()=>m});var n=i(63580),o=i(97295),s=i(50072),r=i(92550);class a{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class l{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class d{constructor(e,t,i,n,o,s,a,l,d,c,h,u,g,p,m,f,v,_,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=d.sort(r.Kp.compare),this.tabSize=c,this.startVisibleColumn=h,this.spaceWidth=u,this.stopRenderingLineAfter=m,this.renderWhitespace="all"===f?4:"boundary"===f?1:"selection"===f?2:"trailing"===f?3:0,this.renderControlCharacters=v,this.fontLigatures=_,this.selectionsOnLine=b&&b.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){const o=(t<<16|i<<0)>>>0;this._data[e-1]=o,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=h.getPartIndex(t),n=h.getCharIndex(t);return new c(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;const n=(e<<16|i<<0)>>>0;let o=0,s=this.length-1;for(;o+1>>1,t=this._data[e];if(t===n)return e;t>n?s=e:o=e}if(o===s)return o;const r=this._data[o],a=this._data[s];if(r===n)return o;if(a===n)return s;const l=h.getPartIndex(r),d=h.getCharIndex(r);let c;return c=l!==h.getPartIndex(a)?t:h.getCharIndex(a),i-d<=c-i?o:s}}class u{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function g(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendString("");let i=0,n=0,o=0;for(const s of e.lineDecorations)1!==s.type&&2!==s.type||(t.appendString(''),1===s.type&&(o|=1,i++),2===s.type&&(o|=2,n++));t.appendString("");const s=new h(1,i+n);return s.setColumnInfo(1,i,0,0),new u(s,!1,o)}return t.appendString(""),new u(new h(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,s=e.canUseHalfwidthRightwardsArrow,r=e.containsForeignElements,a=e.lineContent,l=e.len,d=e.isOverflowing,c=e.overflowingCharCount,g=e.parts,p=e.fauxIndentLength,m=e.tabSize,f=e.startVisibleColumn,_=e.containsRTL,b=e.spaceWidth,w=e.renderSpaceCharCode,y=e.renderWhitespace,C=e.renderControlCharacters,S=new h(l+1,g.length);let x=!1,k=0,L=f,N=0,D=0,E=0;_?t.appendString(''):t.appendString("");for(let e=0,n=g.length;e=p&&(t+=n)}}for(f&&(t.appendString(' style="width:'),t.appendString(String(b*i)),t.appendString('px"')),t.appendASCIICharCode(62);k1?t.appendCharCode(8594):t.appendCharCode(65515);for(let e=2;e<=n;e++)t.appendCharCode(160)}else i=2,n=1,t.appendCharCode(w),t.appendCharCode(8204);N+=i,D+=n,k>=p&&(L+=n)}}else for(t.appendASCIICharCode(62);k=p&&(L+=s)}_?E++:E=0,k>=l&&!x&&n.isPseudoAfter()&&(x=!0,S.setColumnInfo(k+1,e,N,D)),t.appendString("")}return x||S.setColumnInfo(l+1,g.length-1,N,D),d&&(t.appendString(''),t.appendString(n.NC("showMore","Show more ({0})",function(e){return e<1024?n.NC("overflow.chars","{0} chars",e):e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}(c))),t.appendString("")),t.appendString(""),new u(S,_,r)}(function(e){const t=e.lineContent;let i,n,s;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(r[l++]=new a(n,"",0,!1));let d=n;for(let c=0,h=i.getCount();c=s){const i=!!t&&o.Ut(e.substring(d,s));r[l++]=new a(s,u,0,i);break}const g=!!t&&o.Ut(e.substring(d,h));r[l++]=new a(h,u,0,g),d=h}return r}(t,e.containsRTL,e.lineTokens,e.fauxIndentLength,s);e.renderControlCharacters&&!e.isBasicASCII&&(l=function(e,t){const i=[];let n=new a(0,"",0,!1),o=0;for(const s of t){const t=s.endIndex;for(;on.endIndex&&(n=new a(o,s.type,s.metadata,s.containsRTL),i.push(n)),n=new a(o+1,"mtkcontrol",s.metadata,!1),i.push(n));o>n.endIndex&&(n=new a(t,s.type,s.metadata,s.containsRTL),i.push(n))}return i}(t,l)),(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace&&!e.continuesWithWrappedLine)&&(l=function(e,t,i,n){const s=e.continuesWithWrappedLine,r=e.fauxIndentLength,l=e.tabSize,d=e.startVisibleColumn,c=e.useMonospaceOptimizations,h=e.selectionsOnLine,u=1===e.renderWhitespace,g=3===e.renderWhitespace,p=e.renderSpaceWidth!==e.spaceWidth,m=[];let f=0,v=0,_=n[v].type,b=n[v].containsRTL,w=n[v].endIndex;const y=n.length;let C,S=!1,x=o.LC(t);-1===x?(S=!0,x=i,C=i):C=o.ow(t);let k=!1,L=0,N=h&&h[L],D=d%l;for(let e=r;e=N.endOffset&&(L++,N=h&&h[L]),eC)d=!0;else if(9===s)d=!0;else if(32===s)if(u)if(k)d=!0;else{const n=e+1e),d&&g&&(d=S||e>C),d&&b&&e>=x&&e<=C&&(d=!1),k){if(!d||!c&&D>=l){if(p)for(let t=(f>0?m[f-1].endIndex:r)+1;t<=e;t++)m[f++]=new a(t,"mtkw",1,!1);else m[f++]=new a(e,"mtkw",1,!1);D%=l}}else(e===w||d&&e>r)&&(m[f++]=new a(e,_,0,b),D%=l);for(9===s?D=l:o.K7(s)?D+=2:D++,k=d;e===w&&(v++,v0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(E=!0)}else E=!0;if(E)if(p)for(let e=(f>0?m[f-1].endIndex:r)+1;e<=i;e++)m[f++]=new a(e,"mtkw",1,!1);else m[f++]=new a(i,"mtkw",1,!1);else m[f++]=new a(i,_,0,b);return m}(e,t,s,l));let d=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;th&&(h=e.startOffset,d[c++]=new a(h,r,u,g)),!(e.endOffset+1<=n)){h=n,d[c++]=new a(h,r+" "+e.className,u|e.metadata,g);break}h=e.endOffset+1,d[c++]=new a(h,r+" "+e.className,u|e.metadata,g),l++}n>h&&(h=n,d[c++]=new a(h,r,u,g))}const u=i[i.length-1].endIndex;if(l=50&&(o[s++]=new a(c+1,t,i,d),h=c+1,c=-1);h!==l&&(o[s++]=new a(l,t,i,d))}else o[s++]=r;n=l}else for(let e=0,i=t.length;e50){const e=i.type,t=i.metadata,d=i.containsRTL,c=Math.ceil(l/50);for(let i=1;i=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e}},1118:(e,t,i)=>{"use strict";i.d(t,{$l:()=>u,$t:()=>c,IP:()=>l,SQ:()=>g,Wx:()=>h,l_:()=>r,ud:()=>a,wA:()=>d});var n=i(9488),o=i(97295),s=i(24314);class r{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class a{constructor(e,t){this.tabSize=e,this.data=t}}class l{constructor(e,t,i,n,o,s,r){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=s,this.inlineDecorations=r}}class d{constructor(e,t,i,n,o,s,r,a,l,c){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=d.isBasicASCII(i,s),this.containsRTL=d.containsRTL(i,this.isBasicASCII,o),this.tokens=r,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=c}static isBasicASCII(e,t){return!t||o.$i(e)}static containsRTL(e,t,i){return!(t||!i)&&o.Ut(e)}}class c{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class h{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new c(new s.e(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class u{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class g{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&n.fS(e.data,t.data)}static equalsArr(e,t){return n.fS(e,t,g.equals)}}},30665:(e,t,i)=>{"use strict";i.d(t,{EY:()=>o,Tj:()=>s});class n{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}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 o{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&&(g=i-p);const m=l.color;let f=this._color2Id[m];f||(f=++this._lastAssignedId,this._color2Id[m]=f,this._id2Color[f]=m);const v=new n(g-p,g+p,f);l.setColorZone(v),r.push(v)}return this._colorZonesInvalid=!1,r.sort(n.compare),r}}},30168:(e,t,i)=>{"use strict";i.d(t,{$t:()=>d,CU:()=>a,Fd:()=>l,zg:()=>c});var n=i(50187),o=i(24314),s=i(1118),r=i(64141);class a{constructor(e,t,i,n,o){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const r=e.range,a=e.options;let l;if(a.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new n.L(r.startLineNumber,1),0,!1,!0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new n.L(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);l=new o.e(e.lineNumber,e.column,t.lineNumber,t.column)}else l=this._coordinatesConverter.convertModelRangeToViewRange(r,1);i=new s.$l(l,a),this._decorationsCache[t]=i}return i}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,i=!1){const n=new o.e(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(n,t,i).inlineDecorations[0]}_getDecorationsInRange(e,t,i){const n=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,r.$J)(this.configuration.options),t,i),a=e.startLineNumber,d=e.endLineNumber,c=[];let h=0;const u=[];for(let e=a;e<=d;e++)u[e-a]=[];for(let e=0,t=n.length;e1===e))}function c(e,t){return h(e,t.range,(e=>2===e))}function h(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const o=e.tokenization.getLineTokens(n),s=n===t.startLineNumber,r=n===t.endLineNumber;let a=s?o.findTokenIndexAtOffset(t.startColumn-1):0;for(;at.endColumn-1);){if(!i(o.getStandardTokenType(a)))return!1;a++}}return!0}},43017:(e,t,i)=>{"use strict";var n=i(56346),o=i(59365),s=i(22258),r=i(93379),a=i.n(r),l=i(7795),d=i.n(l),c=i(90569),h=i.n(c),u=i(3565),g=i.n(u),p=i(19216),m=i.n(p),f=i(44589),v=i.n(f),_=i(34055),b={};b.styleTagTransform=v(),b.setAttributes=g(),b.insert=h().bind(null,"head"),b.domAPI=d(),b.insertStyleElement=m(),a()(_.Z,b),_.Z&&_.Z.locals&&_.Z.locals;var w,y=i(16830),C=i(3860),S=i(29102),x=i(63580),k=i(93983);const L=new k.uy("selectionAnchorSet",!1);let N=w=class{static get(e){return e.getContribution(w.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=L.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(C.Y.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:(new o.W5).appendText((0,x.NC)("selectionAnchor","Selection Anchor")),className:"selection-anchor"})})),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,n.Z9)((0,x.NC)("anchorSet","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(C.Y.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()}};var D,E;N.ID="editor.contrib.selectionAnchorController",N=w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(D=1,E=k.i6,function(e,t){E(e,t,D)})],N);class I extends y.R6{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,x.NC)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:S.u.editorTextFocus,primary:(0,s.gx)(2089,2080),weight:100}})}async run(e,t){var i;null===(i=N.get(t))||void 0===i||i.setSelectionAnchor()}}class T extends y.R6{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,x.NC)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:L})}async run(e,t){var i;null===(i=N.get(t))||void 0===i||i.goToSelectionAnchor()}}class M extends y.R6{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,x.NC)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:L,kbOpts:{kbExpr:S.u.editorTextFocus,primary:(0,s.gx)(2089,2089),weight:100}})}async run(e,t){var i;null===(i=N.get(t))||void 0===i||i.selectFromAnchorToCursor()}}class R extends y.R6{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,x.NC)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:L,kbOpts:{kbExpr:S.u.editorTextFocus,primary:9,weight:100}})}async run(e,t){var i;null===(i=N.get(t))||void 0===i||i.cancelSelectionAnchor()}}(0,y._K)(N.ID,N,4),(0,y.Qr)(I),(0,y.Qr)(T),(0,y.Qr)(M),(0,y.Qr)(R)},4215:(e,t,i)=>{"use strict";var n=i(15393),o=i(5976),s=i(93379),r=i.n(s),a=i(7795),l=i.n(a),d=i(90569),c=i.n(d),h=i(3565),u=i.n(h),g=i(19216),p=i.n(g),m=i(44589),f=i.n(m),v=i(12205),_={};_.styleTagTransform=f(),_.setAttributes=u(),_.insert=c().bind(null,"head"),_.domAPI=l(),_.insertStyleElement=p(),r()(v.Z,_),v.Z&&v.Z.locals&&v.Z.locals;var b=i(16830),w=i(50187),y=i(24314),C=i(3860),S=i(29102),x=i(84973),k=i(13961),L=i(63580),N=i(84144),D=i(73910),E=i(97781);const I=(0,D.P6G)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},L.NC("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class T extends b.R6{constructor(){super({id:"editor.action.jumpToBracket",label:L.NC("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:S.u.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;null===(i=P.get(t))||void 0===i||i.jumpToBracket()}}class M extends b.R6{constructor(){super({id:"editor.action.selectToBracket",label:L.NC("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:L.vv("smartSelect.selectToBracketDescription","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){var n;let o=!0;i&&!1===i.selectBrackets&&(o=!1),null===(n=P.get(t))||void 0===n||n.selectToBracket(o)}}class R extends b.R6{constructor(){super({id:"editor.action.removeBrackets",label:L.NC("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:S.u.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;null===(i=P.get(t))||void 0===i||i.removeBrackets(this.id)}}class A{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class P extends o.JT{static get(e){return e.getContribution(P.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new n.pY((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),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((t=>{const i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i);let o=null;if(n)n[0].containsPosition(i)&&!n[1].containsPosition(i)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)o=t[1].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new C.Y(o.lineNumber,o.column,o.lineNumber,o.column):new C.Y(i.lineNumber,i.column,i.lineNumber,i.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 o=n.getStartPosition();let s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){const e=t.bracketPairs.findNextBracket(o);e&&e.range&&(s=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let r=null,a=null;if(s){s.sort(y.e.compareRangesUsingStarts);const[t,i]=s;if(r=e?t.getStartPosition():t.getEndPosition(),a=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(o)){const e=r;r=a,a=e}}r&&a&&i.push(new C.Y(r.lineNumber,r.column,a.lineNumber,a.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 o=t.bracketPairs.matchBracket(n);o||(o=t.bracketPairs.findEnclosingBrackets(n)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())}))}_updateBrackets(){if("never"===this._matchBrackets)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())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const o=[];let s=0;for(let t=0,i=e.length;t1&&o.sort(w.L.compare);const r=[];let a=0,l=0;const d=n.length;for(let e=0,i=o.length;e{"use strict";var n=i(16830),o=i(29102),s=i(24314),r=i(3860);class a{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,o=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||o!==e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new s.e(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.e(i,o,i,o),a)}else{const r=new s.e(i,o,i,o+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.e(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new r.Y(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new r.Y(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}var l=i(63580);class d extends n.R6{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const e of n)i.push(new a(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}(0,n.Qr)(class extends d{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:l.NC("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:o.u.writable})}}),(0,n.Qr)(class extends d{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:l.NC("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:o.u.writable})}})},72102:(e,t,i)=>{"use strict";var n=i(16830),o=i(61329),s=i(10839),r=i(24314),a=i(29102),l=i(63580);class d extends n.R6{constructor(){super({id:"editor.action.transposeLetters",label:l.NC("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:a.u.writable,kbOpts:{kbExpr:a.u.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],a=t.getSelections();for(const e of a){if(!e.isEmpty())continue;const t=e.startLineNumber,a=e.startColumn,l=i.getLineMaxColumn(t);if(1===t&&(1===a||2===a&&2===l))continue;const d=a===l?e.getPosition():s.o.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),c=s.o.leftPosition(i,d),h=s.o.leftPosition(i,c),u=i.getValueInRange(r.e.fromPositions(h,c)),g=i.getValueInRange(r.e.fromPositions(c,d)),p=r.e.fromPositions(h,d);n.push(new o.T4(p,g+u))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,n.Qr)(d)},55833:(e,t,i)=>{"use strict";var n=i(16268),o=i(65321),s=i(1432),r=i(35715),a=i(16830),l=i(11640),d=i(29102),c=i(24954),h=i(63580),u=i(84144),g=i(84972),p=i(93983);const m="9_cutcopypaste",f=s.tY||document.queryCommandSupported("cut"),v=s.tY||document.queryCommandSupported("copy"),_=void 0!==navigator.clipboard&&!n.vU||document.queryCommandSupported("paste");function b(e){return e.register(),e}const w=f?b(new a.AJ({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:s.tY?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:u.eH.MenubarEditMenu,group:"2_ccp",title:h.NC({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:u.eH.EditorContext,group:m,title:h.NC("actions.clipboard.cutLabel","Cut"),when:d.u.writable,order:1},{menuId:u.eH.CommandPalette,group:"",title:h.NC("actions.clipboard.cutLabel","Cut"),order:1},{menuId:u.eH.SimpleEditorContext,group:m,title:h.NC("actions.clipboard.cutLabel","Cut"),when:d.u.writable,order:1}]})):void 0,y=v?b(new a.AJ({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:s.tY?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:u.eH.MenubarEditMenu,group:"2_ccp",title:h.NC({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:u.eH.EditorContext,group:m,title:h.NC("actions.clipboard.copyLabel","Copy"),order:2},{menuId:u.eH.CommandPalette,group:"",title:h.NC("actions.clipboard.copyLabel","Copy"),order:1},{menuId:u.eH.SimpleEditorContext,group:m,title:h.NC("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;u.BH.appendMenuItem(u.eH.MenubarEditMenu,{submenu:u.eH.MenubarCopy,title:h.vv("copy as","Copy As"),group:"2_ccp",order:3}),u.BH.appendMenuItem(u.eH.EditorContext,{submenu:u.eH.EditorContextCopy,title:h.vv("copy as","Copy As"),group:m,order:3}),u.BH.appendMenuItem(u.eH.EditorContext,{submenu:u.eH.EditorContextShare,title:h.vv("share","Share"),group:"11_share",order:-1,when:p.Ao.and(p.Ao.notEquals("resourceScheme","output"),d.u.editorTextFocus)}),u.BH.appendMenuItem(u.eH.EditorTitleContext,{submenu:u.eH.EditorTitleContextShare,title:h.vv("share","Share"),group:"11_share",order:-1}),u.BH.appendMenuItem(u.eH.ExplorerContext,{submenu:u.eH.ExplorerContextShare,title:h.vv("share","Share"),group:"11_share",order:-1});const C=_?b(new a.AJ({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:s.tY?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:u.eH.MenubarEditMenu,group:"2_ccp",title:h.NC({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:u.eH.EditorContext,group:m,title:h.NC("actions.clipboard.pasteLabel","Paste"),when:d.u.writable,order:4},{menuId:u.eH.CommandPalette,group:"",title:h.NC("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:u.eH.SimpleEditorContext,group:m,title:h.NC("actions.clipboard.pasteLabel","Paste"),when:d.u.writable,order:4}]})):void 0;class S extends a.R6{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:h.NC("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:d.u.textInputFocus,primary:0,weight:100}})}run(e,t){t.hasModel()&&(!t.getOption(37)&&t.getSelection().isEmpty()||(r.RA.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),r.RA.forceCopyWithSyntaxHighlighting=!1))}}function x(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(l.$).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(37),i=n.getSelection();return i&&i.isEmpty()&&!e||n.getContainerDomNode().ownerDocument.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>((0,o.uP)().execCommand(t),!0))))}x(w,"cut"),x(y,"copy"),C&&(C.addImplementation(1e4,"code-editor",((e,t)=>{var i,n;const o=e.get(l.$),a=e.get(g.p),d=o.getFocusedCodeEditor();return!(!d||!d.hasTextFocus())&&(d.getContainerDomNode().ownerDocument.execCommand("paste")?null!==(n=null===(i=c.bO.get(d))||void 0===i?void 0:i.finishedPaste())&&void 0!==n?n:Promise.resolve():!s.$L||(async()=>{const e=await a.readText();if(""!==e){const t=r.Nl.INSTANCE.get(e);let i=!1,n=null,o=null;t&&(i=d.getOption(37)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,o=t.mode),d.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:o})}})())})),C.addImplementation(0,"generic-dom",((e,t)=>((0,o.uP)().execCommand("paste"),!0)))),v&&(0,a.Qr)(S)},75396:(e,t,i)=>{"use strict";i.d(t,{Bb:()=>S,LR:()=>M,MN:()=>x,RB:()=>w,TM:()=>L,UX:()=>T,aI:()=>E,cz:()=>y,pZ:()=>C,uH:()=>k});var n=i(9488),o=i(71050),s=i(17301),r=i(5976),a=i(70666),l=i(66007),d=i(24314),c=i(3860),h=i(71922),u=i(73733),g=i(16467),p=i(63580),m=i(94565),f=i(59422),v=i(90535),_=i(10829),b=i(87997);const w="editor.action.codeAction",y="editor.action.quickFix",C="editor.action.autoFix",S="editor.action.refactor",x="editor.action.sourceAction",k="editor.action.organizeImports",L="editor.action.fixAll";class N extends r.JT{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:(0,n.Of)(e.diagnostics)?(0,n.Of)(t.diagnostics)?N.codeActionsPreferredComparator(e,t):-1:(0,n.Of)(t.diagnostics)?1:N.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(N.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&b.yN.QuickFix.contains(new b.yN(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 D={actions:[],documentation:void 0};async function E(e,t,i,o,a,l){var d;const c=o.filter||{},h={...c,excludes:[...c.excludes||[],b.yN.Notebook]},u={only:null===(d=c.include)||void 0===d?void 0:d.value,trigger:o.type},p=new g.YQ(t,l),m=2===o.type,f=function(e,t,i){return e.all(t).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>(0,b.EU)(i,new b.yN(e))))))}(e,t,m?h:c),v=new r.SL,_=f.map((async e=>{try{a.report(e);const n=await e.provideCodeActions(t,i,u,p.token);if(n&&v.add(n),p.token.isCancellationRequested)return D;const o=((null==n?void 0:n.actions)||[]).filter((e=>e&&(0,b.Yl)(c,e))),s=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new b.yN(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const e of t)if(e.kind)for(const t of n)if(t.kind.contains(new b.yN(e.kind)))return t.command}(e,o,c.include);return{actions:o.map((t=>new b.bA(t,e))),documentation:s}}catch(e){if((0,s.n2)(e))throw e;return(0,s.Cp)(e),D}})),w=e.onDidChange((()=>{const i=e.all(t);(0,n.fS)(i,f)||p.cancel()}));try{const i=await Promise.all(_),s=i.map((e=>e.actions)).flat(),r=[...(0,n.kX)(i.map((e=>e.documentation))),...I(e,t,o,s)];return new N(s,r,v)}finally{w.dispose(),p.dispose()}}function*I(e,t,i,n){var o,s,r;if(t&&n.length)for(const a of e.all(t))a._getAdditionalMenuItems&&(yield*null===(o=a._getAdditionalMenuItems)||void 0===o?void 0:o.call(a,{trigger:i.type,only:null===(r=null===(s=i.filter)||void 0===s?void 0:s.include)||void 0===r?void 0:r.value},n.map((e=>e.action))))}var T;async function M(e,t,i,n,s=o.T.None){var r;const a=e.get(l.vu),d=e.get(m.H),c=e.get(_.b),h=e.get(f.lT);if(c.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred,reason:i}),await t.resolve(s),!s.isCancellationRequested){if((null===(r=t.action.edit)||void 0===r?void 0:r.edits.length)&&!(await a.apply(t.action.edit,{editor:null==n?void 0:n.editor,label:t.action.title,quotableLabel:t.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==T.OnSave,showPreview:null==n?void 0:n.preview})).isApplied)return;if(t.action.command)try{await d.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){const t=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(e);h.error("string"==typeof t?t:p.NC("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}}!function(e){e.OnSave="onSave",e.FromProblemsView="fromProblemsView",e.FromCodeActions="fromCodeActions",e.FromAILightbulb="fromAILightbulb"}(T||(T={})),m.P.registerCommand("_executeCodeActionProvider",(async function(e,t,i,n,r){if(!(t instanceof a.o))throw(0,s.b1)();const{codeActionProvider:l}=e.get(h.p),g=e.get(u.q).getModel(t);if(!g)throw(0,s.b1)();const p=c.Y.isISelection(i)?c.Y.liftSelection(i):d.e.isIRange(i)?g.validateRange(i):void 0;if(!p)throw(0,s.b1)();const m="string"==typeof n?new b.yN(n):void 0,f=await E(l,g,p,{type:1,triggerAction:b.aQ.Default,filter:{includeSourceActions:!0,include:m}},v.Ex.None,o.T.None),_=[],w=Math.min(f.validActions.length,"number"==typeof r?r:0);for(let e=0;ee.action))}finally{setTimeout((()=>f.dispose()),100)}}))},51925:(e,t,i)=>{"use strict";var n=i(16830),o=i(800),s=i(97295),r=i(29102),a=i(75396),l=i(63580),d=i(93983),c=i(87997),h=i(48499),u=i(17016);function g(e){return d.Ao.regex(u.fj.keys()[0],new RegExp("(\\s|^)"+(0,s.ec)(e.value)+"\\b"))}const p={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:l.NC("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:l.NC("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[l.NC("args.schema.apply.first","Always apply the first returned code action."),l.NC("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),l.NC("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:l.NC("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function m(e,t,i,n,o=c.aQ.Default){if(e.hasModel()){const s=h.G.get(e);null==s||s.manualTriggerAtCurrentPosition(t,o,i,n)}}class f extends n.R6{constructor(){super({id:a.cz,label:l.NC("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:d.Ao.and(r.u.writable,r.u.hasCodeActionsProvider),kbOpts:{kbExpr:r.u.textInputFocus,primary:2137,weight:100}})}run(e,t){return m(t,l.NC("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,c.aQ.QuickFix)}}class v extends n._l{constructor(){super({id:a.RB,precondition:d.Ao.and(r.u.writable,r.u.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:p}]}})}runEditorCommand(e,t,i){const n=c.wZ.fromUser(i,{kind:c.yN.Empty,apply:"ifSingle"});return m(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?l.NC("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):l.NC("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?l.NC("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):l.NC("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class _ extends n.R6{constructor(){super({id:a.Bb,label:l.NC("refactor.label","Refactor..."),alias:"Refactor...",precondition:d.Ao.and(r.u.writable,r.u.hasCodeActionsProvider),kbOpts:{kbExpr:r.u.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:d.Ao.and(r.u.writable,g(c.yN.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:p}]}})}run(e,t,i){const n=c.wZ.fromUser(i,{kind:c.yN.Refactor,apply:"never"});return m(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?l.NC("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):l.NC("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?l.NC("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):l.NC("editor.action.refactor.noneMessage","No refactorings available"),{include:c.yN.Refactor.contains(n.kind)?n.kind:c.yN.None,onlyIncludePreferredActions:n.preferred},n.apply,c.aQ.Refactor)}}class b extends n.R6{constructor(){super({id:a.MN,label:l.NC("source.label","Source Action..."),alias:"Source Action...",precondition:d.Ao.and(r.u.writable,r.u.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:d.Ao.and(r.u.writable,g(c.yN.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:p}]}})}run(e,t,i){const n=c.wZ.fromUser(i,{kind:c.yN.Source,apply:"never"});return m(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?l.NC("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):l.NC("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?l.NC("editor.action.source.noneMessage.preferred","No preferred source actions available"):l.NC("editor.action.source.noneMessage","No source actions available"),{include:c.yN.Source.contains(n.kind)?n.kind:c.yN.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,c.aQ.SourceAction)}}class w extends n.R6{constructor(){super({id:a.uH,label:l.NC("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:d.Ao.and(r.u.writable,g(c.yN.SourceOrganizeImports)),kbOpts:{kbExpr:r.u.textInputFocus,primary:1581,weight:100}})}run(e,t){return m(t,l.NC("editor.action.organize.noneMessage","No organize imports action available"),{include:c.yN.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",c.aQ.OrganizeImports)}}class y extends n.R6{constructor(){super({id:a.TM,label:l.NC("fixAll.label","Fix All"),alias:"Fix All",precondition:d.Ao.and(r.u.writable,g(c.yN.SourceFixAll))})}run(e,t){return m(t,l.NC("fixAll.noneMessage","No fix all action available"),{include:c.yN.SourceFixAll,includeSourceActions:!0},"ifSingle",c.aQ.FixAll)}}class C extends n.R6{constructor(){super({id:a.pZ,label:l.NC("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:d.Ao.and(r.u.writable,g(c.yN.QuickFix)),kbOpts:{kbExpr:r.u.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return m(t,l.NC("editor.action.autoFix.noneMessage","No auto fixes available"),{include:c.yN.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",c.aQ.AutoFix)}}var S=i(58507),x=i(23193),k=i(89872);(0,n._K)(h.G.ID,h.G,3),(0,n._K)(S.f.ID,S.f,4),(0,n.Qr)(f),(0,n.Qr)(_),(0,n.Qr)(b),(0,n.Qr)(w),(0,n.Qr)(C),(0,n.Qr)(y),(0,n.fK)(new v),k.B.as(x.IP.Configuration).registerConfiguration({...o.wk,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:l.NC("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}),k.B.as(x.IP.Configuration).registerConfiguration({...o.wk,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:l.NC("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}})},48499:(e,t,i)=>{"use strict";i.d(t,{G:()=>Ce});var n,o=i(65321),s=i(56346),r=i(17301),a=i(79579),l=i(5976),d=i(50187),c=i(13961),h=i(71922),u=i(75396),g=i(87997),p=i(91847);let m=n=class{constructor(e){this.keybindingService=e}getResolver(){const e=new a.o((()=>this.keybindingService.getKeybindings().filter((e=>n.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===u.uH?t={kind:g.yN.SourceOrganizeImports.value}:e.command===u.TM&&(t={kind:g.yN.SourceFixAll.value}),{resolvedKeybinding:e.resolvedKeybinding,...g.wZ.fromUser(t,{kind:g.yN.None,apply:"never"})}}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new g.yN(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}};var f,v;m.codeActionCommands=[u.Bb,u.RB,u.MN,u.uH,u.TM],m=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(f=0,v=p.d,function(e,t){v(e,t,f)})],m),i(89899);var _=i(73046),b=(i(22368),i(63580));const w=Object.freeze({kind:g.yN.Empty,title:(0,b.NC)("codeAction.widget.id.more","More Actions...")}),y=Object.freeze([{kind:g.yN.QuickFix,title:(0,b.NC)("codeAction.widget.id.quickfix","Quick Fix")},{kind:g.yN.RefactorExtract,title:(0,b.NC)("codeAction.widget.id.extract","Extract"),icon:_.l.wrench},{kind:g.yN.RefactorInline,title:(0,b.NC)("codeAction.widget.id.inline","Inline"),icon:_.l.wrench},{kind:g.yN.RefactorRewrite,title:(0,b.NC)("codeAction.widget.id.convert","Rewrite"),icon:_.l.wrench},{kind:g.yN.RefactorMove,title:(0,b.NC)("codeAction.widget.id.move","Move"),icon:_.l.wrench},{kind:g.yN.SurroundWith,title:(0,b.NC)("codeAction.widget.id.surround","Surround With"),icon:_.l.surroundWith},{kind:g.yN.Source,title:(0,b.NC)("codeAction.widget.id.source","Source Action"),icon:_.l.symbolFile},w]);var C=i(58507),S=i(39310),x=i(90317),k=i(93379),L=i.n(k),N=i(7795),D=i.n(N),E=i(90569),I=i.n(E),T=i(3565),M=i.n(T),R=i(19216),A=i.n(R),P=i(44589),O=i.n(P),F=i(90711),B={};B.styleTagTransform=O(),B.setAttributes=M(),B.insert=I().bind(null,"head"),B.domAPI=D(),B.insertStyleElement=A(),L()(F.Z,B),F.Z&&F.Z.locals&&F.Z.locals;var W=i(12983),H=i(43799),V=i(71050),z=i(1432),j=i(25670),U=i(5606),q=i(86253),K=i(73910),$=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},G=function(e,t){return function(i,n){t(i,n,e)}};const Z="acceptSelectedCodeAction",Q="previewSelectedCodeAction";class Y{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){var n,o;i.text.textContent=null!==(o=null===(n=e.group)||void 0===n?void 0:n.title)&&void 0!==o?o:""}disposeTemplate(e){}}let J=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");return i.className="title",e.append(i),{container:e,icon:t,text:i,keybinding:new W.e(e,z.OS)}}renderElement(e,t,i){var n,s,r;if((null===(n=e.group)||void 0===n?void 0:n.icon)?(i.icon.className=j.k.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=(0,K.n_1)(e.group.icon.color.id))):(i.icon.className=j.k.asClassName(_.l.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=ne(e.label),i.keybinding.set(e.keybinding),o.iJ(!!e.keybinding,i.keybinding.element);const a=null===(s=this._keybindingService.lookupKeybinding(Z))||void 0===s?void 0:s.getLabel(),l=null===(r=this._keybindingService.lookupKeybinding(Q))||void 0===r?void 0:r.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:a&&l?this._supportsPreview&&e.canPreview?i.container.title=(0,b.NC)({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",a,l):i.container.title=(0,b.NC)({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):i.container.title=""}disposeTemplate(e){}};J=$([G(1,p.d)],J);class X extends UIEvent{constructor(){super("acceptSelectedAction")}}class ee extends UIEvent{constructor(){super("previewSelectedAction")}}function te(e){if("action"===e.kind)return e.label}let ie=class extends l.JT{constructor(e,t,i,n,o,s){super(),this._delegate=n,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new V.A),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const r={getHeight:e=>"header"===e.kind?this._headerLineHeight:this._actionLineHeight,getTemplateId:e=>e.kind};this._list=this._register(new H.aV(e,this.domNode,r,[new J(t,this._keybindingService),new Y],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:te},accessibilityProvider:{getAriaLabel:e=>{if("action"===e.kind){let t=e.label?ne(null==e?void 0:e.label):"";return e.disabled&&(t=(0,b.NC)({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",t,e.disabled)),t}return null},getWidgetAriaLabel:()=>(0,b.NC)({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:e=>"action"===e.kind?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(q.O2),this._register(this._list.onMouseClick((e=>this.onListClick(e)))),this._register(this._list.onMouseOver((e=>this.onListHover(e)))),this._register(this._list.onDidChangeFocus((()=>this.onFocus()))),this._register(this._list.onDidChangeSelection((e=>this.onListSelection(e)))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&"action"===e.kind}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter((e=>"header"===e.kind)).length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);let n=e;if(this._allMenuItems.length>=50)n=380;else{const t=this._allMenuItems.map(((e,t)=>{const i=this.domNode.ownerDocument.getElementById(this._list.getElementID(t));if(i){i.style.width="auto";const e=i.getBoundingClientRect().width;return i.style.width="",e}return 0}));n=Math.max(...t,e)}const o=Math.min(i,.7*this.domNode.ownerDocument.body.clientHeight);return this._list.layout(o,n),this.domNode.style.height=`${o}px`,this._list.domFocus(),n}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(0===t.length)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const o=e?new ee:new X;this._list.setSelection([i],o)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof ee):this._list.setSelection([])}onFocus(){var e,t;const i=this._list.getFocus();if(0===i.length)return;const n=i[0],o=this._list.element(n);null===(t=(e=this._delegate).onFocus)||void 0===t||t.call(e,o.item)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&"action"===t.kind){const e=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=e?e.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus("number"==typeof e.index?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};function ne(e){return e.replace(/\r\n|\r|\n/g," ")}ie=$([G(4,U.u),G(5,p.d)],ie);var oe=i(84144),se=i(93983),re=i(65026),ae=i(72065),le=function(e,t){return function(i,n){t(i,n,e)}};(0,K.P6G)("actionBar.toggledBackground",{dark:K.XEs,light:K.XEs,hcDark:K.XEs,hcLight:K.XEs},(0,b.NC)("actionBar.toggledBackground","Background color for toggled action items in action bar."));const de={Visible:new se.uy("codeActionMenuVisible",!1,(0,b.NC)("codeActionMenuVisible","Whether the action widget list is visible"))},ce=(0,ae.yh)("actionWidgetService");let he=class extends l.JT{get isVisible(){return de.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new l.XK)}show(e,t,i,n,o,s,r){const a=de.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(ie,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>o,render:e=>(a.set(!0),this._renderWidget(e,l,null!=r?r:[])),onHide:e=>{a.reset(),this._onWidgetClosed(e)}},s,!1)}acceptSelected(e){var t;null===(t=this._list.value)||void 0===t||t.acceptSelected(e)}focusPrevious(){var e,t;null===(t=null===(e=this._list)||void 0===e?void 0:e.value)||void 0===t||t.focusPrevious()}focusNext(){var e,t;null===(t=null===(e=this._list)||void 0===e?void 0:e.value)||void 0===t||t.focusNext()}hide(){var e;null===(e=this._list.value)||void 0===e||e.hide(),this._list.clear()}_renderWidget(e,t,i){var n;const s=document.createElement("div");if(s.classList.add("action-widget"),e.appendChild(s),this._list.value=t,!this._list.value)throw new Error("List has no value");s.appendChild(this._list.value.domNode);const r=new l.SL,a=document.createElement("div"),d=e.appendChild(a);d.classList.add("context-view-block"),r.add(o.nm(d,o.tw.MOUSE_DOWN,(e=>e.stopPropagation())));const c=document.createElement("div"),h=e.appendChild(c);h.classList.add("context-view-pointerBlock"),r.add(o.nm(h,o.tw.POINTER_MOVE,(()=>h.remove()))),r.add(o.nm(h,o.tw.MOUSE_DOWN,(()=>h.remove())));let u=0;if(i.length){const e=this._createActionBar(".action-widget-action-bar",i);e&&(s.appendChild(e.getContainer().parentElement),r.add(e),u=e.getContainer().offsetWidth)}const g=null===(n=this._list.value)||void 0===n?void 0:n.layout(u);s.style.width=`${g}px`;const p=r.add(o.go(e));return r.add(p.onDidBlur((()=>this.hide()))),r}_createActionBar(e,t){if(!t.length)return;const i=o.$(e),n=new x.o(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){var t;null===(t=this._list.value)||void 0===t||t.hide(e)}};he=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([le(0,U.u),le(1,se.i6),le(2,ae.TG)],he),(0,re.z)(ce,he,1);const ue=1100;(0,oe.r1)(class extends oe.Ke{constructor(){super({id:"hideCodeActionWidget",title:(0,b.vv)("hideCodeActionWidget.title","Hide action widget"),precondition:de.Visible,keybinding:{weight:ue,primary:9,secondary:[1033]}})}run(e){e.get(ce).hide()}}),(0,oe.r1)(class extends oe.Ke{constructor(){super({id:"selectPrevCodeAction",title:(0,b.vv)("selectPrevCodeAction.title","Select previous action"),precondition:de.Visible,keybinding:{weight:ue,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(e){const t=e.get(ce);t instanceof he&&t.focusPrevious()}}),(0,oe.r1)(class extends oe.Ke{constructor(){super({id:"selectNextCodeAction",title:(0,b.vv)("selectNextCodeAction.title","Select next action"),precondition:de.Visible,keybinding:{weight:ue,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(e){const t=e.get(ce);t instanceof he&&t.focusNext()}}),(0,oe.r1)(class extends oe.Ke{constructor(){super({id:Z,title:(0,b.vv)("acceptSelected.title","Accept selected action"),precondition:de.Visible,keybinding:{weight:ue,primary:3,secondary:[2137]}})}run(e){const t=e.get(ce);t instanceof he&&t.acceptSelected()}}),(0,oe.r1)(class extends oe.Ke{constructor(){super({id:Q,title:(0,b.vv)("previewSelected.title","Preview selected action"),precondition:de.Visible,keybinding:{weight:ue,primary:2051}})}run(e){const t=e.get(ce);t instanceof he&&t.acceptSelected(!0)}});var ge,pe=i(94565),me=i(33108),fe=i(98674),ve=i(90535),_e=i(92321),be=i(97781),we=i(17016),ye=function(e,t){return function(i,n){t(i,n,e)}};let Ce=ge=class extends l.JT{static get(e){return e.getContribution(ge.ID)}constructor(e,t,i,n,o,s,r,d,c,h){super(),this._commandService=r,this._configurationService=d,this._actionWidgetService=c,this._instantiationService=h,this._activeCodeActions=this._register(new l.XK),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new we.Jt(this._editor,o.codeActionProvider,t,i,s,d)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._lightBulbWidget=new a.o((()=>{const e=this._editor.getContribution(C.f.ID);return e&&this._register(e.onClick((e=>this.showCodeActionsFromLightbulb(e.actions,e)))),e})),this._resolver=n.createInstance(m),this._register(this._editor.onDidLayoutChange((()=>this._actionWidgetService.hide())))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,t){if(e.allAIFixes&&1===e.validActions.length){const t=e.validActions[0],i=t.action.command;return i&&"inlineChat.start"===i.id&&i.arguments&&i.arguments.length>=1&&(i.arguments[0]={...i.arguments[0],autoSend:!1}),void await this._applyCodeAction(t,!1,!1,u.UX.FromAILightbulb)}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){var o;if(!this._editor.hasModel())return;null===(o=S.O.get(this._editor))||void 0===o||o.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){try{await this._instantiationService.invokeFunction(u.LR,e,n,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:g.aQ.QuickFix,filter:{}})}}async update(e){var t,i,n,o,s,a,l;if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let d;try{d=await e.actions}catch(e){return void(0,r.dL)(e)}if(!this._disposed)if(null===(i=this._lightBulbWidget.value)||void 0===i||i.update(d,e.trigger,e.position),1===e.trigger.type){if(null===(n=e.trigger.filter)||void 0===n?void 0:n.include){const t=this.tryGetValidActionToApply(e.trigger,d);if(t){try{null===(o=this._lightBulbWidget.value)||void 0===o||o.hide(),await this._applyCodeAction(t,!1,!1,u.UX.FromCodeActions)}finally{d.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,d);if(t&&t.action.disabled)return null===(s=S.O.get(this._editor))||void 0===s||s.showMessage(t.action.disabled,e.trigger.context.position),void d.dispose()}}const t=!!(null===(a=e.trigger.filter)||void 0===a?void 0:a.include);if(e.trigger.context&&(!d.allActions.length||!t&&!d.validActions.length))return null===(l=S.O.get(this._editor))||void 0===l||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=d,void d.dispose();this._activeCodeActions.value=d,this.showCodeActionList(d,this.toCoords(e.position),{includeDisabledActions:t,fromLightbulb:!1})}else this._actionWidgetService.isVisible?d.dispose():this._activeCodeActions.value=d}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}async showCodeActionList(e,t,i){const n=this._editor.createDecorationsCollection(),o=this._editor.getDomNode();if(!o)return;const r=i.includeDisabledActions&&(this._showDisabled||0===e.validActions.length)?e.allActions:e.validActions;if(!r.length)return;const a=d.L.isIPosition(t)?this.toCoords(t):t,l={onSelect:async(e,t)=>{this._applyCodeAction(e,!0,!!t,u.UX.FromCodeActions),this._actionWidgetService.hide(),n.clear()},onHide:()=>{var e;null===(e=this._editor)||void 0===e||e.focus(),n.clear()},onHover:async(e,t)=>{var i;if(!t.isCancellationRequested)return{canPreview:!!(null===(i=e.action.edit)||void 0===i?void 0:i.edits.length)}},onFocus:e=>{var t,i;if(e&&e.action){const o=e.action.ranges,r=e.action.diagnostics;if(n.clear(),o&&o.length>0){const e=r&&(null==r?void 0:r.length)>1?r.map((e=>({range:e,options:ge.DECORATION}))):o.map((e=>({range:e,options:ge.DECORATION})));n.set(e)}else if(r&&r.length>0){const e=r.map((e=>({range:e,options:ge.DECORATION})));n.set(e);const o=r[0];if(o.startLineNumber&&o.startColumn){const e=null===(i=null===(t=this._editor.getModel())||void 0===t?void 0:t.getWordAtPosition({lineNumber:o.startLineNumber,column:o.startColumn}))||void 0===i?void 0:i.word;s.i7((0,b.NC)("editingNewSelection","Context: {0} at line {1} and column {2}.",e,o.startLineNumber,o.startColumn))}}}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,function(e,t,i){if(!t)return e.map((e=>{var t;return{kind:"action",item:e,group:w,disabled:!!e.action.disabled,label:e.action.disabled||e.action.title,canPreview:!!(null===(t=e.action.edit)||void 0===t?void 0:t.edits.length)}}));const n=y.map((e=>({group:e,actions:[]})));for(const t of e){const e=t.action.kind?new g.yN(t.action.kind):g.yN.None;for(const i of n)if(i.group.kind.contains(e)){i.actions.push(t);break}}const o=[];for(const e of n)if(e.actions.length){o.push({kind:"header",group:e.group});for(const t of e.actions){const n=e.group;o.push({kind:"action",item:t,group:t.action.isAI?{title:n.title,kind:n.kind,icon:_.l.sparkle}:n,label:t.action.title,disabled:!!t.action.disabled,keybinding:i(t.action)})}}return o}(r,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,o,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=(0,o.i)(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}_shouldShowHeaders(){var e;const t=null===(e=this._editor)||void 0===e?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:null==t?void 0:t.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map((e=>{var t;return{id:e.id,label:e.title,tooltip:null!==(t=e.tooltip)&&void 0!==t?t:"",class:void 0,enabled:!0,run:()=>{var t;return this._commandService.executeCommand(e.id,...null!==(t=e.arguments)&&void 0!==t?t:[])}}}));return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:(0,b.NC)("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:(0,b.NC)("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};Ce.ID="editor.contrib.codeActionController",Ce.DECORATION=c.qx.register({description:"quickfix-highlight",className:"quickfix-edit-highlight"}),Ce=ge=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ye(1,fe.lT),ye(2,se.i6),ye(3,ae.TG),ye(4,h.p),ye(5,ve.ek),ye(6,pe.H),ye(7,me.Ui),ye(8,ce),ye(9,ae.TG)],Ce),(0,be.Ic)(((e,t)=>{var i;(i=e.getColor(K.MUv))&&t.addRule(`.monaco-editor .quickfix-edit-highlight { background-color: ${i}; }`);const n=e.getColor(K.EiJ);n&&t.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${(0,_e.c3)(e.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)}))},17016:(e,t,i)=>{"use strict";i.d(t,{Jt:()=>w,fj:()=>m});var n=i(15393),o=i(17301),s=i(4669),r=i(5976),a=i(95935),l=i(64141),d=i(50187),c=i(3860),h=i(93983),u=i(90535),g=i(87997),p=i(75396);const m=new h.uy("supportedCodeAction",""),f="_typescript.applyFixAllCodeAction";class v extends r.JT{constructor(e,t,i,o=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=o,this._autoTriggerTimer=this._register(new n._F),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),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((e=>(0,a.Xy)(e,t.uri)))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2,triggerAction:g.aQ.Default})}),this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getSelection();if(1===e.type)return t;const i=this._editor.getOption(65).enabled;if(i!==l.$r.Off){if(i===l.$r.On)return t;if(i===l.$r.OnCode){if(!t.isEmpty())return t;const e=this._editor.getModel(),{lineNumber:i,column:n}=t.getPosition(),o=e.getLineContent(i);if(0===o.length)return;if(1===n){if(/\s/.test(o[0]))return}else if(n===e.getLineMaxColumn(i)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[n-2])&&/\s/.test(o[n-1]))return}return t}}}var _;!function(e){e.Empty={type:0},e.Triggered=class{constructor(e,t,i){this.trigger=e,this.position=t,this._cancellablePromise=i,this.type=1,this.actions=i.catch((e=>{if((0,o.n2)(e))return b;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(_||(_={}));const b=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class w extends r.JT{constructor(e,t,i,n,o,a){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=o,this._configurationService=a,this._codeActionOracle=this._register(new r.XK),this._state=_.Empty,this._onDidChangeState=this._register(new s.Q5),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=m.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((e=>{e.hasChanged(65)&&this._update()}))),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(_.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=null===(e=this._editor)||void 0===e?void 0:e.getModel();return!!this._configurationService&&this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:null==t?void 0:t.uri})}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(_.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(91)){const t=this._registry.all(e).flatMap((e=>{var t;return null!==(t=e.providedCodeActionKinds)&&void 0!==t?t:[]}));this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new v(this._editor,this._markerService,(t=>{var i;if(!t)return void this.setState(_.Empty);const o=t.selection.getStartPosition(),s=(0,n.PG)((async i=>{var n,o,s,r,a,l,h,m,v,_;if(this._settingEnabledNearbyQuickfixes()&&1===t.trigger.type&&(t.trigger.triggerAction===g.aQ.QuickFix||(null===(o=null===(n=t.trigger.filter)||void 0===n?void 0:n.include)||void 0===o?void 0:o.contains(g.yN.QuickFix)))){const n=await(0,p.aI)(this._registry,e,t.selection,t.trigger,u.Ex.None,i),o=[...n.allActions];if(i.isCancellationRequested)return b;const w=null===(s=n.validActions)||void 0===s?void 0:s.some((e=>!!e.action.kind&&g.yN.QuickFix.contains(new g.yN(e.action.kind)))),y=this._markerService.read({resource:e.uri});if(w){for(const e of n.validActions)(null===(a=null===(r=e.action.command)||void 0===r?void 0:r.arguments)||void 0===a?void 0:a.some((e=>"string"==typeof e&&e.includes(f))))&&(e.action.diagnostics=[...y.filter((e=>e.relatedInformation))]);return{validActions:n.validActions,allActions:o,documentation:n.documentation,hasAutoFix:n.hasAutoFix,hasAIFix:n.hasAIFix,allAIFixes:n.allAIFixes,dispose:()=>{n.dispose()}}}if(!w&&y.length>0){const s=t.selection.getPosition();let r=s,a=Number.MAX_VALUE;const b=[...n.validActions];for(const w of y){const C=w.endColumn,S=w.endLineNumber,x=w.startLineNumber;if(S===s.lineNumber||x===s.lineNumber){r=new d.L(S,C);const w={type:t.trigger.type,triggerAction:t.trigger.triggerAction,filter:{include:(null===(l=t.trigger.filter)||void 0===l?void 0:l.include)?null===(h=t.trigger.filter)||void 0===h?void 0:h.include:g.yN.QuickFix},autoApply:t.trigger.autoApply,context:{notAvailableMessage:(null===(m=t.trigger.context)||void 0===m?void 0:m.notAvailableMessage)||"",position:r}},x=new c.Y(r.lineNumber,r.column,r.lineNumber,r.column),k=await(0,p.aI)(this._registry,e,x,w,u.Ex.None,i);if(0!==k.validActions.length){for(const e of k.validActions)(null===(_=null===(v=e.action.command)||void 0===v?void 0:v.arguments)||void 0===_?void 0:_.some((e=>"string"==typeof e&&e.includes(f))))&&(e.action.diagnostics=[...y.filter((e=>e.relatedInformation))]);0===n.allActions.length&&o.push(...k.allActions),Math.abs(s.column-C)i.findIndex((t=>t.action.title===e.action.title))===t));return w.sort(((e,t)=>e.action.isPreferred&&!t.action.isPreferred?-1:!e.action.isPreferred&&t.action.isPreferred||e.action.isAI&&!t.action.isAI?1:!e.action.isAI&&t.action.isAI?-1:0)),{validActions:w,allActions:o,documentation:n.documentation,hasAutoFix:n.hasAutoFix,hasAIFix:n.hasAIFix,allAIFixes:n.allAIFixes,dispose:()=>{n.dispose()}}}}return(0,p.aI)(this._registry,e,t.selection,t.trigger,u.Ex.None,i)}));1===t.trigger.type&&(null===(i=this._progressService)||void 0===i||i.showWhile(s,250)),this.setState(new _.Triggered(t.trigger,o,s))}),void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:g.aQ.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;null===(t=this._codeActionOracle.value)||void 0===t||t.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||this._disposed||this._onDidChangeState.fire(e))}}},58507:(e,t,i)=>{"use strict";i.d(t,{f:()=>T});var n=i(65321),o=i(10553),s=i(73046),r=i(4669),a=i(5976),l=i(25670),d=i(93379),c=i.n(d),h=i(7795),u=i.n(h),g=i(90569),p=i.n(g),m=i(3565),f=i.n(m),v=i(19216),_=i.n(v),b=i(44589),w=i.n(b),y=i(32874),C={};C.styleTagTransform=w(),C.setAttributes=f(),C.insert=p().bind(null,"head"),C.domAPI=u(),C.insertStyleElement=_(),c()(y.Z,C),y.Z&&y.Z.locals&&y.Z.locals;var S,x,k=i(59616),L=i(75396),N=i(63580),D=i(94565),E=i(91847),I=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.Hidden={type:0},e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(x||(x={}));let T=S=class extends a.JT{constructor(e,t,i){super(),this._editor=e,this._keybindingService=t,this._onClick=this._register(new r.Q5),this.onClick=this._onClick.event,this._state=x.Hidden,this._iconClasses=[],this._domNode=n.$("div.lightBulbWidget"),this._register(o.o.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()}))),this._register(n.GQ(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=n.i(this._domNode),o=this._editor.getOption(67);let s=Math.floor(o/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{1==(1&e.buttons)&&this.hide()}))),this._register(r.ju.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,(()=>{var e,t,i,n;this._preferredKbLabel=null!==(t=null===(e=this._keybindingService.lookupKeybinding(L.pZ))||void 0===e?void 0:e.getLabel())&&void 0!==t?t:void 0,this._quickFixKbLabel=null!==(n=null===(i=this._keybindingService.lookupKeybinding(L.cz))||void 0===i?void 0:i.getLabel())&&void 0!==n?n:void 0,this._updateLightBulbTitleAndIcon()})))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();if(!this._editor.getOptions().get(65).enabled)return this.hide();const n=this._editor.getModel();if(!n)return this.hide();const{lineNumber:o,column:s}=n.validatePosition(i),r=n.getOptions().tabSize,a=this._editor.getOptions().get(50),l=n.getLineContent(o),d=(0,k.q)(l,r),c=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let h=o,u=1;if(!(a.spaceWidth*d>22)){if(o>1&&!c(o-1))h-=1;else if(o=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([I(1,E.d),I(2,D.H)],T)},87997:(e,t,i)=>{"use strict";i.d(t,{EU:()=>r,Yl:()=>a,aQ:()=>n,bA:()=>c,wZ:()=>d,yN:()=>s});var n,o=i(17301);class s{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+s.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new s(this.value+s.sep+e)}}function r(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>l(t,i,e.include)))||!e.includeSourceActions&&s.Source.contains(t))}function a(e,t){const i=t.kind?new s(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>l(i,t,e.include)))||!e.includeSourceActions&&i&&s.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}function l(e,t,i){return!(!t.contains(e)||i&&t.contains(i))}s.sep=".",s.None=new s("@@none@@"),s.Empty=new s(""),s.QuickFix=new s("quickfix"),s.Refactor=new s("refactor"),s.RefactorExtract=s.Refactor.append("extract"),s.RefactorInline=s.Refactor.append("inline"),s.RefactorMove=s.Refactor.append("move"),s.RefactorRewrite=s.Refactor.append("rewrite"),s.Notebook=new s("notebook"),s.Source=new s("source"),s.SourceOrganizeImports=s.Source.append("organizeImports"),s.SourceFixAll=s.Source.append("fixAll"),s.SurroundWith=s.Refactor.append("surround"),function(e){e.Refactor="refactor",e.RefactorPreview="refactor preview",e.Lightbulb="lightbulb",e.Default="other (default)",e.SourceAction="source action",e.QuickFix="quick fix action",e.FixAll="fix all",e.OrganizeImports="organize imports",e.AutoFix="auto fix",e.QuickFixHover="quick fix hover window",e.OnSave="save participants",e.ProblemsView="problems view"}(n||(n={}));class d{static fromUser(e,t){return e&&"object"==typeof e?new d(d.getKindFromUser(e,t.kind),d.getApplyFromUser(e,t.apply),d.getPreferredUser(e)):new d(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new s(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class c{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}async resolve(e){var t;if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=await this.provider.resolveCodeAction(this.action,e)}catch(e){(0,o.Cp)(e)}t&&(this.action.edit=t.edit)}return this}}},38593:(e,t,i)=>{"use strict";var n=i(15393),o=i(17301),s=i(5976),r=i(43407),a=i(16830),l=i(64141),d=i(29102),c=i(71050),h=i(98401),u=i(70666),g=i(73733),p=i(94565),m=i(71922);class f{constructor(){this.lenses=[],this._disposables=new s.SL}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}async function v(e,t,i){const n=e.ordered(t),s=new Map,r=new f,a=n.map((async(e,n)=>{s.set(e,n);try{const n=await Promise.resolve(e.provideCodeLenses(t,i));n&&r.add(n,e)}catch(e){(0,o.Cp)(e)}}));return await Promise.all(a),r.lenses=r.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:s.get(e.provider)s.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),r}p.P.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;(0,h.p_)(u.o.isUri(i)),(0,h.p_)("number"==typeof n||!n);const{codeLensProvider:r}=e.get(m.p),a=e.get(g.q).getModel(i);if(!a)throw(0,o.b1)();const l=[],d=new s.SL;return v(r,a,c.T.None).then((e=>{d.add(e);const t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?l.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(a,i.symbol,c.T.None)).then((e=>l.push(e||i.symbol))));return Promise.all(t)})).then((()=>l)).finally((()=>{setTimeout((()=>d.dispose()),100)}))}));var _=i(4669),b=i(43702),w=i(24314),y=i(65026),C=i(72065),S=i(26904),x=i(48906),k=i(65321);const L=(0,C.yh)("ICodeLensCache");class N{constructor(e,t){this.lineCount=e,this.data=t}}let D=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new b.z6(20,.75),(0,k.se)(x.Ex,(()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),_.ju.once(e.onWillSaveState)((i=>{i.reason===S.fk.SHUTDOWN&&e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),n=new f;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new N(e.getLineCount(),n);this._cache.set(e.uri.toString(),o)}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 e of i.data.lenses)n.add(e.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 e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new w.e(e,1,e,11)});const o=new f;o.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new N(i.lineCount,o))}}catch(e){}}};var E,I;D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(E=0,I=S.Uy,function(e,t){I(e,t,E)})],D),(0,y.z)(L,D,1);var T=i(56811),M=i(93379),R=i.n(M),A=i(7795),P=i.n(A),O=i(90569),F=i.n(O),B=i(3565),W=i.n(B),H=i(19216),V=i.n(H),z=i(44589),j=i.n(z),U=i(32849),q={};q.styleTagTransform=j(),q.setAttributes=W(),q.insert=F().bind(null,"head"),q.domAPI=P(),q.insertStyleElement=V(),R()(U.Z,q),U.Z&&U.Z.locals&&U.Z.locals;var K=i(13961);class ${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){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return 0!==this._lastHeight&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class G{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+G._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 t=0;t{e.symbol.command&&a.push(e.symbol),i.addDecoration({range:e.symbol.range,options:Q},(e=>this._decorationIds[t]=e)),r=r?w.e.plusRange(r,e.symbol.range):w.e.lift(e.symbol.range)})),this._viewZone=new $(r.startLineNumber-1,o,s),this._viewZoneId=n.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new G(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],null==t||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||w.e.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:Q},(e=>this._decorationIds[i]=e))}))}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;tthis._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((e=>{(e.hasChanged(50)||e.hasChanged(19)||e.hasChanged(18))&&this._updateLensStyle(),e.hasChanged(17)&&this._onModelChange()}))),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=.9*this._editor.getOption(52)|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(18),n=this._editor.getOption(50),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(o.setProperty("--vscode-editorCodeLens-fontFamily",i),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",l.hL.fontFamily)),this._editor.changeViewZones((t=>{for(const i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){var e,t,i;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(i=this._currentCodeLensModel)||void 0===i||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e))return void(t&&(0,n.Vg)((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4,this._localToDispose));for(const t of this._languageFeaturesService.codeLensProvider.all(e))if("function"==typeof t.onDidChange){const e=t.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new n.pY((()=>{var t;const s=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=(0,n.PG)((t=>v(this._languageFeaturesService.codeLensProvider,e,t))),this._getCodeLensModelPromise.then((t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const n=this._provideCodeLensDebounce.update(e,Date.now()-s);i.delay=n,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewportSoon()}),o.dL)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add((0,s.OF)((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{var e;this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=[];let n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));const o=new Z;i.forEach((e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)})),o.commit(e)}))})),i.schedule(),this._resolveCodeLensesScheduler.cancel(),null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidBlurEditorText((()=>{i.cancel()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add((0,s.OF)((()=>{if(this._editor.getModel()){const e=r.Z.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const e of this._lenses){const i=e.getCommand(t);if(i){this._commandService.executeCommand(i.id,...i.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new Z;for(const e of this._lenses)e.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 o of e.lenses){const e=o.symbol.range.startLineNumber;e<1||e>t||(n&&n[n.length-1].symbol.range.startLineNumber===e?n.push(o):(n=[o],i.push(n)))}if(!i.length&&!this._lenses.length)return;const o=r.Z.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const n=new Z;let o=0,r=0;for(;rthis._resolveCodeLensesInViewportSoon()))),o++,r++)}for(;othis._resolveCodeLensesInViewportSoon()))),r++;n.commit(e)}))})),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],s=[];if(this._lenses.forEach((e=>{const n=e.computeIfNecessary(t);n&&(i.push(n),s.push(e))})),0===i.length)return;const r=Date.now(),a=(0,n.PG)((e=>{const n=i.map(((i,n)=>{const r=new Array(i.length),a=i.map(((i,n)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(r[n]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then((e=>{r[n]=e}),o.Cp)));return Promise.all(a).then((()=>{e.isCancellationRequested||s[n].isDisposed()||s[n].updateCommands(r)}))}));return Promise.all(n)}));this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDebounce.update(t,Date.now()-r);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{(0,o.dL)(e),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}async getModel(){var e;return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,(null===(e=this._currentCodeLensModel)||void 0===e?void 0:e.isDisposed)?void 0:this._currentCodeLensModel}};ne.ID="css.editor.codeLens",ne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ie(1,m.p),ie(2,te.A),ie(3,p.H),ie(4,X.lT),ie(5,L)],ne),(0,a._K)(ne.ID,ne,1),(0,a.Qr)(class extends a.R6{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:d.u.hasCodeLensProvider,label:(0,J.NC)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,t){if(!t.hasModel())return;const i=e.get(ee.eJ),n=e.get(p.H),o=e.get(X.lT),s=t.getSelection().positionLineNumber,r=t.getContribution(ne.ID);if(!r)return;const a=await r.getModel();if(!a)return;const l=[];for(const e of a.lenses)e.symbol.command&&e.symbol.range.startLineNumber===s&&l.push({label:e.symbol.command.title,command:e.symbol.command});if(0===l.length)return;const d=await i.pick(l,{canPickMany:!1,placeHolder:(0,J.NC)("placeHolder","Select a command")});if(!d)return;let c=d.command;if(a.isDisposed){const e=await r.getModel(),t=null==e?void 0:e.lenses.find((e=>{var t;return e.symbol.range.startLineNumber===s&&(null===(t=e.symbol.command)||void 0===t?void 0:t.title)===c.title}));if(!t||!t.symbol.command)return;c=t.symbol.command}try{await n.executeCommand(c.id,...c.arguments||[])}catch(e){o.error(e)}}})},52640:(e,t,i)=>{"use strict";i.d(t,{E:()=>u,R:()=>g});var n=i(71050),o=i(17301),s=i(70666),r=i(24314),a=i(73733),l=i(94565),d=i(71922),c=i(15418),h=i(33108);async function u(e,t,i,n=!0){return v(new p,e,t,i,n)}function g(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}class p{constructor(){}async compute(e,t,i,n){const o=await e.provideDocumentColors(t,i);if(Array.isArray(o))for(const t of o)n.push({colorInfo:t,provider:e});return Array.isArray(o)}}class m{constructor(){}async compute(e,t,i,n){const o=await e.provideDocumentColors(t,i);if(Array.isArray(o))for(const e of o)n.push({range:e.range,color:[e.color.red,e.color.green,e.color.blue,e.color.alpha]});return Array.isArray(o)}}class f{constructor(e){this.colorInfo=e}async compute(e,t,i,o){const s=await e.provideColorPresentations(t,this.colorInfo,n.T.None);return Array.isArray(s)&&o.push(...s),Array.isArray(s)}}async function v(e,t,i,n,s){let r,a=!1;const l=[],d=t.ordered(i);for(let t=d.length-1;t>=0;t--){const s=d[t];if(s instanceof c.G)r=s;else try{await e.compute(s,i,n,l)&&(a=!0)}catch(e){(0,o.Cp)(e)}}return a?l:r&&s?(await e.compute(r,i,n,l),l):[]}function _(e,t){const{colorProvider:i}=e.get(d.p),n=e.get(a.q).getModel(t);if(!n)throw(0,o.b1)();return{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:e.get(h.Ui).getValue("editor.defaultColorDecorators",{resource:t})}}l.P.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof s.o))throw(0,o.b1)();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=_(e,i);return v(new m,a,r,n.T.None,l)})),l.P.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,a]=t,{uri:l,range:d}=a;if(!(l instanceof s.o&&Array.isArray(i)&&4===i.length&&r.e.isIRange(d)))throw(0,o.b1)();const{model:c,colorProviderRegistry:h,isDefaultColorDecoratorsEnabled:u}=_(e,l),[g,p,m,b]=i;return v(new f({range:d,color:{red:g,green:p,blue:m,alpha:b}}),h,c,n.T.None,u)}))},46838:(e,t,i)=>{"use strict";var n=i(5976),o=i(16830),s=i(24314),r=i(89431),a=i(65766),l=i(74271),d=i(66520);class c extends n.JT{constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(147);if("click"!==t&&"clickAndHover"!==t)return;const i=e.target;if(6!==i.type)return;if(!i.detail.injectedText)return;if(i.detail.injectedText.options.attachedData!==r.Ak)return;if(!i.range)return;const n=this._editor.getContribution(l.c.ID);if(n&&!n.isColorPickerVisible){const e=new s.e(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(e,1,0,!1,!0)}}}c.ID="editor.contrib.colorContribution",(0,o._K)(c.ID,c,2),d.Ae.register(a.nh)},89431:(e,t,i)=>{"use strict";i.d(t,{Ak:()=>w,if:()=>y});var n,o=i(15393),s=i(41264),r=i(17301),a=i(4669),l=i(5976),d=i(84013),c=i(97295),h=i(29994),u=i(16830),g=i(24314),p=i(13961),m=i(88191),f=i(71922),v=i(52640),_=i(33108),b=function(e,t){return function(i,n){t(i,n,e)}};const w=Object.create({});let y=n=class extends l.JT{constructor(e,t,i,o){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new l.SL),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new h.t7(this._editor),this._decoratorLimitReporter=new C,this._colorDecorationClassRefs=this._register(new l.SL),this._debounceInformation=o.for(i.colorProvider,"Document Colors",{min:n.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((e=>{const t=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(146);const i=t!==this._isColorDecoratorsEnabled||e.hasChanged(21),n=e.hasChanged(146);(i||n)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(146),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&"object"==typeof i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(20)}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 o._F,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),this._debounceInformation.get(e)))}))),this.beginCompute())}async beginCompute(){this._computePromise=(0,o.PG)((async e=>{const t=this._editor.getModel();if(!t)return[];const i=new d.G(!1),n=await(0,v.E)(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);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){(0,r.dL)(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((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:p.qx.EMPTY})));this._editor.changeDecorations((i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(21);for(let n=0;nthis._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};y.ID="editor.contrib.colorDetector",y.RECOMPUTE_TIME=1e3,y=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([b(1,_.Ui),b(2,f.p),b(3,m.A)],y);class C{constructor(){this._onDidChange=new a.Q5,this._computed=0,this._limited=!1}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}(0,u._K)(y.ID,y,1)},65766:(e,t,i)=>{"use strict";i.d(t,{nh:()=>P,PQ:()=>F});var n=i(15393),o=i(71050),s=i(41264),r=i(5976),a=i(24314),l=i(52640),d=i(89431),c=i(4669);class h{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){this.presentationIndex=i,this._onColorFlushed=new c.Q5,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new c.Q5,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new c.Q5,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 e=0;e{this.backgroundColor=e.getColor(b.yJx)||s.Il.white}))),this._register(g.nm(this._pickedColorNode,g.tw.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(g.nm(this._originalColorNode,g.tw.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=s.Il.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.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new S(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=s.Il.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:""}}class S extends r.JT{constructor(e){super(),this._onClicked=this._register(new c.Q5),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),g.R3(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),g.R3(this._button,t),g.R3(t,y(".button"+v.k.asCSSSelector((0,w.q5)("color-picker-close",f.l.close,(0,_.NC)("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._register(g.nm(this._button,g.tw.CLICK,(()=>{this._onClicked.fire()})))}}class x extends r.JT{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=y(".colorpicker-body"),g.R3(e,this._domNode),this._saturationBox=new k(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 N(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 D(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&&(this._insertButton=this._register(new E(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 s.Il(new s.tx(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new s.Il(new s.tx(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new s.Il(new s.tx(360===i?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()}}class k extends r.JT{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new c.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new c.Q5,this.onColorFlushed=this._onColorFlushed.event,this._domNode=y(".saturation-wrap"),g.R3(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",g.R3(this._domNode,this._canvas),this.selection=y(".saturation-selection"),g.R3(this._domNode,this.selection),this.layout(),this._register(g.nm(this._domNode,g.tw.POINTER_DOWN,(e=>this.onPointerDown(e)))),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 p.C);const t=g.i(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangePosition(e.pageX-t.left,e.pageY-t.top)),(()=>null));const i=g.nm(e.target.ownerDocument,g.tw.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 s.Il(new s.tx(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 o=i.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=s.Il.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=o,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 L extends r.JT{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new c.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new c.Q5,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=g.R3(e,y(".standalone-strip")),this.overlay=g.R3(this.domNode,y(".standalone-overlay"))):(this.domNode=g.R3(e,y(".strip")),this.overlay=g.R3(this.domNode,y(".overlay"))),this.slider=g.R3(this.domNode,y(".slider")),this.slider.style.top="0px",this._register(g.nm(this.domNode,g.tw.POINTER_DOWN,(e=>this.onPointerDown(e)))),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 p.C),i=g.i(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangeTop(e.pageY-i.top)),(()=>null));const n=g.nm(e.target.ownerDocument,g.tw.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 N extends L{constructor(e,t,i=!1){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,o=new s.Il(new s.VS(t,i,n,1)),r=new s.Il(new s.VS(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class D extends L{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class E extends r.JT{constructor(e){super(),this._onClicked=this._register(new c.Q5),this.onClicked=this._onClicked.event,this._button=g.R3(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(g.nm(this._button,g.tw.CLICK,(()=>{this._onClicked.fire()})))}get button(){return this._button}}class I extends m.${constructor(e,t,i,n,o=!1){super(),this.model=t,this.pixelRatio=i,this._register(u.T.getInstance(g.Jj(e)).onDidChange((()=>this.layout())));const s=y(".colorpicker-widget");e.appendChild(s),this.header=this._register(new C(s,this.model,n,o)),this.body=this._register(new x(s,this.model,this.pixelRatio,o))}layout(){this.body.layout()}}var T=i(97781),M=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},R=function(e,t){return function(i,n){t(i,n,e)}};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 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let P=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return n.Aq.fromPromise(this._computeAsync(e,t,i))}async _computeAsync(e,t,i){if(!this._editor.hasModel())return[];const n=d.if.get(this._editor);if(!n)return[];for(const e of t){if(!n.isColorDecoration(e))continue;const t=n.getColorData(e.range.getStartPosition());if(t)return[await B(this,this._editor.getModel(),t.colorInfo,t.provider)]}return[]}renderHoverParts(e,t){return W(this,this._editor,this._themeService,t,e)}};P=M([R(1,T.XE)],P);class O{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let F=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}async createColorHover(e,t,i){if(!this._editor.hasModel())return null;if(!d.if.get(this._editor))return null;const n=await(0,l.E)(i,this._editor.getModel(),o.T.None);let s=null,r=null;for(const t of n){const i=t.colorInfo;a.e.containsRange(i.range,e.range)&&(s=i,r=t.provider)}const c=null!=s?s:e,h=null!=r?r:t,u=!!s;return{colorHover:await B(this,this._editor.getModel(),c,h),foundInEditor:u}}async updateEditorModel(e){if(!this._editor.hasModel())return;const t=e.model;let i=new a.e(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await V(this._editor.getModel(),t,this._color,i,e),i=H(this._editor,i,t))}renderHoverParts(e,t){return W(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};async function B(e,t,i,n){const r=t.getValueInRange(i.range),{red:d,green:c,blue:u,alpha:g}=i.color,p=new s.VS(Math.round(255*d),Math.round(255*c),Math.round(255*u),g),m=new s.Il(p),f=await(0,l.R)(t,i,n,o.T.None),v=new h(m,[],0);return v.colorPresentations=f||[],v.guessColorPresentation(m,r),e instanceof P?new A(e,a.e.lift(i.range),v,n):new O(e,a.e.lift(i.range),v,n)}function W(e,t,i,n,o){if(0===n.length||!t.hasModel())return r.JT.None;if(o.setMinimumDimensions){const e=t.getOption(67)+8;o.setMinimumDimensions(new g.Ro(302,e))}const s=new r.SL,l=n[0],d=t.getModel(),c=l.model,h=s.add(new I(o.fragment,c,t.getOption(142),i,e instanceof F));o.setColorPicker(h);let u=!1,p=new a.e(l.range.startLineNumber,l.range.startColumn,l.range.endLineNumber,l.range.endColumn);if(e instanceof F){const t=n[0].model.color;e.color=t,V(d,c,t,p,l),s.add(c.onColorFlushed((t=>{e.color=t})))}else s.add(c.onColorFlushed((async e=>{await V(d,c,e,p,l),u=!0,p=H(t,p,c)})));return s.add(c.onDidChangeColor((e=>{V(d,c,e,p,l)}))),s.add(t.onDidChangeModelContent((e=>{u?u=!1:(o.hide(),t.focus())}))),s}function H(e,t,i){var n,o;const s=[],r=null!==(n=i.presentation.textEdit)&&void 0!==n?n:{range:t,text:i.presentation.label,forceMoveMarkers:!1};s.push(r),i.presentation.additionalTextEdits&&s.push(...i.presentation.additionalTextEdits);const l=a.e.lift(r.range),d=e.getModel()._setTrackedRange(null,l,3);return e.executeEdits("colorpicker",s),e.pushUndoStop(),null!==(o=e.getModel()._getTrackedRange(d))&&void 0!==o?o:l}async function V(e,t,i,n,s){const r=await(0,l.R)(e,{range:n,color:{red:i.rgba.r/255,green:i.rgba.g/255,blue:i.rgba.b/255,alpha:i.rgba.a}},s.provider,o.T.None);t.colorPresentations=r||[]}F=M([R(1,T.XE)],F)},15418:(e,t,i)=>{"use strict";i.d(t,{G:()=>h});var n=i(41264),o=i(35034),s=i(73733),r=i(51381),a=i(5976),l=i(71922),d=i(10637),c=function(e,t){return function(i,n){t(i,n,e)}};class h{constructor(e,t){this._editorWorkerClient=new o.Q8(e,!1,"editorWorkerService",t)}async provideDocumentColors(e,t){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,i){const o=t.range,s=t.color,r=s.alpha,a=new n.Il(new n.VS(Math.round(255*s.red),Math.round(255*s.green),Math.round(255*s.blue),r)),l=r?n.Il.Format.CSS.formatRGB(a):n.Il.Format.CSS.formatRGBA(a),d=r?n.Il.Format.CSS.formatHSL(a):n.Il.Format.CSS.formatHSLA(a),c=r?n.Il.Format.CSS.formatHex(a):n.Il.Format.CSS.formatHexA(a),h=[];return h.push({label:l,textEdit:{range:o,text:l}}),h.push({label:d,textEdit:{range:o,text:d}}),h.push({label:c,textEdit:{range:o,text:c}}),h}}let u=class extends a.JT{constructor(e,t,i){super(),this._register(i.colorProvider.register("*",new h(e,t)))}};u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([c(0,s.q),c(1,r.c_),c(2,l.p)],u),(0,d.y)(u)},2719:(e,t,i)=>{"use strict";var n,o,s=i(16830),r=i(63580),a=i(5976),l=i(65766),d=i(72065),c=i(24251),h=i(91847),u=i(4669),g=i(71922),p=i(29102),m=i(93983),f=i(73733),v=i(51381),_=i(15418),b=i(65321),w=(i(39587),function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}),y=function(e,t){return function(i,n){t(i,n,e)}};let C=n=class extends a.JT{constructor(e,t,i,n,o,s,r){super(),this._editor=e,this._modelService=i,this._keybindingService=n,this._instantiationService=o,this._languageFeatureService=s,this._languageConfigurationService=r,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=p.u.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=p.u.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||null===(e=this._standaloneColorPickerWidget)||void 0===e||e.focus():this._standaloneColorPickerWidget=new S(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),null===(e=this._standaloneColorPickerWidget)||void 0===e||e.hide(),this._editor.focus()}insertColor(){var e;null===(e=this._standaloneColorPickerWidget)||void 0===e||e.updateEditor(),this.hide()}static get(e){return e.getContribution(n.ID)}};C.ID="editor.contrib.standaloneColorPickerController",C=n=w([y(1,m.i6),y(2,f.q),y(3,h.d),y(4,d.TG),y(5,g.p),y(6,v.c_)],C),(0,s._K)(C.ID,C,1);let S=o=class extends a.JT{constructor(e,t,i,n,o,s,r,a){var d;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._modelService=o,this._keybindingService=s,this._languageFeaturesService=r,this._languageConfigurationService=a,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new u.Q5),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(l.PQ,this._editor),this._position=null===(d=this._editor._getViewModel())||void 0===d?void 0:d.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),h=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},g=this._register(b.go(this._body));this._register(g.onDidBlur((e=>{this.hide()}))),this._register(g.onDidFocus((e=>{this.focus()}))),this._register(this._editor.onDidChangeCursorPosition((()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()}))),this._register(this._editor.onMouseMove((e=>{var t;const i=null===(t=e.target.element)||void 0===t?void 0:t.classList;i&&i.contains("colorpicker-color-decoration")&&this.hide()}))),this._register(this.onResult((e=>{this._render(e.value,e.foundInEditor)}))),this._start(h),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return o.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).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 x(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 _.G(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}_render(e,t){const i=document.createDocumentFragment();let n;const o={fragment:i,statusBar:this._register(new c.mR(this._keybindingService)),setColorPicker:e=>n=e,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(o,[e])),void 0===n)return;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(.66*this._editor.getLayoutInfo().width,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),n.layout();const s=n.body,r=s.saturationBox.domNode.clientWidth,a=s.domNode.clientWidth-r-22-8,l=n.body.enterButton;null==l||l.onClicked((()=>{this.updateEditor(),this.hide()}));const d=n.header;d.pickedColorNode.style.width=r+8+"px",d.originalColorNode.style.width=a+"px";const h=n.header.closeButton;null==h||h.onClicked((()=>{this.hide()})),t&&(l&&(l.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};S.ID="editor.contrib.standaloneColorPickerWidget",S=o=w([y(3,d.TG),y(4,f.q),y(5,h.d),y(6,g.p),y(7,v.c_)],S);class x{constructor(e,t){this.value=e,this.foundInEditor=t}}var k=i(84144);class L extends s.x1{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...(0,r.vv)("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:(0,r.NC)({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:k.eH.CommandPalette}]})}runEditorCommand(e,t){var i;null===(i=C.get(t))||void 0===i||i.showOrFocus()}}class N extends s.R6{constructor(){super({id:"editor.action.hideColorPicker",label:(0,r.NC)({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:p.u.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var i;null===(i=C.get(t))||void 0===i||i.hide()}}class D extends s.R6{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:(0,r.NC)({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:p.u.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var i;null===(i=C.get(t))||void 0===i||i.insertColor()}}(0,s.Qr)(N),(0,s.Qr)(D),(0,k.r1)(L)},23365:(e,t,i)=>{"use strict";var n=i(22258),o=i(16830),s=i(24314),r=i(29102),a=i(51381),l=i(69386),d=i(50187),c=i(3860);class h{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;if(i+n>e.length)return!1;for(let o=0;o=65&&n<=90&&n+32===s||s>=65&&s<=90&&s+32===n))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,o,r){const a=e.startLineNumber,l=e.startColumn,d=e.endLineNumber,c=e.endColumn,u=o.getLineContent(a),g=o.getLineContent(d);let p,m=u.lastIndexOf(t,l-1+t.length),f=g.indexOf(i,c-1-i.length);if(-1!==m&&-1!==f)if(a===d)u.substring(m+t.length,f).indexOf(i)>=0&&(m=-1,f=-1);else{const e=u.substring(m+t.length),n=g.substring(0,f);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(m=-1,f=-1)}-1!==m&&-1!==f?(n&&m+t.length0&&32===g.charCodeAt(f-1)&&(i=" "+i,f-=1),p=h._createRemoveBlockCommentOperations(new s.e(a,m+t.length+1,d,f+1),t,i)):(p=h._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===p.length?i:null);for(const e of p)r.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return s.e.isEmpty(e)?n.push(l.h.delete(new s.e(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(l.h.delete(new s.e(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(l.h.delete(new s.e(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const o=[];return s.e.isEmpty(e)?o.push(l.h.replace(new s.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(o.push(l.h.insert(new d.L(e.startLineNumber,e.startColumn),t+(n?" ":""))),o.push(l.h.insert(new d.L(e.endLineNumber,e.endColumn),(n?" ":"")+i))),o}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,n),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;s&&s.blockCommentStartToken&&s.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new c.Y(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new c.Y(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}var u=i(97295);class g{constructor(e,t,i,n,o,s,r){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=n,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const o=e.getLanguageIdAtPosition(t,1),s=n.getLanguageConfiguration(o).comments,r=s?s.lineCommentToken:null;if(!r)return null;const a=[];for(let e=0,n=i-t+1;er?o-1:o}}}var p=i(63580),m=i(84144);class f extends o.R6{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(a.c_);if(!t.hasModel())return;const n=[],o=t.getModel().getOptions(),r=t.getOption(23),l=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));l.sort(((e,t)=>s.e.compareRangesUsingStarts(e.selection,t.selection)));let d=l[0];for(let e=1;e{"use strict";var n,o=i(65321),s=i(10244),r=i(74741),a=i(5976),l=i(1432),d=i(16830),c=i(29102),h=i(63580),u=i(84144),g=i(93983),p=i(5606),m=i(91847),f=i(33108),v=i(40382),_=function(e,t){return function(i,n){t(i,n,e)}};let b=n=class{static get(e){return e.getContribution(n.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.SL,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu((e=>this._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&o.Ay(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{this._editor.getOption(24)&&58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(6===e.target.type&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),11===e.target.type)return this._showScrollbarContextMenu(e.event);if(6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24))return;if(!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?u.eH.SimpleEditorContext:u.eH.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),o=n.getActions({arg:e.uri});n.dispose();for(const t of o){const[,n]=t;let o=0;for(const t of n)if(t instanceof u.NZ){const n=this._getMenuActions(e,t.item.submenu);n.length>0&&(i.push(new r.wY(t.id,t.label,n)),o++)}else i.push(t),o++;o&&i.push(new r.Z0)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),t=o.i(this._editor.getDomNode()),i=t.left+e.left,s=t.top+e.top+e.height;n={x:i,y:s}}const r=this._editor.getOption(127)&&!l.gn;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new s.gU(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"==typeof i.getActionViewItem?i.getActionViewItem():new s.gU(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel())return;if((0,v.x)(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(73);let i=0;const n=e=>({id:"menu-action-"+ ++i,label:e.label,tooltip:"",class:void 0,enabled:void 0===e.enabled||e.enabled,checked:e.checked,run:e.run}),o=(e,t,o,s,a)=>{if(!t)return n({label:e,enabled:t,run:()=>{}});const l=e=>()=>{this._configurationService.updateValue(o,e)},d=[];for(const e of a)d.push(n({label:e.label,checked:s===e.value,run:l(e.value)}));return((e,t)=>new r.wY("menu-action-"+ ++i,e,t,void 0))(e,d)},s=[];s.push(n({label:h.NC("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),s.push(new r.Z0),s.push(n({label:h.NC("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),s.push(o(h.NC("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:h.NC("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:h.NC("context.minimap.size.fill","Fill"),value:"fill"},{label:h.NC("context.minimap.size.fit","Fit"),value:"fit"}])),s.push(o(h.NC("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:h.NC("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:h.NC("context.minimap.slider.always","Always"),value:"always"}]));const a=this._editor.getOption(127)&&!l.gn;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:a?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>s,onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};b.ID="editor.contrib.contextmenu",b=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([_(1,p.i),_(2,p.u),_(3,g.i6),_(4,m.d),_(5,u.co),_(6,f.Ui),_(7,v.ec)],b);class w extends d.R6{constructor(){super({id:"editor.action.showContextMenu",label:h.NC("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:c.u.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;null===(i=b.get(t))||void 0===i||i.showContextMenu()}}(0,d._K)(b.ID,b,2),(0,d.Qr)(w)},41895:(e,t,i)=>{"use strict";var n=i(5976),o=i(16830),s=i(29102),r=i(63580);class a{constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new a(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new l(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new l(new a(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}}d.ID="editor.contrib.cursorUndoRedoController";class c extends o.R6{constructor(){super({id:"cursorUndo",label:r.NC("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var n;null===(n=d.get(t))||void 0===n||n.cursorUndo()}}class h extends o.R6{constructor(){super({id:"cursorRedo",label:r.NC("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var n;null===(n=d.get(t))||void 0===n||n.cursorRedo()}}(0,o._K)(d.ID,d,0),(0,o.Qr)(c),(0,o.Qr)(h)},58076:(e,t,i)=>{"use strict";var n=i(9488),o=i(21070),s=i(78713),r=i(15512),a=i(71922),l=i(30335),d=i(5976),c=i(4669),h=function(e,t){return function(i,n){t(i,n,e)}};let u=class extends d.JT{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=(0,o.uh)(this,void 0);const n=(0,o.aq)("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),s=(0,o.aq)("_textModel.onDidChangeContent",c.ju.debounce((e=>this._textModel.onDidChangeContent(e)),(()=>{}),100));this._register((0,o.gp)((async(e,t)=>{n.read(e),s.read(e);const i=t.add(new r.t2),o=await this._outlineModelService.getOrCreate(this._textModel,i.token);t.isDisposed||this._currentModel.set(o,void 0)})))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const o=i.asListOfDocumentSymbols().filter((t=>e.contains(t.range.startLineNumber)&&!e.contains(t.range.endLineNumber)));return o.sort((0,n.BV)((0,n.tT)((e=>e.range.endLineNumber-e.range.startLineNumber),n.fv))),o.map((e=>({name:e.name,kind:e.kind,startLineNumber:e.range.startLineNumber})))}};u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([h(1,a.p),h(2,l.Je)],u),s.O.setBreadcrumbsSourceFactory(((e,t)=>t.createInstance(u,e)))},54555:(e,t,i)=>{"use strict";var n=i(5976),o=i(1432),s=i(93379),r=i.n(s),a=i(7795),l=i.n(a),d=i(90569),c=i.n(d),h=i(3565),u=i.n(h),g=i(19216),p=i.n(g),m=i(44589),f=i.n(m),v=i(97070),_={};_.styleTagTransform=f(),_.setAttributes=u(),_.insert=c().bind(null,"head"),_.domAPI=l(),_.insertStyleElement=p(),r()(v.Z,_),v.Z&&v.Z.locals&&v.Z.locals;var b=i(16830),w=i(50187),y=i(24314),C=i(3860),S=i(13961);class x{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);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new y.e(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.copy?this.targetSelection=new C.Y(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):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new C.Y(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):this.targetPosition.lineNumberthis._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),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(35)&&!this._editor.getOption(22)&&(k(e)&&(this._modifierPressed=!0),this._mouseDown&&k(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(k(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===L.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(null===this._dragSelection){const e=(this._editor.getSelections()||[]).filter((e=>t.position&&e.containsPosition(t.position)));if(1!==e.length)return;this._dragSelection=e[0]}k(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 w.L(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){const e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:o}=e;i=[new C.Y(n,o,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new C.Y(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(k(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(L.ID,new x(this._dragSelection,t,k(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 y.e(e.lineNumber,e.column,e.lineNumber,e.column),options:L._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}L.ID="editor.contrib.dragAndDrop",L.TRIGGER_KEY_VALUE=o.dz?6:5,L._DECORATION_OPTIONS=S.qx.register({description:"dnd-target",className:"dnd-target"}),(0,b._K)(L.ID,L,2)},76917:(e,t,i)=>{"use strict";var n=i(71050),o=i(98401),s=i(70666),r=i(88216),a=i(30335);i(94565).P.registerCommand("_executeDocumentSymbolProvider",(async function(e,...t){const[i]=t;(0,o.p_)(s.o.isUri(i));const l=e.get(a.Je),d=e.get(r.S),c=await d.createModelReference(i);try{return(await l.getOrCreate(c.object.textEditorModel,n.T.None)).getTopLevelSymbols()}finally{c.dispose()}}))},30335:(e,t,i)=>{"use strict";i.d(t,{C3:()=>w,H3:()=>b,Je:()=>y,sT:()=>_});var n=i(9488),o=i(71050),s=i(17301),r=i(53725),a=i(43702),l=i(50187),d=i(24314),c=i(88191),h=i(72065),u=i(65026),g=i(73733),p=i(5976),m=i(71922),f=function(e,t){return function(i,n){t(i,n,e)}};class v{remove(){var e;null===(e=this.parent)||void 0===e||e.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let e=0;void 0!==t.children.get(n);e++)n=`${i}_${e}`;return n}static empty(e){return 0===e.children.size}}class _ extends v{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class b extends v{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class w extends v{static create(e,t,i){const r=new o.A(i),a=new w(t.uri),l=e.ordered(t),d=l.map(((e,i)=>{var n;const o=v.findId(`provider_${i}`,a),l=new b(o,a,null!==(n=e.displayName)&&void 0!==n?n:"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,r.token)).then((e=>{for(const t of e||[])w._makeOutlineElement(t,l);return l}),(e=>((0,s.Cp)(e),l))).then((e=>{v.empty(e)?e.remove():a._groups.set(o,e)}))})),c=e.onDidChange((()=>{const i=e.ordered(t);(0,n.fS)(i,l)||r.cancel()}));return Promise.all(d).then((()=>r.token.isCancellationRequested&&!i.isCancellationRequested?w.create(e,t,i):a._compact())).finally((()=>{r.dispose(),c.dispose(),r.dispose()}))}static _makeOutlineElement(e,t){const i=v.findId(e,t),n=new _(i,t,e);if(e.children)for(const t of e.children)w._makeOutlineElement(t,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)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{const e=r.$.first(this._groups.values());for(const[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof _?e.push(t.symbol):e.push(...r.$.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>d.e.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return w._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>l.L.compare(d.e.getStartPosition(e.range),d.e.getStartPosition(t.range))||l.L.compare(d.e.getEndPosition(t.range),d.e.getEndPosition(e.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&&w._flattenDocumentSymbols(e,n.children,n.name)}}const y=(0,h.yh)("IOutlineModelService");let C=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new p.SL,this._cache=new a.z6(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved((e=>{this._cache.delete(e.id)})))}dispose(){this._disposables.dispose()}async getOrCreate(e,t){const i=this._languageFeaturesService.documentSymbolProvider,s=i.ordered(e);let r=this._cache.get(e.id);if(!r||r.versionId!==e.getVersionId()||!(0,n.fS)(r.provider,s)){const t=new o.A;r={versionId:e.getVersionId(),provider:s,promiseCnt:0,source:t,promise:w.create(i,e,t.token),model:void 0},this._cache.set(e.id,r);const n=Date.now();r.promise.then((t=>{r.model=t,this._debounceInformation.update(e,Date.now()-n)})).catch((t=>{this._cache.delete(e.id)}))}if(r.model)return r.model;r.promiseCnt+=1;const a=t.onCancellationRequested((()=>{0==--r.promiseCnt&&(r.source.cancel(),this._cache.delete(e.id))}));try{return await r.promise}finally{a.dispose()}}};C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([f(0,m.p),f(1,c.A),f(2,g.q)],C),(0,u.z)(y,C,1)},57811:(e,t,i)=>{"use strict";var n=i(16830),o=i(29102),s=i(10637),r=i(24954),a=i(51512),l=i(63580);(0,n._K)(r.bO.ID,r.bO,0),(0,s.y)(a.v),(0,n.fK)(new class extends n._l{constructor(){super({id:r.iE,precondition:r.wS,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t,i){var n;return null===(n=r.bO.get(t))||void 0===n?void 0:n.changePasteType()}}),(0,n.Qr)(class extends n.R6{constructor(){super({id:"editor.action.pasteAs",label:l.NC("pasteAs","Paste As..."),alias:"Paste As...",precondition:o.u.writable,metadata:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:l.NC("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(e,t,i){var n;const o="string"==typeof(null==i?void 0:i.id)?i.id:void 0;return null===(n=r.bO.get(t))||void 0===n?void 0:n.pasteAs(o)}}),(0,n.Qr)(class extends n.R6{constructor(){super({id:"editor.action.pasteAsText",label:l.NC("pasteAsText","Paste as Text"),alias:"Paste as Text",precondition:o.u.writable})}run(e,t,i){var n;return null===(n=r.bO.get(t))||void 0===n?void 0:n.pasteAs("text")}})},24954:(e,t,i)=>{"use strict";i.d(t,{bO:()=>M,iE:()=>E,wS:()=>I});var n,o=i(65321),s=i(9488),r=i(15393),a=i(73278),l=i(5976),d=i(81170),c=i(1432),h=i(98e3),u=i(35715),g=i(92944),p=i(66007),m=i(24314),f=i(71922),v=i(91092),_=i(16467),b=i(52165),w=i(63580),y=i(84972),C=i(93983),S=i(72065),x=i(90535),k=i(41157),L=i(85197),N=i(39310),D=function(e,t){return function(i,n){t(i,n,e)}};const E="editor.changePasteType",I=new C.uy("pasteWidgetVisible",!1,(0,w.NC)("pasteWidgetVisible","Whether the paste widget is showing")),T="application/vnd.code.copyMetadata";let M=n=class extends l.JT{static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,s,r,a){super(),this._bulkEditService=i,this._clipboardService=n,this._languageFeaturesService=s,this._quickInputService=r,this._progressService=a,this._editor=e;const l=e.getContainerDomNode();this._register((0,o.nm)(l,"copy",(e=>this.handleCopy(e)))),this._register((0,o.nm)(l,"cut",(e=>this.handleCopy(e)))),this._register((0,o.nm)(l,"paste",(e=>this.handlePaste(e)),!0)),this._pasteProgressManager=this._register(new b.r("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(L.p,"pasteIntoEditor",e,I,{id:E,label:(0,w.NC)("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},(0,o.uP)().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(85).enabled&&!this._editor.getOption(91)}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){var t,i;if(!this._editor.hasTextFocus())return;if(c.$L&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled())return;const n=this._editor.getModel(),o=this._editor.getSelections();if(!n||!(null==o?void 0:o.length))return;const a=this._editor.getOption(37);let l=o;const d=1===o.length&&o[0].isEmpty();if(d){if(!a)return;l=[new m.e(l[0].startLineNumber,1,l[0].startLineNumber,1+n.getLineLength(l[0].startLineNumber))]}const u=null===(t=this._editor._getViewModel())||void 0===t?void 0:t.getPlainTextToCopy(o,a,c.ED),p={multicursorText:Array.isArray(u)?u:null,pasteOnNewLine:d,mode:null},f=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter((e=>!!e.prepareDocumentPaste));if(!f.length)return void this.setCopyMetadata(e.clipboardData,{defaultPastePayload:p});const v=(0,g.B)(e.clipboardData),_=f.flatMap((e=>{var t;return null!==(t=e.copyMimeTypes)&&void 0!==t?t:[]})),b=(0,h.R)();this.setCopyMetadata(e.clipboardData,{id:b,providerCopyMimeTypes:_,defaultPastePayload:p});const w=(0,r.PG)((async e=>{const t=(0,s.kX)(await Promise.all(f.map((async t=>{try{return await t.prepareDocumentPaste(n,l,v,e)}catch(e){return void console.error(e)}}))));t.reverse();for(const e of t)for(const[t,i]of e)v.replace(t,i);return v}));null===(i=this._currentCopyOperation)||void 0===i||i.dataTransferPromise.cancel(),this._currentCopyOperation={handle:b,dataTransferPromise:w}}async handlePaste(e){var t,i,n,o,s;if(!e.clipboardData||!this._editor.hasTextFocus())return;null===(t=N.O.get(this._editor))||void 0===t||t.closeMessage(),null===(i=this._currentPasteOperation)||void 0===i||i.cancel(),this._currentPasteOperation=void 0;const r=this._editor.getModel(),l=this._editor.getSelections();if(!(null==l?void 0:l.length)||!r)return;if(!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const c=this.fetchCopyMetadata(e),h=(0,g.L)(e.clipboardData);h.delete(T);const u=[...e.clipboardData.types,...null!==(n=null==c?void 0:c.providerCopyMimeTypes)&&void 0!==n?n:[],d.v.uriList],p=this._languageFeaturesService.documentPasteEditProvider.ordered(r).filter((e=>{var t,i;return(!(null===(t=this._pasteAsActionContext)||void 0===t?void 0:t.preferredId)||this._pasteAsActionContext.preferredId===e.id)&&(null===(i=e.pasteMimeTypes)||void 0===i?void 0:i.some((e=>(0,a.SN)(e,u))))}));p.length?(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,p,l,h,c,{trigger:"explicit",only:this._pasteAsActionContext.preferredId}):this.doPasteInline(p,l,h,c,{trigger:"implicit"})):(null===(o=this._pasteAsActionContext)||void 0===o?void 0:o.preferredId)&&this.showPasteAsNoEditMessage(l,null===(s=this._pasteAsActionContext)||void 0===s?void 0:s.preferredId)}showPasteAsNoEditMessage(e,t){var i;null===(i=N.O.get(this._editor))||void 0===i||i.showMessage((0,w.NC)("pasteAsError","No paste edits for '{0}' found",t),e[0].getStartPosition())}doPasteInline(e,t,i,n,o){const s=(0,r.PG)((async r=>{const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),d=new _.Dl(a,3,void 0,r);try{if(await this.mergeInDataFromCopy(i,n,d.token),d.token.isCancellationRequested)return;const s=e.filter((e=>R(e,i)));if(!s.length||1===s.length&&"text"===s[0].id)return void await this.applyDefaultPasteHandler(i,n,d.token);const r=await this.getPasteEdits(s,i,l,t,o,d.token);if(d.token.isCancellationRequested)return;if(1===r.length&&"text"===r[0].providerId)return void await this.applyDefaultPasteHandler(i,n,d.token);if(r.length){const e="afterPaste"===a.getOption(85).showPasteSelector;return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:r},e,d.token)}await this.applyDefaultPasteHandler(i,n,d.token)}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),(0,w.NC)("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),s),this._currentPasteOperation=s}showPasteAsPick(e,t,i,n,o,s){const a=(0,r.PG)((async r=>{const l=this._editor;if(!l.hasModel())return;const d=l.getModel(),c=new _.Dl(l,3,void 0,r);try{if(await this.mergeInDataFromCopy(n,o,c.token),c.token.isCancellationRequested)return;let r=t.filter((e=>R(e,n)));e&&(r=r.filter((t=>t.id===e)));const a=await this.getPasteEdits(r,n,d,i,s,c.token);if(c.token.isCancellationRequested)return;if(!a.length)return void(s.only&&this.showPasteAsNoEditMessage(i,s.only));let l;if(e)l=a.at(0);else{const e=await this._quickInputService.pick(a.map((e=>({label:e.label,description:e.providerId,detail:e.detail,edit:e}))),{placeHolder:(0,w.NC)("pasteAsPickerPlaceholder","Select Paste Action")});l=null==e?void 0:e.edit}if(!l)return;const h=(0,v.n)(d.uri,i,l);await this._bulkEditService.apply(h,{editor:this._editor})}finally{c.dispose(),this._currentPasteOperation===a&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:(0,w.NC)("pasteAsProgress","Running paste handlers")},(()=>a))}setCopyMetadata(e,t){e.setData(T,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;const i=e.clipboardData.getData(T);if(i)try{return JSON.parse(i)}catch(e){return}const[n,o]=u.b6.getTextData(e.clipboardData);return o?{defaultPastePayload:{mode:o.mode,multicursorText:null!==(t=o.multicursorText)&&void 0!==t?t:null,pasteOnNewLine:!!o.isFromEmptySelection}}:void 0}async mergeInDataFromCopy(e,t,i){var n;if((null==t?void 0:t.id)&&(null===(n=this._currentCopyOperation)||void 0===n?void 0:n.handle)===t.id){const t=await this._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[i,n]of t)e.replace(i,n)}if(!e.has(d.v.uriList)){const t=await this._clipboardService.readResources();if(i.isCancellationRequested)return;t.length&&e.append(d.v.uriList,(0,a.ZO)(a.Z0.create(t)))}}async getPasteEdits(e,t,i,n,o,a){const l=await(0,r.eP)(Promise.all(e.map((async e=>{var s;try{const r=await(null===(s=e.provideDocumentPasteEdits)||void 0===s?void 0:s.call(e,i,n,t,o,a));if(r)return{...r,providerId:e.id}}catch(e){console.error(e)}}))),a),d=(0,s.kX)(null!=l?l:[]);return(0,v.C)(d)}async applyDefaultPasteHandler(e,t,i){var n,o,s;const r=null!==(n=e.get(d.v.text))&&void 0!==n?n:e.get("text");if(!r)return;const a=await r.asString();if(i.isCancellationRequested)return;const l={text:a,pasteOnNewLine:null!==(o=null==t?void 0:t.defaultPastePayload.pasteOnNewLine)&&void 0!==o&&o,multicursorText:null!==(s=null==t?void 0:t.defaultPastePayload.multicursorText)&&void 0!==s?s:null,mode:null};this._editor.trigger("keyboard","paste",l)}};function R(e,t){var i;return Boolean(null===(i=e.pasteMimeTypes)||void 0===i?void 0:i.some((e=>t.matches(e))))}M.ID="editor.contrib.copyPasteActionController",M=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([D(1,S.TG),D(2,p.vu),D(3,y.p),D(4,f.p),D(5,k.eJ),D(6,x.R9)],M)},51512:(e,t,i)=>{"use strict";i.d(t,{P:()=>C,v:()=>S});var n=i(9488),o=i(73278),s=i(5976),r=i(81170),a=i(66663),l=i(95935),d=i(70666),c=i(71922),h=i(63580),u=i(40382),g=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},p=function(e,t){return function(i,n){t(i,n,e)}};const m=(0,h.NC)("builtIn","Built-in");class f{async provideDocumentPasteEdits(e,t,i,n,o){const s=await this.getEdit(i,o);return s?{insertText:s.insertText,label:s.label,detail:s.detail,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}:void 0}async provideDocumentOnDropEdits(e,t,i,n){const o=await this.getEdit(i,n);return o?{insertText:o.insertText,label:o.label,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}:void 0}}class v extends f{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[r.v.text],this.pasteMimeTypes=[r.v.text]}async getEdit(e,t){const i=e.get(r.v.text);if(!i)return;if(e.has(r.v.uriList))return;const n=await i.asString();return{handledMimeType:r.v.text,label:(0,h.NC)("text.label","Insert Plain Text"),detail:m,insertText:n}}}class _ extends f{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[r.v.uriList],this.pasteMimeTypes=[r.v.uriList]}async getEdit(e,t){const i=await y(e);if(!i.length||t.isCancellationRequested)return;let n=0;const o=i.map((({uri:e,originalText:t})=>e.scheme===a.lg.file?e.fsPath:(n++,t))).join(" ");let s;return s=n>0?i.length>1?(0,h.NC)("defaultDropProvider.uriList.uris","Insert Uris"):(0,h.NC)("defaultDropProvider.uriList.uri","Insert Uri"):i.length>1?(0,h.NC)("defaultDropProvider.uriList.paths","Insert Paths"):(0,h.NC)("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:r.v.uriList,insertText:o,label:s,detail:m}}}let b=class extends f{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[r.v.uriList],this.pasteMimeTypes=[r.v.uriList]}async getEdit(e,t){const i=await y(e);if(!i.length||t.isCancellationRequested)return;const o=(0,n.kX)(i.map((({uri:e})=>{const t=this._workspaceContextService.getWorkspaceFolder(e);return t?(0,l.lX)(t.uri,e):void 0})));return o.length?{handledMimeType:r.v.uriList,insertText:o.join(" "),label:i.length>1?(0,h.NC)("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):(0,h.NC)("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:m}:void 0}};b=g([p(0,u.ec)],b);class w{constructor(){this.id="html",this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:r.v.text}]}async provideDocumentPasteEdits(e,t,i,n,o){if("explicit"!==n.trigger&&n.only!==this.id)return;const s=i.get("text/html"),r=await(null==s?void 0:s.asString());return r&&!o.isCancellationRequested?{insertText:r,yieldTo:this._yieldTo,label:(0,h.NC)("pasteHtmlLabel","Insert HTML"),detail:m}:void 0}}async function y(e){const t=e.get(r.v.uriList);if(!t)return[];const i=await t.asString(),n=[];for(const e of o.Z0.parse(i))try{n.push({uri:d.o.parse(e),originalText:e})}catch(e){}return n}let C=class extends s.JT{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new v)),this._register(e.documentOnDropEditProvider.register("*",new _)),this._register(e.documentOnDropEditProvider.register("*",new b(t)))}};C=g([p(0,c.p),p(1,u.ec)],C);let S=class extends s.JT{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new v)),this._register(e.documentPasteEditProvider.register("*",new _)),this._register(e.documentPasteEditProvider.register("*",new b(t))),this._register(e.documentPasteEditProvider.register("*",new w))}};S=g([p(0,c.p),p(1,u.ec)],S)},63218:(e,t,i)=>{"use strict";var n=i(16830),o=i(800),s=i(10637),r=i(51512),a=i(63580),l=i(23193),d=i(89872),c=i(9488),h=i(15393),u=i(73278),g=i(5976),p=i(92944),m=i(24314),f=i(71922);class v{constructor(e){this.identifier=e}}var _=i(65026),b=i(72065);const w=(0,b.yh)("treeViewsDndService");(0,_.z)(w,class{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}}},1);var y,C=i(16467),S=i(52165),x=i(33108),k=i(93983),L=i(16021),N=i(91092),D=i(85197),E=function(e,t){return function(i,n){t(i,n,e)}};const I="editor.experimental.dropIntoEditor.defaultProvider",T="editor.changeDropType",M=new k.uy("dropWidgetVisible",!1,(0,a.NC)("dropWidgetVisible","Whether the drop widget is showing"));let R=y=class extends g.JT{static get(e){return e.getContribution(y.ID)}constructor(e,t,i,n,o){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=o,this.treeItemsTransfer=L.Ej.getInstance(),this._dropProgressManager=this._register(t.createInstance(S.r,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(D.p,"dropIntoEditor",e,M,{id:T,label:(0,a.NC)("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor((t=>this.onDropIntoEditor(e,t.position,t.event))))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,i){var n;if(!i.dataTransfer||!e.hasModel())return;null===(n=this._currentOperation)||void 0===n||n.cancel(),e.focus(),e.setPosition(t);const o=(0,h.PG)((async n=>{const s=new C.Dl(e,1,void 0,n);try{const o=await this.extractDataTransferData(i);if(0===o.size||s.token.isCancellationRequested)return;const r=e.getModel();if(!r)return;const a=this._languageFeaturesService.documentOnDropEditProvider.ordered(r).filter((e=>!e.dropMimeTypes||e.dropMimeTypes.some((e=>o.matches(e))))),l=await this.getDropEdits(a,r,t,o,s);if(s.token.isCancellationRequested)return;if(l.length){const i=this.getInitialActiveEditIndex(r,l),o="afterDrop"===e.getOption(36).showDropSelector;await this._postDropWidgetManager.applyEditAndShowIfNeeded([m.e.fromPositions(t)],{activeEditIndex:i,allEdits:l},o,n)}}finally{s.dispose(),this._currentOperation===o&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,(0,a.NC)("dropIntoEditorProgress","Running drop handlers. Click to cancel"),o),this._currentOperation=o}async getDropEdits(e,t,i,n,o){const s=await(0,h.eP)(Promise.all(e.map((async e=>{try{const s=await e.provideDocumentOnDropEdits(t,i,n,o.token);if(s)return{...s,providerId:e.id}}catch(e){console.error(e)}}))),o.token),r=(0,c.kX)(null!=s?s:[]);return(0,N.C)(r)}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(I,{resource:e.uri});for(const[e,n]of Object.entries(i)){const i=t.findIndex((t=>n===t.providerId&&t.handledMimeType&&(0,u.SN)(e,[t.handledMimeType])));if(i>=0)return i}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new u.Hl;const t=(0,p.L)(e.dataTransfer);if(this.treeItemsTransfer.hasData(v.prototype)){const e=this.treeItemsTransfer.getData(v.prototype);if(Array.isArray(e))for(const i of e){const e=await this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(e)for(const[i,n]of e)t.replace(i,n)}}return t}};R.ID="editor.contrib.dropIntoEditorController",R=y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([E(1,b.TG),E(2,x.Ui),E(3,f.p),E(4,w)],R),(0,n._K)(R.ID,R,2),(0,n.fK)(new class extends n._l{constructor(){super({id:T,precondition:M,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t,i){var n;null===(n=R.get(t))||void 0===n||n.changeDropType()}}),(0,s.y)(r.P),d.B.as(l.IP.Configuration).registerConfiguration({...o.wk,properties:{[I]:{type:"object",scope:5,description:a.NC("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}})},91092:(e,t,i)=>{"use strict";i.d(t,{C:()=>r,n:()=>s});var n=i(66007),o=i(35084);function s(e,t,i){var s,r,a,l;return("string"==typeof i.insertText?""===i.insertText:""===i.insertText.snippet)?{edits:null!==(r=null===(s=i.additionalEdit)||void 0===s?void 0:s.edits)&&void 0!==r?r:[]}:{edits:[...t.map((t=>new n.Gl(e,{range:t,text:"string"==typeof i.insertText?o.Yj.escape(i.insertText)+"$0":i.insertText.snippet,insertAsSnippet:!0}))),...null!==(l=null===(a=i.additionalEdit)||void 0===a?void 0:a.edits)&&void 0!==l?l:[]]}}function r(e){var t;function i(e,t){return"providerId"in e&&e.providerId===t.providerId||"mimeType"in e&&e.mimeType===t.handledMimeType}const n=new Map;for(const o of e)for(const s of null!==(t=o.yieldTo)&&void 0!==t?t:[])for(const t of e)if(t!==o&&i(s,t)){let e=n.get(o);e||(e=[],n.set(o,e)),e.push(t)}if(!n.size)return Array.from(e);const o=new Set,s=[];return function e(t){if(!t.length)return[];const i=t[0];if(s.includes(i))return console.warn(`Yield to cycle detected for ${i.providerId}`),t;if(o.has(i))return e(t.slice(1));let r=[];const a=n.get(i);return a&&(s.push(i),r=e(a),s.pop()),o.add(i),[...r,i,...e(t.slice(1))]}(Array.from(e))}},85197:(e,t,i)=>{"use strict";i.d(t,{p:()=>M});var n=i(65321),o=i(32052),s=i(74741),r=i(4669),a=i(5976),l=i(93379),d=i.n(l),c=i(7795),h=i.n(c),u=i(90569),g=i.n(u),p=i(3565),m=i.n(p),f=i(19216),v=i.n(f),_=i(44589),b=i.n(_),w=i(33399),y={};y.styleTagTransform=b(),y.setAttributes=m(),y.insert=g().bind(null,"head"),y.domAPI=h(),y.insertStyleElement=v(),d()(w.Z,y),w.Z&&w.Z.locals&&w.Z.locals;var C,S=i(66007),x=i(91092),k=i(93983),L=i(5606),N=i(72065),D=i(91847),E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},I=function(e,t){return function(i,n){t(i,n,e)}};let T=C=class extends a.JT{constructor(e,t,i,n,o,s,l,d,c,h){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=o,this.edits=s,this.onSelectNewEdit=l,this._contextMenuService=d,this._keybindingService=h,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(c),this.visibleContext.set(!0),this._register((0,a.OF)((()=>this.visibleContext.reset()))),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register((0,a.OF)((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition((e=>{o.containsPosition(e.position)||this.dispose()}))),this._register(r.ju.runAndSubscribe(h.onDidUpdateKeybindings,(()=>{this._updateButtonTitle()})))}_updateButtonTitle(){var e;const t=null===(e=this._keybindingService.lookupKeybinding(this.showCommand.id))||void 0===e?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=n.$(".post-edit-widget"),this.button=this._register(new o.z(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(n.nm(this.domNode,n.tw.CLICK,(()=>this.showSelector())))}getId(){return C.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=n.i(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map(((e,t)=>(0,s.xw)({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}})))})}};T.baseId="editor.widget.postEditWidget",T=C=E([I(7,L.i),I(8,k.i6),I(9,D.d)],T);let M=class extends a.JT{constructor(e,t,i,n,o,s){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=o,this._bulkEditService=s,this._currentWidget=this._register(new a.XK),this._register(r.ju.any(t.onDidChangeModel,t.onDidChangeModelContent)((()=>this.clear())))}async applyEditAndShowIfNeeded(e,t,i,n){const o=this._editor.getModel();if(!o||!e.length)return;const s=t.allEdits[t.activeEditIndex];if(!s)return;const r=(0,x.n)(o.uri,e,s),a=e[0],l=o.deltaDecorations([],[{range:a,options:{description:"paste-line-suffix",stickiness:0}}]);let d,c;try{d=await this._bulkEditService.apply(r,{editor:this._editor,token:n}),c=o.getDecorationRange(l[0])}finally{o.deltaDecorations(l,[])}i&&d.isApplied&&t.allEdits.length>1&&this.show(null!=c?c:a,t,(async o=>{const s=this._editor.getModel();s&&(await s.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:o,allEdits:t.allEdits},i,n))}))}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(T,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;null===(e=this._currentWidget.value)||void 0===e||e.showSelector()}};M=E([I(4,N.TG),I(5,S.vu)],M)},16467:(e,t,i)=>{"use strict";i.d(t,{yy:()=>f,Dl:()=>v,YQ:()=>_});var n=i(97295),o=i(24314),s=i(71050),r=i(5976),a=i(16830),l=i(93983),d=i(91741),c=i(72065),h=i(65026),u=i(63580);const g=(0,c.yh)("IEditorCancelService"),p=new l.uy("cancellableOperation",!1,(0,u.NC)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,h.z)(g,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:p.bindTo(e.get(l.i6)),tokens:new d.S}))),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},1);class m extends s.A{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(g).add(e,this)))}dispose(){this._unregister(),super.dispose()}}(0,a.fK)(new class extends a._l{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:p})}runEditorCommand(e,t){e.get(g).cancel(t)}});class f{constructor(e,t){if(this.flags=t,0!=(1&this.flags)){const t=e.getModel();this.modelVersionId=t?n.WU("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;0!=(4&this.flags)?this.position=e.getPosition():this.position=null,0!=(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!=(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof f))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 f(e,this.flags))}}class v extends m{constructor(e,t,i,n){super(e,n),this._listener=new r.SL,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&o.e.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&o.e.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class _ extends s.A{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}},96962:(e,t,i)=>{"use strict";i.d(t,{pR:()=>yt});var n=i(15393),o=i(5976),s=i(97295),r=i(16830),a=i(8625),l=i(29102),d=i(84973),c=i(35534),h=i(61329),u=i(50187),g=i(24314),p=i(3860),m=i(77277),f=i(13961),v=i(73910),_=i(97781);class b{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((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));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(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){const e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new g.e(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,b._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=b._FIND_MATCH_DECORATION;const o=[];if(e.length>1e3){n=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height/t,s=Math.max(2,Math.ceil(3/i));let r=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let t=1,i=e.length;t=i.startLineNumber?i.endLineNumber>a&&(a=i.endLineNumber):(o.push({range:new g.e(r,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),r=i.startLineNumber,a=i.endLineNumber)}o.push({range:new g.e(r,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const s=new Array(e.length);for(let t=0,i=e.length;ti.removeDecoration(e))),this._findScopeDecorationIds=[]),(null==t?void 0:t.length)&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,b._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)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(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return n;if(!(n.startColumn0){const e=[];for(let t=0;tg.e.compareRangesUsingStarts(e.range,t.range)));const i=[];let n=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function C(e,t,i){return-1!==e[0].indexOf(i)&&-1!==t.indexOf(i)&&e[0].split(i).length===t.split(i).length}function S(e,t,i){const n=t.split(i),o=e[0].split(i);let s="";return n.forEach(((e,t)=>{s+=y([o[t]],e)+i})),s.slice(0,-1)}class x{constructor(e){this.staticValue=e,this.kind=0}}class k{constructor(e){this.pieces=e,this.kind=1}}class L{static fromStaticValue(e){return new L([N.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new x(e[0].staticValue):this._state=new k(e):this._state=new x("")}buildReplaceString(e,t){if(0===this._state.kind)return t?y(e,this._state.staticValue):this._state.staticValue;let i="";for(let t=0,n=this._state.pieces.length;t0){const e=[],t=n.caseOps.length;let i=0;for(let s=0,r=o.length;s=t){e.push(o.slice(s));break}switch(n.caseOps[i]){case"U":e.push(o[s].toUpperCase());break;case"u":e.push(o[s].toUpperCase()),i++;break;case"L":e.push(o[s].toLowerCase());break;case"l":e.push(o[s].toLowerCase()),i++;break;default:e.push(o[s])}}o=e.join("")}i+=o}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";for(;e>0;){if(ethis.research(!1)),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,o.B9)(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)}),240)):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;void 0!==t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new g.e(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));const n=this._findMatches(i,!1,G);this._decorations.set(n,i);const o=this._editor.getSelection();let s=this._decorations.getCurrentMatchesPosition(o);if(0===s&&n.length>0){const e=(0,c.J_)(n.map((e=>e.range)),(e=>g.e.compareRangesUsingStarts(e,o)>=0));s=e>0?e-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).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 o=this._editor.getModel();return t||1===n?(1===i?i=o.getLineCount():i--,n=o.getLineMaxColumn(i)):n--,new u.L(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const o=this._editor.getModel();return t||n===o.getLineMaxColumn(i)?(i===o.getLineCount()?i=1:i++,n=1):n++,new u.L(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=o)break;const s=e.charCodeAt(n);if(36===s){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===s||38===s){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=s&&s<=57){let r=s-48;if(n+1=o)break;const s=e.charCodeAt(n);switch(s){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(s))}}}return i.finalize()}(this._state.replaceString):L.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){const n=e.buildReplaceString(i.matches,this._state.preserveCase),o=new h.T4(t,n);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new u.L(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const n=(e||[null]).map((e=>Z._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(130):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=G?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new m.bc(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(130):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const i=this._editor.getModel(),n=i.getValue(1),o=i.getFullModelRange(),s=this._getReplacePattern();let r;const a=this._state.preserveCase;r=s.hasReplacementPatterns||a?n.replace(t,(function(){return s.buildReplaceString(arguments,a)})):n.replace(t,s.buildReplaceString(null,a));const l=new h.hP(o,r,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let e=0,o=i.length;ee.range)),n);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let t=this._findMatches(e,!1,1073741824).map((e=>new p.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)));const i=this._editor.getSelection();for(let e=0,n=t.length;ethis._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 o={inputActiveOptionBorder:(0,v.n_1)(v.PRb),inputActiveOptionForeground:(0,v.n_1)(v.Pvw),inputActiveOptionBackground:(0,v.n_1)(v.XEs)};this.caseSensitive=this._register(new he.rk({appendTitle:this._keybindingLabelFor(V),isChecked:this._state.matchCase,...o})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new he.Qx({appendTitle:this._keybindingLabelFor(z),isChecked:this._state.wholeWord,...o})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new he.eH({appendTitle:this._keybindingLabelFor(j),isChecked:this._state.isRegex,...o})),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((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(Q.nm(this._domNode,Q.tw.MOUSE_LEAVE,(e=>this._onMouseLeave()))),this._register(Q.nm(this._domNode,"mouseover",(e=>this._onMouseOver())))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return ge.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")}}ge.ID="editor.contrib.findOptionsWidget";var pe=i(4669);function me(e,t){return 1===e||2!==e&&t}class fe extends o.JT{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return me(this._isRegexOverride,this._isRegex)}get wholeWord(){return me(this._wholeWordOverride,this._wholeWord)}get matchCase(){return me(this._matchCaseOverride,this._matchCase)}get preserveCase(){return me(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 pe.Q5),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 o=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,o=!0),void 0!==i&&(g.e.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;const o={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,a=this.wholeWord,l=this.matchCase,d=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,s=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,s=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,s=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,s=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every((e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some((t=>!g.e.equalsRange(t,e)))})))||(this._searchScope=e.searchScope,o.searchScope=!0,s=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,s=!0),void 0!==e.isSearching&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,o.isSearching=!0,s=!0),void 0!==e.filters&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,o.filters=!0,s=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,r!==this.isRegex&&(s=!0,o.isRegex=!0),a!==this.wholeWord&&(s=!0,o.wholeWord=!0),l!==this.matchCase&&(s=!0,o.matchCase=!0),d!==this.preserveCase&&(s=!0,o.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=G}}var ve=i(56346),_e=i(98892),be=i(63841),we=i(73046),ye=i(17301),Ce=i(1432),Se=i(56950),xe={};xe.styleTagTransform=le(),xe.setAttributes=oe(),xe.insert=ie().bind(null,"head"),xe.domAPI=ee(),xe.insertStyleElement=re(),J()(Se.Z,xe),Se.Z&&Se.Z.locals&&Se.Z.locals;var ke=i(63580),Le=i(22980);function Ne(e){var t,i;return"Up"===(null===(t=e.lookupKeybinding("history.showPrevious"))||void 0===t?void 0:t.getElectronAccelerator())&&"Down"===(null===(i=e.lookupKeybinding("history.showNext"))||void 0===i?void 0:i.getElectronAccelerator())}var De=i(59554),Ee=i(25670),Ie=i(92321),Te=i(98401),Me=i(86253);const Re=(0,De.q5)("find-selection",we.l.selection,ke.NC("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),Ae=(0,De.q5)("find-collapsed",we.l.chevronRight,ke.NC("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Pe=(0,De.q5)("find-expanded",we.l.chevronDown,ke.NC("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Oe=(0,De.q5)("find-replace",we.l.replace,ke.NC("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Fe=(0,De.q5)("find-replace-all",we.l.replaceAll,ke.NC("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Be=(0,De.q5)("find-previous-match",we.l.arrowUp,ke.NC("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),We=(0,De.q5)("find-next-match",we.l.arrowDown,ke.NC("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),He=ke.NC("label.findDialog","Find / Replace"),Ve=ke.NC("label.find","Find"),ze=ke.NC("placeholder.find","Find"),je=ke.NC("label.previousMatchButton","Previous Match"),Ue=ke.NC("label.nextMatchButton","Next Match"),qe=ke.NC("label.toggleSelectionFind","Find in Selection"),Ke=ke.NC("label.closeButton","Close"),$e=ke.NC("label.replace","Replace"),Ge=ke.NC("placeholder.replace","Replace"),Ze=ke.NC("label.replaceButton","Replace"),Qe=ke.NC("label.replaceAllButton","Replace All"),Ye=ke.NC("label.toggleReplaceButton","Toggle Replace"),Je=ke.NC("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",G),Xe=ke.NC("label.matchesLocation","{0} of {1}"),et=ke.NC("label.noResults","No results"),tt=419;let it=69;const nt="ctrlEnterReplaceAll.windows.donotask",ot=Ce.dz?256:2048;class st{constructor(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function rt(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function at(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEndthis._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(91)&&(this._codeEditor.getOption(91)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(144)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(41)){const e=this._codeEditor.getOption(41).loop;this._state.change({loop:e},!1);const t=this._codeEditor.getOption(41).addExtraSpaceOnTop;t&&!this._viewZone&&(this._viewZone=new st(0),this._showViewZone()),!t&&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 e=await this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}}))),this._findInputFocused=T.bindTo(a),this._findFocusTracker=this._register(Q.go(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=M.bindTo(a),this._replaceFocusTracker=this._register(Q.go(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new st(0)),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return lt.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(91)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=Q.w(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 e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),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,ye.dL)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=it+"px",this._state.matchesCount>=G?this._matchesCount.title=Je:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=G&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=s.WU(Xe,i,t)}else e=et;this._matchesCount.appendChild(document.createTextNode(e)),(0,ve.Z9)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),it=Math.max(it,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===et)return""===i?ke.NC("ariaSearchNoResultEmpty","{0} found",e):ke.NC("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=ke.NC("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${n}`:n}return ke.NC("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),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(91);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(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=Q.i(i),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=n.left+(o?o.left:0),r=o?o.top:0;if(this._viewZone&&re.startLineNumber&&(t=!1);const i=Q.xQ(this._domNode).left;s>i&&(t=!1);const o=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(o?o.left:0)>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!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(41).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((i=>{t.heightInPx=this._getHeight(),this._viewZoneId=i.addZone(t),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+t.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new st(0));const t=this._viewZone;this._codeEditor.changeViewZones((i=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===t.heightInPx)return;const o=n-t.heightInPx;return t.heightInPx=n,i.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(84).top,n<=0)return;t.heightInPx=n,this._viewZoneId=i.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(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)return;if(!this._domNode.isConnected)return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,i=e.minimap.minimapWidth;let n=!1,o=!1,s=!1;if(this._resized&&Q.w(this._domNode)>tt)return this._domNode.style.maxWidth=t-28-i-15+"px",void(this._replaceInput.width=Q.w(this._findInput.domNode));if(447+i>=t&&(o=!0),447+i-it>=t&&(s=!0),447+i-it>=t+50&&(n=!0),this._domNode.classList.toggle("collapsed-find-widget",n),this._domNode.classList.toggle("narrow-find-widget",s),this._domNode.classList.toggle("reduced-find-widget",o),s||n||(this._domNode.style.maxWidth=t-28-i-15+"px"),this._findInput.layout({collapsedFindWidget:n,narrowFindWidget:s,reducedFindWidget:o}),this._resized){const e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=Q.w(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(null===this._cachedHeight||this._cachedHeight!==e)&&(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((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||g.e.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|ot)?(this._keybindingService.dispatchEvent(e,e.target)||this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?rt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?at(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|ot)?(this._keybindingService.dispatchEvent(e,e.target)||(Ce.ED&&Ce.tY&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(ke.NC("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(nt,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n")),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?rt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?at(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new Le.Yb(null,this._contextViewProvider,{width:221,label:Ve,placeholder:ze,appendCaseSensitiveLabel:this._keybindingLabelFor(V),appendWholeWordsLabel:this._keybindingLabelFor(z),appendRegexLabel:this._keybindingLabelFor(j),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>Ne(this._keybindingService),inputBoxStyles:Me.Hc,toggleStyles:Me.pl},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((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||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((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),Ce.IJ&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new dt({label:je+this._keybindingLabelFor(W),icon:Be,onTrigger:()=>{(0,Te.cW)(this._codeEditor.getAction(W)).run().then(void 0,ye.dL)}})),this._nextBtn=this._register(new dt({label:Ue+this._keybindingLabelFor(B),icon:We,onTrigger:()=>{(0,Te.cW)(this._codeEditor.getAction(B)).run().then(void 0,ye.dL)}}));const e=document.createElement("div");e.className="find-part",e.appendChild(this._findInput.domNode);const t=document.createElement("div");t.className="find-actions",e.appendChild(t),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new _e.Z({icon:Re,title:qe+this._keybindingLabelFor(U),isChecked:!1,inputActiveOptionBackground:(0,v.n_1)(v.XEs),inputActiveOptionBorder:(0,v.n_1)(v.PRb),inputActiveOptionForeground:(0,v.n_1)(v.Pvw)})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let e=this._codeEditor.getSelections();e=e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),t.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new dt({label:Ke+this._keybindingLabelFor(H),icon:De.s_,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}})),this._replaceInput=this._register(new Le.Nq(null,void 0,{label:$e,placeholder:Ge,appendPreserveCaseLabel:this._keybindingLabelFor(q),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>Ne(this._keybindingService),inputBoxStyles:Me.Hc,toggleStyles:Me.pl},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.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(),e.preventDefault())}))),this._replaceBtn=this._register(new dt({label:Ze+this._keybindingLabelFor(K),icon:Oe,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}})),this._replaceAllBtn=this._register(new dt({label:Qe+this._keybindingLabelFor($),icon:Fe,onTrigger:()=>{this._controller.replaceAll()}}));const i=document.createElement("div");i.className="replace-part",i.appendChild(this._replaceInput.domNode);const n=document.createElement("div");n.className="replace-actions",i.appendChild(n),n.appendChild(this._replaceBtn.domNode),n.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new dt({label:Ye,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Q.w(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),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=He,this._domNode.role="dialog",this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(e),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(i),this._resizeSash=this._register(new be.g(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let o=tt;this._register(this._resizeSash.onDidStart((()=>{o=Q.w(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;const t=o+e.startX-e.currentX;t(parseFloat(Q.Dx(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=Q.w(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=Q.w(this._domNode);if(e{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{var t,i;if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();null===(i=(t=this._opts).onKeyDown)||void 0===i||i.call(t,e)}))}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(...Ee.k.asClassNameArray(Ae)),this._domNode.classList.add(...Ee.k.asClassNameArray(Pe))):(this._domNode.classList.remove(...Ee.k.asClassNameArray(Pe)),this._domNode.classList.add(...Ee.k.asClassNameArray(Ae)))}}(0,_.Ic)(((e,t)=>{const i=e.getColor(v.EiJ);i&&t.addRule(`.monaco-editor .findMatch { border: 1px ${(0,Ie.c3)(e.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`);const n=e.getColor(v.gkn);n&&t.addRule(`.monaco-editor .findScope { border: 1px ${(0,Ie.c3)(e.type)?"dashed":"solid"} ${n}; }`);const o=e.getColor(v.lRK);o&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${o}; }`)}));var ct,ht=i(84144),ut=i(84972),gt=i(5606),pt=i(91847),mt=i(59422),ft=i(41157),vt=i(26904),_t=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},bt=function(e,t){return function(i,n){t(i,n,e)}};function wt(e,t="single",i=!1){if(!e.hasModel())return null;const n=e.getSelection();if("single"===t&&n.startLineNumber===n.endLineNumber||"multiple"===t)if(n.isEmpty()){const t=e.getConfiguredWordAtPosition(n.getStartPosition());if(t&&!1===i)return t.word}else if(e.getModel().getValueLengthInRange(n)<524288)return e.getModel().getValueInRange(n);return null}let yt=ct=class extends o.JT{get editor(){return this._editor}static get(e){return e.getContribution(ct.ID)}constructor(e,t,i,o,s){super(),this._editor=e,this._findWidgetVisible=I.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=o,this._notificationService=s,this._updateHistoryDelayer=new n.vp(500),this._state=this._register(new fe),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{const e=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),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).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!!T.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((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=s.ec(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("single"===e.seedSearchStringFromSelection){const t=wt(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);t&&(this._state.isRegex?i.searchString=s.ec(t):i.searchString=t)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){const t=wt(this._editor,e.seedSearchStringFromSelection);t&&(i.searchString=t)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const e=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(i.searchString=e)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(i.searchScope=e)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new Z(this._editor,this._state))}start(e,t){return this._start(e,t)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}goToMatch(e){return!!this._model&&(this._model.moveToMatch(e),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){var e;return!!this._model&&((null===(e=this._editor.getModel())||void 0===e?void 0:e.isTooLargeForHeapOperation())?(this._notificationService.warn(ke.NC("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0))}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};yt.ID="editor.contrib.findController",yt=ct=_t([bt(1,E.i6),bt(2,vt.Uy),bt(3,ut.p),bt(4,mt.lT)],yt);let Ct=class extends yt{constructor(e,t,i,n,o,s,r,a){super(e,i,r,a,s),this._contextViewService=t,this._keybindingService=n,this._themeService=o,this._widget=null,this._findOptionsWidget=null}async _start(e,t){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":n=!!i&&i.startLineNumber!==i.endLineNumber}e.updateSearchScope=e.updateSearchScope||n,await super._start(e,t),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&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 lt(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new ge(this._editor,this._state,this._keybindingService))}};Ct=_t([bt(1,gt.u),bt(2,E.i6),bt(3,pt.d),bt(4,_.XE),bt(5,mt.lT),bt(6,vt.Uy),bt(7,ut.p)],Ct),(0,r.rn)(new r.jY({id:"actions.find",label:ke.NC("startFindAction","Find"),alias:"Find",precondition:E.Ao.or(l.u.focus,E.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:ht.eH.MenubarEditMenu,group:"3_find",title:ke.NC({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})).addImplementation(0,((e,t,i)=>{const n=yt.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})}));const St={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 xt extends r.R6{constructor(){super({id:"editor.actions.findWithArgs",label:ke.NC("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:St})}async run(e,t,i){const n=yt.get(t);if(n){const e=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:void 0!==i.replaceString,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(null==i?void 0:i.findInSelection)||!1,loop:t.getOption(41).loop},e),n.setGlobalBufferTerm(n.getState().searchString)}}}class kt extends r.R6{constructor(){super({id:"actions.findWithSelection",label:ke.NC("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,t){const i=yt.get(t);i&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),i.setGlobalBufferTerm(i.getState().searchString))}}class Lt extends r.R6{async run(e,t){const i=yt.get(t);i&&!this._run(i)&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===i.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}class Nt extends r.R6{constructor(){super({id:"editor.action.goToMatchFindAction",label:ke.NC("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:I}),this._highlightDecorations=[]}run(e,t,i){const n=yt.get(t);if(!n)return;const o=n.getState().matchesCount;if(o<1)return void e.get(mt.lT).notify({severity:mt.zb.Warning,message:ke.NC("findMatchAction.noResults","No matches. Try searching for something else.")});const s=e.get(ft.eJ).createInputBox();s.placeholder=ke.NC("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",o);const r=e=>{const t=parseInt(e);if(isNaN(t))return;const i=n.getState().matchesCount;return t>0&&t<=i?t-1:t<0&&t>=-i?i+t:void 0},a=e=>{const i=r(e);if("number"==typeof i){s.validationMessage=void 0,n.goToMatch(i);const e=n.getState().currentMatch;e&&this.addDecorations(t,e)}else s.validationMessage=ke.NC("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};s.onDidChangeValue((e=>{a(e)})),s.onDidAccept((()=>{const e=r(s.value);"number"==typeof e?(n.goToMatch(e),s.hide()):s.validationMessage=ke.NC("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount)})),s.onDidHide((()=>{this.clearDecorations(t),s.dispose()})),s.show()}clearDecorations(e){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[])}))}addDecorations(e,t){e.changeDecorations((e=>{this._highlightDecorations=e.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:(0,_.EN)(a.m9),position:d.sh.Full}}}])}))}}class Dt extends r.R6{async run(e,t){const i=yt.get(t);if(!i)return;const n=wt(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(41).loop}),this._run(i))}}(0,r.rn)(new r.jY({id:"editor.action.startFindReplaceAction",label:ke.NC("startReplace","Replace"),alias:"Replace",precondition:E.Ao.or(l.u.focus,E.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:ht.eH.MenubarEditMenu,group:"3_find",title:ke.NC({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})).addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(91))return!1;const n=yt.get(t);if(!n)return!1;const o=t.getSelection(),s=n.isFindInputFocused(),r=!o.isEmpty()&&o.startLineNumber===o.endLineNumber&&"never"!==t.getOption(41).seedSearchStringFromSelection&&!s,a=s||r?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:"never"!==t.getOption(41).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})})),(0,r._K)(yt.ID,Ct,0),(0,r.Qr)(xt),(0,r.Qr)(kt),(0,r.Qr)(class extends Lt{constructor(){super({id:B,label:ke.NC("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:l.u.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:E.Ao.and(l.u.focus,T),primary:3,weight:100}]})}_run(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}),(0,r.Qr)(class extends Lt{constructor(){super({id:W,label:ke.NC("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:l.u.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:E.Ao.and(l.u.focus,T),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}),(0,r.Qr)(Nt),(0,r.Qr)(class extends Dt{constructor(){super({id:"editor.action.nextSelectionMatchFindAction",label:ke.NC("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:l.u.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}),(0,r.Qr)(class extends Dt{constructor(){super({id:"editor.action.previousSelectionMatchFindAction",label:ke.NC("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:l.u.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}});const Et=r._l.bindToContribution(yt.get);(0,r.fK)(new Et({id:H,precondition:I,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:E.Ao.and(l.u.focus,E.Ao.not("isComposing")),primary:9,secondary:[1033]}})),(0,r.fK)(new Et({id:V,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),(0,r.fK)(new Et({id:z,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:A.primary,mac:A.mac,win:A.win,linux:A.linux}})),(0,r.fK)(new Et({id:j,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),(0,r.fK)(new Et({id:U,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),(0,r.fK)(new Et({id:q,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:F.primary,mac:F.mac,win:F.win,linux:F.linux}})),(0,r.fK)(new Et({id:K,precondition:I,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:3094}})),(0,r.fK)(new Et({id:K,precondition:I,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:E.Ao.and(l.u.focus,M),primary:3}})),(0,r.fK)(new Et({id:$,precondition:I,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:2563}})),(0,r.fK)(new Et({id:$,precondition:I,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:E.Ao.and(l.u.focus,M),primary:void 0,mac:{primary:2051}}})),(0,r.fK)(new Et({id:"editor.action.selectAllMatches",precondition:I,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:515}}))},63737:(e,t,i)=>{"use strict";i.d(t,{f:()=>X,n:()=>ee});var n=i(15393),o=i(71050),s=i(17301),r=i(22258),a=i(5976),l=i(97295),d=i(98401),c=i(93379),h=i.n(c),u=i(7795),g=i.n(u),p=i(90569),m=i.n(p),f=i(3565),v=i.n(f),_=i(19216),b=i.n(_),w=i(44589),y=i.n(w),C=i(43388),S={};S.styleTagTransform=y(),S.setAttributes=v(),S.insert=m().bind(null,"head"),S.domAPI=g(),S.insertStyleElement=b(),h()(C.Z,S),C.Z&&C.Z.locals&&C.Z.locals;var x=i(43407),k=i(16830),L=i(29102),N=i(96887),D=i(51381),E=i(71705),I=i(35534),T=i(4669),M=i(24314),R=i(23795);class A{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new T.Q5,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some((e=>e.range.endLineNumber!==e.range.startLineNumber||0!==(0,R.Q)(e.text)[0])))}updateHiddenRanges(){let e=!1;const t=[];let i=0,n=0,o=Number.MAX_VALUE,s=-1;const r=this._foldingModel.regions;for(;i0}isHidden(e){return null!==P(this._hiddenRanges,e)}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let n=null;const o=e=>(n&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,n)||(n=P(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let n=0,s=e.length;n0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function P(e,t){const i=(0,I.J_)(e,(e=>t=0&&e[i].endLineNumber>=t?e[i]:null}var O,F=i(84990),B=i(63580),W=i(93983),H=i(83973),V=i(37702),z=i(99155),j=i(59422),U=i(88191),q=i(84013),K=i(71922),$=i(94565),G=i(70666),Z=i(73733),Q=i(33108),Y=function(e,t){return function(i,n){t(i,n,e)}};const J=new W.uy("foldingEnabled",!1);let X=O=class extends a.JT{static get(e){return e.getContribution(O.ID)}static getFoldingRangeProviders(e,t){var i,n;const o=e.foldingRangeProvider.ordered(t);return null!==(n=null===(i=O._foldingRangeSelector)||void 0===i?void 0:i.call(O,o,t))&&void 0!==n?n:o}constructor(e,t,i,n,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=s,this.localToDispose=this._register(new a.SL),this.editor=e,this._foldingLimitReporter=new ee(e);const r=this.editor.getOptions();this._isEnabled=r.get(43),this._useFoldingProviders="indentation"!==r.get(44),this._unfoldOnClickAfterEndOfLine=r.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=r.get(46),this.updateDebounceInfo=o.for(s.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 H.fF(e),this.foldingDecorationProvider.showFoldingControls=r.get(110),this.foldingDecorationProvider.showFoldingHighlights=r.get(45),this.foldingEnabled=J.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(47)&&this.onModelChanged(),e.hasChanged(110)||e.hasChanged(45)){const e=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=e.get(110),this.foldingDecorationProvider.showFoldingHighlights=e.get(45),this.triggerFoldingModelChanged()}e.hasChanged(44)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(44),this.onFoldingStrategyChanged()),e.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),e.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))}))),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 E.av(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new A(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new n.vp(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new n.pY((()=>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((e=>this.onDidChangeModelContent(e)))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{var e,t;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),null===(e=this.updateScheduler)||void 0===e||e.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,null===(t=this.rangeProvider)||void 0===t||t.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;null===(e=this.rangeProvider)||void 0===e||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new F.aI(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const i=O.getFoldingRangeProviders(this.languageFeaturesService,e);i.length>0&&(this.rangeProvider=new z.e(e,i,(()=>this.triggerFoldingModelChanged()),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;null===(t=this.hiddenRangeModel)||void 0===t||t.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 q.G,i=this.getRangeProvider(e.textModel),o=this.foldingRegionPromise=(0,n.PG)((e=>i.compute(e)));return o.then((i=>{if(i&&o===this.foldingRegionPromise){let n;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const e=i.setCollapsedAllOfType(N.AD.Imports.value,!0);e&&(n=x.Z.capture(this.editor),this._currentModelHasFoldedImports=e)}const o=this.editor.getSelections(),s=o?o.map((e=>e.startLineNumber)):[];e.update(i,s),null==n||n.restore(this.editor);const r=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=r)}return e}))})).then(void 0,(e=>((0,s.dL)(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){const t=this.editor.getSelections();if(t&&t.length>0){const i=[];for(const n of t){const t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,s.dL)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const t=e.target.detail,n=e.target.element.offsetLeft;if(t.offsetX-n<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 e=this.editor.getModel();if(e&&t.startColumn===e.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,o=e.target.range;if(!o||o.startLineNumber!==i)return;if(n){if(4!==e.target.type)return}else{const e=this.editor.getModel();if(!e||o.startColumn!==e.getLineMaxColumn(i))return}const s=t.getRegionAtLine(i);if(s&&s.startLineNumber===i){const o=s.isCollapsed;if(n||o){let n=[];if(e.event.altKey){const e=e=>!e.containedBy(s)&&!s.containedBy(e),i=t.getRegionsInside(null,e);for(const e of i)e.isCollapsed&&n.push(e);0===n.length&&(n=i)}else{const i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(s))e.isCollapsed===o&&n.push(e);!o&&i&&0!==n.length||n.push(s)}t.toggleCollapseState(n),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};X.ID="editor.contrib.folding",X=O=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Y(1,W.i6),Y(2,D.c_),Y(3,j.lT),Y(4,U.A),Y(5,K.p)],X);class ee{constructor(e){this.editor=e,this._onDidChange=new T.Q5,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}class te extends k.R6{runEditorCommand(e,t,i){const n=e.get(D.c_),o=X.get(t);if(!o)return;const s=o.getFoldingModel();return s?(this.reportTelemetry(e,t),s.then((e=>{if(e){this.invoke(o,e,t,i,n);const s=t.getSelection();s&&o.reveal(s.getStartPosition())}}))):void 0}getSelectedLines(e){const t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function ie(e){if(!d.o8(e)){if(!d.Kn(e))return!1;const t=e;if(!d.o8(t.levels)&&!d.hj(t.levels))return!1;if(!d.o8(t.direction)&&!d.HD(t.direction))return!1;if(!(d.o8(t.selectionLines)||Array.isArray(t.selectionLines)&&t.selectionLines.every(d.hj)))return!1}return!0}class ne extends te{getFoldingLevel(){return parseInt(this.id.substr(ne.ID_PREFIX.length))}invoke(e,t,i){(0,E.Ln)(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}ne.ID_PREFIX="editor.foldLevel",ne.ID=e=>ne.ID_PREFIX+e,(0,k._K)(X.ID,X,0),(0,k.Qr)(class extends te{constructor(){super({id:"editor.unfold",label:B.NC("unfoldAction.label","Unfold"),alias:"Unfold",precondition:J,kbOpts:{kbExpr:L.u.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:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* '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.\n\t\t\t\t\t\t",constraint:ie,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 o=n&&n.levels||1,s=this.getLineNumbers(n,i);n&&"up"===n.direction?(0,E.gU)(t,!1,o,s):(0,E.R$)(t,!1,o,s)}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.unfoldRecursively",label:B.NC("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,primary:(0,r.gx)(2089,2142),weight:100}})}invoke(e,t,i,n){(0,E.R$)(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.fold",label:B.NC("foldAction.label","Fold"),alias:"Fold",precondition:J,kbOpts:{kbExpr:L.u.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:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* '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.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:ie,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 o=this.getLineNumbers(n,i),s=n&&n.levels,r=n&&n.direction;"number"!=typeof s&&"string"!=typeof r?(0,E.HX)(t,!0,o):"up"===r?(0,E.gU)(t,!0,s||1,o):(0,E.R$)(t,!0,s||1,o)}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.foldRecursively",label:B.NC("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,primary:(0,r.gx)(2089,2140),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,E.R$)(t,!0,Number.MAX_VALUE,n)}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.foldAll",label:B.NC("foldAllAction.label","Fold All"),alias:"Fold All",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,primary:(0,r.gx)(2089,2069),weight:100}})}invoke(e,t,i){(0,E.R$)(t,!0)}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.unfoldAll",label:B.NC("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,primary:(0,r.gx)(2089,2088),weight:100}})}invoke(e,t,i){(0,E.R$)(t,!1)}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.foldAllBlockComments",label:B.NC("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,primary:(0,r.gx)(2089,2138),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())(0,E.MW)(t,N.AD.Comment.value,!0);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).comments;if(n&&n.blockCommentStartToken){const e=new RegExp("^\\s*"+(0,l.ec)(n.blockCommentStartToken));(0,E.DW)(t,e,!0)}}}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.foldAllMarkerRegions",label:B.NC("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,primary:(0,r.gx)(2089,2077),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())(0,E.MW)(t,N.AD.Region.value,!0);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){const e=new RegExp(n.markers.start);(0,E.DW)(t,e,!0)}}}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:B.NC("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,primary:(0,r.gx)(2089,2078),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())(0,E.MW)(t,N.AD.Region.value,!1);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){const e=new RegExp(n.markers.start);(0,E.DW)(t,e,!1)}}}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.foldAllExcept",label:B.NC("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,primary:(0,r.gx)(2089,2136),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,E.YT)(t,!0,n)}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.unfoldAllExcept",label:B.NC("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,primary:(0,r.gx)(2089,2134),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,E.YT)(t,!1,n)}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.toggleFold",label:B.NC("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,primary:(0,r.gx)(2089,2090),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,E.d8)(t,1,n)}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.gotoParentFold",label:B.NC("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,E.PV)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.gotoPreviousFold",label:B.NC("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,E.sK)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.gotoNextFold",label:B.NC("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,E.hE)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:B.NC("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,primary:(0,r.gx)(2089,2135),weight:100}})}invoke(e,t,i){var n;const o=[],s=i.getSelections();if(s){for(const e of s){let t=e.endLineNumber;1===e.endColumn&&--t,t>e.startLineNumber&&(o.push({startLineNumber:e.startLineNumber,endLineNumber:t,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:e.startLineNumber,startColumn:1,endLineNumber:e.startLineNumber,endColumn:1}))}if(o.length>0){o.sort(((e,t)=>e.startLineNumber-t.startLineNumber));const e=V.MN.sanitizeAndMerge(t.regions,o,null===(n=i.getModel())||void 0===n?void 0:n.getLineCount());t.updatePost(V.MN.fromFoldRanges(e))}}}}),(0,k.Qr)(class extends te{constructor(){super({id:"editor.removeManualFoldingRanges",label:B.NC("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,primary:(0,r.gx)(2089,2137),weight:100}})}invoke(e,t,i){const n=i.getSelections();if(n){const i=[];for(const e of n){const{startLineNumber:t,endLineNumber:n}=e;i.push(n>=t?{startLineNumber:t,endLineNumber:n}:{endLineNumber:n,startLineNumber:t})}t.removeManualRanges(i),e.triggerFoldingModelChanged()}}});for(let e=1;e<=7;e++)(0,k.QG)(new ne({id:ne.ID(e),label:B.NC("foldLevelAction.label","Fold Level {0}",e),alias:`Fold Level ${e}`,precondition:J,kbOpts:{kbExpr:L.u.editorTextFocus,primary:(0,r.gx)(2089,2048|21+e),weight:100}}));$.P.registerCommand("_executeFoldingRangeProvider",(async function(e,...t){const[i]=t;if(!(i instanceof G.o))throw(0,s.b1)();const n=e.get(K.p),r=e.get(Z.q).getModel(i);if(!r)throw(0,s.b1)();const a=e.get(Q.Ui);if(!a.getValue("editor.folding",{resource:i}))return[];const l=e.get(D.c_),d=a.getValue("editor.foldingStrategy",{resource:i}),c={get limit(){return a.getValue("editor.foldingMaximumRegions",{resource:i})},update:(e,t)=>{}},h=new F.aI(r,l,c);let u=h;if("indentation"!==d){const e=X.getFoldingRangeProviders(n,r);e.length&&(u=new z.e(r,e,(()=>{}),c,h))}const g=await u.compute(o.T.None),p=[];try{if(g)for(let e=0;e{"use strict";i.d(t,{Iy:()=>u,f5:()=>g,fF:()=>b});var n=i(73046),o=i(84973),s=i(13961),r=i(63580),a=i(73910),l=i(59554),d=i(97781),c=i(25670);const h=(0,a.P6G)("editor.foldBackground",{light:(0,a.ZnX)(a.hEj,.3),dark:(0,a.ZnX)(a.hEj,.3),hcDark:null,hcLight:null},(0,r.NC)("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);(0,a.P6G)("editorGutter.foldingControlForeground",{dark:a.XZx,light:a.XZx,hcDark:a.XZx,hcLight:a.XZx},(0,r.NC)("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));const u=(0,l.q5)("folding-expanded",n.l.chevronDown,(0,r.NC)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),g=(0,l.q5)("folding-collapsed",n.l.chevronRight,(0,r.NC)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),p=(0,l.q5)("folding-manual-collapsed",g,(0,r.NC)("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),m=(0,l.q5)("folding-manual-expanded",u,(0,r.NC)("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),f={color:(0,d.EN)(h),position:o.F5.Inline},v=(0,r.NC)("linesCollapsed","Click to expand the range."),_=(0,r.NC)("linesExpanded","Click to collapse the range.");class b{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,i){return t?b.HIDDEN_RANGE_DECORATION:"never"===this.showFoldingControls?e?this.showFoldingHighlights?b.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:b.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:b.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?i?this.showFoldingHighlights?b.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:b.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?b.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:b.COLLAPSED_VISUAL_DECORATION:"mouseover"===this.showFoldingControls?i?b.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:b.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i?b.MANUALLY_EXPANDED_VISUAL_DECORATION:b.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}b.COLLAPSED_VISUAL_DECORATION=s.qx.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:v,firstLineDecorationClassName:c.k.asClassName(g)}),b.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=s.qx.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f,isWholeLine:!0,linesDecorationsTooltip:v,firstLineDecorationClassName:c.k.asClassName(g)}),b.MANUALLY_COLLAPSED_VISUAL_DECORATION=s.qx.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:v,firstLineDecorationClassName:c.k.asClassName(p)}),b.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=s.qx.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f,isWholeLine:!0,linesDecorationsTooltip:v,firstLineDecorationClassName:c.k.asClassName(p)}),b.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=s.qx.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:v}),b.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=s.qx.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f,isWholeLine:!0,linesDecorationsTooltip:v}),b.EXPANDED_VISUAL_DECORATION=s.qx.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+c.k.asClassName(u),linesDecorationsTooltip:_}),b.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=s.qx.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:c.k.asClassName(u),linesDecorationsTooltip:_}),b.MANUALLY_EXPANDED_VISUAL_DECORATION=s.qx.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+c.k.asClassName(m),linesDecorationsTooltip:_}),b.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=s.qx.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:c.k.asClassName(m),linesDecorationsTooltip:_}),b.NO_CONTROLS_EXPANDED_RANGE_DECORATION=s.qx.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),b.HIDDEN_RANGE_DECORATION=s.qx.register({description:"folding-hidden-range-decoration",stickiness:1})},71705:(e,t,i)=>{"use strict";i.d(t,{DW:()=>g,HX:()=>c,Ln:()=>h,MW:()=>p,PV:()=>m,R$:()=>l,YT:()=>u,av:()=>r,d8:()=>a,gU:()=>d,hE:()=>v,sK:()=>f});var n=i(4669),o=i(37702),s=i(89954);class r{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new n.Q5,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new o.MN(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort(((e,t)=>e.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,o=-1,s=-1;const r=e=>{for(;ns&&(s=e),n++}};for(const i of e){const e=i.regionIndex,n=this._editorDecorationIds[e];if(n&&!t[n]){t[n]=!0,r(e);const i=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,i),o=Math.max(o,this._regions.getEndLineNumber(e))}}r(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=t=>{for(const i of e)if(!(i.startLineNumber>t.endLineNumber||t.startLineNumber>i.endLineNumber))return!0;return!1};for(let e=0;ei&&(i=s)}this._decorationProvider.changeDecorations((e=>this._editorDecorationIds=e.deltaDecorations(this._editorDecorationIds,t))),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){const t=(t,i)=>{for(const n of e)if(t=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>i)continue;const s=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);t.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,isCollapsed:o.isCollapsed,source:o.source,checksum:s})}return t.length>0?t:void 0}applyMemento(e){var t,i;if(!Array.isArray(e))return;const n=[],s=this._textModel.getLineCount();for(const o of e){if(o.startLineNumber>=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>s)continue;const e=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);o.checksum&&e!==o.checksum||n.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,type:void 0,isCollapsed:null===(t=o.isCollapsed)||void 0===t||t,source:null!==(i=o.source)&&void 0!==i?i:0})}const r=o.MN.sanitizeAndMerge(this._regions,n,s);this.updatePost(o.MN.fromFoldRanges(r))}_getLinesChecksum(e,t){return(0,s.vp)(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let n=this._regions.findRange(e),o=1;for(;n>=0;){const e=this._regions.toRegion(n);t&&!t(e,o)||i.push(e),o++,n=e.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,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let s=n,r=this._regions.length;s0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let e=n,s=this._regions.length;e1){const s=e.getRegionsInside(i,((e,i)=>e.isCollapsed!==o&&i0)for(const s of n){const n=e.getRegionAtLine(s);if(n&&(n.isCollapsed!==t&&o.push(n),i>1)){const s=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&ne.isCollapsed!==t&&ne.isCollapsed!==t&&n<=i));o.push(...n)}e.toggleCollapseState(o)}function c(e,t,i){const n=[];for(const o of i){const i=e.getAllRegionsAtLine(o,(e=>e.isCollapsed!==t));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}function h(e,t,i,n){const o=e.getRegionsInside(null,((e,o)=>o===t&&e.isCollapsed!==i&&!n.some((t=>e.containsLine(t)))));e.toggleCollapseState(o)}function u(e,t,i){const n=[];for(const t of i){const i=e.getAllRegionsAtLine(t,void 0);i.length>0&&n.push(i[0])}const o=e.getRegionsInside(null,(e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t));e.toggleCollapseState(o)}function g(e,t,i){const n=e.textModel,o=e.regions,s=[];for(let e=o.length-1;e>=0;e--)if(i!==o.isCollapsed(e)){const i=o.getStartLineNumber(e);t.test(n.getLineContent(i))&&s.push(o.toRegion(e))}e.toggleCollapseState(s)}function p(e,t,i){const n=e.regions,o=[];for(let e=n.length-1;e>=0;e--)i!==n.isCollapsed(e)&&t===n.getType(e)&&o.push(n.toRegion(e));e.toggleCollapseState(o)}function m(e,t){let i=null;const n=t.getRegionAtLine(e);if(null!==n&&(i=n.startLineNumber,e===i)){const e=n.parentIndex;i=-1!==e?t.regions.getStartLineNumber(e):null}return i}function f(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){if(e!==i.startLineNumber)return i.startLineNumber;{const e=i.parentIndex;let n=0;for(-1!==e&&(n=t.regions.getStartLineNumber(i.parentIndex));null!==i;){if(!(i.regionIndex>0))return null;if(i=t.regions.toRegion(i.regionIndex-1),i.startLineNumber<=n)return null;if(i.parentIndex===e)return i.startLineNumber}}}else if(t.regions.length>0)for(i=t.regions.toRegion(t.regions.length-1);null!==i;){if(i.startLineNumber0?t.regions.toRegion(i.regionIndex-1):null}return null}function v(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){const e=i.parentIndex;let n=0;if(-1!==e)n=t.regions.getEndLineNumber(i.parentIndex);else{if(0===t.regions.length)return null;n=t.regions.getEndLineNumber(t.regions.length-1)}for(;null!==i;){if(!(i.regionIndex=n)return null;if(i.parentIndex===e)return i.startLineNumber}}else if(t.regions.length>0)for(i=t.regions.toRegion(0);null!==i;){if(i.startLineNumber>e)return i.startLineNumber;i=i.regionIndex{"use strict";i.d(t,{MN:()=>a,Xl:()=>o});const n={0:" ",1:"u",2:"r"},o=16777215,s=4278190080;class r{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,i=e%32;return 0!=(this._states[t]&1<65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new r(e.length),this._userDefinedStates=new r(e.length),this._recoveredStates=new r(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(t,i)=>{const n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;io||s>o)throw new Error("startLineNumber or endLineNumber must not exceed "+o);for(;e.length>0&&!t(n,s);)e.pop();const r=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&r)<<24),this._endIndexes[i]=s+((65280&r)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&o}getEndLineNumber(e){return this._endIndexes[e]&o}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){1===t?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):2===t?(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]&s)>>>16);return 65535===t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(e)?i=>ii=d.startLineNumber))l&&l.startLineNumber===d.startLineNumber?(1===d.source?e=d:(e=l,e.isCollapsed=d.isCollapsed&&l.endLineNumber===d.endLineNumber,e.source=0),l=o(++r)):(e=d,d.isCollapsed&&0===d.source&&(e.source=2)),d=s(++a);else{let t=a,i=d;for(;;){if(!i||i.startLineNumber>l.endLineNumber){e=l;break}if(1===i.source&&i.endLineNumber>l.endLineNumber)break;i=s(++t)}l=o(++r)}if(e){for(;h&&h.endLineNumbere.startLineNumber&&e.startLineNumber>u&&e.endLineNumber<=i&&(!h||h.endLineNumber>=e.endLineNumber)&&(g.push(e),u=e.startLineNumber,h&&c.push(h),h=e)}}return g}}class l{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}}},84990:(e,t,i)=>{"use strict";i.d(t,{aI:()=>s});var n=i(59616),o=i(37702);class s{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id="indent"}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,o=t&&t.markers;return Promise.resolve(function(e,t,i,o=a){const s=e.getOptions().tabSize,l=new r(o);let d;i&&(d=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const c=[],h=e.getLineCount()+1;c.push({indent:-1,endAbove:h,line:h});for(let i=e.getLineCount();i>0;i--){const o=e.getLineContent(i),r=(0,n.q)(o,s);let a,h=c[c.length-1];if(-1!==r){if(d&&(a=o.match(d))){if(!a[1]){c.push({indent:-2,endAbove:i,line:i});continue}{let e=c.length-1;for(;e>0&&-2!==c[e].indent;)e--;if(e>0){c.length=e+1,h=c[e],l.insertFirst(i,h.line,r),h.line=i,h.indent=r,h.endAbove=i;continue}}}if(h.indent>r){do{c.pop(),h=c[c.length-1]}while(h.indent>r);const e=h.endAbove-1;e-i>=1&&l.insertFirst(i,e,r)}h.indent===r?h.endAbove=i:c.push({indent:r,endAbove:i,line:i})}else t&&(h.endAbove=i)}return l.toIndentRanges(e)}(this.editorModel,i,o,this.foldingRangesLimit))}}class r{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>o.Xl||t>o.Xl)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 e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new o.MN(e,t)}{this._foldingRangesLimit.update(this._length,t);let i=0,s=this._indentOccurrences.length;for(let e=0;et){s=e;break}i+=n}}const r=e.getOptions().tabSize,a=new Uint32Array(t),l=new Uint32Array(t);for(let o=this._length-1,d=0;o>=0;o--){const c=this._startIndexes[o],h=e.getLineContent(c),u=(0,n.q)(h,r);(u{}}},99155:(e,t,i)=>{"use strict";i.d(t,{e:()=>a});var n=i(17301),o=i(5976),s=i(37702);const r={};class a{constructor(e,t,i,n,s){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=i,this.foldingRangesLimit=n,this.fallbackRangeProvider=s,this.id="syntax",this.disposables=new o.SL,s&&this.disposables.add(s);for(const e of t)"function"==typeof e.onDidChange&&this.disposables.add(e.onDidChange(i))}compute(e){return function(e,t,i){let o=null;const s=e.map(((e,s)=>Promise.resolve(e.provideFoldingRanges(t,r,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(o)||(o=[]);const i=t.getLineCount();for(const t of e)t.start>0&&t.end>t.start&&t.end<=i&&o.push({start:t.start,end:t.end,rank:s,kind:t.kind})}}),n.Cp)));return Promise.all(s).then((e=>o))}(this.providers,this.editorModel,e).then((t=>{var i,n;return t?function(e,t){const i=e.sort(((e,t)=>{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),n=new l(t);let o;const s=[];for(const e of i)if(o){if(e.start>o.start)if(e.end<=o.end)s.push(o),o=e,n.add(e.start,e.end,e.kind&&e.kind.value,s.length);else{if(e.start>o.end){do{o=s.pop()}while(o&&e.start>o.end);o&&s.push(o),o=e}n.add(e.start,e.end,e.kind&&e.kind.value,s.length)}}else o=e,n.add(e.start,e.end,e.kind&&e.kind.value,s.length);return n.toIndentRanges()}(t,this.foldingRangesLimit):null!==(n=null===(i=this.fallbackRangeProvider)||void 0===i?void 0:i.compute(e))&&void 0!==n?n:null}))}dispose(){this.disposables.dispose()}}class l{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>s.Xl||t>s.Xl)return;const o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=n,this._types[o]=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 e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;ie){i=n;break}t+=o}}const n=new Uint32Array(e),o=new Uint32Array(e),r=[];for(let s=0,a=0;s{"use strict";var n=i(16830),o=i(82334),s=i(63580);class r extends n.R6{constructor(){super({id:"editor.action.fontZoomIn",label:s.NC("EditorFontZoomIn.label","Increase Editor Font Size"),alias:"Increase Editor Font Size",precondition:void 0})}run(e,t){o.C.setZoomLevel(o.C.getZoomLevel()+1)}}class a extends n.R6{constructor(){super({id:"editor.action.fontZoomOut",label:s.NC("EditorFontZoomOut.label","Decrease Editor Font Size"),alias:"Decrease Editor Font Size",precondition:void 0})}run(e,t){o.C.setZoomLevel(o.C.getZoomLevel()-1)}}class l extends n.R6{constructor(){super({id:"editor.action.fontZoomReset",label:s.NC("EditorFontZoomReset.label","Reset Editor Font Size"),alias:"Reset Editor Font Size",precondition:void 0})}run(e,t){o.C.setZoomLevel(0)}}(0,n.Qr)(r),(0,n.Qr)(a),(0,n.Qr)(l)},58823:(e,t,i)=>{"use strict";i.d(t,{xC:()=>L,x$:()=>N,Qq:()=>E,Qs:()=>T});var n=i(9488),o=i(71050),s=i(17301),r=i(53725),a=i(91741),l=i(98401),d=i(70666),c=i(16467),h=i(65520),u=i(50187),g=i(24314),p=i(3860),m=i(85215),f=i(88216),v=i(35120),_=i(94565);class b{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}class w{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(b.toKey(e))}has(e){return this._set.has(b.toKey(e))}}var y=i(72065),C=i(71922),S=i(43557),x=i(38832);function k(e,t,i){const n=[],o=new w,s=e.ordered(i);for(const e of s)n.push(e),e.extensionId&&o.add(e.extensionId);const r=t.ordered(i);for(const e of r){if(e.extensionId){if(o.has(e.extensionId))continue;o.add(e.extensionId)}n.push({displayName:e.displayName,extensionId:e.extensionId,provideDocumentFormattingEdits:(t,i,n)=>e.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),i,n)})}return n}class L{static setFormatterSelector(e){return{dispose:L._selectors.unshift(e)}}static async select(e,t,i,n){if(0===e.length)return;const o=r.$.first(L._selectors);return o?await o(e,t,i,n):void 0}}async function N(e,t,i,n,o,s,r){const a=e.get(y.TG),{documentRangeFormattingEditProvider:l}=e.get(C.p),d=(0,h.CL)(t)?t.getModel():t,c=l.ordered(d),u=await L.select(c,d,n,2);u&&(o.report(u),await a.invokeFunction(D,u,t,i,s,r))}async function D(e,t,i,o,s,r){var a,l;const d=e.get(m.p),u=e.get(S.VZ),f=e.get(x.IV);let _,b;(0,h.CL)(i)?(_=i.getModel(),b=new c.Dl(i,5,void 0,s)):(_=i,b=new c.YQ(i,s));const w=[];let y=0;for(const e of(0,n._2)(o).sort(g.e.compareRangesUsingStarts))y>0&&g.e.areIntersectingOrTouching(w[y-1],e)?w[y-1]=g.e.fromPositions(w[y-1].getStartPosition(),e.getEndPosition()):y=w.push(e);const C=async e=>{var i,n;u.trace("[format][provideDocumentRangeFormattingEdits] (request)",null===(i=t.extensionId)||void 0===i?void 0:i.value,e);const o=await t.provideDocumentRangeFormattingEdits(_,e,_.getFormattingOptions(),b.token)||[];return u.trace("[format][provideDocumentRangeFormattingEdits] (response)",null===(n=t.extensionId)||void 0===n?void 0:n.value,o),o},k=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>g.e.plusRange(e,t.range)),e[0].range);if(!t.some((e=>g.e.intersectRanges(i,e.range))))return!1;for(const i of e)for(const e of t)if(g.e.intersectRanges(i.range,e.range))return!0;return!1},L=[],N=[];try{if("function"==typeof t.provideDocumentRangesFormattingEdits){u.trace("[format][provideDocumentRangeFormattingEdits] (request)",null===(a=t.extensionId)||void 0===a?void 0:a.value,w);const e=await t.provideDocumentRangesFormattingEdits(_,w,_.getFormattingOptions(),b.token)||[];u.trace("[format][provideDocumentRangeFormattingEdits] (response)",null===(l=t.extensionId)||void 0===l?void 0:l.value,e),N.push(e)}else{for(const e of w){if(b.token.isCancellationRequested)return!0;N.push(await C(e))}for(let e=0;e({text:e.text,range:g.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(g.e.areIntersectingOrTouching(i,t))return[new p.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return f.playSignal(x.iP.format,{userGesture:r}),!0}async function E(e,t,i,n,o,s){const r=e.get(y.TG),a=e.get(C.p),l=(0,h.CL)(t)?t.getModel():t,d=k(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),c=await L.select(d,l,i,1);c&&(n.report(c),await r.invokeFunction(I,c,t,i,o,s))}async function I(e,t,i,n,o,s){const r=e.get(m.p),a=e.get(x.IV);let l,d,u;(0,h.CL)(i)?(l=i.getModel(),d=new c.Dl(i,5,void 0,o)):(l=i,d=new c.YQ(i,o));try{const e=await t.provideDocumentFormattingEdits(l,l.getFormattingOptions(),d.token);if(u=await r.computeMoreMinimalEdits(l.uri,e),d.token.isCancellationRequested)return!0}finally{d.dispose()}if(!u||0===u.length)return!1;if((0,h.CL)(i))v.V.execute(i,u,2!==n),2!==n&&i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:e}]=u,t=new p.Y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);l.pushEditOperations([t],u.map((e=>({text:e.text,range:g.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(g.e.areIntersectingOrTouching(i,t))return[new p.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return a.playSignal(x.iP.format,{userGesture:s}),!0}function T(e,t,i,n,o,r,a){const l=t.onTypeFormattingEditProvider.ordered(i);return 0===l.length||l[0].autoFormatTriggerCharacters.indexOf(o)<0?Promise.resolve(void 0):Promise.resolve(l[0].provideOnTypeFormattingEdits(i,n,o,r,a)).catch(s.Cp).then((t=>e.computeMoreMinimalEdits(i.uri,t)))}L._selectors=new a.S,_.P.registerCommand("_executeFormatRangeProvider",(async function(e,...t){const[i,r,a]=t;(0,l.p_)(d.o.isUri(i)),(0,l.p_)(g.e.isIRange(r));const c=e.get(f.S),h=e.get(m.p),u=e.get(C.p),p=await c.createModelReference(i);try{return async function(e,t,i,o,r,a){const l=t.documentRangeFormattingEditProvider.ordered(i);for(const t of l){const l=await Promise.resolve(t.provideDocumentRangeFormattingEdits(i,o,r,a)).catch(s.Cp);if((0,n.Of)(l))return await e.computeMoreMinimalEdits(i.uri,l)}}(h,u,p.object.textEditorModel,g.e.lift(r),a,o.T.None)}finally{p.dispose()}})),_.P.registerCommand("_executeFormatDocumentProvider",(async function(e,...t){const[i,r]=t;(0,l.p_)(d.o.isUri(i));const a=e.get(f.S),c=e.get(m.p),h=e.get(C.p),u=await a.createModelReference(i);try{return async function(e,t,i,o,r){const a=k(t.documentFormattingEditProvider,t.documentRangeFormattingEditProvider,i);for(const t of a){const a=await Promise.resolve(t.provideDocumentFormattingEdits(i,o,r)).catch(s.Cp);if((0,n.Of)(a))return await e.computeMoreMinimalEdits(i.uri,a)}}(c,h,u.object.textEditorModel,r,o.T.None)}finally{u.dispose()}})),_.P.registerCommand("_executeFormatOnTypeProvider",(async function(e,...t){const[i,n,s,r]=t;(0,l.p_)(d.o.isUri(i)),(0,l.p_)(u.L.isIPosition(n)),(0,l.p_)("string"==typeof s);const a=e.get(f.S),c=e.get(m.p),h=e.get(C.p),g=await a.createModelReference(i);try{return T(c,h,g.object.textEditorModel,u.L.lift(n),s,r,o.T.None)}finally{g.dispose()}}))},61097:(e,t,i)=>{"use strict";var n=i(9488),o=i(71050),s=i(17301),r=i(22258),a=i(5976),l=i(16830),d=i(11640),c=i(44906),h=i(24314),u=i(29102),g=i(85215),p=i(71922),m=i(58823),f=i(35120),v=i(63580),_=i(38832),b=i(94565),w=i(93983),y=i(72065),C=i(90535),S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},x=function(e,t){return function(i,n){t(i,n,e)}};let k=class{constructor(e,t,i,n){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._accessibilitySignalService=n,this._disposables=new a.SL,this._sessionDisposables=new a.SL,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((e=>{e.hasChanged(56)&&this._update()}))),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new c.q;for(const e of t.autoFormatTriggerCharacters)i.add(e.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType((e=>{const t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),s=new o.A,r=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return s.cancel(),void r.dispose();for(let t=0,n=e.changes.length;t{s.token.isCancellationRequested||(0,n.Of)(e)&&(this._accessibilitySignalService.playSignal(_.iP.format,{userGesture:!1}),f.V.execute(this._editor,e,!0))})).finally((()=>{r.dispose()}))}};k.ID="editor.contrib.autoFormat",k=S([x(1,p.p),x(2,g.p),x(3,_.IV)],k);let L=class{constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new a.SL,this._callOnModel=new a.SL,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(55)&&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(m.x$,this.editor,e,2,C.Ex.None,o.T.None,!1).catch(s.dL))}};L.ID="editor.contrib.formatOnPaste",L=S([x(1,p.p),x(2,y.TG)],L);class N extends l.R6{constructor(){super({id:"editor.action.formatDocument",label:v.NC("formatDocument.label","Format Document"),alias:"Format Document",precondition:w.Ao.and(u.u.notInCompositeEditor,u.u.writable,u.u.hasDocumentFormattingProvider),kbOpts:{kbExpr:u.u.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(y.TG),n=e.get(C.ek);await n.showWhile(i.invokeFunction(m.Qq,t,1,C.Ex.None,o.T.None,!0),250)}}}class D extends l.R6{constructor(){super({id:"editor.action.formatSelection",label:v.NC("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:w.Ao.and(u.u.writable,u.u.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:u.u.editorTextFocus,primary:(0,r.gx)(2089,2084),weight:100},contextMenuOpts:{when:u.u.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,t){if(!t.hasModel())return;const i=e.get(y.TG),n=t.getModel(),s=t.getSelections().map((e=>e.isEmpty()?new h.e(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),r=e.get(C.ek);await r.showWhile(i.invokeFunction(m.x$,t,s,1,C.Ex.None,o.T.None,!0),250)}}(0,l._K)(k.ID,k,2),(0,l._K)(L.ID,L,2),(0,l.Qr)(N),(0,l.Qr)(D),b.P.registerCommand("editor.action.format",(async e=>{const t=e.get(d.$).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(b.H);t.getSelection().isEmpty()?await i.executeCommand("editor.action.formatDocument"):await i.executeCommand("editor.action.formatSelection")}))},35120:(e,t,i)=>{"use strict";i.d(t,{V:()=>r});var n=i(69386),o=i(24314),s=i(43407);class r{static _handleEolEdits(e,t){let i;const n=[];for(const e of t)"number"==typeof e.eol&&(i=e.eol),e.range&&"string"==typeof e.text&&n.push(e);return"number"==typeof i&&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 a=s.Z.capture(e),l=r._handleEolEdits(e,t);1===l.length&&r._isFullModelReplaceEdit(e,l[0])?e.executeEdits("formatEditsCommand",l.map((e=>n.h.replace(o.e.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",l.map((e=>n.h.replaceMove(o.e.lift(e.range),e.text)))),i&&e.pushUndoStop(),a.restoreRelativeVerticalPositionOfCursor(e)}}},40832:(e,t,i)=>{"use strict";i.d(t,{c:()=>we,v:()=>Ce});var n=i(73046),o=i(5976),s=i(16830),r=i(11640),a=i(50187),l=i(24314),d=i(29102),c=i(9488),h=i(4669),u=i(91741),g=i(97295),p=i(70666),m=i(65026),f=i(72065),v=i(98674),_=i(33108),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};class y{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let C=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new h.Q5,this.onDidChange=this._onDidChange.event,this._dispoables=new o.SL,this._markers=[],this._nextIdx=-1,p.o.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(e,t)=>{let i=(0,g.qu)(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?l.e.compareRangesUsingStarts(e,t)||v.ZL.compare(e.severity,t.severity):v.ZL.compare(e.severity,t.severity)||l.e.compareRangesUsingStarts(e,t)),i},r=()=>{this._markers=this._markerService.read({resource:p.o.isUri(e)?e:void 0,severities:v.ZL.Error|v.ZL.Warning|v.ZL.Info}),"function"==typeof e&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(s)};r(),this._dispoables.add(t.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(r(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new y(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,o=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));o<0&&(o=(0,c.ry)(this._markers,{resource:e.uri},((e,t)=>(0,g.qu)(e.resource.toString(),t.resource.toString()))),o<0&&(o=~o));for(let i=o;it.resource.toString()===e.toString()));if(!(i<0))for(;i{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new I.NB(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{r.style.left=`-${e.scrollLeft}px`,r.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){(0,o.B9)(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:o}=e;let s=((null==t?void 0:t.length)||0)+2;o&&(s+="string"==typeof o?o.length:o.value.length);const r=(0,g.uq)(i);this._lines=r.length,this._longestLineLength=0;for(const e of r)this._longestLineLength=Math.max(e.length+s,this._longestLineLength);E.PO(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const e of r)a=document.createElement("div"),a.innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||o){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(o)if("string"==typeof o){const t=document.createElement("span");t.innerText=`(${o})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=E.$("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(o.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},E.R3(this._codeLink,E.$("span")).innerText=o.value,e.appendChild(this._codeLink)}if(E.PO(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,c.Of)(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(67))}px`,this._lines+=1;for(const t of n){const i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);const o=document.createElement("span");o.innerText=t.message,i.appendChild(n),i.appendChild(o),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(50),d=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),h=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:h})}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 v.ZL.Error:t=k.NC("Error","Error");break;case v.ZL.Warning:t=k.NC("Warning","Warning");break;case v.ZL.Info:t=k.NC("Info","Info");break;case v.ZL.Hint:t=k.NC("Hint","Hint")}let i=k.NC("marker aria","{0} at {1}. ",t,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 ae=ie=class extends $.vk{constructor(e,t,i,n,s,r,a){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=a,this._callOnDispose=new o.SL,this._onDidSelectRelatedInformation=new h.Q5,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=v.ZL.Warning,this._backgroundColor=T.Il.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(ve);let t=he,i=ue;this._severity===v.ZL.Warning?(t=ge,i=pe):this._severity===v.ZL.Info&&(t=me,i=fe);const n=e.getColor(t),o=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:o,primaryHeadingColor:e.getColor($.IH),secondaryHeadingColor:e.getColor($.R7)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun((e=>this.editor.focus())));const t=[],i=this._menuService.createMenu(ie.TitleMenu,this._contextKeyService);(0,G.vr)(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=E.R3(e,E.$(""))}_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 re(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),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=l.e.lift(e),o=this.editor.getPosition(),s=o&&n.containsPosition(o)?o:n.getStartPosition();super.show(s,this.computeRequiredHeight());const r=this.editor.getModel();if(r){const e=i>1?k.NC("problems","{0} of {1} problems",t,i):k.NC("change","{0} of {1} problem",t,i);this.setTitle((0,M.EZ)(r.uri),e)}this._icon.className=`codicon ${X.className(v.ZL.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,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()}};ae.TitleMenu=new L.eH("gotoErrorTitleMenu"),ae=ie=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([se(1,oe.XE),se(2,Q.v),se(3,L.co),se(4,f.TG),se(5,N.i6),se(6,Z.e)],ae);const le=(0,ne.kwl)(ne.lXJ,ne.b6y),de=(0,ne.kwl)(ne.uoC,ne.pW3),ce=(0,ne.kwl)(ne.c63,ne.T83),he=(0,ne.P6G)("editorMarkerNavigationError.background",{dark:le,light:le,hcDark:ne.lRK,hcLight:ne.lRK},k.NC("editorMarkerNavigationError","Editor marker navigation widget error color.")),ue=(0,ne.P6G)("editorMarkerNavigationError.headerBackground",{dark:(0,ne.ZnX)(he,.1),light:(0,ne.ZnX)(he,.1),hcDark:null,hcLight:null},k.NC("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),ge=(0,ne.P6G)("editorMarkerNavigationWarning.background",{dark:de,light:de,hcDark:ne.lRK,hcLight:ne.lRK},k.NC("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),pe=(0,ne.P6G)("editorMarkerNavigationWarning.headerBackground",{dark:(0,ne.ZnX)(ge,.1),light:(0,ne.ZnX)(ge,.1),hcDark:"#0C141F",hcLight:(0,ne.ZnX)(ge,.2)},k.NC("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),me=(0,ne.P6G)("editorMarkerNavigationInfo.background",{dark:ce,light:ce,hcDark:ne.lRK,hcLight:ne.lRK},k.NC("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),fe=(0,ne.P6G)("editorMarkerNavigationInfo.headerBackground",{dark:(0,ne.ZnX)(me,.1),light:(0,ne.ZnX)(me,.1),hcDark:null,hcLight:null},k.NC("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),ve=(0,ne.P6G)("editorMarkerNavigation.background",{dark:ne.cvW,light:ne.cvW,hcDark:ne.cvW,hcLight:ne.cvW},k.NC("editorMarkerNavigationBackground","Editor marker navigation widget background."));var _e,be=function(e,t){return function(i,n){t(i,n,e)}};let we=_e=class{static get(e){return e.getContribution(_e.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new o.SL,this._editor=e,this._widgetVisible=xe.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(ae,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((e=>{var t,i,n;(null===(t=this._model)||void 0===t?void 0:t.selected)&&l.e.containsPosition(null===(i=this._model)||void 0===i?void 0:i.selected.marker,e.position)||null===(n=this._model)||void 0===n||n.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:l.e.lift(e).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()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new a.L(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}async nagivate(e,t){var i,n;if(this._editor.hasModel()){const o=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(o.move(e,this._editor.getModel(),this._editor.getPosition()),!o.selected)return;if(o.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const s=await this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);s&&(null===(i=_e.get(s))||void 0===i||i.close(),null===(n=_e.get(s))||void 0===n||n.nagivate(e,t))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}}};we.ID="editor.contrib.markerController",we=_e=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([be(1,S),be(2,N.i6),be(3,r.$),be(4,f.TG)],we);class ye extends s.R6{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){var i;t.hasModel()&&(null===(i=we.get(t))||void 0===i||i.nagivate(this._next,this._multiFile))}}class Ce extends ye{constructor(){super(!0,!1,{id:Ce.ID,label:Ce.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:578,weight:100},menuOpts:{menuId:ae.TitleMenu,title:Ce.LABEL,icon:(0,D.q5)("marker-navigation-next",n.l.arrowDown,k.NC("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}Ce.ID="editor.action.marker.next",Ce.LABEL=k.NC("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class Se extends ye{constructor(){super(!1,!1,{id:Se.ID,label:Se.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:1602,weight:100},menuOpts:{menuId:ae.TitleMenu,title:Se.LABEL,icon:(0,D.q5)("marker-navigation-previous",n.l.arrowUp,k.NC("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}Se.ID="editor.action.marker.prev",Se.LABEL=k.NC("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)"),(0,s._K)(we.ID,we,4),(0,s.Qr)(Ce),(0,s.Qr)(Se),(0,s.Qr)(class extends ye{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:k.NC("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:66,weight:100},menuOpts:{menuId:L.eH.MenubarGoMenu,title:k.NC({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}),(0,s.Qr)(class extends ye{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:k.NC("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:1090,weight:100},menuOpts:{menuId:L.eH.MenubarGoMenu,title:k.NC({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const xe=new N.uy("markersNavigationVisible",!1),ke=s._l.bindToContribution(we.get);(0,s.fK)(new ke({id:"closeMarkersNavigation",precondition:xe,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:d.u.focus,primary:9,secondary:[1033]}}))},60628:(e,t,i)=>{"use strict";i.d(t,{BT:()=>ee,Bj:()=>X,_k:()=>J});var n=i(56346),o=i(15393),s=i(22258),r=i(98401),a=i(70666),l=i(16467),d=i(65520),c=i(16830),h=i(11640),u=i(84527),g=i(50187),p=i(24314),m=i(29102),f=i(96887),v=i(88802),_=i(1293),b=i(4669),w=i(5976),y=i(95935),C=i(63580),S=i(93983),x=i(65026),k=i(72065),L=i(91847),N=i(49989),D=i(59422),E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},I=function(e,t){return function(i,n){t(i,n,e)}};const T=new S.uy("hasSymbols",!1,(0,C.NC)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),M=(0,k.yh)("ISymbolNavigationService");let R=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=T.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new A(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),o=i.getPosition();if(!n||!o)return;let s=!1,r=!1;for(const e of t.references)if((0,y.Xy)(e.uri,n.uri))s=!0,r=r||p.e.containsPosition(e.range,o);else if(s)break;s&&r||this.reset()}));this._currentState=(0,w.F8)(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:p.e.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?(0,C.NC)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):(0,C.NC)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};R=E([I(0,S.i6),I(1,h.$),I(2,D.lT),I(3,L.d)],R),(0,x.z)(M,R,1),(0,c.fK)(new class extends c._l{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:T,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(M).revealNext(t)}}),N.W.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:T,primary:9,handler(e){e.get(M).reset()}});let A=class{constructor(e){this._listener=new Map,this._disposables=new w.SL,this._onDidChange=new b.Q5,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(),(0,w.B9)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,(0,w.F8)(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};A=E([I(0,h.$)],A);var P,O,F,B,W,H,V,z,j=i(39310),U=i(81774),q=i(84144),K=i(94565),$=i(90535),G=i(40184),Z=i(71922),Q=i(53725),Y=i(39282);q.BH.appendMenuItem(q.eH.EditorContext,{submenu:q.eH.EditorContextPeek,title:C.NC("peek.submenu","Peek"),group:"navigation",order:100});class J{static is(e){return!(!e||"object"!=typeof e)&&(e instanceof J||!(!g.L.isIPosition(e.position)||!e.model))}constructor(e,t){this.model=e,this.position=t}}class X extends c.x1{static all(){return X._allSymbolNavigationCommands.values()}static _patchConfig(e){const t={...e,f1:!0};if(t.menu)for(const i of Q.$.wrap(t.menu))i.id!==q.eH.EditorContext&&i.id!==q.eH.EditorContextPeek||(i.when=S.Ao.and(e.precondition,i.when));return t}constructor(e,t){super(X._patchConfig(t)),this.configuration=e,X._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,s){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(D.lT),a=e.get(h.$),d=e.get($.ek),c=e.get(M),u=e.get(Z.p),g=e.get(k.TG),p=t.getModel(),m=t.getPosition(),f=J.is(i)?i:new J(p,m),v=new l.Dl(t,5),_=(0,o.eP)(this._getLocationModel(u,f.model,f.position,v.token),v.token).then((async e=>{var o;if(!e||v.token.isCancellationRequested)return;let r;if((0,n.Z9)(e.ariaMessage),e.referenceAt(p.uri,m)){const e=this._getAlternativeCommand(t);!X._activeAlternativeCommands.has(e)&&X._allSymbolNavigationCommands.has(e)&&(r=X._allSymbolNavigationCommands.get(e))}const l=e.references.length;if(0===l){if(!this.configuration.muteMessage){const e=p.getWordAtPosition(m);null===(o=j.O.get(t))||void 0===o||o.showMessage(this._getNoResultFoundMessage(e),m)}}else{if(1!==l||!r)return this._onResult(a,c,t,e,s);X._activeAlternativeCommands.add(this.desc.id),g.invokeFunction((e=>r.runEditorCommand(e,t,i,s).finally((()=>{X._activeAlternativeCommands.delete(this.desc.id)}))))}}),(e=>{r.error(e)})).finally((()=>{v.dispose()}));return d.showWhile(_,250),_}async _onResult(e,t,i,n,o){const s=this._getGoToPreference(i);if(i instanceof u.H||!(this.configuration.openInPeek||"peek"===s&&n.references.length>1)){const r=n.firstReference(),a=n.references.length>1&&"gotoAndPeek"===s,l=await this._openReference(i,e,r,this.configuration.openToSide,!a);a&&l?this._openInPeek(l,n,o):n.dispose(),"goto"===s&&t.put(r)}else this._openInPeek(i,n,o)}async _openReference(e,t,i,n,o){let s;if((0,f.vx)(i)&&(s=i.targetSelectionRange),s||(s=i.range),!s)return;const r=await t.openCodeEditor({resource:i.uri,options:{selection:p.e.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(r){if(o){const e=r.getModel(),t=r.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{r.getModel()===e&&t.clear()}),350)}return r}}_openInPeek(e,t,i){const n=v.J.get(e);n&&e.hasModel()?n.toggleWidget(null!=i?i:e.getSelection(),(0,o.PG)((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}X._allSymbolNavigationCommands=new Map,X._activeAlternativeCommands=new Set;class ee extends X{async _getLocationModel(e,t,i,n){return new _.oQ(await(0,G.nD)(e.definitionProvider,t,i,n),C.NC("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?C.NC("noResultWord","No definition found for '{0}'",e.word):C.NC("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}(0,q.r1)(((P=class extends ee{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:P.id,title:{...C.vv("actions.goToDecl.label","Go to Definition"),mnemonicTitle:C.NC({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:m.u.hasDefinitionProvider,keybinding:[{when:m.u.editorTextFocus,primary:70,weight:100},{when:S.Ao.and(m.u.editorTextFocus,Y.Pf),primary:2118,weight:100}],menu:[{id:q.eH.EditorContext,group:"navigation",order:1.1},{id:q.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),K.P.registerCommandAlias("editor.action.goToDeclaration",P.id)}}).id="editor.action.revealDefinition",P)),(0,q.r1)(((O=class extends ee{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:O.id,title:C.vv("actions.goToDeclToSide.label","Open Definition to the Side"),precondition:S.Ao.and(m.u.hasDefinitionProvider,m.u.isInEmbeddedEditor.toNegated()),keybinding:[{when:m.u.editorTextFocus,primary:(0,s.gx)(2089,70),weight:100},{when:S.Ao.and(m.u.editorTextFocus,Y.Pf),primary:(0,s.gx)(2089,2118),weight:100}]}),K.P.registerCommandAlias("editor.action.openDeclarationToTheSide",O.id)}}).id="editor.action.revealDefinitionAside",O)),(0,q.r1)(((F=class extends ee{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:F.id,title:C.vv("actions.previewDecl.label","Peek Definition"),precondition:S.Ao.and(m.u.hasDefinitionProvider,U.Jy.notInPeekEditor,m.u.isInEmbeddedEditor.toNegated()),keybinding:{when:m.u.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:q.eH.EditorContextPeek,group:"peek",order:2}}),K.P.registerCommandAlias("editor.action.previewDeclaration",F.id)}}).id="editor.action.peekDefinition",F));class te extends X{async _getLocationModel(e,t,i,n){return new _.oQ(await(0,G.zq)(e.declarationProvider,t,i,n),C.NC("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?C.NC("decl.noResultWord","No declaration found for '{0}'",e.word):C.NC("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}(0,q.r1)(((B=class extends te{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:B.id,title:{...C.vv("actions.goToDeclaration.label","Go to Declaration"),mnemonicTitle:C.NC({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:S.Ao.and(m.u.hasDeclarationProvider,m.u.isInEmbeddedEditor.toNegated()),menu:[{id:q.eH.EditorContext,group:"navigation",order:1.3},{id:q.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?C.NC("decl.noResultWord","No declaration found for '{0}'",e.word):C.NC("decl.generic.noResults","No declaration found")}}).id="editor.action.revealDeclaration",B)),(0,q.r1)(class extends te{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:C.vv("actions.peekDecl.label","Peek Declaration"),precondition:S.Ao.and(m.u.hasDeclarationProvider,U.Jy.notInPeekEditor,m.u.isInEmbeddedEditor.toNegated()),menu:{id:q.eH.EditorContextPeek,group:"peek",order:3}})}});class ie extends X{async _getLocationModel(e,t,i,n){return new _.oQ(await(0,G.L3)(e.typeDefinitionProvider,t,i,n),C.NC("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?C.NC("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):C.NC("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}(0,q.r1)(((W=class extends ie{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:W.ID,title:{...C.vv("actions.goToTypeDefinition.label","Go to Type Definition"),mnemonicTitle:C.NC({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:m.u.hasTypeDefinitionProvider,keybinding:{when:m.u.editorTextFocus,primary:0,weight:100},menu:[{id:q.eH.EditorContext,group:"navigation",order:1.4},{id:q.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}}).ID="editor.action.goToTypeDefinition",W)),(0,q.r1)(((H=class extends ie{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:H.ID,title:C.vv("actions.peekTypeDefinition.label","Peek Type Definition"),precondition:S.Ao.and(m.u.hasTypeDefinitionProvider,U.Jy.notInPeekEditor,m.u.isInEmbeddedEditor.toNegated()),menu:{id:q.eH.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",H));class ne extends X{async _getLocationModel(e,t,i,n){return new _.oQ(await(0,G.f4)(e.implementationProvider,t,i,n),C.NC("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?C.NC("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):C.NC("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}(0,q.r1)(((V=class extends ne{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:V.ID,title:{...C.vv("actions.goToImplementation.label","Go to Implementations"),mnemonicTitle:C.NC({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:m.u.hasImplementationProvider,keybinding:{when:m.u.editorTextFocus,primary:2118,weight:100},menu:[{id:q.eH.EditorContext,group:"navigation",order:1.45},{id:q.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}}).ID="editor.action.goToImplementation",V)),(0,q.r1)(((z=class extends ne{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:z.ID,title:C.vv("actions.peekImplementation.label","Peek Implementations"),precondition:S.Ao.and(m.u.hasImplementationProvider,U.Jy.notInPeekEditor,m.u.isInEmbeddedEditor.toNegated()),keybinding:{when:m.u.editorTextFocus,primary:3142,weight:100},menu:{id:q.eH.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",z));class oe extends X{_getNoResultFoundMessage(e){return e?C.NC("references.no","No references found for '{0}'",e.word):C.NC("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}(0,q.r1)(class extends oe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...C.vv("goToReferences.label","Go to References"),mnemonicTitle:C.NC({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:S.Ao.and(m.u.hasReferenceProvider,U.Jy.notInPeekEditor,m.u.isInEmbeddedEditor.toNegated()),keybinding:{when:m.u.editorTextFocus,primary:1094,weight:100},menu:[{id:q.eH.EditorContext,group:"navigation",order:1.45},{id:q.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,i,n){return new _.oQ(await(0,G.aA)(e.referenceProvider,t,i,!0,n),C.NC("ref.title","References"))}}),(0,q.r1)(class extends oe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:C.vv("references.action.label","Peek References"),precondition:S.Ao.and(m.u.hasReferenceProvider,U.Jy.notInPeekEditor,m.u.isInEmbeddedEditor.toNegated()),menu:{id:q.eH.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,i,n){return new _.oQ(await(0,G.aA)(e.referenceProvider,t,i,!1,n),C.NC("ref.title","References"))}});class se extends X{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:C.vv("label.generic","Go to Any Symbol"),precondition:S.Ao.and(U.Jy.notInPeekEditor,m.u.isInEmbeddedEditor.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}async _getLocationModel(e,t,i,n){return new _.oQ(this._references,C.NC("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&C.NC("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}K.P.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.o},{name:"position",description:"The position at which to start",constraint:g.L.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(e,t,i,n,o,s,l)=>{(0,r.p_)(a.o.isUri(t)),(0,r.p_)(g.L.isIPosition(i)),(0,r.p_)(Array.isArray(n)),(0,r.p_)(void 0===o||"string"==typeof o),(0,r.p_)(void 0===l||"boolean"==typeof l);const c=e.get(h.$),u=await c.openCodeEditor({resource:t},c.getFocusedCodeEditor());if((0,d.CL)(u))return u.setPosition(i),u.revealPositionInCenterIfOutsideViewport(i,0),u.invokeWithinContext((e=>{const t=new class extends se{_getNoResultFoundMessage(e){return s||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(s),openInPeek:Boolean(l),openToSide:!1},n,o);e.get(k.TG).invokeFunction(t.run.bind(t),u)}))}}),K.P.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.o},{name:"position",description:"The position at which to start",constraint:g.L.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(e,t,i,n,o)=>{e.get(K.H).executeCommand("editor.action.goToLocations",t,i,n,o,void 0,!0)}}),K.P.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{(0,r.p_)(a.o.isUri(t)),(0,r.p_)(g.L.isIPosition(i));const n=e.get(Z.p),s=e.get(h.$);return s.openCodeEditor({resource:t},s.getFocusedCodeEditor()).then((e=>{if(!(0,d.CL)(e)||!e.hasModel())return;const t=v.J.get(e);if(!t)return;const s=(0,o.PG)((t=>(0,G.aA)(n.referenceProvider,e.getModel(),g.L.lift(i),!1,t).then((e=>new _.oQ(e,C.NC("ref.title","References")))))),r=new p.e(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(r,s,!1))}))}}),K.P.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")},40184:(e,t,i)=>{"use strict";i.d(t,{L3:()=>g,aA:()=>p,f4:()=>u,nD:()=>c,zq:()=>h});var n=i(9488),o=i(71050),s=i(17301),r=i(16830),a=i(71922),l=i(1293);async function d(e,t,i,o){const r=i.ordered(e).map((i=>Promise.resolve(o(i,e,t)).then(void 0,(e=>{(0,s.Cp)(e)})))),a=await Promise.all(r);return(0,n.kX)(a.flat())}function c(e,t,i,n){return d(t,i,e,((e,t,i)=>e.provideDefinition(t,i,n)))}function h(e,t,i,n){return d(t,i,e,((e,t,i)=>e.provideDeclaration(t,i,n)))}function u(e,t,i,n){return d(t,i,e,((e,t,i)=>e.provideImplementation(t,i,n)))}function g(e,t,i,n){return d(t,i,e,((e,t,i)=>e.provideTypeDefinition(t,i,n)))}function p(e,t,i,n,o){return d(t,i,e,(async(e,t,i)=>{const s=await e.provideReferences(t,i,{includeDeclaration:!0},o);if(!n||!s||2!==s.length)return s;const r=await e.provideReferences(t,i,{includeDeclaration:!1},o);return r&&1===r.length?r:s}))}async function m(e){const t=await e(),i=new l.oQ(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}(0,r.sb)("_executeDefinitionProvider",((e,t,i)=>{const n=c(e.get(a.p).definitionProvider,t,i,o.T.None);return m((()=>n))})),(0,r.sb)("_executeTypeDefinitionProvider",((e,t,i)=>{const n=g(e.get(a.p).typeDefinitionProvider,t,i,o.T.None);return m((()=>n))})),(0,r.sb)("_executeDeclarationProvider",((e,t,i)=>{const n=h(e.get(a.p).declarationProvider,t,i,o.T.None);return m((()=>n))})),(0,r.sb)("_executeReferenceProvider",((e,t,i)=>{const n=p(e.get(a.p).referenceProvider,t,i,!1,o.T.None);return m((()=>n))})),(0,r.sb)("_executeImplementationProvider",((e,t,i)=>{const n=u(e.get(a.p).implementationProvider,t,i,o.T.None);return m((()=>n))}))},82005:(e,t,i)=>{"use strict";i.d(t,{yN:()=>h});var n=i(4669),o=i(5976),s=i(1432);function r(e,t){return!!e[t]}class a{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=r(e.event,t.triggerModifier),this.hasSideBySideModifier=r(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class l{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=r(e,t.triggerModifier)}}class d{constructor(e,t,i,n){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}}function c(e){return"altKey"===e?s.dz?new d(57,"metaKey",6,"altKey"):new d(5,"ctrlKey",6,"altKey"):s.dz?new d(6,"altKey",57,"metaKey"):new d(6,"altKey",5,"ctrlKey")}class h extends o.JT{constructor(e,t){var i;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new n.Q5),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new n.Q5),this.onExecute=this._onExecute.event,this._onCancel=this._register(new n.Q5),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=null!==(i=null==t?void 0:t.extractLineNumberFromMouseEvent)&&void 0!==i?i:e=>e.target.position?e.target.position.lineNumber:0,this._opts=c(this._editor.getOption(78)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(78)){const e=c(this._editor.getOption(78));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new a(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new a(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new a(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new l(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new l(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.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._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&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()}}},53385:(e,t,i)=>{"use strict";i.d(t,{S:()=>O});var n=i(15393),o=i(17301),s=i(59365),r=i(5976),a=i(93379),l=i.n(a),d=i(7795),c=i.n(d),h=i(90569),u=i.n(h),g=i(3565),p=i.n(g),m=i(19216),f=i.n(m),v=i(44589),_=i.n(v),b=i(33257),w={};w.styleTagTransform=_(),w.setAttributes=p(),w.insert=u().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=f(),l()(b.Z,w),b.Z&&b.Z.locals&&b.Z.locals;var y,C=i(16467),S=i(16830),x=i(24314),k=i(72042),L=i(88216),N=i(82005),D=i(81774),E=i(63580),I=i(93983),T=i(60628),M=i(40184),R=i(71922),A=i(13961),P=function(e,t){return function(i,n){t(i,n,e)}};let O=y=class{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new r.SL,this.toUnhookForKeyboard=new r.SL,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new N.yN(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,null!=t?t:void 0)}))),this.toUnhook.add(s.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).catch((e=>{(0,o.dL)(e)})).finally((()=>{this.removeLinkDecorations()}))}))),this.toUnhook.add(s.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(e){return e.getContribution(y.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((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,void this.removeLinkDecorations();if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const r=new C.yy(this.editor,15);let a;this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,n.PG)((t=>this.findDefinition(e,t)));try{a=await this.previousPromise}catch(e){return void(0,o.dL)(e)}if(!a||!a.length||!r.validate(this.editor))return void this.removeLinkDecorations();const l=a[0].originSelectionRange?x.e.lift(a[0].originSelectionRange):new x.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(a.length>1){let e=l;for(const{originSelectionRange:t}of a)t&&(e=x.e.plusRange(e,t));this.addDecoration(e,(new s.W5).appendText(E.NC("multipleResults","Click to show {0} definitions.",a.length)))}else{const e=a[0];if(!e.uri)return;this.textModelResolverService.createModelReference(e.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:i}}=t,{startLineNumber:n}=e.range;if(n<1||n>i.getLineCount())return void t.dispose();const o=this.getPreviewValue(i,n,e),r=this.languageService.guessLanguageIdByFilepathOrFirstLine(i.uri);this.addDecoration(l,o?(new s.W5).appendCodeblock(r||"",o):void 0),t.dispose()}))}}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=y.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;o{const i=!t&&this.editor.getOption(88)&&!this.isInPeekEditor(e);return new T.BT({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e)}))}isInPeekEditor(e){const t=e.get(I.i6);return D.Jy.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};O.ID="editor.contrib.gotodefinitionatposition",O.MAX_SOURCE_PREVIEW_LINES=8,O=y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([P(1,L.S),P(2,k.O),P(3,R.p)],O),(0,S._K)(O.ID,O,2)},88802:(e,t,i)=>{"use strict";i.d(t,{J:()=>xe});var n=i(15393),o=i(17301),s=i(22258),r=i(5976),a=i(11640),l=i(50187),d=i(24314),c=i(81774),h=i(63580),u=i(94565),g=i(33108),p=i(93983),m=i(72065),f=i(49989),v=i(95191),_=i(59422),b=i(26904),w=i(1293),y=i(65321),C=i(89782),S=i(41264),x=i(4669),k=i(66663),L=i(95935),N=i(93379),D=i.n(N),E=i(7795),I=i.n(E),T=i(90569),M=i.n(T),R=i(3565),A=i.n(R),P=i(19216),O=i.n(P),F=i(44589),B=i.n(F),W=i(60879),H={};H.styleTagTransform=B(),H.setAttributes=A(),H.insert=M().bind(null,"head"),H.domAPI=I(),H.insertStyleElement=O(),D()(W.Z,H),W.Z&&W.Z.locals&&W.Z.locals;var V,z=i(84527),j=i(13961),U=i(51381),q=i(68801),K=i(72042),$=i(88216),G=i(89162),Z=i(34650),Q=i(32107),Y=i(13707),J=i(91847),X=i(44349),ee=i(86253),te=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ie=function(e,t){return function(i,n){t(i,n,e)}};let ne=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof w.oQ||e instanceof w.F2}getChildren(e){if(e instanceof w.oQ)return e.groups;if(e instanceof w.F2)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};ne=te([ie(0,$.S)],ne);class oe{getHeight(){return 23}getTemplateId(e){return e instanceof w.F2?le.id:ce.id}}let se=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof w.WX){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return(0,L.EZ)(e.uri)}};se=te([ie(0,J.d)],se);class re{getId(e){return e instanceof w.WX?e.id:e.uri}}let ae=class extends r.JT{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new Q.g(i,{supportHighlights:!0})),this.badge=new G.Z(y.R3(i,y.$(".count")),{},ee.ku),e.appendChild(i)}set(e,t){const i=(0,L.XX)(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((0,h.NC)("referencesCount","{0} references",n)):this.badge.setTitleFormat((0,h.NC)("referenceCount","{0} reference",n))}};ae=te([ie(1,X.e)],ae);let le=V=class{constructor(e){this._instantiationService=e,this.templateId=V.id}renderTemplate(e){return this._instantiationService.createInstance(ae,e)}renderElement(e,t,i){i.set(e.element,(0,Y.mB)(e.filterData))}disposeTemplate(e){e.dispose()}};le.id="FileReferencesRenderer",le=V=te([ie(0,m.TG)],le);class de{constructor(e){this.label=new Z.q(e)}set(e,t){var i;const n=null===(i=e.parent.getPreview(e))||void 0===i?void 0:i.preview(e.range);if(n&&n.value){const{value:e,highlight:i}=n;t&&!Y.CL.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,(0,Y.mB)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${(0,L.EZ)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class ce{constructor(){this.templateId=ce.id}renderTemplate(e){return new de(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}ce.id="OneReferenceRenderer";class he{getWidgetAriaLabel(){return(0,h.NC)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var ue=i(97781),ge=i(64862),pe=function(e,t){return function(i,n){t(i,n,e)}};class me{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new r.SL,this._callOnModelChange=new r.SL,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())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,o=e.children.length;n{const o=n.deltaDecorations([],t);for(let t=0;t{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(ve,"ReferencesWidget",this._treeContainer,new oe,[this._instantiationService.createInstance(le),this._instantiationService.createInstance(ce)],this._instantiationService.createInstance(ne),t),this._splitView.addView({onDidChange:x.ju.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},C.M.Distribute),this._splitView.addView({onDidChange:x.ju.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},C.M.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));const i=(e,t)=>{e instanceof w.WX&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen((e=>{e.sideBySide?i(e.element,"side"):e.editorOptions.pinned?i(e.element,"goto"):i(e.element,"show")})),y.Cp(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new y.Ro(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=h.NC("noResults","No results"),y.$Z(this._messageContainer),Promise.resolve(void 0)):(y.Cp(this._messageContainer),this._decorationsManager=new me(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(2!==t.detail)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"),y.$Z(this._treeContainer),y.$Z(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof w.WX?e:e instanceof w.F2&&e.children.length>0?e.children[0]:void 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!==k.lg.inMemory?this.setTitle((0,L.Hx)(e.uri),this._uriLabel.getUriLabel((0,L.XX)(e.uri))):this.setTitle(h.NC("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent)),this._tree.reveal(e);const n=await i;if(!this._model)return void n.dispose();(0,r.B9)(this._previewModelReference);const o=n.object;if(o){const t=this._preview.getModel()===o.textEditorModel?0:1,i=d.e.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(o.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}};_e=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([pe(3,ue.XE),pe(4,$.S),pe(5,m.TG),pe(6,c.Fw),pe(7,X.e),pe(8,ge.tJ),pe(9,J.d),pe(10,K.O),pe(11,U.c_)],_e);var be,we=i(29102),ye=i(39282),Ce=function(e,t){return function(i,n){t(i,n,e)}};const Se=new p.uy("referenceSearchVisible",!1,h.NC("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let xe=be=class{static get(e){return e.getContribution(be.ID)}constructor(e,t,i,n,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new r.SL,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Se.bindTo(i)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.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 o="peekViewLayout",s=fe.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(_e,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(h.NC("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget&&(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{const{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t,!0):this.openReference(t,!1,!0)}})));const r=++this._requestIdPool;t.then((t=>{var i;if(r===this._requestIdPool&&this._widget)return null===(i=this._model)||void 0===i||i.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(h.NC("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const t=this._editor.getModel().uri,i=new l.L(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(87)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}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),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();await this._widget.setSelection(n),await this._gotoReference(n,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}async revealReference(e){this._editor.hasModel()&&this._model&&this._widget&&await this._widget.revealReference(e)}closeWidget(e=!0){var t,i;null===(t=this._widget)||void 0===t||t.dispose(),null===(i=this._model)||void 0===i||i.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){var i;null===(i=this._widget)||void 0===i||i.hide(),this._ignoreModelChangeEvent=!0;const s=d.e.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:s,selectionSource:"code.jump",pinned:t}},this._editor).then((e=>{var t;if(this._ignoreModelChangeEvent=!1,e&&this._widget)if(this._editor===e)this._widget.show(s),this._widget.focusOnReferenceTree();else{const i=be.get(e),o=this._model.clone();this.closeWidget(),e.focus(),null==i||i.toggleWidget(s,(0,n.PG)((e=>Promise.resolve(o))),null!==(t=this._peekMode)&&void 0!==t&&t)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,(0,o.dL)(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:o}=e;this._editorService.openCodeEditor({resource:n,options:{selection:o,selectionSource:"code.jump",pinned:i}},this._editor,t)}};function ke(e,t){const i=(0,c.rc)(e);if(!i)return;const n=xe.get(i);n&&t(n)}xe.ID="editor.contrib.referencesController",xe=be=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ce(2,p.i6),Ce(3,a.$),Ce(4,_.lT),Ce(5,m.TG),Ce(6,b.Uy),Ce(7,g.Ui)],xe),f.W.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,s.gx)(2089,60),when:p.Ao.or(Se,c.Jy.inPeekEditor),handler(e){ke(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),f.W.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:p.Ao.or(Se,c.Jy.inPeekEditor),handler(e){ke(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),f.W.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:p.Ao.or(Se,c.Jy.inPeekEditor),handler(e){ke(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),u.P.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),u.P.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),u.P.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),u.P.registerCommand("closeReferenceSearch",(e=>ke(e,(e=>e.closeWidget())))),f.W.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:p.Ao.and(c.Jy.inPeekEditor,p.Ao.not("config.editor.stablePeek"))}),f.W.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:p.Ao.and(Se,p.Ao.not("config.editor.stablePeek"),p.Ao.or(we.u.editorTextFocus,ye.Ul.negate()))}),f.W.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:p.Ao.and(Se,v.CQ,v.PS.negate(),v.uJ.negate()),handler(e){var t;const i=null===(t=e.get(v.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof w.WX&&ke(e,(e=>e.revealReference(i[0])))}}),f.W.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:p.Ao.and(Se,v.CQ,v.PS.negate(),v.uJ.negate()),handler(e){var t;const i=null===(t=e.get(v.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof w.WX&&ke(e,(e=>e.openReference(i[0],!0,!0)))}}),u.P.registerCommand("openReference",(e=>{var t;const i=null===(t=e.get(v.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof w.WX&&ke(e,(e=>e.openReference(i[0],!1,!0)))}))},1293:(e,t,i)=>{"use strict";i.d(t,{F2:()=>p,WX:()=>u,oQ:()=>m});var n=i(17301),o=i(4669),s=i(44742),r=i(5976),a=i(43702),l=i(95935),d=i(97295),c=i(24314),h=i(63580);class u{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=s.a.nextId()}get uri(){return this.link.uri}get range(){var e,t;return null!==(t=null!==(e=this._range)&&void 0!==e?e:this.link.targetSelectionRange)&&void 0!==t?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=null===(e=this.parent.getPreview(this))||void 0===e?void 0:e.preview(this.range);return t?(0,h.NC)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",t.value,(0,l.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn):(0,h.NC)("aria.oneReference","in {0} on line {1} at column {2}",(0,l.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class g{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:o,endLineNumber:s,endColumn:r}=e,a=i.getWordUntilPosition({lineNumber:n,column:o-t}),l=new c.e(n,a.startColumn,n,o),d=new c.e(s,r,s,1073741824),h=i.getValueInRange(l).replace(/^\s+/,""),u=i.getValueInRange(e);return{value:h+u+i.getValueInRange(d).replace(/\s+$/,""),highlight:{start:h.length,end:h.length+u.length}}}}class p{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new a.Y9}dispose(){(0,r.B9)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?(0,h.NC)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,l.EZ)(this.uri),this.uri.fsPath):(0,h.NC)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,l.EZ)(this.uri),this.uri.fsPath)}async resolve(e){if(0!==this._previews.size)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 g(i))}catch(e){(0,n.dL)(e)}return this}}class m{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new o.Q5,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(m._compareReferences);for(const t of e)if(n&&l.SF.isEqual(n.uri,t.uri,!0)||(n=new p(this,t.uri),this.groups.push(n)),0===n.children.length||0!==m._compareReferences(t,n.children[n.children.length-1])){const e=new u(i===t,n,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){(0,r.B9)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new m(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?(0,h.NC)("aria.result.0","No results found"):1===this.references.length?(0,h.NC)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?(0,h.NC)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):(0,h.NC)("aria.result.nm","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 o=i.children.length,s=i.parent.groups.length;return 1===s||t&&n+10?(n=t?(n+1)%o:(n+o-1)%o,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%s,i.parent.groups[n].children[0]):(n=(n+s-1)%s,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:d.Mh(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.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()&&c.e.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 l.SF.compare(e.uri,t.uri)||c.e.compareRangesUsingStarts(e.range,t.range)}}},24251:(e,t,i)=>{"use strict";i.d(t,{hT:()=>N,Hb:()=>T,mR:()=>M});var n=i(65321),o=i(82246),s=i(9488),r=i(5976),a=i(50187),l=i(24314),d=i(13961),c=i(96887),h=i(12457),u=i(66520),g=i(72065),p=i(91847),m=i(15393),f=i(29102),v=i(93983),_=i(17735);class b extends r.JT{constructor(e,t=new n.Ro(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new _.f),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=n.Ro.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize((e=>{this._resize(new n.Ro(e.dimension.width,e.dimension.height)),e.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(){var e;return(null===(e=this._contentPosition)||void 0===e?void 0:e.position)?a.L.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(t&&i)return n.i(t).top+i.top-30}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const o=n.i(t),s=n.D6(t.ownerDocument.body),r=o.top+i.top+i.height;return s.height-r-24}_findPositionPreference(e,t){var i,n;const o=Math.min(null!==(i=this._availableVerticalSpaceBelow(t))&&void 0!==i?i:1/0,e),s=Math.min(null!==(n=this._availableVerticalSpaceAbove(t))&&void 0!==n?n:1/0,e),r=Math.min(Math.max(s,o),e),a=Math.min(e,r);let l;return l=this._editor.getOption(60).above?a<=s?1:2:a<=o?2:1,1===l?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 w,y,C=i(33108),S=i(31106),x=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},k=function(e,t){return function(i,n){t(i,n,e)}};const L=n.$;let N=w=class extends r.JT{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(T,this._editor)),this._participants=[];for(const e of u.Ae.getAll())this._participants.push(this._instantiationService.createInstance(e,this._editor));this._participants.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._computer=new R(this._editor,this._participants),this._hoverOperation=this._register(new h.H(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{if(!this._computer.anchor)return;const t=e.hasLoadingMessage?this._addLoadingMessage(e.value):e.value;this._withResult(new D(this._computer.anchor,t,e.isComplete))}))),this._register(n.mu(this._widget.getDomNode(),"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(c.RW.onDidChange((()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)})))}_startShowingOrUpdateHover(e,t,i,n,o){return this._widget.position&&this._currentResult?this._editor.getOption(60).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?!(!e||!this._currentResult.anchor.equals(e))||(e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(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):!!e&&(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0)}_startHoverOperationIfNecessary(e,t,i,n,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&0===e.messages.length&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}_addLoadingMessage(e){if(this._computer.anchor)for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}return e}_withResult(e){if(this._widget.position&&this._currentResult&&this._currentResult.isComplete){if(!e.isComplete)return;if(this._computer.insistOnKeepingHoverVisible&&0===e.messages.length)return}this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:i,showAtSecondaryPosition:n,highlightRange:o}=w.computeHoverRanges(this._editor,e.range,t),s=new r.SL,a=s.add(new M(this._keybindingService)),l=document.createDocumentFragment();let d=null;const c={fragment:l,statusBar:a,setColorPicker:e=>d=e,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:e=>this._widget.setMinimumDimensions(e),hide:()=>this.hide()};for(const e of this._participants){const i=t.filter((t=>t.owner===e));i.length>0&&s.add(e.renderHoverParts(c,i))}const h=t.some((e=>e.isBeforeContent));if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(o){const e=this._editor.createDecorationsCollection();e.set([{range:o,options:w._DECORATION_OPTIONS}]),s.add((0,r.OF)((()=>{e.clear()})))}this._widget.showAt(l,new I(e.initialMousePosX,e.initialMousePosY,d,i,n,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,h,s))}else s.dispose()}static computeHoverRanges(e,t,i){let n=1;if(e.hasModel()){const i=e._getViewModel(),o=i.coordinatesConverter,s=o.convertModelRangeToViewRange(t),r=new a.L(s.startLineNumber,i.getLineMinColumn(s.startLineNumber));n=o.convertViewPositionToModelPosition(r).column}const o=t.startLineNumber;let s=t.startColumn,r=i[0].range,d=null;for(const e of i)r=l.e.plusRange(r,e.range),e.range.startLineNumber===o&&e.range.endLineNumber===o&&(s=Math.max(Math.min(s,e.range.startColumn),n)),e.forceShowAtRange&&(d=e.range);return{showAtPosition:d?d.getStartPosition():new a.L(o,t.startColumn),showAtSecondaryPosition:d?d.getStartPosition():new a.L(o,s),highlightRange:r}}showsOrWillShow(e){if(this._widget.isResizing)return!0;const t=[];for(const i of this._participants)if(i.suggestHoverAnchor){const n=i.suggestHoverAnchor(e);n&&t.push(n)}const i=e.target;if(6===i.type&&t.push(new u.Qj(0,i.range,e.event.posx,e.event.posy)),7===i.type){const n=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&"number"==typeof i.detail.horizontalDistanceToText&&i.detail.horizontalDistanceToTextt.priority-e.priority)),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new u.Qj(0,e,void 0,void 0),t,i,n,null)}containsNode(e){return!!e&&this._widget.getDomNode().contains(e)}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}get widget(){return this._widget}};N._DECORATION_OPTIONS=d.qx.register({description:"content-hover-highlight",className:"hoverHighlight"}),N=w=x([k(1,g.TG),k(2,p.d)],N);class D{constructor(e,t,i){this.anchor=e,this.messages=t,this.isComplete=i}filter(e){const t=this.messages.filter((t=>t.isValidForHoverAnchor(e)));return t.length===this.messages.length?this:new E(this,this.anchor,t,this.isComplete)}}class E extends D{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}class I{constructor(e,t,i,n,o,s,r,a,l,d){this.initialMousePosX=e,this.initialMousePosY=t,this.colorPicker=i,this.showAtPosition=n,this.showAtSecondaryPosition=o,this.preferAbove=s,this.stoleFocus=r,this.source=a,this.isBeforeContent=l,this.disposables=d,this.closestMouseDistance=void 0}}let T=y=class extends b{get isColorPickerVisible(){var e;return Boolean(null===(e=this._visibleData)||void 0===e?void 0:e.colorPicker)}get isVisibleFromKeyboard(){var e;return 1===(null===(e=this._visibleData)||void 0===e?void 0:e.source)}get isVisible(){var e;return null!==(e=this._hoverVisibleKey.get())&&void 0!==e&&e}get isFocused(){var e;return null!==(e=this._hoverFocusedKey.get())&&void 0!==e&&e}constructor(e,t,i,s,r){const a=e.getOption(67)+8,l=new n.Ro(150,a);super(e,l),this._configurationService=i,this._accessibilityService=s,this._keybindingService=r,this._hover=this._register(new o.c8),this._minimumSize=l,this._hoverVisibleKey=f.u.hoverVisible.bindTo(t),this._hoverFocusedKey=f.u.hoverFocused.bindTo(t),n.R3(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange((()=>{this.isVisible&&this._updateMaxDimensions()}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()})));const d=this._register(n.go(this._resizableNode.domNode));this._register(d.onDidFocus((()=>{this._hoverFocusedKey.set(!0)}))),this._register(d.onDidBlur((()=>{this._hoverFocusedKey.set(!1)}))),this._setHoverData(void 0),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),null===(e=this._visibleData)||void 0===e||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return y.ID}static _applyDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,o="number"==typeof i?`${i}px`:i;e.style.width=n,e.style.height=o}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return y._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return y._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,o="number"==typeof i?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=o}_setHoverWidgetMaxDimensions(e,t){y._applyMaxDimensions(this._hover.contentsDomNode,e,t),y._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth","number"==typeof e?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,i=e.height;this._setHoverWidgetDimensions(t,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,i-10))}_updateResizableNodeMaxDimensions(){var e,t;const i=null!==(e=this._findMaximumRenderingWidth())&&void 0!==e?e:1/0,o=null!==(t=this._findMaximumRenderingHeight())&&void 0!==t?t:1/0;this._resizableNode.maxSize=new n.Ro(i,o),this._setHoverWidgetMaxDimensions(i,o)}_resize(e){var t,i;y._lastDimensions=new n.Ro(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),null===(i=null===(t=this._visibleData)||void 0===t?void 0:t.colorPicker)||void 0===i||i.layout()}_findAvailableSpaceVertically(){var e;const t=null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition;if(t)return 1===this._positionPreference?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=6;return Array.from(this._hover.contentsDomNode.children).forEach((e=>{t+=e.clientHeight})),this._hasHorizontalScrollbar()&&(t+=10),Math.min(e,t)}_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((e=>e.scrollWidth>e.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=void 0===this._contentWidth?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidththis._visibleData.closestMouseDistance+4||(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,o),0))}_setHoverData(e){var t;null===(t=this._visibleData)||void 0===t||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=""+t/e,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_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,y._lastDimensions.height),t=Math.max(.66*this._editor.getLayoutInfo().width,500,y._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[null!==(e=this._positionPreference)&&void 0!==e?e:1]}:null}showAt(e,t){var i,s,r,a;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const l=n.wn(this._hover.containerDomNode),d=t.showAtPosition;this._positionPreference=null!==(i=this._findPositionPreference(l,d))&&void 0!==i?i:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),null===(s=t.colorPicker)||void 0===s||s.layout();const c=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&(0,o.uX)(!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),null!==(a=null===(r=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))||void 0===r?void 0:r.getAriaLabel())&&void 0!==a?a:"");c&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+c)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new n.Ro(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")}_adjustHoverHeightForScrollbar(e){var t;const i=this._hover.containerDomNode,o=this._hover.contentsDomNode,s=null!==(t=this._findMaximumRenderingHeight())&&void 0!==t?t:1/0;this._setContainerDomNodeDimensions(n.w(i),Math.min(s,e)),this._setContentsDomNodeDimensions(n.w(o),Math.min(s,e-10))}setMinimumDimensions(e){this._minimumSize=new n.Ro(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=void 0===this._contentWidth?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new n.Ro(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let i=n.wn(t),o=n.w(t);if(this._resizableNode.layout(i,o),this._setHoverWidgetDimensions(o,i),i=n.wn(t),o=n.w(t),this._contentWidth=o,this._updateMinimumWidth(),this._resizableNode.layout(i,o),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(i)),null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition){const e=n.wn(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(e,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-30})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+30})}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})}};T.ID="editor.contrib.resizableContentHoverWidget",T._lastDimensions=new n.Ro(0,0),T=y=x([k(1,v.i6),k(2,C.Ui),k(3,S.F),k(4,p.d)],T);let M=class extends r.JT{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=L("div.hover-row.status-bar"),this.actionsElement=n.R3(this.hoverElement,L("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(o.Sr.render(this.actionsElement,e,i))}append(e){const t=n.R3(this.actionsElement,e);return this._hasContent=!0,t}};M=x([k(0,p.d)],M);class R{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(1!==t.type&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const o=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,s=e.range.endLineNumber===n?e.range.endColumn:o;if(e.options.showIfCollapsed){if(i>t.range.startColumn+1||t.range.endColumn-1>s)return!1}else if(i>t.range.startColumn||t.range.endColumn>s)return!1;return!0}))}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return m.Aq.EMPTY;const i=R._getLineDecorations(this._editor,t);return m.Aq.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):m.Aq.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=R._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return(0,s.kX)(t)}}function A(e,t,i,n,o,s){const r=i+o/2,a=n+s/2,l=Math.max(Math.abs(e-r)-o/2,0),d=Math.max(Math.abs(t-a)-s/2,0);return Math.sqrt(l*l+d*d)}},41095:(e,t,i)=>{"use strict";i.d(t,{R8:()=>d});var n=i(15393),o=i(71050),s=i(17301),r=i(16830),a=i(71922);class l{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function d(e,t,i,o){const r=e.ordered(t).map(((e,n)=>async function(e,t,i,n,o){try{const s=await Promise.resolve(e.provideHover(i,n,o));if(s&&function(e){const t=void 0!==e.range,i=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&i}(s))return new l(e,s,t)}catch(e){(0,s.Cp)(e)}}(e,n,t,i,o)));return n.Aq.fromPromises(r).coalesce()}(0,r.sb)("_executeHoverProvider",((e,t,i)=>function(e,t,i,n){return d(e,t,i,n).map((e=>e.hover)).toPromise()}(e.get(a.p).hoverProvider,t,i,o.T.None)))},74271:(e,t,i)=>{"use strict";i.d(t,{c:()=>le});var n=i(22258),o=i(5976),s=i(16830),r=i(24314),a=i(29102),l=i(72042),d=i(53385),c=i(24251),h=i(65321),u=i(9488),g=i(59365),p=i(92467),m=i(12457),f=i(82246),v=i(84973);const _=h.$;class b extends o.JT{constructor(e,t,i){super(),this._renderDisposeables=this._register(new o.SL),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new f.c8),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new p.$({editor:this._editor},t,i)),this._computer=new w(this._editor),this._hoverOperation=this._register(new m.H(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value)}))),this._register(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return b.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e,t){this._computer.lineNumber===e&&this._computer.lane===t||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._computer.lane=t,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const e of t){const t=_("div.hover-row.markdown-hover"),n=h.R3(t,_("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(e.value));n.appendChild(o.element),i.appendChild(t)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),o=this._editor.getOption(67),s=i-n-(this._hover.containerDomNode.clientHeight-o)/2,r=t.glyphMarginLeft+t.glyphMarginWidth+("lineNo"===this._computer.lane?t.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${r}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(s),0)}px`}}b.ID="editor.contrib.modesGlyphHoverWidget";class w{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}get lane(){return this._laneOrLine}set lane(e){this._laneOrLine=e}constructor(e){this._editor=e,this._lineNumber=-1,this._laneOrLine=v.U.Center}computeSync(){var e,t;const i=e=>({value:e}),n=this._editor.getLineDecorations(this._lineNumber),o=[],s="lineNo"===this._laneOrLine;if(!n)return o;for(const r of n){const n=null!==(t=null===(e=r.options.glyphMargin)||void 0===e?void 0:e.position)&&void 0!==t?t:v.U.Center;if(!s&&n!==this._laneOrLine)continue;const a=s?r.options.lineNumberHoverMessage:r.options.glyphMarginHoverMessage;a&&!(0,g.CP)(a)&&o.push(...(0,u._2)(a).map(i))}return o}}var y=i(72065),C=i(50988),S=i(73910),x=i(97781),k=i(66520),L=i(22374),N=i(15393),D=i(17301),E=i(95935),I=i(71922),T=i(36357),M=i(75396),R=i(48499),A=i(87997),P=i(40832),O=i(63580),F=i(98674),B=i(90535),W=function(e,t){return function(i,n){t(i,n,e)}};const H=h.$;class V{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const z={type:1,filter:{include:A.yN.QuickFix},triggerAction:A.aQ.QuickFixHover};let j=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),s=[];for(const a of t){const t=a.range.startLineNumber===n?a.range.startColumn:1,l=a.range.endLineNumber===n?a.range.endColumn:o,d=this._markerDecorationsService.getMarker(i.uri,a);if(!d)continue;const c=new r.e(e.range.startLineNumber,t,e.range.startLineNumber,l);s.push(new V(this,c,d))}return s}renderHoverParts(e,t){if(!t.length)return o.JT.None;const i=new o.SL;t.forEach((t=>e.fragment.appendChild(this.renderMarkerHover(t,i))));const n=1===t.length?t[0]:t.sort(((e,t)=>F.ZL.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=H("div.hover-row"),n=h.R3(i,H("div.marker.hover-contents")),{source:o,message:s,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);const l=h.R3(n,H("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=s,o||r)if(r&&"string"!=typeof r){const e=H("span");o&&(h.R3(e,H("span")).innerText=o);const i=h.R3(e,H("a.code-link"));i.setAttribute("href",r.target.toString()),t.add(h.nm(i,"click",(e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()}))),h.R3(i,H("span")).innerText=r.value;const s=h.R3(n,e);s.style.opacity="0.6",s.style.paddingLeft="6px"}else{const e=h.R3(n,H("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=o&&r?`${o}(${r})`:o||`(${r})`}if((0,u.Of)(a))for(const{message:e,resource:i,startLineNumber:o,startColumn:s}of a){const r=h.R3(n,H("div"));r.style.marginTop="8px";const a=h.R3(r,H("a"));a.innerText=`${(0,E.EZ)(i)}(${o}, ${s}): `,a.style.cursor="pointer",t.add(h.nm(a,"click",(e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(i,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:o,startColumn:s}}}).catch(D.dL)})));const l=h.R3(r,H("span"));l.innerText=e,this._editor.applyFontInfo(l)}return i}renderMarkerStatusbar(e,t,i){if(t.marker.severity===F.ZL.Error||t.marker.severity===F.ZL.Warning||t.marker.severity===F.ZL.Info){const i=P.c.get(this._editor);i&&e.statusBar.addAction({label:O.NC("view problem","View Problem"),commandId:P.v.ID,run:()=>{e.hide(),i.showAtMarker(t.marker),this._editor.focus()}})}if(!this._editor.getOption(91)){const n=e.statusBar.append(H("div"));this.recentMarkerCodeActionsInfo&&(F.H0.makeKey(this.recentMarkerCodeActionsInfo.marker)===F.H0.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=O.NC("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?o.JT.None:(0,N.Vg)((()=>n.textContent=O.NC("checkingForQuickFixes","Checking for quick fixes...")),200,i);n.textContent||(n.textContent=String.fromCharCode(160));const r=this.getCodeActions(t.marker);i.add((0,o.OF)((()=>r.cancel()))),r.then((r=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:r.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return r.dispose(),void(n.textContent=O.NC("noQuickFixes","No quick fixes available"));n.style.display="none";let a=!1;i.add((0,o.OF)((()=>{a||r.dispose()}))),e.statusBar.addAction({label:O.NC("quick fixes","Quick Fix..."),commandId:M.cz,run:t=>{a=!0;const i=R.G.get(this._editor),n=h.i(t);e.hide(),null==i||i.showCodeActions(z,r,{x:n.left,y:n.top,width:n.width,height:n.height})}})}),D.dL)}}getCodeActions(e){return(0,N.PG)((t=>(0,M.aI)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new r.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),z,B.Ex.None,t)))}};j=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([W(1,T.i),W(2,C.v),W(3,I.p)],j);var U=i(85895),q=i(91847),K=i(93379),$=i.n(K),G=i(7795),Z=i.n(G),Q=i(90569),Y=i.n(Q),J=i(3565),X=i.n(J),ee=i(19216),te=i.n(ee),ie=i(44589),ne=i.n(ie),oe=i(41738),se={};se.styleTagTransform=ne(),se.setAttributes=X(),se.insert=Y().bind(null,"head"),se.domAPI=Z(),se.insertStyleElement=te(),$()(oe.Z,se),oe.Z&&oe.Z.locals&&oe.Z.locals;var re,ae=function(e,t){return function(i,n){t(i,n,e)}};let le=re=class extends o.JT{constructor(e,t,i,n,s){super(),this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._keybindingService=s,this._listenersStore=new o.SL,this._hoverState={mouseDown:!1,contentHoverFocused:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new N.pY((()=>this._reactToEditorMouseMove(this._mouseMoveEvent)),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())})))}static get(e){return e.getContribution(re.ID)}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.delay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._listenersStore.add(this._editor.onMouseUp((()=>this._onEditorMouseUp()))),this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._listenersStore.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._listenersStore.add(this._editor.onDidChangeModel((()=>{this._cancelScheduler(),this._hideWidgets()}))),this._listenersStore.add(this._editor.onDidChangeModelContent((()=>this._cancelScheduler()))),this._listenersStore.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._hoverState.mouseDown=!0;const i=e.target;9!==i.type||i.detail!==c.Hb.ID?12===i.type&&i.detail===b.ID||(12!==i.type&&(this._hoverState.contentHoverFocused=!1),(null===(t=this._contentWidget)||void 0===t?void 0:t.widget.isResizing)||this._hideWidgets()):this._hoverState.contentHoverFocused=!0}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){var t,i;this._cancelScheduler();const n=e.event.browserEvent.relatedTarget;(null===(t=this._contentWidget)||void 0===t?void 0:t.widget.isResizing)||(null===(i=this._contentWidget)||void 0===i?void 0:i.containsNode(n))||this._hideWidgets()}_isMouseOverWidget(e){var t,i,n,o,s;const r=e.target,a=this._hoverSettings.sticky;return!((!a||9!==r.type||r.detail!==c.Hb.ID)&&(!a||!(null===(t=this._contentWidget)||void 0===t?void 0:t.containsNode(null===(i=e.event.browserEvent.view)||void 0===i?void 0:i.document.activeElement))||(null===(o=null===(n=e.event.browserEvent.view)||void 0===n?void 0:n.getSelection())||void 0===o?void 0:o.isCollapsed))&&(a||9!==r.type||r.detail!==c.Hb.ID||!(null===(s=this._contentWidget)||void 0===s?void 0:s.isColorPickerVisible))&&(!a||12!==r.type||r.detail!==b.ID))}_onEditorMouseMove(e){var t,i,n,o;if(this._mouseMoveEvent=e,(null===(t=this._contentWidget)||void 0===t?void 0:t.isFocused)||(null===(i=this._contentWidget)||void 0===i?void 0:i.isResizing))return;if(this._hoverState.mouseDown&&this._hoverState.contentHoverFocused)return;const s=this._hoverSettings.sticky;if(s&&(null===(n=this._contentWidget)||void 0===n?void 0:n.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(e))return void this._reactToEditorMouseMoveRunner.cancel();const r=this._hoverSettings.hidingDelay;(null===(o=this._contentWidget)||void 0===o?void 0:o.isVisible)&&s&&r>0?this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(r):this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t,i,n,o;if(!e)return;const s=e.target,r=null===(t=s.element)||void 0===t?void 0:t.classList.contains("colorpicker-color-decoration"),a=this._editor.getOption(147),l=this._hoverSettings.enabled,d=this._hoverState.activatedByDecoratorClick;r&&("click"===a&&!d||"hover"===a&&!l||"clickAndHover"===a&&!l&&!d)||!(r||l||d)?this._hideWidgets():this._getOrCreateContentWidget().showsOrWillShow(e)?null===(i=this._glyphWidget)||void 0===i||i.hide():2===s.type&&s.position&&s.detail.glyphMarginLane?(null===(n=this._contentWidget)||void 0===n||n.hide(),this._getOrCreateGlyphWidget().startShowingAt(s.position.lineNumber,s.detail.glyphMarginLane)):3===s.type&&s.position?(null===(o=this._contentWidget)||void 0===o||o.hide(),this._getOrCreateGlyphWidget().startShowingAt(s.position.lineNumber,"lineNo")):this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const i=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=1===i.kind||2===i.kind&&"editor.action.showHover"===i.commandId&&(null===(t=this._contentWidget)||void 0===t?void 0:t.isVisible);5===e.keyCode||6===e.keyCode||57===e.keyCode||4===e.keyCode||n||this._hideWidgets()}_hideWidgets(){var e,t,i;this._hoverState.mouseDown&&this._hoverState.contentHoverFocused&&(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible)||U.QG.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,this._hoverState.contentHoverFocused=!1,null===(t=this._glyphWidget)||void 0===t||t.hide(),null===(i=this._contentWidget)||void 0===i||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(c.hT,this._editor)),this._contentWidget}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=new b(this._editor,this._languageService,this._openerService)),this._glyphWidget}showContentHover(e,t,i,n,o=!1){this._hoverState.activatedByDecoratorClick=o,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}focus(){var e;null===(e=this._contentWidget)||void 0===e||e.focus()}scrollUp(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollUp()}scrollDown(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollDown()}scrollLeft(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollLeft()}scrollRight(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollRight()}pageUp(){var e;null===(e=this._contentWidget)||void 0===e||e.pageUp()}pageDown(){var e;null===(e=this._contentWidget)||void 0===e||e.pageDown()}goToTop(){var e;null===(e=this._contentWidget)||void 0===e||e.goToTop()}goToBottom(){var e;null===(e=this._contentWidget)||void 0===e||e.goToBottom()}get isColorPickerVisible(){var e;return null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return null===(e=this._contentWidget)||void 0===e?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),null===(e=this._glyphWidget)||void 0===e||e.dispose(),null===(t=this._contentWidget)||void 0===t||t.dispose()}};var de;le.ID="editor.contrib.hover",le=re=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ae(1,y.TG),ae(2,C.v),ae(3,l.O),ae(4,q.d)],le),function(e){e.NoAutoFocus="noAutoFocus",e.FocusIfVisible="focusIfVisible",e.AutoFocusImmediately="autoFocusImmediately"}(de||(de={}));class ce extends s.R6{constructor(){super({id:"editor.action.showHover",label:O.NC({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse."]},"Show or Focus Hover"),metadata:{description:"Show or Focus Hover",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:[de.NoAutoFocus,de.FocusIfVisible,de.AutoFocusImmediately],enumDescriptions:[O.NC("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),O.NC("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),O.NC("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:de.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:a.u.editorTextFocus,primary:(0,n.gx)(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const n=le.get(t);if(!n)return;const o=null==i?void 0:i.focus;let s=de.FocusIfVisible;Object.values(de).includes(o)?s=o:"boolean"==typeof o&&o&&(s=de.AutoFocusImmediately);const a=e=>{const i=t.getPosition(),o=new r.e(i.lineNumber,i.column,i.lineNumber,i.column);n.showContentHover(o,1,1,e)},l=2===t.getOption(2);n.isHoverVisible?s!==de.NoAutoFocus?n.focus():a(l):a(l||s===de.AutoFocusImmediately)}}class he extends s.R6{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:O.NC({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=le.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const o=new r.e(n.lineNumber,n.column,n.lineNumber,n.column),s=d.S.get(t);s&&s.startFindDefinitionFromCursor(n).then((()=>{i.showContentHover(o,1,1,!0)}))}}class ue extends s.R6{constructor(){super({id:"editor.action.scrollUpHover",label:O.NC({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:16,weight:100}})}run(e,t){const i=le.get(t);i&&i.scrollUp()}}class ge extends s.R6{constructor(){super({id:"editor.action.scrollDownHover",label:O.NC({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:18,weight:100}})}run(e,t){const i=le.get(t);i&&i.scrollDown()}}class pe extends s.R6{constructor(){super({id:"editor.action.scrollLeftHover",label:O.NC({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:15,weight:100}})}run(e,t){const i=le.get(t);i&&i.scrollLeft()}}class me extends s.R6{constructor(){super({id:"editor.action.scrollRightHover",label:O.NC({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:17,weight:100}})}run(e,t){const i=le.get(t);i&&i.scrollRight()}}class fe extends s.R6{constructor(){super({id:"editor.action.pageUpHover",label:O.NC({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const i=le.get(t);i&&i.pageUp()}}class ve extends s.R6{constructor(){super({id:"editor.action.pageDownHover",label:O.NC({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const i=le.get(t);i&&i.pageDown()}}class _e extends s.R6{constructor(){super({id:"editor.action.goToTopHover",label:O.NC({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const i=le.get(t);i&&i.goToTop()}}class be extends s.R6{constructor(){super({id:"editor.action.goToBottomHover",label:O.NC({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const i=le.get(t);i&&i.goToBottom()}}(0,s._K)(le.ID,le,2),(0,s.Qr)(ce),(0,s.Qr)(he),(0,s.Qr)(ue),(0,s.Qr)(ge),(0,s.Qr)(pe),(0,s.Qr)(me),(0,s.Qr)(fe),(0,s.Qr)(ve),(0,s.Qr)(_e),(0,s.Qr)(be),k.Ae.register(L.D5),k.Ae.register(j),(0,x.Ic)(((e,t)=>{const i=e.getColor(S.CNo);i&&(t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))}))},12457:(e,t,i)=>{"use strict";i.d(t,{H:()=>l});var n=i(15393),o=i(17301),s=i(4669),r=i(5976);class a{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class l extends r.JT{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new s.Q5),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new n.pY((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new n.pY((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new n.pY((()=>this._triggerLoadingMessage()),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,n.zS)((e=>this._computer.computeAsync(e))),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(e){(0,o.dL)(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){3===this._state&&this._setState(4)}_fireResult(){if(1===this._state||2===this._state)return;const e=0===this._state,t=4===this._state;this._onResult.fire(new a(this._result.slice(0),e,t))}start(e){if(0===e)0===this._state&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}},66520:(e,t,i)=>{"use strict";i.d(t,{Ae:()=>s,Qj:()=>n,YM:()=>o});class n{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class o{constructor(e,t,i,n,o,s){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}const s=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}},22374:(e,t,i)=>{"use strict";i.d(t,{D5:()=>w,c:()=>y,hU:()=>b});var n=i(65321),o=i(9488),s=i(15393),r=i(59365),a=i(5976),l=i(92467),d=i(50187),c=i(24314),h=i(72042),u=i(41095),g=i(63580),p=i(33108),m=i(50988),f=i(71922),v=function(e,t){return function(i,n){t(i,n,e)}};const _=n.$;class b{constructor(e,t,i,n,o){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=o}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let w=class{constructor(e,t,i,n,o){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=o,this.hoverOrdinal=3}createLoadingMessage(e){return new b(this,e.range,[(new r.W5).appendText(g.NC("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),a=[];let l=1e3;const d=i.getLineLength(n),h=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),u=this._editor.getOption(117),p=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:h});let m=!1;u>=0&&d>u&&e.range.startColumn>=u&&(m=!0,a.push(new b(this,e.range,[{value:g.NC("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,l++))),!m&&"number"==typeof p&&d>=p&&a.push(new b(this,e.range,[{value:g.NC("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,l++));let f=!1;for(const i of t){const t=i.range.startLineNumber===n?i.range.startColumn:1,d=i.range.endLineNumber===n?i.range.endColumn:s,h=i.options.hoverMessage;if(!h||(0,r.CP)(h))continue;i.options.beforeContentClassName&&(f=!0);const u=new c.e(e.range.startLineNumber,t,e.range.startLineNumber,d);a.push(new b(this,u,(0,o._2)(h),f,l++))}return a}computeAsync(e,t,i){if(!this._editor.hasModel()||1!==e.type)return s.Aq.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return s.Aq.EMPTY;const o=new d.L(e.range.startLineNumber,e.range.startColumn);return(0,u.R8)(this._languageFeaturesService.hoverProvider,n,o,i).filter((e=>!(0,r.CP)(e.hover.contents))).map((t=>{const i=t.hover.range?c.e.lift(t.hover.range):e.range;return new b(this,i,t.hover.contents,!1,t.ordinal)}))}renderHoverParts(e,t){return y(e,t,this._editor,this._languageService,this._openerService)}};function y(e,t,i,o,s){t.sort(((e,t)=>e.ordinal-t.ordinal));const d=new a.SL;for(const a of t)for(const t of a.contents){if((0,r.CP)(t))continue;const a=_("div.hover-row.markdown-hover"),c=n.R3(a,_("div.hover-contents")),h=d.add(new l.$({editor:i},o,s));d.add(h.onDidRenderAsync((()=>{c.className="hover-contents code-hover-contents",e.onContentsChanged()})));const u=d.add(h.render(t));c.appendChild(u.element),e.fragment.appendChild(a)}return d}w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([v(1,h.O),v(2,m.v),v(3,p.Ui),v(4,f.p)],w)},810:(e,t,i)=>{"use strict";var n=i(15393),o=i(17301),s=i(16467),r=i(16830),a=i(24314),l=i(3860),d=i(29102),c=i(13961),h=i(85215),u=i(63580);class g{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new l.Y(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new l.Y(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}var p=i(93379),m=i.n(p),f=i(7795),v=i.n(f),_=i(90569),b=i.n(_),w=i(3565),y=i.n(w),C=i(19216),S=i.n(C),x=i(44589),k=i.n(x),L=i(16921),N={};N.styleTagTransform=k(),N.setAttributes=y(),N.insert=b().bind(null,"head"),N.domAPI=v(),N.insertStyleElement=S(),m()(L.Z,N),L.Z&&L.Z.locals&&L.Z.locals;var D;let E=D=class{static get(e){return e.getContribution(D.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var i;null===(i=this.currentRequest)||void 0===i||i.cancel();const r=this.editor.getSelection(),d=this.editor.getModel();if(!d||!r)return;let c=r;if(c.startLineNumber!==c.endLineNumber)return;const h=new s.yy(this.editor,5),u=d.uri;return this.editorWorkerService.canNavigateValueSet(u)?(this.currentRequest=(0,n.PG)((e=>this.editorWorkerService.navigateValueSet(u,c,t))),this.currentRequest.then((t=>{var i;if(!t||!t.range||!t.value)return;if(!h.validate(this.editor))return;const s=a.e.lift(t.range);let r=t.range;const d=t.value.length-(c.endColumn-c.startColumn);r={startLineNumber:r.startLineNumber,startColumn:r.startColumn,endLineNumber:r.endLineNumber,endColumn:r.startColumn+t.value.length},d>1&&(c=new l.Y(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn+d-1));const u=new g(s,c,t.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,u),this.editor.pushUndoStop(),this.decorations.set([{range:r,options:D.DECORATION}]),null===(i=this.decorationRemover)||void 0===i||i.cancel(),this.decorationRemover=(0,n.Vs)(350),this.decorationRemover.then((()=>this.decorations.clear())).catch(o.dL)})).catch(o.dL)):Promise.resolve(void 0)}};var I,T;E.ID="editor.contrib.inPlaceReplaceController",E.DECORATION=c.qx.register({description:"in-place-replace",className:"valueSetReplacement"}),E=D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(I=1,T=h.p,function(e,t){T(e,t,I)})],E);class M extends r.R6{constructor(){super({id:"editor.action.inPlaceReplace.up",label:u.NC("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:d.u.writable,kbOpts:{kbExpr:d.u.editorTextFocus,primary:3159,weight:100}})}run(e,t){const i=E.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}class R extends r.R6{constructor(){super({id:"editor.action.inPlaceReplace.down",label:u.NC("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:d.u.writable,kbOpts:{kbExpr:d.u.editorTextFocus,primary:3161,weight:100}})}run(e,t){const i=E.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}(0,r._K)(E.ID,E,4),(0,r.Qr)(M),(0,r.Qr)(R)},18279:(e,t,i)=>{"use strict";function n(e,t){let i=0;for(let n=0;no,Y:()=>n})},84602:(e,t,i)=>{"use strict";var n=i(5976),o=i(97295),s=i(16830),r=i(10291),a=i(69386),l=i(24314),d=i(3860),c=i(29102),h=i(51381),u=i(73733),g=i(18279),p=i(63580),m=i(41157),f=i(83158),v=i(75383);function _(e,t,i,n,s){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];const l=t.getLanguageConfiguration(e.getLanguageId()).indentationRules;if(!l)return[];for(n=Math.min(n,e.getLineCount());i<=n&&l.unIndentedLinePattern;){const t=e.getLineContent(i);if(!l.unIndentedLinePattern.test(t))break;i++}if(i>n-1)return[];const{tabSize:c,indentSize:h,insertSpaces:u}=e.getOptions(),g=(e,t)=>(t=t||1,r.U.shiftIndent(e,e.length+t,c,h,u)),p=(e,t)=>(t=t||1,r.U.unshiftIndent(e,e.length+t,c,h,u)),m=[];let v;const _=e.getLineContent(i);let b=_;if(null!=s){v=s;const e=o.V8(_);b=v+_.substring(e.length),l.decreaseIndentPattern&&l.decreaseIndentPattern.test(b)&&(v=p(v),b=v+_.substring(e.length)),_!==b&&m.push(a.h.replaceMove(new d.Y(i,1,i,e.length+1),(0,f.x)(v,h,u)))}else v=o.V8(_);let w=v;l.increaseIndentPattern&&l.increaseIndentPattern.test(b)?(w=g(w),v=g(v)):l.indentNextLinePattern&&l.indentNextLinePattern.test(b)&&(w=g(w));for(let t=++i;t<=n;t++){const i=e.getLineContent(t),n=o.V8(i),s=w+i.substring(n.length);l.decreaseIndentPattern&&l.decreaseIndentPattern.test(s)&&(w=p(w),v=p(v)),n!==w&&m.push(a.h.replaceMove(new d.Y(t,1,t,n.length+1),(0,f.x)(w,h,u))),l.unIndentedLinePattern&&l.unIndentedLinePattern.test(i)||(l.increaseIndentPattern&&l.increaseIndentPattern.test(s)?(v=g(v),w=v):w=l.indentNextLinePattern&&l.indentNextLinePattern.test(s)?g(w):v)}return m}class b extends s.R6{constructor(){super({id:b.ID,label:p.NC("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:c.u.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new R(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}b.ID="editor.action.indentationToSpaces";class w extends s.R6{constructor(){super({id:w.ID,label:p.NC("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:c.u.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new A(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}w.ID="editor.action.indentationToTabs";class y extends s.R6{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const i=e.get(m.eJ),n=e.get(u.q),o=t.getModel();if(!o)return;const s=n.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),r=o.getOptions(),a=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===s.tabSize&&e===r.tabSize?p.NC("configuredTabSize","Configured Tab Size"):e===s.tabSize?p.NC("defaultTabSize","Default Tab Size"):e===r.tabSize?p.NC("currentTabSize","Current Tab Size"):void 0}))),l=Math.min(o.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(a,{placeHolder:p.NC({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then((e=>{if(e&&o&&!o.isDisposed()){const t=parseInt(e.label,10);this.displaySizeOnly?o.updateOptions({tabSize:t}):o.updateOptions({tabSize:t,indentSize:t,insertSpaces:this.insertSpaces})}}))}),50)}}class C extends y{constructor(){super(!1,!1,{id:C.ID,label:p.NC("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}C.ID="editor.action.indentUsingTabs";class S extends y{constructor(){super(!0,!1,{id:S.ID,label:p.NC("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}S.ID="editor.action.indentUsingSpaces";class x extends y{constructor(){super(!0,!0,{id:x.ID,label:p.NC("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}}x.ID="editor.action.changeTabDisplaySize";class k extends s.R6{constructor(){super({id:k.ID,label:p.NC("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(u.q),n=t.getModel();if(!n)return;const o=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(o.insertSpaces,o.tabSize)}}k.ID="editor.action.detectIndentation";class L extends s.R6{constructor(){super({id:"editor.action.reindentlines",label:p.NC("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:c.u.writable})}run(e,t){const i=e.get(h.c_),n=t.getModel();if(!n)return;const o=_(n,i,1,n.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class N extends s.R6{constructor(){super({id:"editor.action.reindentselectedlines",label:p.NC("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:c.u.writable})}run(e,t){const i=e.get(h.c_),n=t.getModel();if(!n)return;const o=t.getSelections();if(null===o)return;const s=[];for(const e of o){let t=e.startLineNumber,o=e.endLineNumber;if(t!==o&&1===e.endColumn&&o--,1===t){if(t===o)continue}else t--;const r=_(n,i,t,o);s.push(...r)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class D{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(const e of this._edits)t.addEditOperation(l.e.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&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 E=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new n.SL,this.callOnModel=new n.SL,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(12)<4||this.editor.getOption(55)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){const t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(12),{tabSize:s,indentSize:a,insertSpaces:d}=i.getOptions(),c=[],h={shiftIndent:e=>r.U.shiftIndent(e,e.length+1,s,a,d),unshiftIndent:e=>r.U.unshiftIndent(e,e.length+1,s,a,d)};let u=e.startLineNumber;for(;u<=e.endLineNumber&&this.shouldIgnoreLine(i,u);)u++;if(u>e.endLineNumber)return;let p=i.getLineContent(u);if(!/\S/.test(p.substring(0,e.startColumn-1))){const e=(0,v.n8)(n,i,i.getLanguageId(),u,h,this._languageConfigurationService);if(null!==e){const t=o.V8(p),n=g.Y(e,s);if(n!==g.Y(t,s)){const e=g.J(n,s,d);c.push({range:new l.e(u,1,u,t.length+1),text:e}),p=e+p.substr(t.length)}else{const e=(0,v.tI)(i,u,this._languageConfigurationService);if(0===e||8===e)return}}}const m=u;for(;ui.tokenization.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===m?p:i.getLineContent(e)},r=(0,v.n8)(n,t,i.getLanguageId(),u+1,h,this._languageConfigurationService);if(null!==r){const t=g.Y(r,s),n=g.Y(o.V8(i.getLineContent(u+1)),s);if(t!==n){const r=t-n;for(let t=u+1;t<=e.endLineNumber;t++){const e=i.getLineContent(t),n=o.V8(e),a=g.Y(n,s)+r,h=g.J(a,s,d);h!==n&&c.push({range:new l.e(t,1,t,n.length+1),text:h})}}}}if(c.length>0){this.editor.pushUndoStop();const e=new D(c,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function I(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let o="";for(let e=0;e=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(T=1,M=h.c_,function(e,t){M(e,t,T)})],E);class R{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),I(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class A{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),I(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}(0,s._K)(E.ID,E,2),(0,s.Qr)(b),(0,s.Qr)(w),(0,s.Qr)(C),(0,s.Qr)(S),(0,s.Qr)(x),(0,s.Qr)(k),(0,s.Qr)(L),(0,s.Qr)(N)},66348:(e,t,i)=>{"use strict";var n=i(16830),o=i(66520),s=i(65321),r=i(9488),a=i(15393),l=i(71050),d=i(17301),c=i(5976),h=i(43702),u=i(98401),g=i(70666),p=i(29994),m=i(43407),f=i(64141),v=i(69386),_=i(24314),b=i(96887),w=i(84973),y=i(13961),C=i(88191),S=i(71922),x=i(88216),k=i(82005),L=i(50187),N=i(66663);class D{constructor(e,t){this.range=e,this.direction=t}}class E{constructor(e,t,i){this.hint=e,this.anchor=t,this.provider=i,this._isResolved=!1}with(e){const t=new E(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}async resolve(e){if("function"==typeof this.provider.resolveInlayHint){if(this._currentResolve){if(await this._currentResolve,e.isCancellationRequested)return;return this.resolve(e)}this._isResolved||(this._currentResolve=this._doResolve(e).finally((()=>this._currentResolve=void 0))),await this._currentResolve}}async _doResolve(e){var t,i,n;try{const o=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=null!==(t=null==o?void 0:o.tooltip)&&void 0!==t?t:this.hint.tooltip,this.hint.label=null!==(i=null==o?void 0:o.label)&&void 0!==i?i:this.hint.label,this.hint.textEdits=null!==(n=null==o?void 0:o.textEdits)&&void 0!==n?n:this.hint.textEdits,this._isResolved=!0}catch(e){(0,d.Cp)(e),this._isResolved=!1}}}class I{static async create(e,t,i,n){const o=[],s=e.ordered(t).reverse().map((e=>i.map((async i=>{try{const s=await e.provideInlayHints(t,i,n);((null==s?void 0:s.hints.length)||e.onDidChangeInlayHints)&&o.push([null!=s?s:I._emptyInlayHintList,e])}catch(e){(0,d.Cp)(e)}}))));if(await Promise.all(s.flat()),n.isCancellationRequested||t.isDisposed())throw new d.FU;return new I(i,o,t)}constructor(e,t,i){this._disposables=new c.SL,this.ranges=e,this.provider=new Set;const n=[];for(const[e,o]of t){this._disposables.add(e),this.provider.add(o);for(const t of e.hints){const e=i.validatePosition(t.position);let s="before";const r=I._getRangeAtPosition(i,e);let a;r.getStartPosition().isBefore(e)?(a=_.e.fromPositions(r.getStartPosition(),e),s="after"):(a=_.e.fromPositions(e,r.getEndPosition()),s="before"),n.push(new E(t,new D(a,s),o))}}this.items=n.sort(((e,t)=>L.L.compare(e.hint.position,t.hint.position)))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new _.e(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const o=e.tokenization.getLineTokens(i),s=t.column-1,r=o.findTokenIndexAtOffset(s);let a=o.getStartOffset(r),l=o.getEndOffset(r);return l-a==1&&(a===s&&r>1?(a=o.getStartOffset(r-1),l=o.getEndOffset(r-1)):l===s&&rthis._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(140)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(140);if("off"===e.enabled)return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;if("on"===e.enabled)this._activeRenderMode=0;else{let t,i;"onUnlessPressed"===e.enabled?(t=0,i=1):(t=1,i=0),this._activeRenderMode=t,this._sessionDisposables.add(s._q.getInstance().event((e=>{if(!this._editor.hasModel())return;const n=e.altKey&&e.ctrlKey&&!e.shiftKey&&!e.metaKey?i:t;if(n!==this._activeRenderMode){this._activeRenderMode=n;const e=this._editor.getModel(),t=this._copyInlayHintsWithCurrentAnchor(e);this._updateHintsDecorators([e.getFullModelRange()],t),r.schedule(0)}})))}const i=this._inlayHintsCache.get(t);let n;i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add((0,c.OF)((()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)})));const o=new Set,r=new a.pY((async()=>{const e=Date.now();null==n||n.dispose(!0),n=new l.A;const i=t.onWillDispose((()=>null==n?void 0:n.cancel()));try{const i=n.token,s=await I.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),i);if(r.delay=this._debounceInfo.update(t,Date.now()-e),i.isCancellationRequested)return void s.dispose();for(const e of s.provider)"function"!=typeof e.onDidChangeInlayHints||o.has(e)||(o.add(e),this._sessionDisposables.add(e.onDidChangeInlayHints((()=>{r.isScheduled()||r.schedule()}))));this._sessionDisposables.add(s),this._updateHintsDecorators(s.ranges,s.items),this._cacheHintsForFastRestore(t)}catch(e){(0,d.dL)(e)}finally{n.dispose(),i.dispose()}}),this._debounceInfo.get(t));this._sessionDisposables.add(r),this._sessionDisposables.add((0,c.OF)((()=>null==n?void 0:n.dispose(!0)))),r.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange((e=>{!e.scrollTopChanged&&r.isScheduled()||r.schedule()}))),this._sessionDisposables.add(this._editor.onDidChangeModelContent((e=>{null==n||n.cancel();const t=Math.max(r.delay,1250);r.schedule(t)}))),this._sessionDisposables.add(this._installDblClickGesture((()=>r.schedule(0)))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new c.SL,t=e.add(new k.yN(this._editor)),i=new c.SL;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown((e=>{const[t]=e,n=this._getInlayHintLabelPart(t),o=this._editor.getModel();if(!n||!o)return void i.clear();const s=new l.A;i.add((0,c.OF)((()=>s.dispose(!0)))),n.item.resolve(s.token),this._activeInlayHintPart=n.part.command||n.part.location?new j(n,t.hasTriggerModifier):void 0;const r=o.validatePosition(n.item.hint.position).lineNumber,a=new _.e(r,1,r,o.getLineMaxColumn(r)),d=this._getInlineHintsForRange(a);this._updateHintsDecorators([a],d),i.add((0,c.OF)((()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([a],d)})))}))),e.add(t.onCancel((()=>i.clear()))),e.add(t.onExecute((async e=>{const t=this._getInlayHintLabelPart(e);if(t){const i=t.part;i.location?this._instaService.invokeFunction(M.K,e,this._editor,i.location):b.mY.is(i.command)&&await this._invokeCommand(i.command,t.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(2!==t.event.detail)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),await i.item.resolve(l.T.None),(0,r.Of)(i.item.hint.textEdits))){const t=i.item.hint.textEdits.map((e=>v.h.replace(_.e.lift(e.range),e.text)));this._editor.executeEdits("inlayHint.default",t),e()}}))}_installContextMenu(){return this._editor.onContextMenu((async e=>{if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&await this._instaService.invokeFunction(M.u,this._editor,e.event.target,t)}))}_getInlayHintLabelPart(e){var t;if(6!==e.target.type)return;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof y.HS&&(null==i?void 0:i.attachedData)instanceof z?i.attachedData:void 0}async _invokeCommand(e,t){var i;try{await this._commandService.executeCommand(e.id,...null!==(i=e.arguments)&&void 0!==i?i:[])}catch(e){this._notificationService.notify({severity:O.zb.Error,source:t.provider.displayName,message:e})}}_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 o=e.getDecorationRange(i);if(o){const e=new D(o,n.item.anchor.direction),i=n.item.with({anchor:e});t.set(n.item,i)}}return Array.from(t.values())}_getHintsRanges(){const e=this._editor.getModel(),t=this._editor.getVisibleRangesPlusViewportAboveBelow(),i=[];for(const n of t.sort(_.e.compareRangesUsingStarts)){const t=e.validateRange(new _.e(n.startLineNumber-30,n.startColumn,n.endLineNumber+30,n.endColumn));0!==i.length&&_.e.areIntersectingOrTouching(i[i.length-1],t)?i[i.length-1]=_.e.plusRange(i[i.length-1],t):i.push(t)}return i}_updateHintsDecorators(e,t){var i,n;const o=[],s=(e,t,i,n,s)=>{const r={content:i,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:t.className,cursorStops:n,attachedData:s};o.push({item:e,classNameRef:t,decoration:{range:e.anchor.range,options:{description:"InlayHint",showIfCollapsed:e.anchor.range.isEmpty(),collapseOnReplaceEdit:!e.anchor.range.isEmpty(),stickiness:0,[e.anchor.direction]:0===this._activeRenderMode?r:void 0}}})},a=(e,t)=>{const i=this._ruleFactory.createClassNameRef({width:(l/3|0)+"px",display:"inline-block"});s(e,i," ",t?w.RM.Right:w.RM.None)},{fontSize:l,fontFamily:d,padding:c,isUniform:h}=this._getLayoutInfo(),u="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(u,d);let g={line:0,totalLen:0};for(const e of t){if(g.line!==e.anchor.range.startLineNumber&&(g={line:e.anchor.range.startLineNumber,totalLen:0}),g.totalLen>T._MAX_LABEL_LEN)continue;e.hint.paddingLeft&&a(e,!1);const t="string"==typeof e.hint.label?[{label:e.hint.label}]:e.hint.label;for(let n=0;n0&&(m=m.slice(0,-_)+"…",v=!0),s(e,this._ruleFactory.createClassNameRef(p),m.replace(/[ \t]/g," "),d&&!e.hint.paddingRight?w.RM.Right:w.RM.None,new z(e,n)),v)break}if(e.hint.paddingRight&&a(e,!0),o.length>T._MAX_DECORATORS)break}const p=[];for(const[t,i]of this._decorationsMetadata){const o=null===(n=this._editor.getModel())||void 0===n?void 0:n.getDecorationRange(t);o&&e.some((e=>e.containsRange(o)))&&(p.push(t),i.classNameRef.dispose(),this._decorationsMetadata.delete(t))}const v=m.Z.capture(this._editor);this._editor.changeDecorations((e=>{const t=e.deltaDecorations(p,o.map((e=>e.decoration)));for(let e=0;ei)&&(o=i);const s=e.fontFamily||n;return{fontSize:o,fontFamily:s,padding:t,isUniform:!t&&s===n&&o===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};U.ID="editor.contrib.InlayHints",U._MAX_DECORATORS=1500,U._MAX_LABEL_LEN=43,U=T=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([W(1,S.p),W(2,C.A),W(3,V),W(4,R.H),W(5,O.lT),W(6,P.TG)],U),R.P.registerCommand("_executeInlayHintProvider",(async(e,...t)=>{const[i,n]=t;(0,u.p_)(g.o.isUri(i)),(0,u.p_)(_.e.isIRange(n));const{inlayHintsProvider:o}=e.get(S.p),s=await e.get(x.S).createModelReference(i);try{const e=await I.create(o,s.object.textEditorModel,[_.e.lift(n)],l.T.None),t=e.items.map((e=>e.hint));return setTimeout((()=>e.dispose()),0),t}finally{s.dispose()}}));var q=i(59365),K=i(72042),$=i(41095),G=i(22374),Z=i(33108),Q=i(50988),Y=i(63580),J=i(1432),X=function(e,t){return function(i,n){t(i,n,e)}};class ee extends o.YM{constructor(e,t,i,n){super(10,t,e.item.anchor.range,i,n,!0),this.part=e}}let te=class extends G.D5{constructor(e,t,i,n,o,s){super(e,t,i,n,s),this._resolverService=o,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!U.get(this._editor))return null;if(6!==e.target.type)return null;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof y.HS&&i.attachedData instanceof z?new ee(i.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof ee?new a.Aq((async t=>{const{part:n}=e;if(await n.item.resolve(i),i.isCancellationRequested)return;let o,s;if("string"==typeof n.item.hint.tooltip?o=(new q.W5).appendText(n.item.hint.tooltip):n.item.hint.tooltip&&(o=n.item.hint.tooltip),o&&t.emitOne(new G.hU(this,e.range,[o],!1,0)),(0,r.Of)(n.item.hint.textEdits)&&t.emitOne(new G.hU(this,e.range,[(new q.W5).appendText((0,Y.NC)("hint.dbl","Double-click to insert"))],!1,10001)),"string"==typeof n.part.tooltip?s=(new q.W5).appendText(n.part.tooltip):n.part.tooltip&&(s=n.part.tooltip),s&&t.emitOne(new G.hU(this,e.range,[s],!1,1)),n.part.location||n.part.command){let i;const o="altKey"===this._editor.getOption(78)?J.dz?(0,Y.NC)("links.navigate.kb.meta.mac","cmd + click"):(0,Y.NC)("links.navigate.kb.meta","ctrl + click"):J.dz?(0,Y.NC)("links.navigate.kb.alt.mac","option + click"):(0,Y.NC)("links.navigate.kb.alt","alt + click");n.part.location&&n.part.command?i=(new q.W5).appendText((0,Y.NC)("hint.defAndCommand","Go to Definition ({0}), right click for more",o)):n.part.location?i=(new q.W5).appendText((0,Y.NC)("hint.def","Go to Definition ({0})",o)):n.part.command&&(i=new q.W5(`[${(0,Y.NC)("hint.cmd","Execute Command")}](${a=n.part.command,g.o.from({scheme:N.lg.command,path:a.id,query:a.arguments&&encodeURIComponent(JSON.stringify(a.arguments))}).toString()} "${n.part.command.title}") (${o})`,{isTrusted:!0})),i&&t.emitOne(new G.hU(this,e.range,[i],!1,1e4))}var a;const l=await this._resolveInlayHintLabelPartHover(n,i);for await(const e of l)t.emitOne(e)})):a.Aq.EMPTY}async _resolveInlayHintLabelPartHover(e,t){if(!e.part.location)return a.Aq.EMPTY;const{uri:i,range:n}=e.part.location,o=await this._resolverService.createModelReference(i);try{const i=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(i)?(0,$.R8)(this._languageFeaturesService.hoverProvider,i,new L.L(n.startLineNumber,n.startColumn),t).filter((e=>!(0,q.CP)(e.hover.contents))).map((t=>new G.hU(this,e.item.anchor.range,t.hover.contents,!1,2+t.ordinal))):a.Aq.EMPTY}finally{o.dispose()}}};te=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([X(1,K.O),X(2,Q.v),X(3,Z.Ui),X(4,x.S),X(5,S.p)],te),(0,n._K)(U.ID,U,1),o.Ae.register(te)},58722:(e,t,i)=>{"use strict";i.d(t,{K:()=>_,u:()=>v});var n=i(65321),o=i(74741),s=i(71050),r=i(98e3),a=i(24314),l=i(88216),d=i(60628),c=i(81774),h=i(84144),u=i(94565),g=i(93983),p=i(5606),m=i(72065),f=i(59422);async function v(e,t,i,c){var g;const v=e.get(l.S),_=e.get(p.i),b=e.get(u.H),w=e.get(m.TG),y=e.get(f.lT);if(await c.item.resolve(s.T.None),!c.part.location)return;const C=c.part.location,S=[],x=new Set(h.BH.getMenuItems(h.eH.EditorContext).map((e=>(0,h.vr)(e)?e.command.id:(0,r.R)())));for(const e of d.Bj.all())x.has(e.desc.id)&&S.push(new o.aU(e.desc.id,h.U8.label(e.desc,{renderShortTitle:!0}),void 0,!0,(async()=>{const i=await v.createModelReference(C.uri);try{const n=new d._k(i.object.textEditorModel,a.e.getStartPosition(C.range)),o=c.item.anchor.range;await w.invokeFunction(e.runEditorCommand.bind(e),t,n,o)}finally{i.dispose()}})));if(c.part.command){const{command:e}=c.part;S.push(new o.Z0),S.push(new o.aU(e.id,e.title,void 0,!0,(async()=>{var t;try{await b.executeCommand(e.id,...null!==(t=e.arguments)&&void 0!==t?t:[])}catch(e){y.notify({severity:f.zb.Error,source:c.item.provider.displayName,message:e})}})))}const k=t.getOption(127);_.showContextMenu({domForShadowRoot:k&&null!==(g=t.getDomNode())&&void 0!==g?g:void 0,getAnchor:()=>{const e=n.i(i);return{x:e.left,y:e.top+e.height+8}},getActions:()=>S,onHide:()=>{t.focus()},autoSelectFirstItem:!0})}async function _(e,t,i,n){const o=e.get(l.S),s=await o.createModelReference(n.uri);await i.invokeWithinContext((async e=>{const o=t.hasSideBySideModifier,r=e.get(g.i6),l=c.Jy.inPeekEditor.getValue(r),h=!o&&i.getOption(88)&&!l;return new d.BT({openToSide:o,openInPeek:h,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e,new d._k(s.object.textEditorModel,a.e.getStartPosition(n.range)),a.e.lift(n.range))})),s.dispose()}},96020:(e,t,i)=>{"use strict";i.d(t,{Np:()=>o,OW:()=>s,Ou:()=>n});const n="editor.action.inlineSuggest.commit",o="editor.action.inlineSuggest.showPrevious",s="editor.action.inlineSuggest.showNext"},20757:(e,t,i)=>{"use strict";i.d(t,{HL:()=>c,NY:()=>a,Vb:()=>r,bY:()=>d,s1:()=>l});var n=i(9488),o=i(97295),s=i(8396);class r{constructor(e,t){this.lineNumber=e,this.parts=t}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(0===this.parts.length)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1);return(0,s.Jj)(i,this.parts.map((e=>({range:{startLineNumber:1,endLineNumber:1,startColumn:e.column,endColumn:e.column},text:e.lines.join("\n")})))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every((e=>0===e.lines.length))}get lineCount(){return 1+this.parts.reduce(((e,t)=>e+t.lines.length-1),0)}}class a{constructor(e,t,i){this.column=e,this.text=t,this.preview=i,this.lines=(0,o.uq)(this.text)}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every(((t,i)=>t===e.lines[i]))}}class l{constructor(e,t,i,n=0){this.lineNumber=e,this.columnRange=t,this.text=i,this.additionalReservedLineCount=n,this.parts=[new a(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=(0,o.uq)(this.text)}renderForScreenReader(e){return this.newLines.join("\n")}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every((e=>0===e.lines.length))}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 d(e,t){return(0,n.fS)(e,t,c)}function c(e,t){return e===t||!(!e||!t)&&(e instanceof r&&t instanceof r||e instanceof l&&t instanceof l)&&e.equals(t)}},14191:(e,t,i)=>{"use strict";i.d(t,{rw:()=>B,Wd:()=>P});var n=i(77514),o=i(4669),s=i(5976),r=i(21070),a=i(97295),l=i(93379),d=i.n(l),c=i(7795),h=i.n(c),u=i(90569),g=i.n(u),p=i(3565),m=i.n(p),f=i(19216),v=i.n(f),_=i(44589),b=i.n(_),w=i(77682),y={};y.styleTagTransform=b(),y.setAttributes=m(),y.insert=g().bind(null,"head"),y.domAPI=h(),y.insertStyleElement=v(),d()(w.Z,y),w.Z&&w.Z.locals&&w.Z.locals;var C=i(52136),S=i(64141),x=i(50187),k=i(24314),L=i(50072),N=i(72042),D=i(84973),E=i(77378),I=i(92550),T=i(91557),M=i(20757),R=i(8396);const A="ghost-text";let P=class extends s.JT{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=(0,r.uh)(this,!1),this.currentTextModel=(0,r.rD)(this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=(0,r.nK)(this,(e=>{if(this.isDisposed.read(e))return;const t=this.currentTextModel.read(e);if(t!==this.model.targetTextModel.read(e))return;const i=this.model.ghostText.read(e);if(!i)return;const n=i instanceof M.s1?i.columnRange:void 0,o=[],s=[];function r(e,t){if(s.length>0){const i=s[s.length-1];t&&i.decorations.push(new I.Kp(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)s.push({content:i,decorations:t?[new I.Kp(1,i.length+1,t,0)]:[]})}const a=t.getLineContent(i.lineNumber);let l,d=0;for(const e of i.parts){let t=e.lines;void 0===l?(o.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):r([a.substring(d,e.column-1)],void 0),t.length>0&&(r(t,A),void 0===l&&e.column<=a.length&&(l=e.column)),d=e.column-1}void 0!==l&&r([a.substring(d)],void 0);const c=void 0!==l?new R.rv(l,a.length+1):void 0;return{replacedRange:n,inlineTexts:o,additionalLines:s,hiddenRange:c,lineNumber:i.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:t}})),this.decorations=(0,r.nK)(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];t.replacedRange&&i.push({range:t.replacedRange.toRange(t.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const e of t.inlineTexts)i.push({range:k.e.fromPositions(new x.L(t.lineNumber,e.column)),options:{description:A,after:{content:e.text,inlineClassName:e.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:D.RM.Left},showIfCollapsed:!0}});return i})),this.additionalLinesWidget=this._register(new B(this.editor,this.languageService.languageIdCodec,(0,r.nK)((e=>{const t=this.uiState.read(e);return t?{lineNumber:t.lineNumber,additionalLines:t.additionalLines,minReservedLineCount:t.additionalReservedLineCount,targetTextModel:t.targetTextModel}:void 0})))),this._register((0,s.OF)((()=>{this.isDisposed.set(!0,void 0)}))),this._register((0,R.RP)(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};var O,F;P=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(O=2,F=N.O,function(e,t){F(e,t,O)})],P);class B extends s.JT{get viewZoneId(){return this._viewZoneId}constructor(e,t,i){super(),this.editor=e,this.languageIdCodec=t,this.lines=i,this._viewZoneId=void 0,this.editorOptionsChanged=(0,r.aq)("editorOptionChanged",o.ju.filter(this.editor.onDidChangeConfiguration,(e=>e.hasChanged(33)||e.hasChanged(117)||e.hasChanged(99)||e.hasChanged(94)||e.hasChanged(51)||e.hasChanged(50)||e.hasChanged(67)))),this._register((0,r.EH)((e=>{const t=this.lines.read(e);this.editorOptionsChanged.read(e),t?this.updateLines(t.lineNumber,t.additionalLines,t.minReservedLineCount):this.clear()})))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones((e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:o}=n.getOptions();this.editor.changeViewZones((n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const s=Math.max(t.length,i);if(s>0){const i=document.createElement("div");!function(e,t,i,n,o){const s=n.get(33),r=n.get(117),l=n.get(94),d=n.get(51),c=n.get(50),h=n.get(67),u=new L.HT(1e4);u.appendString('
    ');for(let e=0,n=i.length;e');const p=a.$i(g),m=a.Ut(g),f=E.A.createEmpty(g,o);(0,T.d1)(new T.IJ(c.isMonospace&&!s,c.canUseHalfwidthRightwardsArrow,g,!1,p,m,0,f,n.decorations,t,0,c.spaceWidth,c.middotWidth,c.wsmiddotWidth,r,"none",l,d!==S.n0.OFF,null),u),u.appendString("
    ")}u.appendString(""),(0,C.N)(e,c);const g=u.build(),p=W?W.createHTML(g):g;e.innerHTML=p}(i,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:s,domNode:i,afterColumnAffinity:1})}}))}}const W=(0,n.Z)("editorGhostText",{createHTML:e=>e})},78573:(e,t,i)=>{"use strict";i.d(t,{f:()=>d});var n=i(21070),o=i(97295),s=i(7988),r=i(93983),a=i(5976),l=i(63580);class d extends a.JT{constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=d.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=d.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=d.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=d.suppressSuggestions.bindTo(this.contextKeyService),this._register((0,n.EH)((e=>{const t=this.model.read(e),i=null==t?void 0:t.state.read(e),n=!!(null==i?void 0:i.inlineCompletion)&&void 0!==(null==i?void 0:i.primaryGhostText)&&!(null==i?void 0:i.primaryGhostText.isEmpty());this.inlineCompletionVisible.set(n),(null==i?void 0:i.primaryGhostText)&&(null==i?void 0:i.inlineCompletion)&&this.suppressSuggestions.set(i.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)}))),this._register((0,n.EH)((e=>{const t=this.model.read(e);let i=!1,n=!0;const r=null==t?void 0:t.primaryGhostText.read(e);if((null==t?void 0:t.selectedSuggestItem)&&r&&r.parts.length>0){const{column:e,lines:a}=r.parts[0],l=a[0];if(e<=t.textModel.getLineIndentColumn(r.lineNumber)){let e=(0,o.LC)(l);-1===e&&(e=l.length-1),i=e>0;const r=t.textModel.getOptions().tabSize;n=s.i.visibleColumnFromColumn(l,e+1,r){"use strict";var n=i(16830),o=i(66520),s=i(21070),r=i(96512),a=i(29102),l=i(96020),d=i(78573),c=i(65321),h=i(56346),u=i(5976),g=i(69317),p=i(50187),m=i(88191),f=i(71922),v=i(14191),_=i(85895),b=i(35534),w=i(17301),y=i(97295),C=i(98401),S=i(69386),x=i(24314),k=i(3860),L=i(96887),N=i(51381),D=i(20757),E=i(71050),I=i(13707),T=i(35146),M=i(15393),R=i(43702),A=i(35382),P=i(45035),O=i(13883),F=i(61761),B=i(6735);class W{constructor(e){this.lines=e,this.tokenization={getLineTokens:e=>this.lines[e-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}var H=i(8396),V=i(35084);async function z(e,t,i,n,o=E.T.None,s){const r=function(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new x.e(e.lineNumber,i.startColumn,e.lineNumber,n):x.e.fromPositions(e,e.with(void 0,n))}(t,i),a=e.all(i),l=new R.ri;for(const e of a)e.groupId&&l.add(e.groupId,e);function d(e){if(!e.yieldsToGroupIds)return[];const t=[];for(const i of e.yieldsToGroupIds||[]){const e=l.get(i);for(const i of e)t.push(i)}return t}const c=new Map,h=new Set;function u(e,t){if(t=[...t,e],h.has(e))return t;h.add(e);try{const i=d(e);for(const e of i){const i=u(e,t);if(i)return i}}finally{h.delete(e)}}function g(e){const s=c.get(e);if(s)return s;const r=u(e,[]);r&&(0,w.Cp)(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${r.map((e=>e.toString?e.toString():""+e)).join(" -> ")}`));const a=new M.CR;return c.set(e,a.p),(async()=>{if(!r){const t=d(e);for(const e of t){const t=await g(e);if(t&&t.items.length>0)return}}try{return await e.provideInlineCompletions(i,t,n,o)}catch(e){return void(0,w.Cp)(e)}})().then((e=>a.complete(e)),(e=>a.error(e))),a.p}const p=await Promise.all(a.map((async e=>({provider:e,completions:await g(e)})))),m=new Map,f=[];for(const e of p){const t=e.completions;if(!t)continue;const n=new U(t,e.provider);f.push(n);for(const e of t.items){const t=q.from(e,n,r,i,s);m.set(t.hash(),t)}}return new j(Array.from(m.values()),new Set(m.keys()),f)}class j{constructor(e,t,i){this.completions=e,this.hashs=t,this.providerResults=i}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class U{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,0===this.refCount&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class q{static from(e,t,i,n,o){let s,r,a=e.range?x.e.lift(e.range):i;if("string"==typeof e.insertText){if(s=e.insertText,o&&e.completeBracketPairs){s=K(s,a.getStartPosition(),n,o);const t=s.length-e.insertText.length;0!==t&&(a=new x.e(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+t))}r=void 0}else if("snippet"in e.insertText){const t=e.insertText.snippet.length;if(o&&e.completeBracketPairs){e.insertText.snippet=K(e.insertText.snippet,a.getStartPosition(),n,o);const i=e.insertText.snippet.length-t;0!==i&&(a=new x.e(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+i))}const i=(new V.Yj).parse(e.insertText.snippet);1===i.children.length&&i.children[0]instanceof V.xv?(s=i.children[0].value,r=void 0):(s=i.toString(),r={snippet:e.insertText.snippet,range:a})}else(0,T.vE)(e.insertText);return new q(s,e.command,a,s,r,e.additionalTextEdits||(0,H.He)(),e,t)}constructor(e,t,i,n,o,s,r,a){this.filterText=e,this.command=t,this.range=i,this.insertText=n,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=r,this.source=a,n=(e=e.replace(/\r\n|\r/g,"\n")).replace(/\r\n|\r/g,"\n")}withRange(e){return new q(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}function K(e,t,i,n){const o=i.getLineContent(t.lineNumber).substring(0,t.column-1)+e,s=i.tokenization.tokenizeLineWithEdit(t,o.length-(t.column-1),e),r=null==s?void 0:s.sliceAndInflate(t.column-1,o.length,0);if(!r)return e;const a=function(e,t){const i=new F.FE,n=new A.Z(i,(e=>t.getLanguageConfiguration(e))),o=new B.xH(new W([e]),n),s=(0,O.w)(o,[],void 0,!0);let r="";const a=e.getLineContent();return function e(t,i){if(2===t.kind)if(e(t.openingBracket,i),i=(0,P.Ii)(i,t.openingBracket.length),t.child&&(e(t.child,i),i=(0,P.Ii)(i,t.child.length)),t.closingBracket)e(t.closingBracket,i),i=(0,P.Ii)(i,t.closingBracket.length);else{const e=n.getSingleLanguageBracketTokens(t.openingBracket.languageId).findClosingTokenText(t.openingBracket.bracketIds);r+=e}else if(3===t.kind);else if(0===t.kind||1===t.kind)r+=a.substring((0,P.F_)(i),(0,P.F_)((0,P.Ii)(i,t.length)));else if(4===t.kind)for(const n of t.children)e(n,i),i=(0,P.Ii)(i,n.length)}(s,P.xl),r}(r,n);return a}var $=i(2484);class G{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){const i=t?this.range.intersectRanges(t):this.range;if(!i)return this;const n=e.getValueInRange(i,1),o=(0,y.Mh)(n,this.text),s=(0,H.QO)(this.range.getStartPosition(),(0,H.CE)(n.substring(0,o))),r=this.text.substring(o),a=x.e.fromPositions(s,this.range.getEndPosition());return new G(a,r)}augments(e){return this.text.startsWith(e.text)&&(t=this.range,(i=e.range).getStartPosition().equals(t.getStartPosition())&&i.getEndPosition().isBeforeOrEqual(t.getEndPosition()));var t,i}computeGhostText(e,t,i,n=0){let o=this.removeCommonPrefix(e);if(o.range.endLineNumber!==o.range.startLineNumber)return;const s=e.getLineContent(o.range.startLineNumber),r=(0,y.V8)(s).length;if(o.range.startColumn-1<=r){const e=(0,y.V8)(o.text).length,t=s.substring(o.range.startColumn-1,r),[i,n]=[o.range.getStartPosition(),o.range.getEndPosition()],a=i.column+t.length<=n.column?i.delta(0,t.length):n,l=x.e.fromPositions(a,n),d=o.text.startsWith(t)?o.text.substring(t.length):o.text.substring(e);o=new G(l,d)}const a=e.getValueInRange(o.range),l=function(e,t){if((null==Z?void 0:Z.originalValue)===e&&(null==Z?void 0:Z.newValue)===t)return null==Z?void 0:Z.changes;{let i=Y(e,t,!0);if(i){const n=Q(i);if(n>0){const o=Y(e,t,!1);o&&Q(o)0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==a.length)return}const h=o.text.length-n;for(const e of l){const n=o.range.startColumn+e.originalStart+e.originalLength;if("subwordSmart"===t&&i&&i.lineNumber===o.range.startLineNumber&&n0)return;if(0===e.modifiedLength)continue;const s=e.modifiedStart+e.modifiedLength,r=Math.max(e.modifiedStart,Math.min(s,h)),a=o.text.substring(e.modifiedStart,r),l=o.text.substring(r,Math.max(e.modifiedStart,s));a.length>0&&c.push(new D.NY(n,a,!1)),l.length>0&&c.push(new D.NY(n,l,!0))}return new D.Vb(d,c)}}let Z;function Q(e){let t=0;for(const i of e)t+=i.originalLength;return t}function Y(e,t,i){if(e.length>5e3||t.length>5e3)return;function n(e){let t=0;for(let i=0,n=e.length;it&&(t=n)}return t}const o=Math.max(n(e),n(t));function s(e){if(e<0)throw new Error("unexpected");return o+e+1}function r(e){let t=0,n=0;const o=new Int32Array(e.length);for(let r=0,a=e.length;ra},{getElements:()=>l}).ComputeDiff(!1).changes}var J=function(e,t){return function(i,n){t(i,n,e)}};let X=class extends u.JT{constructor(e,t,i,n,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=i,this.languageFeaturesService=n,this.languageConfigurationService=o,this._updateOperation=this._register(new u.XK),this.inlineCompletions=(0,s.DN)("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=(0,s.DN)("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent((()=>{this._updateOperation.clear()})))}fetch(e,t,i){var n,o;const r=new ee(e,t,this.textModel.getVersionId()),a=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(null===(n=this._updateOperation.value)||void 0===n?void 0:n.request.satisfies(r))return this._updateOperation.value.promise;if(null===(o=a.get())||void 0===o?void 0:o.request.satisfies(r))return Promise.resolve(!0);const l=!!this._updateOperation.value;this._updateOperation.clear();const d=new E.A,c=(async()=>{var n,o;if((l||t.triggerKind===L.bw.Automatic)&&await(n=this._debounceValue.get(this.textModel),o=d.token,new Promise((e=>{let t;const i=setTimeout((()=>{t&&t.dispose(),e()}),n);o&&(t=o.onCancellationRequested((()=>{clearTimeout(i),t&&t.dispose(),e()})))}))),d.token.isCancellationRequested||this.textModel.getVersionId()!==r.versionId)return!1;const c=new Date,h=await z(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,d.token,this.languageConfigurationService);if(d.token.isCancellationRequested||this.textModel.getVersionId()!==r.versionId)return!1;const u=new Date;this._debounceValue.update(this.textModel,u.getTime()-c.getTime());const g=new ie(h,r,this.textModel,this.versionId);if(i){const t=i.toInlineCompletion(void 0);i.canBeReused(this.textModel,e)&&!h.has(t)&&g.prepend(i.inlineCompletion,t.range,!0)}return this._updateOperation.clear(),(0,s.PS)((e=>{a.set(g,e)})),!0})(),h=new te(r,d,c);return this._updateOperation.value=h,c}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;(null===(t=this._updateOperation.value)||void 0===t?void 0:t.request.context.selectedSuggestionInfo)&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};X=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([J(3,f.p),J(4,N.c_)],X);class ee{constructor(e,t,i){this.position=e,this.context=t,this.versionId=i}satisfies(e){return this.position.equals(e.position)&&(t=this.context.selectedSuggestionInfo,i=e.context.selectedSuggestionInfo,t&&i?((e,t)=>e.equals(t))(t,i):t===i)&&(e.context.triggerKind===L.bw.Automatic||this.context.triggerKind===L.bw.Explicit)&&this.versionId===e.versionId;var t,i}}class te{constructor(e,t,i){this.request=e,this.cancellationTokenSource=t,this.promise=i}dispose(){this.cancellationTokenSource.cancel()}}class ie{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,i,n){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=i,this.versionId=n,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=(0,s.nK)(this,(e=>{this.versionId.read(e);let t=!1;for(const e of this._inlineCompletions)t=t||e._updateRange(this.textModel);return t&&this._rangeVersionIdValue++,this._rangeVersionIdValue}));const o=i.deltaDecorations([],e.completions.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._inlineCompletions=e.completions.map(((e,t)=>new ne(e,o[t],this._rangeVersionId)))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,0===this._refCount){setTimeout((()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map((e=>e.decorationId)),[])}),0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,i){i&&e.source.addRef();const n=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new ne(e,n,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}}class ne{get forwardStable(){var e;return null!==(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)&&void 0!==e&&e}constructor(e,t,i,n){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=i,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=null!=n?n:e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new G(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,i){const n=this._toFilterTextReplacement(i).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(i).getStartPosition())||t.lineNumber!==n.range.startLineNumber)return!1;const o=e.getValueInRange(n.range,1),s=n.text,r=Math.max(0,t.column-n.range.startColumn);let a=s.substring(0,r),l=s.substring(r),d=o.substring(0,r),c=o.substring(r);const h=e.getLineIndentColumn(n.range.startLineNumber);return n.range.startColumn<=h&&(d=d.trimStart(),0===d.length&&(c=c.trimStart()),a=a.trimStart(),0===a.length&&(l=l.trimStart())),a.startsWith(d)&&!!(0,I.Sy)(c,l)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new G(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return oe(this._getUpdatedRange(e)).isBefore(oe(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){const t=e.getDecorationRange(this.decorationId);return t?!this._updatedRange.equalsRange(t)&&(this._updatedRange=t,!0):(this._isValid=!1,!0)}}function oe(e){return e.startLineNumber===e.endLineNumber?new p.L(1,1+e.endColumn-e.startColumn):new p.L(1+e.endLineNumber-e.startLineNumber,e.endColumn)}var se,re=i(98762),ae=i(94565),le=i(72065),de=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e[e.Undo=0]="Undo",e[e.Redo=1]="Redo",e[e.AcceptWord=2]="AcceptWord",e[e.Other=3]="Other"}(se||(se={}));let ce=class extends u.JT{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,i,n,o,r,a,l,d,c,h,u){let g;super(),this.textModel=e,this.selectedSuggestItem=t,this.textModelVersionId=i,this._positions=n,this._debounceValue=o,this._suggestPreviewEnabled=r,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=d,this._instantiationService=c,this._commandService=h,this._languageConfigurationService=u,this._source=this._register(this._instantiationService.createInstance(X,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=(0,s.uh)(this,!1),this._forceUpdateSignal=(0,s.GN)("forceUpdate"),this._selectedInlineCompletionId=(0,s.uh)(this,void 0),this._primaryPosition=(0,s.nK)(this,(e=>{var t;return null!==(t=this._positions.read(e)[0])&&void 0!==t?t:new p.L(1,1)})),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([se.Redo,se.Undo,se.AcceptWord]),this._fetchInlineCompletions=(0,s.aK)({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:L.bw.Automatic}),handleChange:(e,t)=>(e.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(e.change)?t.preserveCurrentCompletion=!0:e.didChange(this._forceUpdateSignal)&&(t.inlineCompletionTriggerKind=e.change),!0)},((e,t)=>{if(this._forceUpdateSignal.read(e),!(this._enabled.read(e)&&this.selectedSuggestItem.read(e)||this._isActive.read(e)))return void this._source.cancelUpdate();this.textModelVersionId.read(e);const i=this.selectedInlineCompletion.get(),n=t.preserveCurrentCompletion||(null==i?void 0:i.forwardStable)?i:void 0,o=this._source.suggestWidgetInlineCompletions.get(),r=this.selectedSuggestItem.read(e);if(o&&!r){const e=this._source.inlineCompletions.get();(0,s.PS)((t=>{(!e||o.request.versionId>e.request.versionId)&&this._source.inlineCompletions.set(o.clone(),t),this._source.clearSuggestWidgetInlineCompletions(t)}))}const a=this._primaryPosition.read(e),l={triggerKind:t.inlineCompletionTriggerKind,selectedSuggestionInfo:null==r?void 0:r.toSelectedSuggestionInfo()};return this._source.fetch(a,l,n)})),this._filteredInlineCompletionItems=(0,s.nK)(this,(e=>{const t=this._source.inlineCompletions.read(e);if(!t)return[];const i=this._primaryPosition.read(e),n=t.inlineCompletions.filter((t=>t.isVisible(this.textModel,i,e)));return n})),this.selectedInlineCompletionIndex=(0,s.nK)(this,(e=>{const t=this._selectedInlineCompletionId.read(e),i=this._filteredInlineCompletionItems.read(e),n=void 0===this._selectedInlineCompletionId?-1:i.findIndex((e=>e.semanticId===t));return-1===n?(this._selectedInlineCompletionId.set(void 0,void 0),0):n})),this.selectedInlineCompletion=(0,s.nK)(this,(e=>this._filteredInlineCompletionItems.read(e)[this.selectedInlineCompletionIndex.read(e)])),this.lastTriggerKind=this._source.inlineCompletions.map(this,(e=>null==e?void 0:e.request.context.triggerKind)),this.inlineCompletionsCount=(0,s.nK)(this,(e=>this.lastTriggerKind.read(e)===L.bw.Explicit?this._filteredInlineCompletionItems.read(e).length:void 0)),this.state=(0,s.bk)({owner:this,equalityComparer:(e,t)=>e&&t?(0,D.bY)(e.ghostTexts,t.ghostTexts)&&e.inlineCompletion===t.inlineCompletion&&e.suggestItem===t.suggestItem:e===t},(e=>{var t,i;const n=this.textModel,o=this.selectedSuggestItem.read(e);if(o){const s=o.toSingleTextEdit().removeCommonPrefix(n),r=this._computeAugmentation(s,e);if(!this._suggestPreviewEnabled.read(e)&&!r)return;const a=null!==(t=null==r?void 0:r.edit)&&void 0!==t?t:s,l=r?r.edit.text.length-s.text.length:0,d=this._suggestPreviewMode.read(e),c=this._positions.read(e),h=[a,...he(this.textModel,c,a)],u=h.map(((e,t)=>e.computeGhostText(n,d,c[t],l))).filter(C.$K);return{edits:h,primaryGhostText:null!==(i=u[0])&&void 0!==i?i:new D.Vb(a.range.endLineNumber,[]),ghostTexts:u,inlineCompletion:null==r?void 0:r.completion,suggestItem:o}}{if(!this._isActive.read(e))return;const t=this.selectedInlineCompletion.read(e);if(!t)return;const i=t.toSingleTextEdit(e),o=this._inlineSuggestMode.read(e),s=this._positions.read(e),r=[i,...he(this.textModel,s,i)],a=r.map(((e,t)=>e.computeGhostText(n,o,s[t],0))).filter(C.$K);if(!a[0])return;return{edits:r,primaryGhostText:a[0],ghostTexts:a,inlineCompletion:t,suggestItem:void 0}}})),this.ghostTexts=(0,s.bk)({owner:this,equalityComparer:D.bY},(e=>{const t=this.state.read(e);if(t)return t.ghostTexts})),this.primaryGhostText=(0,s.bk)({owner:this,equalityComparer:D.HL},(e=>{const t=this.state.read(e);if(t)return null==t?void 0:t.primaryGhostText})),this._register((0,s.jx)(this._fetchInlineCompletions)),this._register((0,s.EH)((e=>{var t,i;const n=this.state.read(e),o=null==n?void 0:n.inlineCompletion;if((null==o?void 0:o.semanticId)!==(null==g?void 0:g.semanticId)&&(g=o,o)){const e=o.inlineCompletion,n=e.source;null===(i=(t=n.provider).handleItemDidShow)||void 0===i||i.call(t,n.inlineCompletions,e.sourceInlineCompletion,e.insertText)}})))}async trigger(e){this._isActive.set(!0,e),await this._fetchInlineCompletions.get()}async triggerExplicitly(e){(0,s.c8)(e,(e=>{this._isActive.set(!0,e),this._forceUpdateSignal.trigger(e,L.bw.Explicit)})),await this._fetchInlineCompletions.get()}stop(e){(0,s.c8)(e,(e=>{this._isActive.set(!1,e),this._source.clear(e)}))}_computeAugmentation(e,t){const i=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t),o=n?n.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(C.$K);return(0,b.Fr)(o,(n=>{let o=n.toSingleTextEdit(t);return o=o.removeCommonPrefix(i,x.e.fromPositions(o.range.getStartPosition(),e.range.getEndPosition())),o.augments(e)?{completion:n,edit:o}:void 0}))}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineCompletionItems.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)}async accept(e){var t;if(e.getModel()!==this.textModel)throw new w.he;const i=this.state.get();if(!i||i.primaryGhostText.isEmpty()||!i.inlineCompletion)return;const n=i.inlineCompletion.toInlineCompletion(void 0);if(e.pushUndoStop(),n.snippetInfo)e.executeEdits("inlineSuggestion.accept",[S.h.replaceMove(n.range,""),...n.additionalTextEdits]),e.setPosition(n.snippetInfo.range.getStartPosition(),"inlineCompletionAccept"),null===(t=re.f.get(e))||void 0===t||t.insert(n.snippetInfo.snippet,{undoStopBefore:!1});else{const t=i.edits,o=ue(t).map((e=>k.Y.fromPositions(e)));e.executeEdits("inlineSuggestion.accept",[...t.map((e=>S.h.replaceMove(e.range,e.text))),...n.additionalTextEdits]),e.setSelections(o,"inlineCompletionAccept")}n.command&&n.source.addRef(),(0,s.PS)((e=>{this._source.clear(e),this._isActive.set(!1,e)})),n.command&&(await this._commandService.executeCommand(n.command.id,...n.command.arguments||[]).then(void 0,w.Cp),n.source.removeRef())}async acceptNextWord(e){await this._acceptNext(e,((e,t)=>{const i=this.textModel.getLanguageIdAtPosition(e.lineNumber,e.column),n=this._languageConfigurationService.getLanguageConfiguration(i),o=new RegExp(n.wordDefinition.source,n.wordDefinition.flags.replace("g","")),s=t.match(o);let r=0;r=s&&void 0!==s.index?0===s.index?s[0].length:s.index:t.length;const a=/\s+/g.exec(t);return a&&void 0!==a.index&&a.index+a[0].length{const i=t.match(/\n/);return i&&void 0!==i.index?i.index+1:t.length}))}async _acceptNext(e,t){if(e.getModel()!==this.textModel)throw new w.he;const i=this.state.get();if(!i||i.primaryGhostText.isEmpty()||!i.inlineCompletion)return;const n=i.primaryGhostText,o=i.inlineCompletion.toInlineCompletion(void 0);if(o.snippetInfo||o.filterText!==o.insertText)return void await this.accept(e);const s=n.parts[0],r=new p.L(n.lineNumber,s.column),a=s.text,l=t(r,a);if(l===a.length&&1===n.parts.length)return void this.accept(e);const d=a.substring(0,l),c=this._positions.get(),h=c[0];o.source.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop();const t=x.e.fromPositions(h,r),i=e.getModel().getValueInRange(t)+d,n=new G(t,i),o=[n,...he(this.textModel,c,n)],s=ue(o).map((e=>k.Y.fromPositions(e)));e.executeEdits("inlineSuggestion.accept",o.map((e=>S.h.replaceMove(e.range,e.text)))),e.setSelections(s,"inlineCompletionPartialAccept")}finally{this._isAcceptingPartially=!1}if(o.source.provider.handlePartialAccept){const t=x.e.fromPositions(o.range.getStartPosition(),(0,H.QO)(r,(0,H.CE)(d))),i=e.getModel().getValueInRange(t,1);o.source.provider.handlePartialAccept(o.source.inlineCompletions,o.sourceInlineCompletion,i.length)}}finally{o.source.removeRef()}}handleSuggestAccepted(e){var t,i;const n=e.toSingleTextEdit().removeCommonPrefix(this.textModel),o=this._computeAugmentation(n,void 0);if(!o)return;const s=o.completion.inlineCompletion;null===(i=(t=s.source.provider).handlePartialAccept)||void 0===i||i.call(t,s.source.inlineCompletions,s.sourceInlineCompletion,n.text.length)}};function he(e,t,i){if(1===t.length)return[];const n=t[0],o=t.slice(1),s=i.range.getStartPosition(),r=i.range.getEndPosition(),a=e.getValueInRange(x.e.fromPositions(n,r)),l=(0,H.Bm)(n,s);if(l.lineNumber<1)return(0,w.dL)(new w.he(`positionWithinTextEdit line number should be bigger than 0.\n\t\t\tInvalid subtraction between ${n.toString()} and ${s.toString()}`)),[];const d=function(e,t){let i="";const n=(0,y.Fw)(e);for(let e=t.lineNumber-1;e{const i=(0,H.QO)((0,H.Bm)(t,s),r),n=e.getValueInRange(x.e.fromPositions(t,i)),o=(0,y.Mh)(a,n),l=x.e.fromPositions(t,t.delta(0,o));return new G(l,d)}))}function ue(e){const t=H._i.createSortPermutation(e,((e,t)=>x.e.compareRangesUsingStarts(e.range,t.range))),i=(0,H.Ym)(t.apply(e));return t.inverse().apply(i).map((e=>e.getEndPosition()))}ce=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([de(9,le.TG),de(10,ae.H),de(11,N.c_)],ce);var ge=i(4669),pe=i(18217),me=i(49925),fe=i(9488);class ve extends u.JT{get selectedItem(){return this._selectedItem}constructor(e,t,i,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=i,this.onWillAccept=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=(0,s.uh)(this,void 0),this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))})));const o=me.n.get(this.editor);if(o){this._register(o.registerSelector({priority:100,select:(e,t,i)=>{var n;(0,s.PS)((e=>this.checkModelVersion(e)));const r=this.editor.getModel();if(!r)return-1;const a=null===(n=this.suggestControllerPreselector())||void 0===n?void 0:n.removeCommonPrefix(r);if(!a)return-1;const l=p.L.lift(t),d=i.map(((e,t)=>{const i=_e.fromSuggestion(o,r,l,e,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(r);return{index:t,valid:a.augments(i),prefixLength:i.text.length,suggestItem:e}})).filter((e=>e&&e.valid&&e.prefixLength>0)),c=(0,b.dI)(d,(0,fe.tT)((e=>e.prefixLength),fe.fv));return c?c.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(o.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))),this._register(o.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.update(!1)}))),this._register(o.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))))};this._register(ge.ju.once(o.model.onDidTrigger)((e=>{t()}))),this._register(o.onWillInsertSuggestItem((e=>{const t=this.editor.getPosition(),i=this.editor.getModel();if(!t||!i)return;const n=_e.fromSuggestion(o,i,t,e.item,this.isShiftKeyPressed);this.onWillAccept(n)})))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();var i,n;this._isActive===e&&((i=this._currentSuggestItemInfo)===(n=t)||i&&n&&i.equals(n))||(this._isActive=e,this._currentSuggestItemInfo=t,(0,s.PS)((e=>{this.checkModelVersion(e),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,e)})))}getSuggestItemInfo(){const e=me.n.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),i=this.editor.getPosition(),n=this.editor.getModel();return t&&i&&n?_e.fromSuggestion(e,n,i,t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=me.n.get(this.editor);null==e||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=me.n.get(this.editor);null==e||e.forceRenderingAbove()}}class _e{static fromSuggestion(e,t,i,n,o){let{insertText:s}=n.completion,r=!1;if(4&n.completion.insertTextRules){const e=(new V.Yj).parse(s);e.children.length<100&&pe.l.adjustWhitespace(t,i,!0,e),s=e.toString(),r=!0}const a=e.getOverwriteInfo(n,o);return new _e(x.e.fromPositions(i.delta(0,-a.overwriteBefore),i.delta(0,Math.max(a.overwriteAfter,0))),s,n.completion.kind,r)}constructor(e,t,i,n){this.range=e,this.insertText=t,this.completionItemKind=i,this.isSnippetText=n}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new L.ln(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new G(this.range,this.insertText)}}var be,we=i(63580),ye=i(38832),Ce=i(33108),Se=i(93983),xe=i(91847),ke=i(86367),Le=function(e,t){return function(i,n){t(i,n,e)}};let Ne=be=class extends u.JT{static get(e){return e.getContribution(be.ID)}constructor(e,t,i,n,o,r,a,h,m){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._configurationService=n,this._commandService=o,this._debounceService=r,this._languageFeaturesService=a,this._accessibilitySignalService=h,this._keybindingService=m,this.model=this._register((0,s.DN)("inlineCompletionModel",void 0)),this._textModelVersionId=(0,s.uh)(this,-1),this._positions=(0,s.uh)(this,[new p.L(1,1)]),this._suggestWidgetAdaptor=this._register(new ve(this.editor,(()=>{var e,t;return null===(t=null===(e=this.model.get())||void 0===e?void 0:e.selectedInlineCompletion.get())||void 0===t?void 0:t.toSingleTextEdit(void 0)}),(e=>this.updateObservables(e,se.Other)),(e=>{(0,s.PS)((t=>{var i;this.updateObservables(t,se.Other),null===(i=this.model.get())||void 0===i||i.handleSuggestAccepted(e)}))}))),this._enabled=(0,s.rD)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).enabled)),this._fontFamily=(0,s.rD)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).fontFamily)),this._ghostTexts=(0,s.nK)(this,(e=>{var t;const i=this.model.read(e);return null!==(t=null==i?void 0:i.ghostTexts.read(e))&&void 0!==t?t:[]})),this._stablizedGhostTexts=function(e,t){const i=(0,s.uh)("result",[]),n=[];return t.add((0,s.EH)((t=>{const o=e.read(t);(0,s.PS)((e=>{if(o.length!==n.length){n.length=o.length;for(let e=0;et.set(o[i],e)))}))}))),i}(this._ghostTexts,this._store),this._ghostTextWidgets=(0,ke.Zg)(this,this._stablizedGhostTexts,((e,t)=>t.add(this._instantiationService.createInstance(v.Wd,this.editor,{ghostText:e,minReservedLineCount:(0,s.Dz)(0),targetTextModel:this.model.map((e=>null==e?void 0:e.textModel))})))).recomputeInitiallyAndOnChange(this._store),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._playAccessibilitySignal=(0,s.GN)(this),this._isReadonly=(0,s.rD)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(91))),this._textModel=(0,s.rD)(this.editor.onDidChangeModel,(()=>this.editor.getModel())),this._textModelIfWritable=(0,s.nK)((e=>this._isReadonly.read(e)?void 0:this._textModel.read(e))),this._register(new d.f(this._contextKeyService,this.model)),this._register((0,s.EH)((i=>{const n=this._textModelIfWritable.read(i);(0,s.PS)((i=>{if(this.model.set(void 0,i),this.updateObservables(i,se.Other),n){const o=t.createInstance(ce,n,this._suggestWidgetAdaptor.selectedItem,this._textModelVersionId,this._positions,this._debounceValue,(0,s.rD)(e.onDidChangeConfiguration,(()=>e.getOption(118).preview)),(0,s.rD)(e.onDidChangeConfiguration,(()=>e.getOption(118).previewMode)),(0,s.rD)(e.onDidChangeConfiguration,(()=>e.getOption(62).mode)),this._enabled);this.model.set(o,i)}}))})));const f=this._register((0,c.aU)());this._register((0,s.EH)((e=>{const t=this._fontFamily.read(e);f.setStyle(""===t||"default"===t?"":`\n.monaco-editor .ghost-text-decoration,\n.monaco-editor .ghost-text-decoration-preview,\n.monaco-editor .ghost-text {\n\tfont-family: ${t};\n}`)})));const b=e=>{var t;return e.isUndoing?se.Undo:e.isRedoing?se.Redo:(null===(t=this.model.get())||void 0===t?void 0:t.isAcceptingPartially)?se.AcceptWord:se.Other};let w;this._register(e.onDidChangeModelContent((e=>(0,s.PS)((t=>this.updateObservables(t,b(e))))))),this._register(e.onDidChangeCursorPosition((e=>(0,s.PS)((t=>{var i;this.updateObservables(t,se.Other),3!==e.reason&&"api"!==e.source||null===(i=this.model.get())||void 0===i||i.stop(t)}))))),this._register(e.onDidType((()=>(0,s.PS)((e=>{var t;this.updateObservables(e,se.Other),this._enabled.get()&&(null===(t=this.model.get())||void 0===t||t.trigger(e))}))))),this._register(this._commandService.onDidExecuteCommand((t=>{new Set([g.wk.Tab.id,g.wk.DeleteLeft.id,g.wk.DeleteRight.id,l.Ou,"acceptSelectedSuggestion"]).has(t.commandId)&&e.hasTextFocus()&&this._enabled.get()&&(0,s.PS)((e=>{var t;null===(t=this.model.get())||void 0===t||t.trigger(e)}))}))),this._register(this.editor.onDidBlurEditorWidget((()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||_.QG.dropDownVisible||(0,s.PS)((e=>{var t;null===(t=this.model.get())||void 0===t||t.stop(e)}))}))),this._register((0,s.EH)((e=>{var t;const i=null===(t=this.model.read(e))||void 0===t?void 0:t.state.read(e);(null==i?void 0:i.suggestItem)?i.primaryGhostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()}))),this._register((0,u.OF)((()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()}))),this._register((0,s.nJ)({handleChange:(e,t)=>(e.didChange(this._playAccessibilitySignal)&&(w=void 0),!0)},(async e=>{this._playAccessibilitySignal.read(e);const t=this.model.read(e),i=null==t?void 0:t.state.read(e);if(t&&i&&i.inlineCompletion){if(i.inlineCompletion.semanticId!==w){w=i.inlineCompletion.semanticId;const e=t.textModel.getLineContent(i.primaryGhostText.lineNumber);this._accessibilitySignalService.playSignal(ye.iP.inlineSuggestion).then((()=>{this.editor.getOption(8)&&this.provideScreenReaderUpdate(i.primaryGhostText.renderForScreenReader(e))}))}}else w=void 0}))),this._register(new _.oU(this.editor,this.model,this._instantiationService)),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}))),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}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(148)&&(n=(0,we.NC)("showAccessibleViewHint","Inspect this in the accessible view ({0})",i.getAriaLabel())),n?(0,h.Z9)(e+", "+n):(0,h.Z9)(e)}updateObservables(e,t){var i,n,o;const s=this.editor.getModel();this._textModelVersionId.set(null!==(i=null==s?void 0:s.getVersionId())&&void 0!==i?i:-1,e,t),this._positions.set(null!==(o=null===(n=this.editor.getSelections())||void 0===n?void 0:n.map((e=>e.getPosition())))&&void 0!==o?o:[new p.L(1,1)],e)}shouldShowHoverAt(e){var t;const i=null===(t=this.model.get())||void 0===t?void 0:t.primaryGhostText.get();return!!i&&i.parts.some((t=>e.containsPosition(new p.L(i.lineNumber,t.column))))}shouldShowHoverAtViewZone(e){var t,i;return null!==(i=null===(t=this._ghostTextWidgets.get()[0])||void 0===t?void 0:t.ownsViewZone(e))&&void 0!==i&&i}};Ne.ID="editor.contrib.inlineCompletionsController",Ne=be=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Le(1,le.TG),Le(2,Se.i6),Le(3,Ce.Ui),Le(4,ae.H),Le(5,m.A),Le(6,f.p),Le(7,ye.IV),Le(8,xe.d)],Ne);var De=i(55621),Ee=i(84144);class Ie extends n.R6{constructor(){super({id:Ie.ID,label:we.NC("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:Se.Ao.and(a.u.writable,d.f.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,t){var i;const n=Ne.get(t);null===(i=null==n?void 0:n.model.get())||void 0===i||i.next()}}Ie.ID=l.OW;class Te extends n.R6{constructor(){super({id:Te.ID,label:we.NC("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:Se.Ao.and(a.u.writable,d.f.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,t){var i;const n=Ne.get(t);null===(i=null==n?void 0:n.model.get())||void 0===i||i.previous()}}Te.ID=l.Np;class Me extends n.R6{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:we.NC("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:a.u.writable})}async run(e,t){const i=Ne.get(t);await(0,r.Hr)((async e=>{var t;await(null===(t=null==i?void 0:i.model.get())||void 0===t?void 0:t.triggerExplicitly(e)),null==i||i.playAccessibilitySignal(e)}))}}class Re extends n.R6{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:we.NC("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:Se.Ao.and(a.u.writable,d.f.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:Se.Ao.and(a.u.writable,d.f.inlineSuggestionVisible)},menuOpts:[{menuId:Ee.eH.InlineSuggestionToolbar,title:we.NC("acceptWord","Accept Word"),group:"primary",order:2}]})}async run(e,t){var i;const n=Ne.get(t);await(null===(i=null==n?void 0:n.model.get())||void 0===i?void 0:i.acceptNextWord(n.editor))}}class Ae extends n.R6{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:we.NC("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:Se.Ao.and(a.u.writable,d.f.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:Ee.eH.InlineSuggestionToolbar,title:we.NC("acceptLine","Accept Line"),group:"secondary",order:2}]})}async run(e,t){var i;const n=Ne.get(t);await(null===(i=null==n?void 0:n.model.get())||void 0===i?void 0:i.acceptNextLine(n.editor))}}class Pe extends n.R6{constructor(){super({id:l.Ou,label:we.NC("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:d.f.inlineSuggestionVisible,menuOpts:[{menuId:Ee.eH.InlineSuggestionToolbar,title:we.NC("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:Se.Ao.and(d.f.inlineSuggestionVisible,a.u.tabMovesFocus.toNegated(),d.f.inlineSuggestionHasIndentationLessThanTabSize,De._y.Visible.toNegated(),a.u.hoverFocused.toNegated())}})}async run(e,t){var i;const n=Ne.get(t);n&&(null===(i=n.model.get())||void 0===i||i.accept(n.editor),n.editor.focus())}}class Oe extends n.R6{constructor(){super({id:Oe.ID,label:we.NC("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:d.f.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(e,t){const i=Ne.get(t);(0,s.PS)((e=>{var t;null===(t=null==i?void 0:i.model.get())||void 0===t||t.stop(e)}))}}Oe.ID="editor.action.inlineSuggest.hide";class Fe extends Ee.Ke{constructor(){super({id:Fe.ID,title:we.NC("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:Ee.eH.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:Se.Ao.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e,t){const i=e.get(Ce.Ui),n="always"===i.getValue("editor.inlineSuggest.showToolbar")?"onHover":"always";i.updateValue("editor.inlineSuggest.showToolbar",n)}}Fe.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";var Be=i(59365),We=i(72042),He=i(92467),Ve=i(31106),ze=i(50988),je=i(10829),Ue=function(e,t){return function(i,n){t(i,n,e)}};class qe{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Ke=class{constructor(e,t,i,n,o,s){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=Ne.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new o.YM(1e3,this,x.e.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}return 7===i.type&&t.shouldShowHoverAt(i.range)||6===i.type&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new o.YM(1e3,this,i.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if("onHover"!==this._editor.getOption(62).showToolbar)return[];const i=Ne.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new qe(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new u.SL,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&this.renderScreenReaderText(e,n,i);const o=n.controller.model.get(),r=this._instantiationService.createInstance(_.QG,this._editor,!1,(0,s.Dz)(null),o.selectedInlineCompletionIndex,o.inlineCompletionsCount,o.selectedInlineCompletion.map((e=>{var t;return null!==(t=null==e?void 0:e.inlineCompletion.source.inlineCompletions.commands)&&void 0!==t?t:[]})));return e.fragment.appendChild(r.getDomNode()),o.triggerExplicitly(),i.add(r),i}renderScreenReaderText(e,t,i){const n=c.$,o=n("div.hover-row.markdown-hover"),r=c.R3(o,n("div.hover-contents",{"aria-live":"assertive"})),a=i.add(new He.$({editor:this._editor},this._languageService,this._openerService));i.add((0,s.EH)((n=>{var o;const s=null===(o=t.controller.model.read(n))||void 0===o?void 0:o.primaryGhostText.read(n);if(s){const t=this._editor.getModel().getLineContent(s.lineNumber);(t=>{i.add(a.onDidRenderAsync((()=>{r.className="hover-contents code-hover-contents",e.onContentsChanged()})));const n=we.NC("inlineSuggestionFollows","Suggestion:"),o=i.add(a.render((new Be.W5).appendText(n).appendCodeblock("text",t)));r.replaceChildren(o.element)})(s.renderForScreenReader(t))}else c.mc(r)}))),e.fragment.appendChild(o)}};Ke=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ue(1,We.O),Ue(2,ze.v),Ue(3,Ve.F),Ue(4,le.TG),Ue(5,je.b)],Ke),(0,n._K)(Ne.ID,Ne,3),(0,n.Qr)(Me),(0,n.Qr)(Ie),(0,n.Qr)(Te),(0,n.Qr)(Re),(0,n.Qr)(Ae),(0,n.Qr)(Pe),(0,n.Qr)(Oe),(0,Ee.r1)(Fe),o.Ae.register(Ke)},85895:(e,t,i)=>{"use strict";i.d(t,{oU:()=>q,QG:()=>G});var n=i(65321),o=i(10244),s=i(12983),r=i(74741),a=i(9488),l=i(15393),d=i(73046),c=i(5976),h=i(21070),u=i(1432),g=i(25670),p=i(93379),m=i.n(p),f=i(7795),v=i.n(f),_=i(90569),b=i.n(_),w=i(3565),y=i.n(w),C=i(19216),S=i.n(C),x=i(44589),k=i.n(x),L=i(28300),N={};N.styleTagTransform=k(),N.setAttributes=y(),N.insert=b().bind(null,"head"),N.domAPI=v(),N.insertStyleElement=S(),m()(L.Z,N),L.Z&&L.Z.locals&&L.Z.locals;var D,E=i(50187),I=i(96887),T=i(96020),M=i(63580),R=i(44691),A=i(75194),P=i(84144),O=i(94565),F=i(93983),B=i(5606),W=i(72065),H=i(91847),V=i(10829),z=i(59554),j=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},U=function(e,t){return function(i,n){t(i,n,e)}};let q=class extends c.JT{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=(0,h.rD)(this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(62).showToolbar)),this.sessionPosition=void 0,this.position=(0,h.nK)(this,(e=>{var t,i,n;const o=null===(t=this.model.read(e))||void 0===t?void 0:t.primaryGhostText.read(e);if(!this.alwaysShowToolbar.read(e)||!o||0===o.parts.length)return this.sessionPosition=void 0,null;const s=o.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==o.lineNumber&&(this.sessionPosition=void 0);const r=new E.L(o.lineNumber,Math.min(s,null!==(n=null===(i=this.sessionPosition)||void 0===i?void 0:i.column)&&void 0!==n?n:Number.MAX_SAFE_INTEGER));return this.sessionPosition=r,r})),this._register((0,h.gp)(((t,i)=>{const n=this.model.read(t);if(!n||!this.alwaysShowToolbar.read(t))return;const o=i.add(this.instantiationService.createInstance(G,this.editor,!0,this.position,n.selectedInlineCompletionIndex,n.inlineCompletionsCount,n.selectedInlineCompletion.map((e=>{var t;return null!==(t=null==e?void 0:e.inlineCompletion.source.inlineCompletions.commands)&&void 0!==t?t:[]}))));e.addContentWidget(o),i.add((0,c.OF)((()=>e.removeContentWidget(o)))),i.add((0,h.EH)((e=>{this.position.read(e)&&n.lastTriggerKind.read(e)!==I.bw.Explicit&&n.triggerExplicitly()})))})))}};q=j([U(2,W.TG)],q);const K=(0,z.q5)("inline-suggestion-hints-next",d.l.chevronRight,(0,M.NC)("parameterHintsNextIcon","Icon for show next parameter hint.")),$=(0,z.q5)("inline-suggestion-hints-previous",d.l.chevronLeft,(0,M.NC)("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let G=D=class extends c.JT{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const n=new r.aU(e,t,i,!0,(()=>this._commandService.executeCommand(e))),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let s=t;return o&&(s=(0,M.NC)({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),n.tooltip=s,n}constructor(e,t,i,o,s,d,c,u,p,m,f){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=o,this._suggestionCount=s,this._extraCommands=d,this._commandService=c,this.keybindingService=p,this._contextKeyService=m,this._menuService=f,this.id="InlineSuggestionHintsContentWidget"+D.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,n.h)("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[(0,n.h)("div@toolBar")]),this.previousAction=this.createCommandAction(T.Np,(0,M.NC)("previous","Previous"),g.k.asClassName($)),this.availableSuggestionCountAction=new r.aU("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(T.OW,(0,M.NC)("next","Next"),g.k.asClassName(K)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(P.eH.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new l.pY((()=>{this.availableSuggestionCountAction.label=""}),100)),this.disableButtonsDebounced=this._register(new l.pY((()=>{this.previousAction.enabled=this.nextAction.enabled=!1}),100)),this.lastCommands=[],this.toolBar=this._register(u.createInstance(Y,this.nodes.toolBar,P.eH.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof P.U8)return u.createInstance(Q,e,void 0);if(e===this.availableSuggestionCountAction){const t=new Z(void 0,e,{label:!0,icon:!1});return t.setClass("availableSuggestionCount"),t}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{D._dropDownVisible=e}))),this._register((0,h.EH)((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register((0,h.EH)((e=>{const t=this._suggestionCount.read(e),i=this._currentSuggestionIdx.read(e);void 0!==t?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${i+1}/${t}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),void 0!==t&&t>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()}))),this._register((0,h.EH)((e=>{const t=this._extraCommands.read(e);if((0,a.fS)(this.lastCommands,t))return;this.lastCommands=t;const i=t.map((e=>({class:void 0,id:e.id,enabled:!0,tooltip:e.tooltip||"",label:e.title,run:t=>this._commandService.executeCommand(e.id)})));for(const[e,t]of this.inlineCompletionsActionsMenus.getActions())for(const e of t)e instanceof P.U8&&i.push(e);i.length>0&&i.unshift(new r.Z0),this.toolBar.setAdditionalSecondaryActions(i)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};G._dropDownVisible=!1,G.id=0,G=D=j([U(6,O.H),U(7,W.TG),U(8,H.d),U(9,F.i6),U(10,P.co)],G);class Z extends o.gU{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 Q extends R.Mm{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=(0,n.h)("div.keybinding").root;new s.e(t,u.OS,{disableTitle:!0,...s.F}).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}}let Y=class extends A.T{constructor(e,t,i,n,o,s,r,a){super(e,{resetMenu:t,...i},n,o,s,r,a),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){var e,t,i,n,o,s,r;const a=[],l=[];(0,R.vr)(this.menu,null===(e=this.options2)||void 0===e?void 0:e.menuOptions,{primary:a,secondary:l},null===(i=null===(t=this.options2)||void 0===t?void 0:t.toolbarOptions)||void 0===i?void 0:i.primaryGroup,null===(o=null===(n=this.options2)||void 0===n?void 0:n.toolbarOptions)||void 0===o?void 0:o.shouldInlineSubmenu,null===(r=null===(s=this.options2)||void 0===s?void 0:s.toolbarOptions)||void 0===r?void 0:r.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),a.unshift(...this.prependedPrimaryActions),this.setActions(a,l)}setPrependedPrimaryActions(e){(0,a.fS)(this.prependedPrimaryActions,e,((e,t)=>e===t))||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){(0,a.fS)(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};Y=j([U(3,P.co),U(4,F.i6),U(5,B.i),U(6,H.d),U(7,V.b)],Y)},8396:(e,t,i)=>{"use strict";i.d(t,{Bm:()=>m,CE:()=>f,He:()=>h,Jj:()=>l,QO:()=>p,RP:()=>g,Ym:()=>v,_i:()=>_,rv:()=>u});var n=i(17301),o=i(5976),s=i(21070),r=i(50187),a=i(24314);function l(e,t){const i=new d(e),n=t.map((e=>{const t=a.e.lift(e.range);return{startOffset:i.getOffset(t.getStartPosition()),endOffset:i.getOffset(t.getEndPosition()),text:e.text}}));n.sort(((e,t)=>t.startOffset-e.startOffset));for(const t of n)e=e.substring(0,t.startOffset)+t.text+e.substring(t.endOffset);return e}class d{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;tt)throw new n.he(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new a.e(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function g(e,t){const i=new o.SL,n=e.createDecorationsCollection();return i.add((0,s.UV)({debugName:()=>`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function p(e,t){return new r.L(e.lineNumber+t.lineNumber-1,1===t.lineNumber?e.column+t.column-1:t.column)}function m(e,t){return new r.L(e.lineNumber-t.lineNumber+1,e.lineNumber-t.lineNumber==0?e.column-t.column+1:e.column)}function f(e){let t=1,i=1;for(const n of e)"\n"===n?(t++,i=1):i++;return new r.L(t,i)}function v(e){var t;const i=[];let n=0,o=0,s=0;for(const l of e){const e=f(null!==(t=l.text)&&void 0!==t?t:""),d=r.L.lift({lineNumber:l.range.startLineNumber+o,column:l.range.startColumn+(l.range.startLineNumber===n?s:0)}),c=p(d,e);i.push(a.e.fromPositions(d,c)),o+=e.lineNumber-l.range.endLineNumber+l.range.startLineNumber-1,s=c.column-l.range.endColumn,n=l.range.endLineNumber}return i}class _{constructor(e){this._indexMap=e}static createSortPermutation(e,t){const i=Array.from(e.keys()).sort(((i,n)=>t(e[i],e[n])));return new _(i)}apply(e){return e.map(((t,i)=>e[this._indexMap[i]]))}inverse(){const e=this._indexMap.slice();for(let t=0;t{"use strict";var n=i(16830),o=i(66520),s=i(29102),r=i(5976),a=i(21070),l=i(69386),d=i(50187),c=i(24314),h=i(93379),u=i.n(h),g=i(7795),p=i.n(g),m=i(90569),f=i.n(m),v=i(3565),_=i.n(v),b=i(19216),w=i.n(b),y=i(44589),C=i.n(y),S=i(45426),x={};x.styleTagTransform=C(),x.setAttributes=_(),x.insert=f().bind(null,"head"),x.domAPI=p(),x.insertStyleElement=w(),u()(S.Z,x),S.Z&&S.Z.locals&&S.Z.locals;var k=i(72042),L=i(84973),N=i(92550),D=i(14191),E=i(8396);const I="inline-edit";let T=class extends r.JT{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=(0,a.uh)(this,!1),this.currentTextModel=(0,a.rD)(this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=(0,a.nK)(this,(e=>{var t;if(this.isDisposed.read(e))return;const i=this.currentTextModel.read(e);if(i!==this.model.targetTextModel.read(e))return;const n=this.model.ghostText.read(e);if(!n)return;let o=null===(t=this.model.range)||void 0===t?void 0:t.read(e);o&&o.startLineNumber===o.endLineNumber&&o.startColumn===o.endColumn&&(o=void 0);const s=(!o||o.startLineNumber===o.endLineNumber)&&1===n.parts.length&&1===n.parts[0].lines.length,r=1===n.parts.length&&n.parts[0].lines.every((e=>0===e.length)),a=[],l=[];function d(e,t){if(l.length>0){const i=l[l.length-1];t&&i.decorations.push(new N.Kp(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)l.push({content:i,decorations:t?[new N.Kp(1,i.length+1,t,0)]:[]})}const c=i.getLineContent(n.lineNumber);let h,u=0;if(!r){for(const e of n.parts){let t=e.lines;o&&!s&&(d(t,I),t=[]),void 0===h?(a.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):d([c.substring(u,e.column-1)],void 0),t.length>0&&(d(t,I),void 0===h&&e.column<=c.length&&(h=e.column)),u=e.column-1}void 0!==h&&d([c.substring(u)],void 0)}const g=void 0!==h?new E.rv(h,c.length+1):void 0,p=s||!o?n.lineNumber:o.endLineNumber-1;return{inlineTexts:a,additionalLines:l,hiddenRange:g,lineNumber:p,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:i,range:o,isSingleLine:s,isPureRemove:r,backgroundColoring:this.model.backgroundColoring.read(e)}})),this.decorations=(0,a.nK)(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];if(t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"inline-edit-hidden",description:"inline-edit-hidden"}}),t.range){const e=[];if(t.isSingleLine)e.push(t.range);else if(t.isPureRemove){const i=t.range.endLineNumber-t.range.startLineNumber;for(let n=0;n{const t=this.uiState.read(e);return t&&!t.isPureRemove?{lineNumber:t.lineNumber,additionalLines:t.additionalLines,minReservedLineCount:t.additionalReservedLineCount,targetTextModel:t.targetTextModel}:void 0})))),this._register((0,r.OF)((()=>{this.isDisposed.set(!0,void 0)}))),this._register((0,E.RP)(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};var M,R;T=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(M=2,R=k.O,function(e,t){R(e,t,M)})],T);var A=i(93983),P=i(72065),O=i(96887),F=i(71922),B=i(71050),W=i(20757),H=i(94565),V=i(65321),z=i(12983),j=i(74741),U=i(9488),q=i(1432),K=i(87280),$={};$.styleTagTransform=C(),$.setAttributes=_(),$.insert=f().bind(null,"head"),$.domAPI=p(),$.insertStyleElement=w(),u()(K.Z,$),K.Z&&K.Z.locals&&K.Z.locals;var G,Z=i(44691),Q=i(75194),Y=i(84144),J=i(5606),X=i(91847),ee=i(10829),te=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ie=function(e,t){return function(i,n){t(i,n,e)}};let ne=class extends r.JT{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=(0,a.rD)(this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(63).showToolbar)),this.sessionPosition=void 0,this.position=(0,a.nK)(this,(e=>{var t,i,n;const o=null===(t=this.model.read(e))||void 0===t?void 0:t.widget.model.ghostText.read(e);if(!this.alwaysShowToolbar.read(e)||!o||0===o.parts.length)return this.sessionPosition=void 0,null;const s=o.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==o.lineNumber&&(this.sessionPosition=void 0);const r=new d.L(o.lineNumber,Math.min(s,null!==(n=null===(i=this.sessionPosition)||void 0===i?void 0:i.column)&&void 0!==n?n:Number.MAX_SAFE_INTEGER));return this.sessionPosition=r,r})),this._register((0,a.gp)(((t,i)=>{if(!this.model.read(t)||!this.alwaysShowToolbar.read(t))return;const n=i.add(this.instantiationService.createInstance(oe,this.editor,!0,this.position));e.addContentWidget(n),i.add((0,r.OF)((()=>e.removeContentWidget(n))))})))}};ne=te([ie(2,P.TG)],ne);let oe=G=class extends r.JT{constructor(e,t,i,n,o,s){super(),this.editor=e,this.withBorder=t,this._position=i,this._contextKeyService=o,this._menuService=s,this.id="InlineEditHintsContentWidget"+G.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,V.h)("div.inlineEditHints",{className:this.withBorder?".withBorder":""},[(0,V.h)("div@toolBar")]),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(Y.eH.InlineEditActions,this._contextKeyService)),this.toolBar=this._register(n.createInstance(re,this.nodes.toolBar,this.editor,Y.eH.InlineEditToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof Y.U8)return n.createInstance(se,e,void 0)},telemetrySource:"InlineEditToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{G._dropDownVisible=e}))),this._register((0,a.EH)((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register((0,a.EH)((e=>{const t=[];for(const[e,i]of this.inlineCompletionsActionsMenus.getActions())for(const e of i)e instanceof Y.U8&&t.push(e);t.length>0&&t.unshift(new j.Z0),this.toolBar.setAdditionalSecondaryActions(t)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};oe._dropDownVisible=!1,oe.id=0,oe=G=te([ie(3,P.TG),ie(4,A.i6),ie(5,Y.co)],oe);class se extends Z.Mm{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=(0,V.h)("div.keybinding").root;new z.e(t,q.OS,{disableTitle:!0,...z.F}).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineEditStatusBarItemLabel")}}updateTooltip(){}}let re=class extends Q.T{constructor(e,t,i,n,o,s,r,a,l){super(e,{resetMenu:i,...n},o,s,r,a,l),this.editor=t,this.menuId=i,this.options2=n,this.menuService=o,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this._store.add(this.editor.onDidChangeCursorPosition((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){var e,t,i,n,o,s,r;const a=[],l=[];(0,Z.vr)(this.menu,null===(e=this.options2)||void 0===e?void 0:e.menuOptions,{primary:a,secondary:l},null===(i=null===(t=this.options2)||void 0===t?void 0:t.toolbarOptions)||void 0===i?void 0:i.primaryGroup,null===(o=null===(n=this.options2)||void 0===n?void 0:n.toolbarOptions)||void 0===o?void 0:o.shouldInlineSubmenu,null===(r=null===(s=this.options2)||void 0===s?void 0:s.toolbarOptions)||void 0===r?void 0:r.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),a.unshift(...this.prependedPrimaryActions),this.setActions(a,l)}setAdditionalSecondaryActions(e){(0,U.fS)(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};re=te([ie(4,Y.co),ie(5,A.i6),ie(6,J.i),ie(7,X.d),ie(8,ee.b)],re);var ae,le=i(33108),de=function(e,t){return function(i,n){t(i,n,e)}};class ce{constructor(e,t){this.widget=e,this.edit=t}dispose(){this.widget.dispose()}}let he=ae=class extends r.JT{static get(e){return e.getContribution(ae.ID)}constructor(e,t,i,n,o,s){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.languageFeaturesService=n,this._commandService=o,this._configurationService=s,this._isVisibleContext=ae.inlineEditVisibleContext.bindTo(this.contextKeyService),this._isCursorAtInlineEditContext=ae.cursorAtInlineEditContext.bindTo(this.contextKeyService),this._currentEdit=this._register((0,a.DN)(this,void 0)),this._isAccepting=!1,this._enabled=(0,a.rD)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).enabled)),this._fontFamily=(0,a.rD)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).fontFamily)),this._backgroundColoring=(0,a.rD)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).backgroundColoring));const r=(0,a.aq)("InlineEditController.modelContentChangedSignal",e.onDidChangeModelContent);this._register((0,a.EH)((t=>{this._enabled.read(t)&&(r.read(t),this.getInlineEdit(e,!0))})));const l=(0,a.rD)(e.onDidChangeCursorPosition,(()=>e.getPosition()));this._register((0,a.EH)((e=>{if(!this._enabled.read(e))return;const t=l.read(e);t&&this.checkCursorPosition(t)}))),this._register((0,a.EH)((t=>{const i=this._currentEdit.read(t);if(this._isCursorAtInlineEditContext.set(!1),!i)return void this._isVisibleContext.set(!1);this._isVisibleContext.set(!0);const n=e.getPosition();n&&this.checkCursorPosition(n)})));const d=(0,a.aq)("InlineEditController.editorBlurSignal",e.onDidBlurEditorWidget);this._register((0,a.EH)((t=>{var i;this._enabled.read(t)&&(d.read(t),this._configurationService.getValue("editor.experimentalInlineEdit.keepOnBlur")||e.getOption(63).keepOnBlur||(null===(i=this._currentRequestCts)||void 0===i||i.dispose(),this._currentRequestCts=void 0,this.clear(!1)))})));const c=(0,a.aq)("InlineEditController.editorFocusSignal",e.onDidFocusEditorText);this._register((0,a.EH)((t=>{this._enabled.read(t)&&(c.read(t),this.getInlineEdit(e,!0))})));const h=this._register((0,V.aU)());this._register((0,a.EH)((e=>{const t=this._fontFamily.read(e);h.setStyle(""===t||"default"===t?"":`\n.monaco-editor .inline-edit-decoration,\n.monaco-editor .inline-edit-decoration-preview,\n.monaco-editor .inline-edit {\n\tfont-family: ${t};\n}`)}))),this._register(new ne(this.editor,this._currentEdit,this.instantiationService))}checkCursorPosition(e){var t;if(!this._currentEdit)return void this._isCursorAtInlineEditContext.set(!1);const i=null===(t=this._currentEdit.get())||void 0===t?void 0:t.edit;i?this._isCursorAtInlineEditContext.set(c.e.containsPosition(i.range,e)):this._isCursorAtInlineEditContext.set(!1)}validateInlineEdit(e,t){var i,n;if(t.text.includes("\n")&&t.range.startLineNumber!==t.range.endLineNumber&&t.range.startColumn!==t.range.endColumn){if(1!==t.range.startColumn)return!1;const o=t.range.endLineNumber;if(t.range.endColumn!==(null!==(n=null===(i=e.getModel())||void 0===i?void 0:i.getLineLength(o))&&void 0!==n?n:0)+1)return!1}return!0}async fetchInlineEdit(e,t){this._currentRequestCts&&this._currentRequestCts.dispose(!0);const i=e.getModel();if(!i)return;const n=i.getVersionId(),o=this.languageFeaturesService.inlineEditProvider.all(i);if(0===o.length)return;const s=o[0];this._currentRequestCts=new B.A;const r=this._currentRequestCts.token,a=t?O.rn.Automatic:O.rn.Invoke;var l;if(t&&await(50,l=r,new Promise((e=>{let t;const i=setTimeout((()=>{t&&t.dispose(),e()}),50);l&&(t=l.onCancellationRequested((()=>{clearTimeout(i),t&&t.dispose(),e()})))}))),r.isCancellationRequested||i.isDisposed()||i.getVersionId()!==n)return;const d=await s.provideInlineEdit(i,{triggerKind:a},r);return d&&!r.isCancellationRequested&&!i.isDisposed()&&i.getVersionId()===n&&this.validateInlineEdit(e,d)?d:void 0}async getInlineEdit(e,t){var i;this._isCursorAtInlineEditContext.set(!1),this.clear(),this._isAccepting=!1;const n=await this.fetchInlineEdit(e,t);if(!n)return;const o=n.range.endLineNumber,s=n.range.endColumn,r=new W.Vb(o,[new W.NY(s,n.text,!1)]),l=this.instantiationService.createInstance(T,this.editor,{ghostText:(0,a.Dz)(r),minReservedLineCount:(0,a.Dz)(0),targetTextModel:(0,a.Dz)(null!==(i=this.editor.getModel())&&void 0!==i?i:void 0),range:(0,a.Dz)(n.range),backgroundColoring:this._backgroundColoring});this._currentEdit.set(new ce(l,n),void 0)}async trigger(){await this.getInlineEdit(this.editor,!1)}async jumpBack(){this._jumpBackPosition&&(this.editor.setPosition(this._jumpBackPosition),this.editor.revealPositionInCenterIfOutsideViewport(this._jumpBackPosition))}accept(){var e;this._isAccepting=!0;const t=null===(e=this._currentEdit.get())||void 0===e?void 0:e.edit;if(!t)return;let i=t.text;t.text.startsWith("\n")&&(i=t.text.substring(1)),this.editor.pushUndoStop(),this.editor.executeEdits("acceptCurrent",[l.h.replace(c.e.lift(t.range),i)]),t.accepted&&this._commandService.executeCommand(t.accepted.id,...t.accepted.arguments||[]),this.freeEdit(t),this._currentEdit.set(void 0,void 0)}jumpToCurrent(){var e,t;this._jumpBackPosition=null===(e=this.editor.getSelection())||void 0===e?void 0:e.getStartPosition();const i=null===(t=this._currentEdit.get())||void 0===t?void 0:t.edit;if(!i)return;const n=d.L.lift({lineNumber:i.range.startLineNumber,column:i.range.startColumn});this.editor.setPosition(n),this.editor.revealPositionInCenterIfOutsideViewport(n)}clear(e=!0){var t;const i=null===(t=this._currentEdit.get())||void 0===t?void 0:t.edit;i&&(null==i?void 0:i.rejected)&&!this._isAccepting&&e&&this._commandService.executeCommand(i.rejected.id,...i.rejected.arguments||[]),i&&this.freeEdit(i),this._currentEdit.set(void 0,void 0)}freeEdit(e){const t=this.editor.getModel();if(!t)return;const i=this.languageFeaturesService.inlineEditProvider.all(t);0!==i.length&&i[0].freeInlineEdit(e)}shouldShowHoverAt(e){const t=this._currentEdit.get();if(!t)return!1;const i=t.edit,n=t.widget.model;if(c.e.containsPosition(i.range,e.getStartPosition())||c.e.containsPosition(i.range,e.getEndPosition()))return!0;const o=n.ghostText.get();return!!o&&o.parts.some((t=>e.containsPosition(new d.L(o.lineNumber,t.column))))}shouldShowHoverAtViewZone(e){var t,i;return null!==(i=null===(t=this._currentEdit.get())||void 0===t?void 0:t.widget.ownsViewZone(e))&&void 0!==i&&i}};he.ID="editor.contrib.inlineEditController",he.inlineEditVisibleKey="inlineEditVisible",he.inlineEditVisibleContext=new A.uy(ae.inlineEditVisibleKey,!1),he.cursorAtInlineEditKey="cursorAtInlineEdit",he.cursorAtInlineEditContext=new A.uy(ae.cursorAtInlineEditKey,!1),he=ae=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([de(1,P.TG),de(2,A.i6),de(3,F.p),de(4,H.H),de(5,le.Ui)],he);class ue extends n.R6{constructor(){super({id:"editor.action.inlineEdit.accept",label:"Accept Inline Edit",alias:"Accept Inline Edit",precondition:A.Ao.and(s.u.writable,he.inlineEditVisibleContext),kbOpts:[{weight:101,primary:2,kbExpr:A.Ao.and(s.u.writable,he.inlineEditVisibleContext,he.cursorAtInlineEditContext)}],menuOpts:[{menuId:Y.eH.InlineEditToolbar,title:"Accept",group:"primary",order:1}]})}async run(e,t){const i=he.get(t);null==i||i.accept()}}class ge extends n.R6{constructor(){const e=A.Ao.and(s.u.writable,A.Ao.not(he.inlineEditVisibleKey));super({id:"editor.action.inlineEdit.trigger",label:"Trigger Inline Edit",alias:"Trigger Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e}})}async run(e,t){const i=he.get(t);null==i||i.trigger()}}class pe extends n.R6{constructor(){const e=A.Ao.and(s.u.writable,he.inlineEditVisibleContext,A.Ao.not(he.cursorAtInlineEditKey));super({id:"editor.action.inlineEdit.jumpTo",label:"Jump to Inline Edit",alias:"Jump to Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e},menuOpts:[{menuId:Y.eH.InlineEditToolbar,title:"Jump To Edit",group:"primary",order:3,when:e}]})}async run(e,t){const i=he.get(t);null==i||i.jumpToCurrent()}}class me extends n.R6{constructor(){const e=A.Ao.and(s.u.writable,he.cursorAtInlineEditContext);super({id:"editor.action.inlineEdit.jumpBack",label:"Jump Back from Inline Edit",alias:"Jump Back from Inline Edit",precondition:e,kbOpts:{weight:110,primary:2646,kbExpr:e},menuOpts:[{menuId:Y.eH.InlineEditToolbar,title:"Jump Back",group:"primary",order:3,when:e}]})}async run(e,t){const i=he.get(t);null==i||i.jumpBack()}}class fe extends n.R6{constructor(){const e=A.Ao.and(s.u.writable,he.inlineEditVisibleContext);super({id:"editor.action.inlineEdit.reject",label:"Reject Inline Edit",alias:"Reject Inline Edit",precondition:e,kbOpts:{weight:100,primary:9,kbExpr:e},menuOpts:[{menuId:Y.eH.InlineEditToolbar,title:"Reject",group:"secondary",order:2}]})}async run(e,t){const i=he.get(t);null==i||i.clear()}}var ve=function(e,t){return function(i,n){t(i,n,e)}};class _e{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let be=class{constructor(e,t,i){this._editor=e,this._instantiationService=t,this._telemetryService=i,this.hoverOrdinal=5}suggestHoverAnchor(e){const t=he.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId)){const t=i.range;return new o.YM(1e3,this,t,e.event.posx,e.event.posy,!1)}}return 7===i.type&&t.shouldShowHoverAt(i.range)||6===i.type&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new o.YM(1e3,this,i.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if("onHover"!==this._editor.getOption(63).showToolbar)return[];const i=he.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new _e(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new r.SL;this._telemetryService.publicLog2("inlineEditHover.shown");const n=this._instantiationService.createInstance(oe,this._editor,!1,(0,a.Dz)(null));return e.fragment.appendChild(n.getDomNode()),i.add(n),i}};be=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ve(1,P.TG),ve(2,ee.b)],be),(0,n.Qr)(ue),(0,n.Qr)(fe),(0,n.Qr)(pe),(0,n.Qr)(me),(0,n.Qr)(ge),(0,n._K)(he.ID,he,3),o.Ae.register(be)},52165:(e,t,i)=>{"use strict";i.d(t,{r:()=>D});var n=i(65321),o=i(15393),s=i(73046),r=i(5976),a=i(97295),l=i(25670),d=i(93379),c=i.n(d),h=i(7795),u=i.n(h),g=i(90569),p=i.n(g),m=i(3565),f=i.n(m),v=i(19216),_=i.n(v),b=i(44589),w=i.n(b),y=i(16668),C={};C.styleTagTransform=w(),C.setAttributes=f(),C.insert=p().bind(null,"head"),C.domAPI=u(),C.insertStyleElement=_(),c()(y.Z,C),y.Z&&y.Z.locals&&y.Z.locals;var S=i(24314),x=i(13961),k=i(72065);const L=x.qx.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:a.B4,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class N extends r.JT{constructor(e,t,i,n,o){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=n.$(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=n.$("span.icon");this.domNode.append(t),t.classList.add(...l.k.asClassNameArray(s.l.loading),"codicon-modifier-spin");const i=()=>{const e=this.editor.getOption(67);this.domNode.style.height=`${e}px`,this.domNode.style.width=`${Math.ceil(.8*e)}px`};i(),this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(52)||e.hasChanged(67))&&i()}))),this._register(n.nm(this.domNode,n.tw.CLICK,(e=>{this.delegate.cancel()})))}getId(){return N.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)}}N.baseId="editor.widget.inlineProgressWidget";let D=class extends r.JT{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new r.XK),this._currentWidget=new r.XK,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}async showWhile(e,t,i){const n=this._operationIdPool++;this._currentOperation=n,this.clear(),this._showPromise.value=(0,o.Vg)((()=>{const n=S.e.fromPositions(e);this._currentDecorations.set([{range:n,options:L}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(N,this.id,this._editor,n,t,i))}),this._showDelay);try{return await i}finally{this._currentOperation===n&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};var E,I;D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(E=2,I=k.TG,function(e,t){I(e,t,E)})],D)},97615:(e,t,i)=>{"use strict";var n=i(16830),o=i(28108),s=i(29102),r=i(63580);class a extends n.R6{constructor(){super({id:"expandLineSelection",label:r.NC("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:s.u.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.P.expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(i.source,!0)}}(0,n.Qr)(a)},50995:(e,t,i)=>{"use strict";var n=i(22258),o=i(69317),s=i(16830),r=i(61329),a=i(97295),l=i(69386),d=i(24314);class c{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){const i=function(e,t){t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);const i=[];let n=0,o=0;const s=t.length;for(let r=1,c=e.getLineCount();r<=c;r++){const c=e.getLineContent(r),h=c.length+1;let u=0;if(oe.tokenization.getLineTokens(t),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i)},getLineContent:null};if(n.startLineNumber===n.endLineNumber&&1===e.getLineMaxColumn(n.startLineNumber)){const i=n.startLineNumber,o=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(o)?t.addEditOperation(new d.e(1,1,1,1),null):(t.addEditOperation(new d.e(i,1,i,1),e.getLineContent(o)),t.addEditOperation(new d.e(o,1,o,e.getLineMaxColumn(o)),null)),n=new g.Y(o,1,o,1)}else{let i,s;if(this._isMovingDown){i=n.endLineNumber+1,s=e.getLineContent(i),t.addEditOperation(new d.e(i-1,e.getLineMaxColumn(i-1),i,e.getLineMaxColumn(i)),null);let h=s;if(this.shouldAutoIndent(e,n)){const u=this.matchEnterRule(e,l,o,i,n.startLineNumber-1);if(null!==u){const t=a.V8(e.getLineContent(i)),n=u+b.Y(t,o),l=b.J(n,o,r);h=l+this.trimStart(s)}else{c.getLineContent=t=>t===n.startLineNumber?e.getLineContent(i):e.getLineContent(t);const t=(0,w.n8)(this._autoIndent,c,e.getLanguageIdAtPosition(i,1),n.startLineNumber,l,this._languageConfigurationService);if(null!==t){const n=a.V8(e.getLineContent(i)),l=b.Y(t,o);if(l!==b.Y(n,o)){const e=b.J(l,o,r);h=e+this.trimStart(s)}}}t.addEditOperation(new d.e(n.startLineNumber,1,n.startLineNumber,1),h+"\n");const g=this.matchEnterRuleMovingDown(e,l,o,n.startLineNumber,i,h);if(null!==g)0!==g&&this.getIndentEditsOfMovingBlock(e,t,n,o,r,g);else{c.getLineContent=t=>t===n.startLineNumber?h:t>=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);const s=(0,w.n8)(this._autoIndent,c,e.getLanguageIdAtPosition(i,1),n.startLineNumber+1,l,this._languageConfigurationService);if(null!==s){const i=a.V8(e.getLineContent(n.startLineNumber)),l=b.Y(s,o),d=b.Y(i,o);if(l!==d){const i=l-d;this.getIndentEditsOfMovingBlock(e,t,n,o,r,i)}}}}else t.addEditOperation(new d.e(n.startLineNumber,1,n.startLineNumber,1),h+"\n")}else if(i=n.startLineNumber-1,s=e.getLineContent(i),t.addEditOperation(new d.e(i,1,i+1,1),null),t.addEditOperation(new d.e(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+s),this.shouldAutoIndent(e,n)){c.getLineContent=t=>t===i?e.getLineContent(n.startLineNumber):e.getLineContent(t);const s=this.matchEnterRule(e,l,o,n.startLineNumber,n.startLineNumber-2);if(null!==s)0!==s&&this.getIndentEditsOfMovingBlock(e,t,n,o,r,s);else{const s=(0,w.n8)(this._autoIndent,c,e.getLanguageIdAtPosition(n.startLineNumber,1),i,l,this._languageConfigurationService);if(null!==s){const i=a.V8(e.getLineContent(n.startLineNumber)),l=b.Y(s,o),d=b.Y(i,o);if(l!==d){const i=l-d;this.getIndentEditsOfMovingBlock(e,t,n,o,r,i)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>f.U.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>f.U.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,o){if(o){let s=o.indentation;o.indentAction===v.wU.None||o.indentAction===v.wU.Indent?s=o.indentation+o.appendText:o.indentAction===v.wU.IndentOutdent?s=o.indentation:o.indentAction===v.wU.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);const r=e.getLineContent(n);if(this.trimStart(r).indexOf(this.trimStart(s))>=0){const o=a.V8(e.getLineContent(n));let r=a.V8(s);const l=(0,w.tI)(e,n,this._languageConfigurationService);return null!==l&&2&l&&(r=t.unshiftIndent(r)),b.Y(r,i)-b.Y(o,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,o,s){if(a.ow(s)>=0){const s=e.getLineMaxColumn(o),r=(0,y.A)(this._autoIndent,e,new d.e(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let o=n-1;for(;o>=1;){const t=e.getLineContent(o);if(a.ow(t)>=0)break;o--}if(o<1||n>e.getLineCount())return null;const s=e.getLineMaxColumn(o),r=(0,y.A)(this._autoIndent,e,new d.e(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,o,s){let r=o;for(;r>=1;){let t;if(t=r===o&&void 0!==s?s:e.getLineContent(r),a.ow(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(r),c=(0,y.A)(this._autoIndent,e,new d.e(r,l,r,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,c)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,o,s){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){const l=e.getLineContent(r),c=a.V8(l),h=b.Y(c,n)+s,u=b.J(h,n,o);u!==c&&(t.addEditOperation(new d.e(r,1,r,c.length+1),u),r===i.endLineNumber&&i.endColumn<=c.length+1&&""===u&&(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=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(S=3,x=_.c_,function(e,t){x(e,t,S)})],C);class k{static getCollator(){return k._COLLATOR||(k._COLLATOR=new Intl.Collator),k._COLLATOR}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){const i=function(e,t,i){const n=L(e,t,i);return n?l.h.replace(new d.e(n.startLineNumber,1,n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),n.after.join("\n")):null}(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(null===e)return!1;const n=L(e,t,i);if(!n)return!1;for(let e=0,t=n.before.length;e=o)return null;const s=[];for(let t=n;t<=o;t++)s.push(e.getLineContent(t));let r=s.slice(0);return r.sort(k.getCollator().compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:o,before:s,after:r}}k._COLLATOR=null;var N=i(63580),D=i(84144);class E extends s.R6{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>d.e.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let e=1;enew u.L(e.positionLineNumber,e.positionColumn))));const o=t.getSelection();if(null===o)return;const s=new c(o,n);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}}A.ID="editor.action.trimTrailingWhitespace";class P extends s.R6{constructor(){super({id:"editor.action.deleteLines",label:N.NC("lines.delete","Delete Line"),alias:"Delete Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let o=0;const s=[],r=[];for(let e=0,t=i.length;e1&&(a-=1,c=n.getLineMaxColumn(a)),s.push(l.h.replace(new g.Y(a,c,d,h),"")),r.push(new g.Y(a-o,t.positionColumn,a-o,t.positionColumn)),o+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,r),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));const i=[];let n=t[0];for(let e=1;e=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}class O extends s.R6{constructor(){super({id:"editor.action.indentLines",label:N.NC("lines.indent","Indent Line"),alias:"Indent Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2142,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,h.u6.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class F extends s.R6{constructor(){super({id:"editor.action.outdentLines",label:N.NC("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2140,weight:100}})}run(e,t){o.wk.Outdent.runEditorCommand(e,t,null)}}class B extends s.R6{constructor(){super({id:"editor.action.insertLineBefore",label:N.NC("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,h.u6.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class W extends s.R6{constructor(){super({id:"editor.action.insertLineAfter",label:N.NC("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,h.u6.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class H extends s.R6{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),o=[];for(let e=0,t=n.length-1;el.h.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}}class V extends s.R6{constructor(){super({id:"editor.action.joinLines",label:N.NC("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(d.e.compareRangesUsingStarts);const o=[],s=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new g.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new g.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));o.push(s);const r=t.getModel();if(null===r)return;const a=[],c=[];let h=n,u=0;for(let e=0,t=o.length;e=1){let e=!0;""===_&&(e=!1),!e||" "!==_.charAt(_.length-1)&&"\t"!==_.charAt(_.length-1)||(e=!1,_=_.replace(/[\s\uFEFF\xA0]+$/g," "));const n=t.substr(i-1);_+=(e?" ":"")+n,f=e?n.length+1:n.length}else f=0}const b=new d.e(i,s,p,m);if(!b.isEmpty()){let e;t.isEmpty()?(a.push(l.h.replace(b,_)),e=new g.Y(b.startLineNumber-u,_.length-f+1,i-u,_.length-f+1)):t.startLineNumber===t.endLineNumber?(a.push(l.h.replace(b,_)),e=new g.Y(t.startLineNumber-u,t.startColumn,t.endLineNumber-u,t.endColumn)):(a.push(l.h.replace(b,_)),e=new g.Y(t.startLineNumber-u,t.startColumn,t.startLineNumber-u,_.length-v)),null!==d.e.intersectRanges(b,n)?h=e:c.push(e)}u+=b.endLineNumber-b.startLineNumber}c.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,a,c),t.pushUndoStop()}}class z extends s.R6{constructor(){super({id:"editor.action.transpose",label:N.NC("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:p.u.writable})}run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=[];for(let e=0,t=i.length;e=a){if(s.lineNumber===n.getLineCount())continue;const e=new d.e(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new r.T4(new g.Y(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t))}else{const e=new d.e(s.lineNumber,Math.max(1,s.column-1),s.lineNumber,s.column+1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new r.hP(e,t,new g.Y(s.lineNumber,s.column+1,s.lineNumber,s.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class j extends s.R6{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=t.getOption(130),s=[];for(const e of i)if(e.isEmpty()){const i=e.getStartPosition(),r=t.getConfiguredWordAtPosition(i);if(!r)continue;const a=new d.e(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),c=n.getValueInRange(a);s.push(l.h.replace(a,this._modifyText(c,o)))}else{const t=n.getValueInRange(e);s.push(l.h.replace(e,this._modifyText(t,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}}class U{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(e){}}return this._actual}isSupported(){return null!==this.get()}}class q extends j{constructor(){super({id:"editor.action.transformToTitlecase",label:N.NC("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:p.u.writable})}_modifyText(e,t){const i=q.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,(e=>e.toLocaleUpperCase())):e}}q.titleBoundary=new U("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class K extends j{constructor(){super({id:"editor.action.transformToSnakecase",label:N.NC("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:p.u.writable})}_modifyText(e,t){const i=K.caseBoundary.get(),n=K.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}K.caseBoundary=new U("(\\p{Ll})(\\p{Lu})","gmu"),K.singleLetters=new U("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class $ extends j{constructor(){super({id:"editor.action.transformToCamelcase",label:N.NC("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:p.u.writable})}_modifyText(e,t){const i=$.wordBoundary.get();if(!i)return e;const n=e.split(i);return n.shift()+n.map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join("")}}$.wordBoundary=new U("[_\\s-]","gm");class G extends j{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every((e=>e.isSupported()))}constructor(){super({id:"editor.action.transformToKebabcase",label:N.NC("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:p.u.writable})}_modifyText(e,t){const i=G.caseBoundary.get(),n=G.singleLetters.get(),o=G.underscoreBoundary.get();return i&&n&&o?e.replace(o,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}G.caseBoundary=new U("(\\p{Ll})(\\p{Lu})","gmu"),G.singleLetters=new U("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),G.underscoreBoundary=new U("(\\S)(_)(\\S)","gm"),(0,s.Qr)(class extends E{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:N.NC("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:D.eH.MenubarSelectionMenu,group:"2_line",title:N.NC({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}),(0,s.Qr)(class extends E{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:N.NC("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:D.eH.MenubarSelectionMenu,group:"2_line",title:N.NC({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}),(0,s.Qr)(I),(0,s.Qr)(class extends T{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:N.NC("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:D.eH.MenubarSelectionMenu,group:"2_line",title:N.NC({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}),(0,s.Qr)(class extends T{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:N.NC("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:D.eH.MenubarSelectionMenu,group:"2_line",title:N.NC({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}),(0,s.Qr)(class extends M{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:N.NC("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:p.u.writable})}}),(0,s.Qr)(class extends M{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:N.NC("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:p.u.writable})}}),(0,s.Qr)(R),(0,s.Qr)(A),(0,s.Qr)(P),(0,s.Qr)(O),(0,s.Qr)(F),(0,s.Qr)(B),(0,s.Qr)(W),(0,s.Qr)(class extends H{constructor(){super({id:"deleteAllLeft",label:N.NC("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let o=0;return t.forEach((t=>{let s;if(1===t.endColumn&&o>0){const e=t.startLineNumber-o;s=new g.Y(e,t.startColumn,e,t.startColumn)}else s=new g.Y(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=s:n.push(s)})),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(null===t)return[];let i=t;const n=e.getModel();return null===n?[]:(i.sort(d.e.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){const t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineLength(t)+1;return new d.e(t,i,e.startLineNumber,1)}return new d.e(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new d.e(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}),(0,s.Qr)(class extends H{constructor(){super({id:"deleteAllRight",label:N.NC("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];for(let o=0,s=t.length,r=0;o{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new d.e(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new d.e(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(d.e.compareRangesUsingStarts),n}}),(0,s.Qr)(V),(0,s.Qr)(z),(0,s.Qr)(class extends j{constructor(){super({id:"editor.action.transformToUppercase",label:N.NC("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:p.u.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}),(0,s.Qr)(class extends j{constructor(){super({id:"editor.action.transformToLowercase",label:N.NC("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:p.u.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}),K.caseBoundary.isSupported()&&K.singleLetters.isSupported()&&(0,s.Qr)(K),$.wordBoundary.isSupported()&&(0,s.Qr)($),q.titleBoundary.isSupported()&&(0,s.Qr)(q),G.isSupported()&&(0,s.Qr)(G)},52293:(e,t,i)=>{"use strict";var n=i(9488),o=i(15393),s=i(71050),r=i(41264),a=i(17301),l=i(4669),d=i(5976),c=i(97295),h=i(70666),u=i(16830),g=i(11640),p=i(50187),m=i(24314),f=i(29102),v=i(13961),_=i(51381),b=i(63580),w=i(93983),y=i(71922),C=i(73910),S=i(88191),x=i(84013),k=i(93379),L=i.n(k),N=i(7795),D=i.n(N),E=i(90569),I=i.n(E),T=i(3565),M=i.n(T),R=i(19216),A=i.n(R),P=i(44589),O=i.n(P),F=i(55040),B={};B.styleTagTransform=O(),B.setAttributes=M(),B.insert=I().bind(null,"head"),B.domAPI=D(),B.insertStyleElement=A(),L()(F.Z,B),F.Z&&F.Z.locals&&F.Z.locals;var W,H=function(e,t){return function(i,n){t(i,n,e)}};const V=new w.uy("LinkedEditingInputVisible",!1);let z=W=class extends d.JT{static get(e){return e.getContribution(W.ID)}constructor(e,t,i,n,o){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new d.SL),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=V.bindTo(t),this._debounceInformation=o.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 d.SL),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((e=>{(e.hasChanged(70)||e.hasChanged(93))&&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=null!==t&&(this._editor.getOption(70)||this._editor.getOption(93))&&this._providers.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._localToDispose.add(l.ju.runAndSubscribe(t.onDidChangeLanguageConfiguration,(()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()})));const n=new o.vp(this._debounceInformation.get(t)),s=()=>{var e;this._rangeUpdateTriggerPromise=n.trigger((()=>this.updateRanges()),null!==(e=this._debounceDuration)&&void 0!==e?e:this._debounceInformation.get(t))},r=new o.vp(0),a=e=>{this._rangeSyncTriggerPromise=r.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{s()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const t=this._currentDecorations.getRange(0);if(t&&e.changes.every((e=>t.intersectRanges(e.range))))return void a(this._syncRangesToken)}s()}))),this._localToDispose.add({dispose:()=>{n.dispose(),r.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)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 e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}const o=[];for(let e=1,i=this._currentDecorations.length;e1)return void this.clearRanges();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 e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=n;const o=this._currentRequestCts=new s.A;try{const e=new x.G(!1),s=await q(this._providers,i,t,o.token);if(this._debounceInformation.update(i,e.elapsed()),o!==this._currentRequestCts)return;if(this._currentRequestCts=null,n!==i.getVersionId())return;let r=[];(null==s?void 0:s.ranges)&&(r=s.ranges),this._currentWordPattern=(null==s?void 0:s.wordPattern)||this._languageWordPattern;let a=!1;for(let e=0,i=r.length;e({range:e,options:W.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations.set(l),this._syncRangesToken++}catch(e){(0,a.n2)(e)||(0,a.dL)(e),this._currentRequestCts!==o&&this._currentRequestCts||this.clearRanges()}}};z.ID="editor.contrib.linkedEditing",z.DECORATION=v.qx.register({description:"linked-editing",stickiness:0,className:"linked-editing-decoration"}),z=W=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([H(1,w.i6),H(2,y.p),H(3,_.c_),H(4,S.A)],z);class j extends u.R6{constructor(){super({id:"editor.action.linkedEditing",label:b.NC("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:w.Ao.and(f.u.writable,f.u.hasRenameProvider),kbOpts:{kbExpr:f.u.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(g.$),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return h.o.isUri(n)&&p.L.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),a.dL):super.runCommand(e,t)}run(e,t){const i=z.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const U=u._l.bindToContribution(z.get);function q(e,t,i,s){const r=e.ordered(t);return(0,o.Ps)(r.map((e=>async()=>{try{return await e.provideLinkedEditingRanges(t,i,s)}catch(e){return void(0,a.Cp)(e)}})),(e=>!!e&&n.Of(null==e?void 0:e.ranges)))}(0,u.fK)(new U({id:"cancelLinkedEditingInput",precondition:V,handler:e=>e.clearRanges(),kbOpts:{kbExpr:f.u.editorTextFocus,weight:199,primary:9,secondary:[1033]}})),(0,C.P6G)("editor.linkedEditingBackground",{dark:r.Il.fromHex("#f00").transparent(.3),light:r.Il.fromHex("#f00").transparent(.3),hcDark:r.Il.fromHex("#f00").transparent(.3),hcLight:r.Il.white},b.NC("editorLinkedEditingBackground","Background color when the editor auto renames on type.")),(0,u.sb)("_executeLinkedEditingProvider",((e,t,i)=>{const{linkedEditingRangeProvider:n}=e.get(y.p);return q(n,t,i,s.T.None)})),(0,u._K)(z.ID,z,1),(0,u.Qr)(j)},34540:(e,t,i)=>{"use strict";var n=i(15393),o=i(71050),s=i(17301),r=i(59365),a=i(5976),l=i(66663),d=i(1432),c=i(95935),h=i(84013),u=i(70666),g=i(93379),p=i.n(g),m=i(7795),f=i.n(m),v=i(90569),_=i.n(v),b=i(3565),w=i.n(b),y=i(19216),C=i.n(y),S=i(44589),x=i.n(S),k=i(28477),L={};L.styleTagTransform=x(),L.setAttributes=w(),L.insert=_().bind(null,"head"),L.domAPI=f(),L.insertStyleElement=C(),p()(k.Z,L),k.Z&&k.Z.locals&&k.Z.locals;var N=i(16830),D=i(13961),E=i(88191),I=i(71922),T=i(82005),M=i(9488),R=i(98401),A=i(24314),P=i(73733),O=i(94565);class F{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:"function"==typeof this._provider.resolveLink?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"))}}class B{constructor(e){this._disposables=new a.SL;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new F(e,n)));t=B._union(t,e),(0,a.Wf)(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const i=[];let n,o,s,r;for(n=0,s=0,o=e.length,r=t.length;nPromise.resolve(e.provideLinks(t,i)).then((t=>{t&&(n[o]=[t,e])}),s.Cp)));return Promise.all(o).then((()=>{const e=new B((0,M.kX)(n));return i.isCancellationRequested?(e.dispose(),new B([])):e}))}O.P.registerCommand("_executeLinkProvider",(async(e,...t)=>{let[i,n]=t;(0,R.p_)(i instanceof u.o),"number"!=typeof n&&(n=0);const{linkProvider:s}=e.get(I.p),r=e.get(P.q).getModel(i);if(!r)return[];const a=await W(s,r,o.T.None);if(!a)return[];for(let e=0;ethis.computeLinksNow()),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const r=this._register(new T.yN(e));this._register(r.onMouseMoveOrRelevantKeyDown((([e,t])=>{this._onEditorMouseMove(e,t)}))),this._register(r.onExecute((e=>{this.onEditorMouseUp(e)}))),this._register(r.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(71)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))}))),this._register(e.onDidChangeModelContent((e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))}))),this._register(e.onDidChangeModel((e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)}))),this._register(e.onDidChangeModelLanguage((e=>{this.stop(),this.computeLinks.schedule(0)}))),this._register(this.providers.onDidChange((e=>{this.stop(),this.computeLinks.schedule(0)}))),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(71))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,n.PG)((t=>W(this.providers,e,t)));try{const t=new h.G(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(e){(0,s.dL)(e)}finally{this.computePromise=null}}}updateDecorations(e){const t="altKey"===this.editor.getOption(78),i=[],n=Object.keys(this.currentOccurrences);for(const e of n){const t=this.currentOccurrences[e];i.push(t.decorationId)}const o=[];if(e)for(const i of e)o.push(G.decoration(i,t));this.editor.changeDecorations((t=>{const n=t.deltaDecorations(i,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let t=0,i=n.length;t{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(78);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(o.T.None).then((e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===l.lg.file&&e.startsWith(`${l.lg.file}:`)){const i=u.o.parse(e);if(i.scheme===l.lg.file){const n=c.z_(i);let o=null;n.startsWith("/./")?o=`.${n.substr(1)}`:n.startsWith("//./")&&(o=`.${n.substr(2)}`),o&&(e=c.Vo(t,o))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(V.NC("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(V.NC("missing.url","Failed to open this link because its target is missing.")):(0,s.dL)(e)}))}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 e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&(null===(e=this.activeLinksList)||void 0===e||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};q.ID="editor.linkDetector",q=H=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([U(1,j.v),U(2,z.lT),U(3,I.p),U(4,E.A)],q);const K=D.qx.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),$=D.qx.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"});class G{static decoration(e,t){return{range:e.range,options:G._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n={...i?$:K};return n.hoverMessage=function(e,t){const i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:i?V.NC("links.navigate.executeCmd","Execute command"):V.NC("links.navigate.follow","Follow link"),o=t?d.dz?V.NC("links.navigate.kb.meta.mac","cmd + click"):V.NC("links.navigate.kb.meta","ctrl + click"):d.dz?V.NC("links.navigate.kb.alt.mac","option + click"):V.NC("links.navigate.kb.alt","alt + click");if(e.url){let t="";if(/^command:/i.test(e.url.toString())){const i=e.url.toString().match(/^command:([^?#]+)/);if(i){const e=i[1];t=V.NC("tooltip.explanation","Execute command {0}",e)}}return new r.W5("",!0).appendLink(e.url.toString(!0).replace(/ /g,"%20"),n,t).appendMarkdown(` (${o})`)}return(new r.W5).appendText(`${n} (${o})`)}(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,G._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,G._getOptions(this.link,t,!1))}}class Z extends N.R6{constructor(){super({id:"editor.action.openLink",label:V.NC("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=q.get(t);if(!i)return;if(!t.hasModel())return;const n=t.getSelections();for(const e of n){const t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}(0,N._K)(q.ID,q,1),(0,N.Qr)(Z)},93519:(e,t,i)=>{"use strict";var n=i(5976),o=i(16830);class s extends n.JT{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown((e=>{const t=this._editor.getOption(117);t>=0&&6===e.target.type&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})})))}}s.ID="editor.contrib.longLinesHelper",(0,o._K)(s.ID,s,2)},39310:(e,t,i)=>{"use strict";i.d(t,{O:()=>T});var n=i(77352),o=i(56346),s=i(4669),r=i(59365),a=i(5976),l=i(93379),d=i.n(l),c=i(7795),h=i.n(c),u=i(90569),g=i.n(u),p=i(3565),m=i.n(p),f=i(19216),v=i.n(f),_=i(44589),b=i.n(_),w=i(65807),y={};y.styleTagTransform=b(),y.setAttributes=m(),y.insert=g().bind(null,"head"),y.domAPI=h(),y.insertStyleElement=v(),d()(w.Z,y),w.Z&&w.Z.locals&&w.Z.locals;var C,S=i(16830),x=i(24314),k=i(92467),L=i(63580),N=i(93983),D=i(50988),E=i(65321),I=function(e,t){return function(i,n){t(i,n,e)}};let T=C=class{static get(e){return e.getContribution(C.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new a.XK,this._messageListeners=new a.SL,this._mouseOverMessage=!1,this._editor=e,this._visible=C.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;null===(e=this._message)||void 0===e||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;(0,o.Z9)((0,r.Fr)(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=(0,r.Fr)(e)?(0,n.ap)(e,{actionHandler:{callback:t=>{this.closeMessage(),(0,k.N)(this._openerService,t,(0,r.Fr)(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new R(this._editor,t,"string"==typeof e?e:this._message.element),this._messageListeners.add(s.ju.debounce(this._editor.onDidBlurEditorText,((e,t)=>t),0)((()=>{this._mouseOverMessage||this._messageWidget.value&&E.jg(E.vY(),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(E.nm(this._messageWidget.value.getDomNode(),E.tw.MOUSE_ENTER,(()=>this._mouseOverMessage=!0),!0)),this._messageListeners.add(E.nm(this._messageWidget.value.getDomNode(),E.tw.MOUSE_LEAVE,(()=>this._mouseOverMessage=!1),!0)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new x.e(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(R.fadeOut(this._messageWidget.value))}};T.ID="editor.contrib.messageController",T.MESSAGE_VISIBLE=new N.uy("messageVisible",!1,L.NC("messageVisible","Whether the editor is currently showing an inline message")),T=C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([I(1,N.i6),I(2,D.v)],T);const M=S._l.bindToContribution(T.get);(0,S.fK)(new M({id:"leaveEditorMessage",precondition:T.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class R{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 o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const s=document.createElement("div");"string"==typeof n?(s.classList.add("message"),s.textContent=n):(n.classList.add("message"),s.appendChild(n)),this._domNode.appendChild(s);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),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",2===e)}}(0,S._K)(T.ID,T,4)},77061:(e,t,i)=>{"use strict";var n,o=i(56346),s=i(15393),r=i(22258),a=i(5976),l=i(16830),d=i(28108),c=i(24314),h=i(3860),u=i(29102),g=i(96962),p=i(63580),m=i(84144),f=i(93983),v=i(71922),_=i(45550),b=i(72065);function w(e,t){const i=t.filter((t=>!e.find((e=>e.equals(t)))));if(i.length>=1){const e=i.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", "),t=1===i.length?p.NC("cursorAdded","Cursor added: {0}",e):p.NC("cursorsAdded","Cursors added: {0}",e);(0,o.i7)(t)}}class y extends l.R6{constructor(){super({id:"editor.action.insertCursorAbove",label:p.NC("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:u.u.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"3_multi",title:p.NC({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,d.P.addCursorUp(o,s,n)),o.revealTopMostCursor(i.source),w(s,o.getCursorStates())}}class C extends l.R6{constructor(){super({id:"editor.action.insertCursorBelow",label:p.NC("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:u.u.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"3_multi",title:p.NC({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,d.P.addCursorDown(o,s,n)),o.revealBottomMostCursor(i.source),w(s,o.getCursorStates())}}class S extends l.R6{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:p.NC("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:u.u.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"3_multi",title:p.NC({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n1&&i.push(new h.Y(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates(),r=[];n.forEach((e=>this.getCursorsForSelection(e,i,r))),r.length>0&&t.setSelections(r),w(s,o.getCursorStates())}}class x extends l.R6{constructor(){super({id:"editor.action.addCursorsToBottom",label:p.NC("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount(),o=[];for(let e=i[0].startLineNumber;e<=n;e++)o.push(new h.Y(e,i[0].startColumn,e,i[0].endColumn));const s=t._getViewModel(),r=s.getCursorStates();o.length>0&&t.setSelections(o),w(r,s.getCursorStates())}}class k extends l.R6{constructor(){super({id:"editor.action.addCursorsToTop",label:p.NC("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new h.Y(e,i[0].startColumn,e,i[0].endColumn));const o=t._getViewModel(),s=o.getCursorStates();n.length>0&&t.setSelections(n),w(s,o.getCursorStates())}}class L{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class N{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new N(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,o,s=!1;const r=e.getSelections();1===r.length&&r[0].isEmpty()?(s=!0,n=!0,o=!0):(n=i.wholeWord,o=i.matchCase);const a=e.getSelection();let l,d=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,d=new h.Y(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new N(e,t,s,l,n,o,d)}constructor(e,t,i,n,o,s,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=o,this.matchCase=s,this.currentMatch=r}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new L(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 L(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}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(130):null,!1);return i?new h.Y(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 L(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 L(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}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(130):null,!1);return i?new h.Y(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(130):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(130):null,!1,1073741824)}}class D extends a.JT{static get(e){return e.getContribution(D.ID)}constructor(e){super(),this._sessionDispose=this._register(new a.SL),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=N.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((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.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 h.Y(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 i=e.getState().matchCase;if(!M(this._editor.getModel(),t,i)){const e=this._editor.getModel(),i=[];for(let n=0,o=t.length;n0&&i.isRegex){const e=this._editor.getModel();t=i.searchScope?e.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(130):null,!1,1073741824):e.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(130):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;inew h.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}D.ID="editor.contrib.multiCursorController";class E extends l.R6{run(e,t){const i=D.get(t);if(!i)return;const n=t._getViewModel();if(n){const o=n.getCursorStates(),s=g.pR.get(t);if(s)this._run(i,s);else{const n=e.get(b.TG).createInstance(g.pR,t);this._run(i,n),n.dispose()}w(o,n.getCursorStates())}}}class I{constructor(e,t,i,n,o){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,o&&this._model===o._model&&this._searchText===o._searchText&&this._matchCase===o._matchCase&&this._wordSeparators===o._wordSeparators&&this._modelVersionId===o._modelVersionId&&(this._cachedFindMatches=o._cachedFindMatches)}findMatches(){return null===this._cachedFindMatches&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map((e=>e.range)),this._cachedFindMatches.sort(c.e.compareRangesUsingStarts)),this._cachedFindMatches}}let T=n=class extends a.JT{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(108),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new s.pY((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(108)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()})));const i=g.pR.get(e);i&&this._register(i.getState().onFindReplaceStateChange((e=>{this._update()}))),this.updateSoon.schedule()}_update(){this._setState(n._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t)return null;if(!i.hasModel())return null;const n=i.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const o=D.get(i);if(!o)return null;const s=g.pR.get(i);if(!s)return null;let r=o.getSession(s);if(!r){const e=i.getSelections();if(e.length>1){const t=s.getState().matchCase;if(!M(i.getModel(),e,t))return null}r=N.create(i,s)}if(!r)return null;if(r.currentMatch)return null;if(/^[ \t]+$/.test(r.searchText))return null;if(r.searchText.length>200)return null;const a=s.getState(),l=a.matchCase;if(a.isRevealed){let e=a.searchString;l||(e=e.toLowerCase());let t=r.searchText;if(l||(t=t.toLowerCase()),e===t&&r.matchCase===a.matchCase&&r.wholeWord===a.wholeWord&&!a.isRegex)return null}return new I(i.getModel(),r.searchText,r.matchCase,r.wholeWord?i.getOption(130):null,e)}_setState(e){if(this.state=e,!this.state)return void this._decorations.clear();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(c.e.compareRangesUsingStarts);const o=[];for(let e=0,t=0,s=i.length,r=n.length;e=r)o.push(s),e++;else{const i=c.e.compareRangesUsingStarts(s,n[t]);i<0?(!n[t].isEmpty()&&c.e.areIntersecting(s,n[t])||o.push(s),e++):(i>0||e++,t++)}}const s="off"!==this.editor.getOption(81),r=this._languageFeaturesService.documentHighlightProvider.has(t)&&s,a=o.map((e=>({range:e,options:(0,_.w)(r)})));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};function M(e,t,i){const n=R(e,t[0],!i);for(let o=1,s=t.length;o=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(A=1,P=v.p,function(e,t){P(e,t,A)})],T);class O extends l.R6{constructor(){super({id:"editor.action.focusNextCursor",label:p.NC("mutlicursor.focusNextCursor","Focus Next Cursor"),metadata:{description:p.NC("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const o=Array.from(n.getCursorStates()),s=o.shift();s&&(o.push(s),n.setCursorStates(i.source,3,o),n.revealPrimaryCursor(i.source,!0),w(o,n.getCursorStates()))}}class F extends l.R6{constructor(){super({id:"editor.action.focusPreviousCursor",label:p.NC("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),metadata:{description:p.NC("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const o=Array.from(n.getCursorStates()),s=o.pop();s&&(o.unshift(s),n.setCursorStates(i.source,3,o),n.revealPrimaryCursor(i.source,!0),w(o,n.getCursorStates()))}}(0,l._K)(D.ID,D,4),(0,l._K)(T.ID,T,1),(0,l.Qr)(y),(0,l.Qr)(C),(0,l.Qr)(S),(0,l.Qr)(class extends E{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:p.NC("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:2082,weight:100},menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"3_multi",title:p.NC({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}),(0,l.Qr)(class extends E{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:p.NC("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"3_multi",title:p.NC({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}),(0,l.Qr)(class extends E{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:p.NC("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:(0,r.gx)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}),(0,l.Qr)(class extends E{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:p.NC("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}),(0,l.Qr)(class extends E{constructor(){super({id:"editor.action.selectHighlights",label:p.NC("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:3114,weight:100},menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"3_multi",title:p.NC({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}),(0,l.Qr)(class extends E{constructor(){super({id:"editor.action.changeAll",label:p.NC("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:f.Ao.and(u.u.writable,u.u.editorTextFocus),kbOpts:{kbExpr:u.u.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}),(0,l.Qr)(x),(0,l.Qr)(k),(0,l.Qr)(O),(0,l.Qr)(F)},55584:(e,t,i)=>{"use strict";var n=i(79579),o=i(5976),s=i(16830),r=i(29102),a=i(96887),l=i(71922),d=i(15393),c=i(17301),h=i(4669),u=i(44906),g=i(71050),p=i(98401),m=i(70666),f=i(50187),v=i(88216),_=i(94565),b=i(93983);const w={Visible:new b.uy("parameterHintsVisible",!1),MultipleSignatures:new b.uy("parameterHintsMultipleSignatures",!1)};async function y(e,t,i,n,o){const s=e.ordered(t);for(const e of s)try{const s=await e.provideSignatureHelp(t,i,o,n);if(s)return s}catch(e){(0,c.Cp)(e)}}var C;_.P.registerCommand("_executeSignatureHelpProvider",(async(e,...t)=>{const[i,n,o]=t;(0,p.p_)(m.o.isUri(i)),(0,p.p_)(f.L.isIPosition(n)),(0,p.p_)("string"==typeof o||!o);const s=e.get(l.p),r=await e.get(v.S).createModelReference(i);try{const e=await y(s.signatureHelpProvider,r.object.textEditorModel,f.L.lift(n),{triggerKind:a.WW.Invoke,isRetrigger:!1,triggerCharacter:o},g.T.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{r.dispose()}})),function(e){e.Default={type:0},e.Pending=class{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}},e.Active=class{constructor(e){this.hints=e,this.type=1}}}(C||(C={}));class S extends o.JT{constructor(e,t,i=S.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new h.Q5),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=C.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new o.XK),this.triggerChars=new u.q,this.retriggerChars=new u.q,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new d.vp(i),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=C.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(c.dL)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(86).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(86).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new C.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const n=this._pendingTriggers.reduce(x);this._pendingTriggers=[];const o={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const s=this.editor.getModel(),r=this.editor.getPosition();this.state=new C.Pending((0,d.PG)((e=>y(this.providers,s,r,o,e))),i);try{const t=await this.state.request;return e!==this.triggerId?(null==t||t.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new C.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(null==t||t.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(t){return e===this.triggerId&&(this.state=C.Default),(0,c.dL)(t),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||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 e of t.signatureHelpTriggerCharacters||[])if(e.length){const t=e.charCodeAt(0);this.triggerChars.add(t),this.retriggerChars.add(t)}for(const e of t.signatureHelpRetriggerCharacters||[])e.length&&this.retriggerChars.add(e.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.WW.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:a.WW.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:a.WW.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(86).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function x(e,t){switch(t.triggerKind){case a.WW.Invoke:return t;case a.WW.ContentChange:return e;case a.WW.TriggerCharacter:default:return t}}S.DEFAULT_DELAY=120;var k=i(63580),L=i(72065),N=i(65321),D=i(56346),E=i(64117),I=i(73046),T=i(97295),M=i(93379),R=i.n(M),A=i(7795),P=i.n(A),O=i(90569),F=i.n(O),B=i(3565),W=i.n(B),H=i(19216),V=i.n(H),z=i(44589),j=i.n(z),U=i(81386),q={};q.styleTagTransform=j(),q.setAttributes=W(),q.insert=F().bind(null,"head"),q.domAPI=P(),q.insertStyleElement=V(),R()(U.Z,q),U.Z&&U.Z.locals&&U.Z.locals;var K,$=i(72042),G=i(92467),Z=i(50988),Q=i(73910),Y=i(59554),J=i(25670),X=function(e,t){return function(i,n){t(i,n,e)}};const ee=N.$,te=(0,Y.q5)("parameter-hints-next",I.l.chevronDown,k.NC("parameterHintsNextIcon","Icon for show next parameter hint.")),ie=(0,Y.q5)("parameter-hints-previous",I.l.chevronUp,k.NC("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let ne=K=class extends o.JT{constructor(e,t,i,n,s){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new o.SL),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new G.$({editor:e},s,n)),this.keyVisible=w.Visible.bindTo(i),this.keyMultipleSignatures=w.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=ee(".editor-widget.parameter-hints-widget"),t=N.R3(e,ee(".phwrapper"));t.tabIndex=-1;const i=N.R3(t,ee(".controls")),n=N.R3(i,ee(".button"+J.k.asCSSSelector(ie))),o=N.R3(i,ee(".overloads")),s=N.R3(i,ee(".button"+J.k.asCSSSelector(te)));this._register(N.nm(n,"click",(e=>{N.zB.stop(e),this.previous()}))),this._register(N.nm(s,"click",(e=>{N.zB.stop(e),this.next()})));const r=ee(".body"),a=new E.s$(r,{alwaysConsumeMouseWheel:!0});this._register(a),t.appendChild(a.getDomNode());const l=N.R3(r,ee(".signature")),d=N.R3(r,ee(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:o,docs:d,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const c=()=>{if(!this.domNodes)return;const e=this.editor.getOption(50);this.domNodes.element.style.fontSize=`${e.fontSize}px`,this.domNodes.element.style.lineHeight=""+e.lineHeight/e.fontSize};c(),this._register(h.ju.chain(this.editor.onDidChangeConfiguration.bind(this.editor),(e=>e.filter((e=>e.hasChanged(50)))))(c)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{var e;null===(e=this.domNodes)||void 0===e||e.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,null===(e=this.domNodes)||void 0===e||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const i=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",i),this.keyMultipleSignatures.set(i),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const n=e.signatures[e.activeSignature];if(!n)return;const o=N.R3(this.domNodes.signature,ee(".code")),s=this.editor.getOption(50);o.style.fontSize=`${s.fontSize}px`,o.style.fontFamily=s.fontFamily;const r=n.parameters.length>0,a=null!==(t=n.activeParameter)&&void 0!==t?t:e.activeParameter;r?this.renderParameters(o,n,a):N.R3(o,ee("span")).textContent=n.label;const l=n.parameters[a];if(null==l?void 0:l.documentation){const e=ee("span.documentation");if("string"==typeof l.documentation)e.textContent=l.documentation;else{const t=this.renderMarkdownDocs(l.documentation);e.appendChild(t.element)}N.R3(this.domNodes.docs,ee("p",{},e))}if(void 0===n.documentation);else if("string"==typeof n.documentation)N.R3(this.domNodes.docs,ee("p",{},n.documentation));else{const e=this.renderMarkdownDocs(n.documentation);N.R3(this.domNodes.docs,e.element)}const d=this.hasDocs(n,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 e="";const t=n.parameters[a];e=Array.isArray(t.label)?n.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"==typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),n.documentation&&(e+="string"==typeof n.documentation?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==e&&(D.Z9(k.NC("hint","{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var e;null===(e=this.domNodes)||void 0===e||e.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&"string"==typeof t.documentation&&(0,p.cW)(t.documentation).length>0||t&&"object"==typeof t.documentation&&(0,p.cW)(t.documentation).value.length>0||e.documentation&&"string"==typeof e.documentation&&(0,p.cW)(e.documentation).length>0||e.documentation&&"object"==typeof e.documentation&&(0,p.cW)(e.documentation.value).length>0)}renderParameters(e,t,i){const[n,o]=this.getParameterLabelOffsets(t,i),s=document.createElement("span");s.textContent=t.label.substring(0,n);const r=document.createElement("span");r.textContent=t.label.substring(n,o),r.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(o),N.R3(e,s,r,a)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const t=new RegExp(`(\\W|^)${(0,T.ec)(i.label)}(?=\\W|$)`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}return[0,0]}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 K.ID}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("phwrapper");t.length&&(t[0].style.maxHeight=e)}};ne.ID="editor.widget.parameterHintsWidget",ne=K=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([X(2,b.i6),X(3,Z.v),X(4,$.O)],ne),(0,Q.P6G)("editorHoverWidget.highlightForeground",{dark:Q.Gwp,light:Q.Gwp,hcDark:Q.Gwp,hcLight:Q.Gwp},k.NC("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var oe,se=function(e,t){return function(i,n){t(i,n,e)}};let re=oe=class extends o.JT{static get(e){return e.getContribution(oe.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new S(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints((e=>{var t;e?(this.widget.value.show(),this.widget.value.render(e)):null===(t=this.widget.rawValue)||void 0===t||t.hide()}))),this.widget=new n.o((()=>this._register(t.createInstance(ne,this.editor,this.model))))}cancel(){this.model.cancel()}previous(){var e;null===(e=this.widget.rawValue)||void 0===e||e.previous()}next(){var e;null===(e=this.widget.rawValue)||void 0===e||e.next()}trigger(e){this.model.trigger(e,0)}};re.ID="editor.controller.parameterHints",re=oe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([se(1,L.TG),se(2,l.p)],re);class ae extends s.R6{constructor(){super({id:"editor.action.triggerParameterHints",label:k.NC("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:r.u.hasSignatureHelpProvider,kbOpts:{kbExpr:r.u.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=re.get(t);null==i||i.trigger({triggerKind:a.WW.Invoke})}}(0,s._K)(re.ID,re,2),(0,s.Qr)(ae);const le=s._l.bindToContribution(re.get);(0,s.fK)(new le({id:"closeParameterHints",precondition:w.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:r.u.focus,primary:9,secondary:[1033]}})),(0,s.fK)(new le({id:"showPrevParameterHint",precondition:b.Ao.and(w.Visible,w.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:r.u.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,s.fK)(new le({id:"showNextParameterHint",precondition:b.Ao.and(w.Visible,w.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:r.u.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},81774:(e,t,i)=>{"use strict";i.d(t,{Fw:()=>Z,Jy:()=>Q,vk:()=>ee,rc:()=>J,SC:()=>oe,M8:()=>se,KY:()=>te,IH:()=>ie,R7:()=>ne});var n=i(65321),o=i(90317),s=i(74741),r=i(73046),a=i(25670),l=i(41264),d=i(4669),c=i(36248),h=i(93379),u=i.n(h),g=i(7795),p=i.n(g),m=i(90569),f=i.n(m),v=i(3565),_=i.n(v),b=i(19216),w=i.n(b),y=i(44589),C=i.n(y),S=i(8881),x={};x.styleTagTransform=C(),x.setAttributes=_(),x.insert=f().bind(null,"head"),x.domAPI=p(),x.insertStyleElement=w(),u()(S.Z,x),S.Z&&S.Z.locals&&S.Z.locals;var k=i(16830),L=i(11640),N=i(84527),D=i(63841),E=i(44742),I=i(5976),T=i(51564),M={};M.styleTagTransform=C(),M.setAttributes=_(),M.insert=f().bind(null,"head"),M.domAPI=p(),M.insertStyleElement=w(),u()(T.Z,M),T.Z&&T.Z.locals&&T.Z.locals;var R=i(24314),A=i(13961);const P=new l.Il(new l.VS(0,122,204)),O={showArrow:!0,showFrame:!0,className:"",frameColor:P,arrowColor:P,keepEditorSelection:!1};class F{constructor(e,t,i,n,o,s,r,a){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=r,this.ordinal=a,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class B{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class W{constructor(e){this._editor=e,this._ruleName=W._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),n.uN(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(){n.uN(this._ruleName),n.fk(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){1===e.column&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:R.e.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}W._IdGenerator=new E.R(".arrow-decoration-");class H{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new I.SL,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=c.I8(t),c.jB(this.options,O,!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((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}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 W(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&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;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))}null===(t=this._resizeSash)||void 0===t||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=R.e.isIRange(e)?R.e.lift(e):R.e.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:A.qx.EMPTY}])}hide(){var e;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),null===(e=this._arrow)||void 0===e||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(67);let t=0;return this.options.showArrow&&(t+=2*Math.round(e/3)),this.options.showFrame&&(t+=2*Math.round(e/9)),t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),o=this._getWidth(n);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(n)+"px";const s=document.createElement("div");s.style.overflow="hidden";const r=this.editor.getOption(67);if(!this.options.allowUnlimitedHeight){const e=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,e)}let a=0,l=0;if(this._arrow&&this.options.showArrow&&(a=Math.round(r/3),this._arrow.height=a,this._arrow.show(i)),this.options.showFrame&&(l=Math.round(r/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new F(s,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e)),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new B("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}const d=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=a+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden"),this._doLayout(d,o),this.options.keepEditorSelection||this.editor.setSelection(e);const c=this.editor.getModel();if(c){const t=c.validateRange(new R.e(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(t,t.startLineNumber===c.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){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))}))}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new D.g(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),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(67),n=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+n;o>5&&o<35&&this._relayout(o)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var V=i(63580),z=i(44691),j=i(93983),U=i(65026),q=i(72065),K=i(73910),$=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},G=function(e,t){return function(i,n){t(i,n,e)}};const Z=(0,q.yh)("IPeekViewService");var Q;(0,U.z)(Z,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose()),this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))}))})}},1),function(e){e.inPeekEditor=new j.uy("inReferenceSearchEditor",!0,V.NC("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(Q||(Q={}));let Y=class{constructor(e,t){e instanceof N.H&&Q.inPeekEditor.bindTo(t)}dispose(){}};function J(e){const t=e.get(L.$).getFocusedCodeEditor();return t instanceof N.H?t.getParentEditor():t}Y.ID="editor.contrib.referenceController",Y=$([G(1,j.i6)],Y),(0,k._K)(Y.ID,Y,0);const X={headerBackgroundColor:l.Il.white,primaryHeadingColor:l.Il.fromHex("#333333"),secondaryHeadingColor:l.Il.fromHex("#6c6c6cb3")};let ee=class extends H{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new d.Q5,this.onDidClose=this._onDidClose.event,c.jB(this.options,X,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}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=n.$(".head"),this._bodyElement=n.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=n.$(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),n.mu(this._titleElement,"click",(e=>this._onTitleClick(e)))),n.R3(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=n.$("span.filename"),this._secondaryHeading=n.$("span.dirname"),this._metaHeading=n.$("span.meta"),n.R3(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=n.$(".peekview-actions");n.R3(this._headElement,i);const l=this._getActionBarOptions();this._actionbarWidget=new o.o(i,l),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new s.aU("peekview.close",V.NC("label.close","Close"),a.k.asClassName(r.l.close),!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:z.Id.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:n.PO(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,n.$Z(this._metaHeading)):n.Cp(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(67)),n=Math.round(e-(i+2));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`)}};ee=$([G(2,q.TG)],ee);const te=(0,K.P6G)("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:l.Il.black,hcLight:l.Il.white},V.NC("peekViewTitleBackground","Background color of the peek view title area.")),ie=(0,K.P6G)("peekViewTitleLabel.foreground",{dark:l.Il.white,light:l.Il.black,hcDark:l.Il.white,hcLight:K.NOs},V.NC("peekViewTitleForeground","Color of the peek view title.")),ne=(0,K.P6G)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},V.NC("peekViewTitleInfoForeground","Color of the peek view title info.")),oe=(0,K.P6G)("peekView.border",{dark:K.c63,light:K.c63,hcDark:K.lRK,hcLight:K.lRK},V.NC("peekViewBorder","Color of the peek view borders and arrow.")),se=(0,K.P6G)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:l.Il.black,hcLight:l.Il.white},V.NC("peekViewResultsBackground","Background color of the peek view result list.")),re=((0,K.P6G)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:l.Il.white,hcLight:K.NOs},V.NC("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),(0,K.P6G)("peekViewResult.fileForeground",{dark:l.Il.white,light:"#1E1E1E",hcDark:l.Il.white,hcLight:K.NOs},V.NC("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),(0,K.P6G)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},V.NC("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),(0,K.P6G)("peekViewResult.selectionForeground",{dark:l.Il.white,light:"#6C6C6C",hcDark:l.Il.white,hcLight:K.NOs},V.NC("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),(0,K.P6G)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:l.Il.black,hcLight:l.Il.white},V.NC("peekViewEditorBackground","Background color of the peek view editor.")));(0,K.P6G)("peekViewEditorGutter.background",{dark:re,light:re,hcDark:re,hcLight:re},V.NC("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),(0,K.P6G)("peekViewEditorStickyScroll.background",{dark:re,light:re,hcDark:re,hcLight:re},V.NC("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),(0,K.P6G)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},V.NC("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),(0,K.P6G)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},V.NC("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),(0,K.P6G)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:K.xL1,hcLight:K.xL1},V.NC("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},83943:(e,t,i)=>{"use strict";i.d(t,{X:()=>c});var n=i(88289),o=i(5976),s=i(65520),r=i(84973),a=i(8625),l=i(97781),d=i(56346);class c{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new o.SL;e.canAcceptInBackground=!!(null===(i=this.options)||void 0===i?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new o.XK);return s.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange((()=>{s.value=void 0,s.value=this.doProvide(e,t)}))),n}doProvide(e,t){var i;const r=new o.SL,a=this.activeTextEditorControl;if(a&&this.canProvideWithTextEditor(a)){const l={editor:a},d=(0,s.Pi)(a);if(d){let e=null!==(i=a.saveViewState())&&void 0!==i?i:void 0;r.add(d.onDidChangeCursorPosition((()=>{var t;e=null!==(t=a.saveViewState())&&void 0!==t?t:void 0}))),l.restoreViewState=()=>{e&&a===this.activeTextEditorControl&&a.restoreViewState(e)},r.add((0,n.M)(t.onCancellationRequested)((()=>{var e;return null===(e=l.restoreViewState)||void 0===e?void 0:e.call(l)})))}r.add((0,o.OF)((()=>this.clearDecorations(a)))),r.add(this.provideWithTextEditor(l,e,t))}else r.add(this.provideWithoutTextEditor(e,t));return r}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&(0,d.i7)(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return(0,s.QI)(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,l.EN)(a.m9),position:r.sh.Full}}}],[o,s]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:s}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}},73945:(e,t,i)=>{"use strict";var n=i(59365),o=i(5976),s=i(16830),r=i(39310),a=i(63580);class l extends o.JT{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit())))}_onDidAttemptReadOnlyEdit(){const e=r.O.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(92);t||(t=this.editor.isSimpleWidget?new n.W5(a.NC("editor.simple.readonly","Cannot edit in read-only input")):new n.W5(a.NC("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}l.ID="editor.contrib.readOnlyMessageController",(0,s._K)(l.ID,l,2)},43448:(e,t,i)=>{"use strict";var n=i(56346),o=i(15393),s=i(71050),r=i(17301),a=i(5976),l=i(98401),d=i(70666),c=i(16830),h=i(66007),u=i(11640),g=i(50187),p=i(24314),m=i(29102),f=i(71922),v=i(71765),_=i(16467),b=i(39310),w=i(63580),y=i(84144),C=i(23193),S=i(93983),x=i(72065),k=i(43557),L=i(59422),N=i(90535),D=i(89872),E=i(10829),I=i(65321),T=i(56811),M=i(43799),R=i(9488),A=i(73046),P=i(93379),O=i.n(P),F=i(7795),B=i.n(F),W=i(90569),H=i.n(W),V=i(3565),z=i.n(V),j=i(19216),U=i.n(j),q=i(44589),K=i.n(q),$=i(88342),G={};G.styleTagTransform=K(),G.setAttributes=z(),G.insert=H().bind(null,"head"),G.domAPI=B(),G.insertStyleElement=U(),O()($.Z,G),$.Z&&$.Z.locals&&$.Z.locals,i(96887);var Z=i(91847),Q=i(86253),Y=i(73910),J=i(97781),X=function(e,t){return function(i,n){t(i,n,e)}};const ee=new S.uy("renameInputVisible",!1,(0,w.NC)("renameInputVisible","Whether the rename input widget is visible")),te=new S.uy("renameInputFocused",!1,(0,w.NC)("renameInputFocused","Whether the rename input widget is focused"));let ie=class{constructor(e,t,i,n,o,s){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._logService=s,this._disposables=new a.SL,this.allowEditorOverflow=!0,this._visibleContextKey=ee.bindTo(o),this._focusedContextKey=te.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&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._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",(0,w.NC)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._disposables.add((0,I.nm)(this._input,"focus",(()=>{this._focusedContextKey.set(!0)}))),this._disposables.add((0,I.nm)(this._input,"blur",(()=>{this._focusedContextKey.reset()}))),this._domNode.appendChild(this._input),this._candidatesView=this._disposables.add(new ne(this._domNode,{fontInfo:this._editor.getOption(50),onSelectionChange:()=>this.acceptInput(!1)})),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){var t,i,n,o;if(!this._input||!this._domNode)return;const s=e.getColor(Y.rh),r=e.getColor(Y.A42);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(Y.D0T))&&void 0!==t?t:""),this._domNode.style.boxShadow=s?` 0 0 8px 2px ${s}`:"",this._domNode.style.border=r?`1px solid ${r}`:"",this._domNode.style.color=String(null!==(i=e.getColor(Y.zJb))&&void 0!==i?i:""),this._input.style.backgroundColor=String(null!==(n=e.getColor(Y.sEe))&&void 0!==n?n:"");const a=e.getColor(Y.dt_);this._input.style.borderWidth=a?"1px":"0px",this._input.style.borderStyle=a?"solid":"none",this._input.style.borderColor=null!==(o=null==a?void 0:a.toString())&&void 0!==o?o:"none"}_updateFont(){if(!this._input||!this._label||!this._candidatesView)return;const e=this._editor.getOption(50);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._candidatesView.updateFont(e),this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return.8*e}getPosition(){if(!this._visible)return null;if(!this._editor.hasModel()||!this._editor.getDomNode())return null;const e=(0,I.D6)(this.getDomNode().ownerDocument.body),t=(0,I.i)(this._editor.getDomNode()),i=this._getTopForPosition();this._nPxAvailableAbove=i+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;const n=this._editor.getOption(67),{totalHeight:o}=oe.getLayoutInfo({lineHeight:n}),s=this._nPxAvailableBelow>6*o?[2,1]:[1,2];return{position:this._position,preference:s}}beforeRender(){var e,t;const[i,n]=this._acceptKeybindings;return this._label.innerText=(0,w.NC)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",null===(e=this._keybindingService.lookupKeybinding(i))||void 0===e?void 0:e.getLabel(),null===(t=this._keybindingService.lookupKeybinding(n))||void 0===t?void 0:t.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(this._trace("invoking afterRender, position: ",e?"not null":"null"),null===e)return void this.cancelInput(!0,"afterRender (because position is null)");if(!this._editor.hasModel()||!this._editor.getDomNode())return;(0,l.p_)(this._candidatesView),(0,l.p_)(void 0!==this._nPxAvailableAbove),(0,l.p_)(void 0!==this._nPxAvailableBelow);const t=(0,I.wn)(this._input),i=(0,I.wn)(this._label);let n;n=2===e?this._nPxAvailableBelow:this._nPxAvailableAbove,this._candidatesView.layout({height:n-i-t,width:(0,I.w)(this._input)})}acceptInput(e){var t;this._trace("invoking acceptInput"),null===(t=this._currentAcceptInput)||void 0===t||t.call(this,e)}cancelInput(e,t){var i;this._trace(`invoking cancelInput, caller: ${t}, _currentCancelInput: ${this._currentAcceptInput?"not undefined":"undefined"}`),null===(i=this._currentCancelInput)||void 0===i||i.call(this,e)}focusNextRenameSuggestion(){var e;null===(e=this._candidatesView)||void 0===e||e.focusNext()}focusPreviousRenameSuggestion(){var e;(null===(e=this._candidatesView)||void 0===e?void 0:e.focusPrevious())||this._input.focus()}getInput(e,t,i,n,o,s,r){this._domNode.classList.toggle("preview",o),this._position=new g.L(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max(1.1*(e.endColumn-e.startColumn),20);const d=new a.SL;return d.add((0,a.OF)((()=>r.dispose(!0)))),this._updateRenameCandidates(s,t,r.token),new Promise((e=>{this._currentCancelInput=t=>{var i;return this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,null===(i=this._candidatesView)||void 0===i||i.clearCandidates(),e(t),!0},this._currentAcceptInput=i=>{this._trace("invoking _currentAcceptInput"),(0,l.p_)(void 0!==this._input),(0,l.p_)(void 0!==this._candidatesView);const n=this._candidatesView.nCandidates;let s,r;const a=this._candidatesView.focusedCandidate;void 0!==a?(this._trace("using new name from renameSuggestion"),s=a,r="renameSuggestion"):(this._trace("using new name from inputField"),s=this._input.value,r="inputField"),s!==t&&0!==s.trim().length?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._candidatesView.clearCandidates(),e({newName:s,wantsPreview:o&&i,source:r,nRenameSuggestions:n})):this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)")},d.add(r.token.onCancellationRequested((()=>this.cancelInput(!0,"cts.token.onCancellationRequested")))),d.add(this._editor.onDidBlurEditorWidget((()=>{var e;return this.cancelInput(!(null===(e=this._domNode)||void 0===e?void 0:e.ownerDocument.hasFocus()),"editor.onDidBlurEditorWidget")}))),this._show()})).finally((()=>{d.dispose(),this._hide()}))}_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._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))}),100)}async _updateRenameCandidates(e,t,i){const n=(...e)=>this._trace("_updateRenameCandidates",...e);n("start");const s=await(0,o.eP)(Promise.allSettled(e),i);if(void 0===s)return void n("returning early - received updateRenameCandidates results - undefined");const r=s.flatMap((e=>"fulfilled"===e.status&&(0,l.$K)(e.value)?e.value:[]));n(`received updateRenameCandidates results - total (unfiltered) ${r.length} candidates.`);const a=R.EB(r,(e=>e.newSymbolName));n(`distinct candidates - ${a.length} candidates.`);const d=a.filter((({newSymbolName:e})=>{var i;return e.trim().length>0&&e!==(null===(i=this._input)||void 0===i?void 0:i.value)&&e!==t}));n(`valid distinct candidates - ${r.length} candidates.`),d.length<1?n("returning early - no valid distinct candidates"):(n("setting candidates"),this._candidatesView.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("RenameInputField#_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("RenameInputField",...e)}};ie=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([X(2,J.XE),X(3,Z.d),X(4,S.i6),X(5,k.VZ)],ie);class ne{constructor(e,t){this._disposables=new a.SL,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.style.fontFamily=t.fontInfo.fontFamily,this._listContainer.style.fontWeight=t.fontInfo.fontWeight,this._listContainer.style.fontSize=`${t.fontInfo.fontSize}px`,e.appendChild(this._listContainer);const i=this,n=new class{getTemplateId(e){return"candidate"}getHeight(e){return i._candidateViewHeight}},o=new class{constructor(){this.templateId="candidate"}renderTemplate(e){return new oe(e,{lineHeight:i._lineHeight})}renderElement(e,t,i){i.model=e}disposeTemplate(e){e.dispose()}};this._listWidget=new M.aV("NewSymbolNameCandidates",this._listContainer,n,[o],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1}),this._disposables.add(this._listWidget.onDidChangeSelection((e=>{e.elements.length>0&&t.onSelectionChange()}))),this._disposables.add(this._listWidget.onDidBlur((e=>{this._listWidget.setFocus([])}))),this._listWidget.style(Q.O2)}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(e.length),i=this._pickListWidth(e);this._listWidget.layout(t,i),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${i}px`,n.i7((0,w.NC)("renameSuggestionsReceivedAria","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(0===this._listWidget.length)return;const e=this._listWidget.getSelectedElements()[0];if(void 0!==e)return e.newSymbolName;const t=this._listWidget.getFocusedElements()[0];return void 0!==t?t.newSymbolName:void 0}updateFont(e){this._listContainer.style.fontFamily=e.fontFamily,this._listContainer.style.fontWeight=e.fontWeight,this._listContainer.style.fontSize=`${e.fontSize}px`,this._lineHeight=e.lineHeight,this._listWidget.rerender()}focusNext(){0!==this._listWidget.length&&(this._listWidget.isDOMFocused()?this._listWidget.focusNext():(this._listWidget.domFocus(),this._listWidget.focusFirst()),this._listWidget.reveal(this._listWidget.getFocus()[0]))}focusPrevious(){if(0===this._listWidget.length)return!1;this._listWidget.domFocus();const e=this._listWidget.getFocus()[0];return 0!==e&&(this._listWidget.focusPrevious(),this._listWidget.reveal(this._listWidget.getFocus()[0])),e>0}get _candidateViewHeight(){const{totalHeight:e}=oe.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){const t=this._candidateViewHeight*e;return Math.min(t,this._availableHeight,7*this._candidateViewHeight)}_pickListWidth(e){const t=Math.ceil(Math.max(...e.map((e=>e.newSymbolName.length)))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+t+10)}}class oe{constructor(e,{lineHeight:t}){this.domNode=document.createElement("div"),this.domNode.style.display="flex",this.domNode.style.alignItems="center",this.domNode.style.height=`${t}px`,this.domNode.style.padding=`${oe._PADDING}px`,this._icon=document.createElement("div"),this._icon.style.display="flex",this._icon.style.alignItems="center",this._icon.style.width=this._icon.style.height=.8*t+"px",this.domNode.appendChild(this._icon),this._label=document.createElement("div"),this._icon.style.display="flex",this._icon.style.alignItems="center",this._label.style.marginLeft="5px",this.domNode.appendChild(this._label),e.appendChild(this.domNode)}set model(e){0===this._icon.children.length&&this._icon.appendChild((0,T.h)(A.l.sparkle)),this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+2*oe._PADDING}}dispose(){}}oe._PADDING=2;var se,re=function(e,t){return function(i,n){t(i,n,e)}};class ae{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("\n"):void 0}:{range:p.e.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,i,n){const o=this._providers[t];if(!o)return{edits:[],rejectReason:i.join("\n")};const s=await o.provideRenameEdits(this.model,this.position,e,n);return s?s.rejectReason?this._provideRenameEdits(e,t+1,i.concat(s.rejectReason),n):s:this._provideRenameEdits(e,t+1,i.concat(w.NC("no result","No result.")),n)}}let le=se=class{static get(e){return e.getContribution(se.ID)}constructor(e,t,i,n,o,r,l,d,c){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=r,this._configService=l,this._languageFeaturesService=d,this._telemetryService=c,this._disposableStore=new a.SL,this._cts=new s.A,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(ie,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){var e,t;const i=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new s.A,!this.editor.hasModel())return void i("editor has no model");const r=this.editor.getPosition(),a=new ae(this.editor.getModel(),r,this._languageFeaturesService.renameProvider);if(!a.hasProvider())return void i("skeleton has no provider");const l=new _.Dl(this.editor,5,void 0,this._cts.token);let d;try{i("resolving rename location");const e=a.resolveRenameLocation(l.token);this._progressService.showWhile(e,250),d=await e,i("resolved rename location")}catch(t){return i("resolve rename location failed",JSON.stringify(t,null,"\t")),void(null===(e=b.O.get(this.editor))||void 0===e||e.showMessage(t||w.NC("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),r))}finally{l.dispose()}if(!d)return void i("returning early - no loc");if(d.rejectReason)return i(`returning early - rejected with reason: ${d.rejectReason}`,d.rejectReason),void(null===(t=b.O.get(this.editor))||void 0===t||t.showMessage(d.rejectReason,r));if(l.token.isCancellationRequested)return void i("returning early - cts1 cancelled");const c=new _.Dl(this.editor,5,d.range,this._cts.token),h=this.editor.getModel(),u=new s.A(c.token),g=this._languageFeaturesService.newSymbolNamesProvider.all(h),m=g.map((e=>e.provideNewSymbolNames(h,d.range,u.token)));i(`requested new symbol names from ${g.length} providers`);const f=this.editor.getSelection();let v=0,y=d.text.length;p.e.isEmpty(f)||p.e.spansMultipleLines(f)||!p.e.containsRange(d.range,f)||(v=Math.max(0,f.startColumn-d.range.startColumn),y=Math.min(d.range.endColumn,f.endColumn)-d.range.startColumn),i("creating rename input field and awaiting its result");const C=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),S=await this._renameInputField.getInput(d.range,d.text,v,y,C,m,u);if(i("received response from rename input field"),g.length>0&&this._reportTelemetry(g.length,h.getLanguageId(),S),"boolean"==typeof S)return i(`returning early - rename input field response - ${S}`),S&&this.editor.focus(),void c.dispose();this.editor.focus(),i("requesting rename edits");const x=(0,o.eP)(a.provideRenameEdits(S.newName,c.token),c.token).then((async e=>{if(e)if(this.editor.hasModel()){if(e.rejectReason)return i(`returning early - rejected with reason: ${e.rejectReason}`),void this._notificationService.info(e.rejectReason);this.editor.setSelection(p.e.fromPositions(this.editor.getSelection().getPosition())),i("applying edits"),this._bulkEditService.apply(e,{editor:this.editor,showPreview:S.wantsPreview,label:w.NC("label","Renaming '{0}' to '{1}'",null==d?void 0:d.text,S.newName),code:"undoredo.rename",quotableLabel:w.NC("quotableLabel","Renaming {0} to {1}",null==d?void 0:d.text,S.newName),respectAutoSaveConfig:!0}).then((e=>{i("edits applied"),e.ariaSummary&&(0,n.Z9)(w.NC("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",d.text,S.newName,e.ariaSummary))})).catch((e=>{i(`error when applying edits ${JSON.stringify(e,null,"\t")}`),this._notificationService.error(w.NC("rename.failedApply","Rename failed to apply edits")),this._logService.error(e)}))}else i("returning early - no model after rename edits are provided");else i("returning early - no rename edits result")}),(e=>{i("error when providing rename edits",JSON.stringify(e,null,"\t")),this._notificationService.error(w.NC("rename.failed","Rename failed to compute edits")),this._logService.error(e)})).finally((()=>{c.dispose()}));return i("returning rename operation"),this._progressService.showWhile(x,250),x}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameInputField.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameInputField.focusPreviousRenameSuggestion()}_reportTelemetry(e,t,i){const n="boolean"==typeof i?{kind:"cancelled",languageId:t,nRenameSuggestionProviders:e}:{kind:"accepted",languageId:t,nRenameSuggestionProviders:e,source:i.source,nRenameSuggestions:i.nRenameSuggestions,wantsPreview:i.wantsPreview};this._telemetryService.publicLog2("renameInvokedEvent",n)}};le.ID="editor.contrib.renameController",le=se=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([re(1,x.TG),re(2,L.lT),re(3,h.vu),re(4,N.ek),re(5,k.VZ),re(6,v.V),re(7,f.p),re(8,E.b)],le);class de extends c.R6{constructor(){super({id:"editor.action.rename",label:w.NC("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:S.Ao.and(m.u.writable,m.u.hasRenameProvider),kbOpts:{kbExpr:m.u.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(u.$),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return d.o.isUri(n)&&g.L.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),r.dL):super.runCommand(e,t)}run(e,t){const i=e.get(k.VZ),n=le.get(t);return n?(i.trace("[RenameAction] got controller, running..."),n.run()):(i.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}(0,c._K)(le.ID,le,4),(0,c.Qr)(de);const ce=c._l.bindToContribution(le.get);(0,c.fK)(new ce({id:"acceptRenameInput",precondition:ee,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:S.Ao.and(m.u.focus,S.Ao.not("isComposing")),primary:3}})),(0,c.fK)(new ce({id:"acceptRenameInputWithPreview",precondition:S.Ao.and(ee,S.Ao.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:S.Ao.and(m.u.focus,S.Ao.not("isComposing")),primary:1027}})),(0,c.fK)(new ce({id:"cancelRenameInput",precondition:ee,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:m.u.focus,primary:9,secondary:[1033]}})),(0,y.r1)(class extends y.Ke{constructor(){super({id:"focusNextRenameSuggestion",title:{...w.vv("focusNextRenameSuggestion","Focus Next Rename Suggestion")},precondition:ee,keybinding:[{primary:2,secondary:[18],weight:199}]})}run(e){const t=e.get(u.$).getFocusedCodeEditor();if(!t)return;const i=le.get(t);i&&i.focusNextRenameSuggestion()}}),(0,y.r1)(class extends y.Ke{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...w.vv("focusPreviousRenameSuggestion","Focus Previous Rename Suggestion")},precondition:ee,keybinding:[{when:te,primary:6,weight:199},{when:te.toNegated(),primary:1026,secondary:[16],weight:199}]})}run(e){const t=e.get(u.$).getFocusedCodeEditor();if(!t)return;const i=le.get(t);i&&i.focusPreviousRenameSuggestion()}}),(0,c.sb)("_executeDocumentRenameProvider",(function(e,t,i,...n){const[o]=n;(0,l.p_)("string"==typeof o);const{renameProvider:r}=e.get(f.p);return async function(e,t,i,n){const o=new ae(t,i,e),r=await o.resolveRenameLocation(s.T.None);return(null==r?void 0:r.rejectReason)?{edits:[],rejectReason:r.rejectReason}:o.provideRenameEdits(n,s.T.None)}(r,t,i,o)})),(0,c.sb)("_executePrepareRename",(async function(e,t,i){const{renameProvider:n}=e.get(f.p),o=new ae(t,i,n),r=await o.resolveRenameLocation(s.T.None);if(null==r?void 0:r.rejectReason)throw new Error(r.rejectReason);return r})),D.B.as(C.IP.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:w.NC("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})},61168:(e,t,i)=>{"use strict";var n,o=i(5976),s=i(17301),r=i(73733),a=i(33108),l=i(15393),d=i(71050),c=i(97781),h=i(26909),u=i(34983),g=i(88191),p=i(84013),m=i(71922),f=i(73343),v=i(10637),_=i(44408),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};let y=class extends o.JT{constructor(e,t,i,n,o,s){super(),this._watchers=Object.create(null);const r=t=>{this._watchers[t.uri.toString()]=new C(t,e,i,o,s)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(const e of t.getModels()){const t=this._watchers[e.uri.toString()];(0,_.t)(e,i,n)?t||r(e):t&&a(e,t)}};t.getModels().forEach((e=>{(0,_.t)(e,i,n)&&r(e)})),this._register(t.onModelAdded((e=>{(0,_.t)(e,i,n)&&r(e)}))),this._register(t.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&a(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(_.e)&&l()}))),this._register(i.onDidColorThemeChange(l))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};y=b([w(0,f.s),w(1,r.q),w(2,c.XE),w(3,a.Ui),w(4,g.A),w(5,m.p)],y);let C=n=class extends o.JT{constructor(e,t,i,s,r){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentSemanticTokens",{min:n.REQUEST_MIN_DELAY,max:n.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new l.pY((()=>this._fetchDocumentSemanticTokensNow()),n.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,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._fetchDocumentSemanticTokens.schedule(0)})));const a=()=>{(0,o.B9)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of this._provider.all(e))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange((()=>{this._currentDocumentRequestCancellationTokenSource?this._providersChangedDuringRequest=!0:this._fetchDocumentSemanticTokens.schedule(0)})))};a(),this._register(this._provider.onDidChange((()=>{a(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(i.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),(0,o.B9)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,u.Jc)(this._provider,this._model))return void(this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1));if(!this._model.isAttachedToEditor())return;const e=new d.A,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=(0,u.ML)(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const o=[],r=this._model.onDidChangeContent((e=>{o.push(e)})),a=new p.G(!1);n.then((e=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticTokensStylingService.getStyling(t);this._setDocumentSemanticTokens(t,i||null,n,o)}else this._setDocumentSemanticTokens(null,null,null,o)}),(e=>{e&&(s.n2(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||s.dL(e),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,o){o=Math.min(o,i.length-n,e.length-t);for(let s=0;s{(o.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);else if(e&&i){if(!t)return this._model.tokenization.setSemanticTokens(null,!0),void r();if((0,u.Vj)(t)){if(!s)return void this._model.tokenization.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:s.data};else{let e=0;for(const i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;const o=s.data,r=new Uint32Array(o.length+e);let a=o.length,l=r.length;for(let e=t.edits.length-1;e>=0;e--){const d=t.edits[e];if(d.start>o.length)return i.warnInvalidEditStart(s.resultId,t.resultId,e,d.start,o.length),void this._model.tokenization.setSemanticTokens(null,!0);const c=a-(d.start+d.deleteCount);c>0&&(n._copy(o,a-c,r,l-c,c),l-=c),d.data&&(n._copy(d.data,0,r,l-d.data.length,d.data.length),l-=d.data.length),a=d.start}a>0&&n._copy(o,0,r,0,a),t={resultId:t.resultId,data:r}}}if((0,u.Vl)(t)){this._currentDocumentResponse=new S(e,t.resultId,t.data);const n=(0,h.h)(t,i,this._model.getLanguageId());if(o.length>0)for(const e of o)for(const t of n)for(const i of e.changes)t.applyEdit(i.range,i.text);this._model.tokenization.setSemanticTokens(n,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}else this._model.tokenization.setSemanticTokens(null,!1)}};C.REQUEST_MIN_DELAY=300,C.REQUEST_MAX_DELAY=2e3,C=n=b([w(1,f.s),w(2,c.XE),w(3,g.A),w(4,m.p)],C);class S{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,v.y)(y)},89995:(e,t,i)=>{"use strict";var n=i(15393),o=i(5976),s=i(16830),r=i(34983),a=i(44408),l=i(26909),d=i(33108),c=i(97781),h=i(88191),u=i(84013),g=i(71922),p=i(73343),m=function(e,t){return function(i,n){t(i,n,e)}};let f=class extends o.JT{constructor(e,t,i,o,s,r){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=o,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new n.pY((()=>this._tokenizeViewportNow()),100)),this._outstandingRequests=[];const l=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange((()=>{l()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),l()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),l()}))),this._register(this._provider.onDidChange((()=>{this._cancelAll(),l()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(a.e)&&(this._cancelAll(),l())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),l()}))),l()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,t))))}_requestRange(e,t){const i=e.getVersionId(),o=(0,n.PG)((i=>Promise.resolve((0,r.OG)(this._provider,e,t,i)))),s=new u.G(!1);return o.then((n=>{if(this._debounceInformation.update(e,s.elapsed()),!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:o,tokens:r}=n,a=this._semanticTokensStylingService.getStyling(o);e.tokenization.setPartialSemanticTokens(t,(0,l.h)(r,a,e.getLanguageId()))})).then((()=>this._removeOutstandingRequest(o)),(()=>this._removeOutstandingRequest(o))),o}};f.ID="editor.contrib.viewportSemanticTokens",f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([m(1,p.s),m(2,c.XE),m(3,d.Ui),m(4,h.A),m(5,g.p)],f),(0,s._K)(f.ID,f,1)},34983:(e,t,i)=>{"use strict";i.d(t,{OG:()=>C,ML:()=>_,KO:()=>w,Jc:()=>v,Vl:()=>p,Vj:()=>m});var n=i(71050),o=i(17301),s=i(70666),r=i(73733),a=i(94565),l=i(98401),d=i(53060),c=i(1432);function h(e){const t=new Uint32Array(function(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const i of e.deltas)i.data&&(t+=i.data.length)}return t}(e));let i=0;if(t[i++]=e.id,"full"===e.type)t[i++]=1,t[i++]=e.data.length,t.set(e.data,i),i+=e.data.length;else{t[i++]=2,t[i++]=e.deltas.length;for(const n of e.deltas)t[i++]=n.start,t[i++]=n.deleteCount,n.data?(t[i++]=n.data.length,t.set(n.data,i),i+=n.data.length):t[i++]=0}return function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return c.r()||function(e){for(let t=0,i=e.length;t0?i[0]:[]}(e,t),r=await Promise.all(s.map((async e=>{let s,r=null;try{s=await e.provideDocumentSemanticTokens(t,e===i?n:null,o)}catch(e){r=e,s=null}return s&&(p(s)||m(s))||(s=null),new f(e,s,r)})));for(const e of r){if(e.error)throw e.error;if(e.tokens)return e}return r.length>0?r[0]:null}class b{constructor(e,t){this.provider=e,this.tokens=t}}function w(e,t){return e.has(t)}function y(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}async function C(e,t,i,n){const s=y(e,t),r=await Promise.all(s.map((async e=>{let s;try{s=await e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){(0,o.Cp)(e),s=null}return s&&p(s)||(s=null),new b(e,s)})));for(const e of r)if(e.tokens)return e;return r.length>0?r[0]:null}a.P.registerCommand("_provideDocumentSemanticTokensLegend",(async(e,...t)=>{const[i]=t;(0,l.p_)(i instanceof s.o);const n=e.get(r.q).getModel(i);if(!n)return;const{documentSemanticTokensProvider:o}=e.get(g.p),d=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:null}(o,n);return d?d[0].getLegend():e.get(a.H).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})),a.P.registerCommand("_provideDocumentSemanticTokens",(async(e,...t)=>{const[i]=t;(0,l.p_)(i instanceof s.o);const o=e.get(r.q).getModel(i);if(!o)return;const{documentSemanticTokensProvider:d}=e.get(g.p);if(!v(d,o))return e.get(a.H).executeCommand("_provideDocumentRangeSemanticTokens",i,o.getFullModelRange());const c=await _(d,o,null,null,n.T.None);if(!c)return;const{provider:u,tokens:m}=c;if(!m||!p(m))return;const f=h({id:0,type:"full",data:m.data});return m.resultId&&u.releaseDocumentSemanticTokens(m.resultId),f})),a.P.registerCommand("_provideDocumentRangeSemanticTokensLegend",(async(e,...t)=>{const[i,o]=t;(0,l.p_)(i instanceof s.o);const a=e.get(r.q).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:d}=e.get(g.p),c=y(d,a);if(0===c.length)return;if(1===c.length)return c[0].getLegend();if(!o||!u.e.isIRange(o))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),c[0].getLegend();const h=await C(d,a,u.e.lift(o),n.T.None);return h?h.provider.getLegend():void 0})),a.P.registerCommand("_provideDocumentRangeSemanticTokens",(async(e,...t)=>{const[i,o]=t;(0,l.p_)(i instanceof s.o),(0,l.p_)(u.e.isIRange(o));const a=e.get(r.q).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:d}=e.get(g.p),c=await C(d,a,u.e.lift(o),n.T.None);return c&&c.tokens?h({id:0,type:"full",data:c.tokens.data}):void 0}))},44408:(e,t,i)=>{"use strict";i.d(t,{e:()=>n,t:()=>o});const n="editor.semanticHighlighting";function o(e,t,i){var o;const s=null===(o=i.getValue(n,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))||void 0===o?void 0:o.enabled;return"boolean"==typeof s?s:t.getColorTheme().semanticHighlighting}},79694:(e,t,i)=>{"use strict";i.d(t,{x:()=>r});var n=i(91741),o=i(50187),s=i(24314);class r{async provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t);const o=new Map;await new Promise((t=>r._bracketsRightYield(t,0,e,n,o))),await new Promise((i=>r._bracketsLeftYield(i,0,e,n,o,t)))}return i}static _bracketsRightYield(e,t,i,o,s){const a=new Map,l=Date.now();for(;;){if(t>=r._maxRounds){e();break}if(!o){e();break}const d=i.bracketPairs.findNextBracket(o);if(!d){e();break}if(Date.now()-l>r._maxDuration){setTimeout((()=>r._bracketsRightYield(e,t+1,i,o,s)));break}if(d.bracketInfo.isOpeningBracket){const e=d.bracketInfo.bracketText,t=a.has(e)?a.get(e):0;a.set(e,t+1)}else{const e=d.bracketInfo.getOpeningBrackets()[0].bracketText;let t=a.has(e)?a.get(e):0;if(t-=1,a.set(e,Math.max(0,t)),t<0){let t=s.get(e);t||(t=new n.S,s.set(e,t)),t.push(d.range)}}o=d.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,o,a){const l=new Map,d=Date.now();for(;;){if(t>=r._maxRounds&&0===o.size){e();break}if(!n){e();break}const c=i.bracketPairs.findPrevBracket(n);if(!c){e();break}if(Date.now()-d>r._maxDuration){setTimeout((()=>r._bracketsLeftYield(e,t+1,i,n,o,a)));break}if(c.bracketInfo.isOpeningBracket){const e=c.bracketInfo.bracketText;let t=l.has(e)?l.get(e):0;if(t-=1,l.set(e,Math.max(0,t)),t<0){const t=o.get(e);if(t){const n=t.shift();0===t.size&&o.delete(e);const l=s.e.fromPositions(c.range.getEndPosition(),n.getStartPosition()),d=s.e.fromPositions(c.range.getStartPosition(),n.getEndPosition());a.push({range:l}),a.push({range:d}),r._addBracketLeading(i,d,a)}}}else{const e=c.bracketInfo.getOpeningBrackets()[0].bracketText,t=l.has(e)?l.get(e):0;l.set(e,t+1)}n=c.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,r=e.getLineFirstNonWhitespaceColumn(n);0!==r&&r!==t.startColumn&&(i.push({range:s.e.fromPositions(new o.L(n,r),t.getEndPosition())}),i.push({range:s.e.fromPositions(new o.L(n,1),t.getEndPosition())}));const a=n-1;if(a>0){const n=e.getLineFirstNonWhitespaceColumn(a);n===t.startColumn&&n!==e.getLineLastNonWhitespaceColumn(a)&&(i.push({range:s.e.fromPositions(new o.L(a,n),t.getEndPosition())}),i.push({range:s.e.fromPositions(new o.L(a,1),t.getEndPosition())}))}}}r._maxDuration=30,r._maxRounds=2},102:(e,t,i)=>{"use strict";var n=i(9488),o=i(71050),s=i(17301),r=i(16830),a=i(50187),l=i(24314),d=i(3860),c=i(29102),h=i(79694),u=i(97295);class g{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t),this.selectSubwords&&this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:o,startColumn:s}=n,r=i.column-s;let a=r,d=r,c=0;for(;a>=0;a--){const e=o.charCodeAt(a);if(a!==r&&(95===e||45===e))break;if((0,u.mK)(e)&&(0,u.df)(c))break;c=e}for(a+=1;d0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new l.e(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var p,m=i(63580),f=i(84144),v=i(94565),_=i(71922),b=i(88216),w=i(98401),y=i(70666);class C{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 C(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let S=p=class{static get(e){return e.getContribution(p.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;null===(e=this._selectionListener)||void 0===e||e.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await N(this._languageFeaturesService.selectionRangeProvider,i,t.map((e=>e.getPosition())),this._editor.getOption(113),o.T.None).then((e=>{var i;if(n.Of(e)&&e.length===t.length&&this._editor.hasModel()&&n.fS(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let i=0;ie.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition()))),e[i].unshift(t[i]);this._state=e.map((e=>new C(0,e))),null===(i=this._selectionListener)||void 0===i||i.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{var e;this._ignoreSelection||(null===(e=this._selectionListener)||void 0===e||e.dispose(),this._state=void 0)}))}})),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const s=this._state.map((e=>d.Y.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(s)}finally{this._ignoreSelection=!1}}};var x,k;S.ID="editor.contrib.smartSelectController",S=p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(x=1,k=_.p,function(e,t){k(e,t,x)})],S);class L extends r.R6{constructor(e,t){super(t),this._forward=e}async run(e,t){const i=S.get(t);i&&await i.run(this._forward)}}async function N(e,t,i,o,r){const d=e.all(t).concat(new g(o.selectSubwords));1===d.length&&d.unshift(new h.x);const c=[],u=[];for(const e of d)c.push(Promise.resolve(e.provideSelectionRanges(t,i,r)).then((e=>{if(n.Of(e)&&e.length===i.length)for(let t=0;t{if(0===e.length)return[];e.sort(((e,t)=>a.L.isBefore(e.getStartPosition(),t.getStartPosition())?1:a.L.isBefore(t.getStartPosition(),e.getStartPosition())||a.L.isBefore(e.getEndPosition(),t.getEndPosition())?-1:a.L.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));const i=[];let n;for(const t of e)(!n||l.e.containsRange(t,n)&&!l.e.equalsRange(t,n))&&(i.push(t),n=t);if(!o.selectLeadingAndTrailingWhitespace)return i;const s=[i[0]];for(let e=1;e{"use strict";i.d(t,{f:()=>_});var n,o=i(5976),s=i(98401),r=i(16830),a=i(50187),l=i(29102),d=i(51381),c=i(71922),h=i(55621),u=i(63580),g=i(93983),p=i(43557),m=i(18217),f=function(e,t){return function(i,n){t(i,n,e)}};const v={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let _=n=class{static get(e){return e.getContribution(n.ID)}constructor(e,t,i,s,r){this._editor=e,this._logService=t,this._languageFeaturesService=i,this._languageConfigurationService=r,this._snippetListener=new o.SL,this._modelVersionId=-1,this._inSnippet=n.InSnippetMode.bindTo(s),this._hasNextTabstop=n.HasNextTabstop.bindTo(s),this._hasPrevTabstop=n.HasPrevTabstop.bindTo(s)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),null===(e=this._session)||void 0===e||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,void 0===t?v:{...v,...t})}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){var i;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&"string"!=typeof e&&this.cancel(),this._session?((0,s.p_)("string"==typeof e),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new m.l(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),null===(i=this._session)||void 0===i?void 0:i.hasChoice){const e={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(e,t)=>{if(!this._session||e!==this._editor.getModel()||!a.L.equals(this._editor.getPosition(),t))return;const{activeChoice:i}=this._session;if(!i||0===i.choice.options.length)return;const n=e.getValueInRange(i.range),o=Boolean(i.choice.options.find((e=>e.value===n))),s=[];for(let e=0;e{null==i||i.dispose(),n=!1},s=()=>{n||(i=this._languageFeaturesService.completionProvider.register({language:t.getLanguageId(),pattern:t.uri.fsPath,scheme:t.uri.scheme,exclusive:!0},e),this._snippetListener.add(i),n=!0)};this._choiceCompletions={provider:e,enable:s,disable:o}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.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._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var e;if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{activeChoice:t}=this._session;if(!t||!this._choiceCompletions)return null===(e=this._choiceCompletions)||void 0===e||e.disable(),void(this._currentChoice=void 0);this._currentChoice!==t.choice&&(this._currentChoice=t.choice,this._choiceCompletions.enable(),queueMicrotask((()=>{(0,h.i5)(this._editor,this._choiceCompletions.provider)})))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,null===(t=this._session)||void 0===t||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;null===(e=this._session)||void 0===e||e.prev(),this._updateState()}next(){var e;null===(e=this._session)||void 0===e||e.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};_.ID="snippetController2",_.InSnippetMode=new g.uy("inSnippetMode",!1,(0,u.NC)("inSnippetMode","Whether the editor in current in snippet mode")),_.HasNextTabstop=new g.uy("hasNextTabstop",!1,(0,u.NC)("hasNextTabstop","Whether there is a next tab stop when in snippet mode")),_.HasPrevTabstop=new g.uy("hasPrevTabstop",!1,(0,u.NC)("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode")),_=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([f(1,p.VZ),f(2,c.p),f(3,g.i6),f(4,d.c_)],_),(0,r._K)(_.ID,_,4);const b=r._l.bindToContribution(_.get);(0,r.fK)(new b({id:"jumpToNextSnippetPlaceholder",precondition:g.Ao.and(_.InSnippetMode,_.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:l.u.editorTextFocus,primary:2}})),(0,r.fK)(new b({id:"jumpToPrevSnippetPlaceholder",precondition:g.Ao.and(_.InSnippetMode,_.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:l.u.editorTextFocus,primary:1026}})),(0,r.fK)(new b({id:"leaveSnippet",precondition:_.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:l.u.editorTextFocus,primary:9,secondary:[1033]}})),(0,r.fK)(new b({id:"acceptSnippet",precondition:_.InSnippetMode,handler:e=>e.finish()}))},35084:(e,t,i)=>{"use strict";i.d(t,{Lv:()=>l,Vm:()=>a,Yj:()=>p,xv:()=>s,y1:()=>g});class n{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||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,i=0,o=this.value.charCodeAt(e);if(t=n._table[o],"number"==typeof t)return this.pos+=1,{type:t,pos:e,len:1};if(n.isDigitCharacter(o)){t=8;do{i+=1,o=this.value.charCodeAt(e+i)}while(n.isDigitCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}if(n.isVariableCharacter(o)){t=9;do{o=this.value.charCodeAt(e+ ++i)}while(n.isVariableCharacter(o)||n.isDigitCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}t=10;do{i+=1,o=this.value.charCodeAt(e+i)}while(!isNaN(o)&&void 0===n._table[o]&&!n.isDigitCharacter(o)&&!n.isVariableCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}}n._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class o{constructor(){this._children=[]}appendChild(e){return e instanceof s&&this._children[this._children.length-1]instanceof s?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),o=i.children.slice(0);o.splice(n,1,...t),i._children=o,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(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 g)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class s extends o{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new s(this.value)}}class r extends o{}class a extends r{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 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof l?this._children[0]:void 0}clone(){const e=new a(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class l extends o{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof s&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new l;return this.options.forEach(e.appendChild,e),e}}class d extends o{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((e=>e instanceof c&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof c){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new d;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class c extends o{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":"camelcase"===this.shorthandName?e?this._toCamelCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.charAt(0).toLowerCase()+e.substr(1):e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}clone(){return new c(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class h extends r{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new s(t)],!0)}clone(){const e=new h(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function u(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}class g extends o{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk((function(i){return i instanceof a&&(e.push(i),t=!t||t.indexn===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return u([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof a&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof h&&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 g;return this._children=this.children.map((e=>e.clone())),e}walk(e){u(this.children,e)}}class p{constructor(){this._scanner=new n,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 g;return this.parseFragment(e,n),this.ensureFinalTabstop(n,null!=i&&i,null!=t&&t),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,o=[];t.walk((e=>(e instanceof a&&(e.isFinalTabstop?n.set(0,void 0):!n.has(e.index)&&e.children.length>0?n.set(e.index,e.children):o.push(e)),!0)));const s=(e,i)=>{const o=n.get(e.index);if(!o)return;const r=new a(e.index);r.transform=e.transform;for(const e of o){const t=e.clone();r.appendChild(t),t instanceof a&&n.has(t.index)&&!i.has(t.index)&&(i.add(t.index),s(t,i),i.delete(t.index))}t.replace(e,[r])},r=new Set;for(const e of o)s(e,r);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find((e=>0===e.index))||e.appendChild(new a(0)))}_accept(e,t){if(void 0===e||this._token.type===e){const e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}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(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)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 s(t)),!0)}_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 a(Number(t)):new h(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 n=new a(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new s("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);{const t=new l;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(t),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new s(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 n=new h(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new s("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){const t=new d;let i="",n="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new s(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(e){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)return this._backTo(t),!1;if(!i)return e.appendChild(new c(Number(n))),!0;if(this._accept(4))return e.appendChild(new c(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){const i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new c(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){const t=this._until(4);if(t)return e.appendChild(new c(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){const t=this._until(4);if(t)return e.appendChild(new c(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){const t=this._until(1);if(t){const i=this._until(4);if(i)return e.appendChild(new c(Number(n),void 0,t,i)),!0}}else{const t=this._until(4);if(t)return e.appendChild(new c(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new s(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}},18217:(e,t,i)=>{"use strict";i.d(t,{l:()=>G});var n=i(9488),o=i(5976),s=i(97295),r=i(93379),a=i.n(r),l=i(7795),d=i.n(l),c=i(90569),h=i.n(c),u=i(3565),g=i.n(u),p=i(19216),m=i.n(p),f=i(44589),v=i.n(f),_=i(15756),b={};b.styleTagTransform=v(),b.setAttributes=g(),b.insert=h().bind(null,"head"),b.domAPI=d(),b.insertStyleElement=m(),a()(_.Z,b),_.Z&&_.Z.locals&&_.Z.locals;var w=i(69386),y=i(24314),C=i(3860),S=i(51381),x=i(13961),k=i(44349),L=i(40382),N=i(35084),D=i(15527),E=i(1432);function I(e,t=E.ED){return(0,D.oP)(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}Object.create(null);var T=i(82663),M=i(95935),R=i(98e3),A=i(63580);Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class P{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(void 0!==i)return i}}}class O{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,i=e.multiline)}if(t&&i&&e.snippet){const i=this._model.getLineContent(this._selection.startLineNumber),n=(0,s.V8)(i,0,this._selection.startColumn-1);let o=n;e.snippet.walk((t=>t!==e&&(t instanceof N.xv&&(o=(0,s.V8)((0,s.uq)(t.value).pop())),!0)));const r=(0,s.Mh)(o,n);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,i)=>`${t}${o.substr(r)}${i}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):"CURSOR_INDEX"===t?String(this._selectionIdx):"CURSOR_NUMBER"===t?String(this._selectionIdx+1):void 0}}class F{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return T.EZ(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=T.EZ(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t?"."===T.XX(this._model.uri.fsPath)?"":this._labelService.getUriLabel((0,M.XX)(this._model.uri)):"TM_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class B{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!(0,s.m5)(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}let W=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)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}};var H,V;W=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(H=2,V=S.c_,function(e,t){V(e,t,H)})],W);class z{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if("CURRENT_YEAR"===t)return String(this._date.getFullYear());if("CURRENT_YEAR_SHORT"===t)return String(this._date.getFullYear()).slice(-2);if("CURRENT_MONTH"===t)return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if("CURRENT_DATE"===t)return String(this._date.getDate().valueOf()).padStart(2,"0");if("CURRENT_HOUR"===t)return String(this._date.getHours().valueOf()).padStart(2,"0");if("CURRENT_MINUTE"===t)return String(this._date.getMinutes().valueOf()).padStart(2,"0");if("CURRENT_SECOND"===t)return String(this._date.getSeconds().valueOf()).padStart(2,"0");if("CURRENT_DAY_NAME"===t)return z.dayNames[this._date.getDay()];if("CURRENT_DAY_NAME_SHORT"===t)return z.dayNamesShort[this._date.getDay()];if("CURRENT_MONTH_NAME"===t)return z.monthNames[this._date.getMonth()];if("CURRENT_MONTH_NAME_SHORT"===t)return z.monthNamesShort[this._date.getMonth()];if("CURRENT_SECONDS_UNIX"===t)return String(Math.floor(this._date.getTime()/1e3));if("CURRENT_TIMEZONE_OFFSET"===t){const e=this._date.getTimezoneOffset(),t=e>0?"-":"+",i=Math.trunc(Math.abs(e/60)),n=i<10?"0"+i:i,o=Math.abs(e)-60*i;return t+n+":"+(o<10?"0"+o:o)}}}z.dayNames=[A.NC("Sunday","Sunday"),A.NC("Monday","Monday"),A.NC("Tuesday","Tuesday"),A.NC("Wednesday","Wednesday"),A.NC("Thursday","Thursday"),A.NC("Friday","Friday"),A.NC("Saturday","Saturday")],z.dayNamesShort=[A.NC("SundayShort","Sun"),A.NC("MondayShort","Mon"),A.NC("TuesdayShort","Tue"),A.NC("WednesdayShort","Wed"),A.NC("ThursdayShort","Thu"),A.NC("FridayShort","Fri"),A.NC("SaturdayShort","Sat")],z.monthNames=[A.NC("January","January"),A.NC("February","February"),A.NC("March","March"),A.NC("April","April"),A.NC("May","May"),A.NC("June","June"),A.NC("July","July"),A.NC("August","August"),A.NC("September","September"),A.NC("October","October"),A.NC("November","November"),A.NC("December","December")],z.monthNamesShort=[A.NC("JanuaryShort","Jan"),A.NC("FebruaryShort","Feb"),A.NC("MarchShort","Mar"),A.NC("AprilShort","Apr"),A.NC("MayShort","May"),A.NC("JuneShort","Jun"),A.NC("JulyShort","Jul"),A.NC("AugustShort","Aug"),A.NC("SeptemberShort","Sep"),A.NC("OctoberShort","Oct"),A.NC("NovemberShort","Nov"),A.NC("DecemberShort","Dec")];class j{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=(0,L.uT)(this._workspaceService.getWorkspace());return(0,L.c$)(t)?void 0:"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0}_resolveWorkspaceName(e){if((0,L.eb)(e))return T.EZ(e.uri.path);let t=T.EZ(e.configPath.path);return t.endsWith(L.A6)&&(t=t.substr(0,t.length-L.A6.length-1)),t}_resoveWorkspacePath(e){if((0,L.eb)(e))return I(e.uri.fsPath);const t=T.EZ(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?I(i):"/"}}class U{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?(0,R.R)():void 0}}var q;class K{constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,n.vM)(t.placeholders,N.Vm.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(-1===this._offset)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),o=this._snippet.fullLen(i),s=y.e.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+o)),r=i.isFinalTabstop?K._decor.inactiveFinal:K._decor.inactive,a=t.addDecoration(s,r);this._placeholderDecorations.set(i,a)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),o=this._editor.getModel().getValueInRange(n),s=t.transform.resolve(o).split(/\r\n|\r|\n/);for(let e=1;e0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations((e=>{const i=new Set,n=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const s=this._placeholderDecorations.get(o),r=this._editor.getModel().getDecorationRange(s);n.push(new C.Y(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(o),e.changeDecorationOptions(s,o.isFinalTabstop?K._decor.activeFinal:K._decor.active),i.add(o);for(const t of this._snippet.enclosingPlaceholders(o)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?K._decor.activeFinal:K._decor.active),i.add(t)}}for(const[t,n]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(n,t.isFinalTabstop?K._decor.inactiveFinal:K._decor.inactive);return n}));return t?this.move(e):null!=i?i:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof N.Vm){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(0===this._snippet.placeholders.length)return!0;if(1===this._snippet.placeholders.length){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 t=this._placeholderDecorations.get(n),o=this._editor.getModel().getDecorationRange(t);if(!o){e.delete(n.index);break}i.push(o)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(null==e?void 0:e.choice))return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);return i?{range:i,choice:e.choice}:void 0}get hasChoice(){let e=!1;return this._snippet.walk((t=>(e=t instanceof N.Lv,!e))),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const o=e.shift();console.assert(-1!==o._offset),console.assert(!o._placeholderDecorations);const s=o._snippet.placeholderInfo.last.index;for(const e of o._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(s+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,o._snippet.children);const r=this._placeholderDecorations.get(n);i.removeDecoration(r),this._placeholderDecorations.delete(n);for(const e of o._snippet.placeholders){const n=o._snippet.offset(e),s=o._snippet.fullLen(e),r=y.e.fromPositions(t.getPositionAt(o._offset+n),t.getPositionAt(o._offset+n+s)),a=i.addDecoration(r,K._decor.inactive);this._placeholderDecorations.set(e,a)}}this._placeholderGroups=(0,n.vM)(this._snippet.placeholders,N.Vm.compareByIndex)}))}}K._decor={active:x.qx.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:x.qx.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:x.qx.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:x.qx.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const $={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let G=q=class{static adjustWhitespace(e,t,i,n,o){const r=e.getLineContent(t.lineNumber),a=(0,s.V8)(r,0,t.column-1);let l;return n.walk((t=>{if(!(t instanceof N.xv)||t.parent instanceof N.Lv)return!0;if(o&&!o.has(t))return!0;const s=t.value.split(/\r\n|\r|\n/);if(i){const i=n.offset(t);if(0===i)s[0]=e.normalizeIndentation(s[0]);else{l=null!=l?l:n.toString();const t=l.charCodeAt(i-1);10!==t&&13!==t||(s[0]=e.normalizeIndentation(a+s[0]))}for(let t=1;te.get(L.ec))),g=e.invokeWithinContext((e=>new F(e.get(k.e),h))),p=()=>r,m=h.getValueInRange(q.adjustSelection(h,e.getSelection(),i,0)),f=h.getValueInRange(q.adjustSelection(h,e.getSelection(),0,n)),v=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),_=e.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>y.e.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:r,idx:b}of _){let y=q.adjustSelection(h,r,i,0),C=q.adjustSelection(h,r,0,n);m!==h.getValueInRange(y)&&(y=r),f!==h.getValueInRange(C)&&(C=r);const S=r.setStartPosition(y.startLineNumber,y.startColumn).setEndPosition(C.endLineNumber,C.endColumn),x=(new N.Yj).parse(t,!0,o),k=S.getStartPosition(),L=q.adjustWhitespace(h,k,s||b>0&&v!==h.getLineFirstNonWhitespaceColumn(r.positionLineNumber),x);x.resolveVariables(new P([g,new B(p,b,_.length,"spread"===e.getOption(79)),new O(h,r,b,a),new W(h,r,l),new z,new j(u),new U])),d[b]=w.h.replace(S,x.toString()),d[b].identifier={major:b,minor:0},d[b]._isTracked=!0,c[b]=new K(e,x,L)}return{edits:d,snippets:c}}static createEditsAndSnippetsFromEdits(e,t,i,n,o,s,r){if(!e.hasModel()||0===t.length)return{edits:[],snippets:[]};const a=[],l=e.getModel(),d=new N.Yj,c=new N.y1,h=new P([e.invokeWithinContext((e=>new F(e.get(k.e),l))),new B((()=>o),0,e.getSelections().length,"spread"===e.getOption(79)),new O(l,e.getSelection(),0,s),new W(l,e.getSelection(),r),new z,new j(e.invokeWithinContext((e=>e.get(L.ec)))),new U]);t=t.sort(((e,t)=>y.e.compareRangesUsingStarts(e.range,t.range)));let u=0;for(let e=0;e0){const n=t[e-1].range,o=y.e.fromPositions(n.getEndPosition(),i.getStartPosition()),s=new N.xv(l.getValueInRange(o));c.appendChild(s),u+=s.value.length}const o=d.parseFragment(n,c);q.adjustWhitespace(l,i.getStartPosition(),!0,c,new Set(o)),c.resolveVariables(h);const s=c.toString(),r=s.slice(u);u=s.length;const g=w.h.replace(i,r);g.identifier={major:e,minor:0},g._isTracked=!0,a.push(g)}return d.ensureFinalTabstop(c,i,!0),{edits:a,snippets:[new K(e,c,"")]}}constructor(e,t,i=$,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){(0,o.B9)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}="string"==typeof this._template?q.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):q.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,(e=>{const i=e.filter((e=>!!e.identifier));for(let e=0;eC.Y.fromPositions(e.range.getEndPosition())))})),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=$){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=q.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,(e=>{const t=e.filter((e=>!!e.identifier));for(let e=0;eC.Y.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);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{e.push(...n.get(t))}))}e.sort(y.e.compareRangesUsingStarts);for(const[i,n]of t)if(n.length===e.length){n.sort(y.e.compareRangesUsingStarts);for(let o=0;o0}};G=q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,S.c_)],G)},90165:(e,t,i)=>{"use strict";var n=i(16830),o=i(63580);const s=Object.freeze({View:(0,o.vv)("view","View"),Help:(0,o.vv)("help","Help"),Test:(0,o.vv)("test","Test"),File:(0,o.vv)("file","File"),Preferences:(0,o.vv)("preferences","Preferences"),Developer:(0,o.vv)({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer")});var r=i(84144),a=i(33108),l=i(93983),d=i(29102),c=i(5976),h=i(71922),u=i(65321),g=i(77514),p=i(9488),m=i(25670),f=i(93379),v=i.n(f),_=i(7795),b=i.n(_),w=i(90569),y=i.n(w),C=i(3565),S=i.n(C),x=i(19216),k=i.n(x),L=i(44589),N=i.n(L),D=i(36098),E={};E.styleTagTransform=N(),E.setAttributes=S(),E.insert=y().bind(null,"head"),E.domAPI=b(),E.insertStyleElement=k(),v()(D.Z,E),D.Z&&D.Z.locals&&D.Z.locals;var I=i(60571),T=i(84527),M=i(50187),R=i(50072),A=i(92550),P=i(91557),O=i(83973);class F{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&&(0,p.fS)(this.startLineNumbers,e.startLineNumbers)&&(0,p.fS)(this.endLineNumbers,e.endLineNumbers)}}const B=(0,g.Z)("stickyScrollViewLayer",{createHTML:e=>e}),W="data-sticky-line-index",H="data-sticky-is-line",V="data-sticky-is-folding-icon";class z extends c.JT{constructor(e){super(),this._editor=e,this._foldingIconStore=new c.SL,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(67),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,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 T.H),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(115).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(115)&&t(),e.hasChanged(67)&&(this._lineHeight=this._editor.getOption(67))}))),this._register(this._editor.onDidScrollChange((e=>{e.scrollLeftChanged&&t(),e.scrollWidthChanged&&this._updateWidgetWidth()}))),this._register(this._editor.onDidChangeModel((()=>{t(),this._updateWidgetWidth()}))),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange((e=>{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){if(void 0===i&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;const n=this._isWidgetHeightZero(e),o=n?void 0:e,s=n?0:this._findLineToRebuildWidgetFrom(e,i);this._renderRootNode(o,t,s),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;const t=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(t>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const t=[...e.startLineNumbers];null!==e.showEndForLine&&(t[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=t}else this._lastLineRelativePosition=0,this._lineNumbers=[];return 0===t}_findLineToRebuildWidgetFrom(e,t){if(!e||!this._previousState)return 0;if(void 0!==t)return t;const i=this._previousState,n=e.startLineNumbers.findIndex((e=>!i.startLineNumbers.includes(e)));return-1===n?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"}_clearStickyLinesFromLine(e){this._foldingIconStore.clear();for(let t=e;te.scrollWidth)))+n.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){"mouseover"===this._editor.getOption(110)&&(this._foldingIconStore.add(u.nm(this._lineNumbersDomNode,u.tw.MOUSE_ENTER,(()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)}))),this._foldingIconStore.add(u.nm(this._lineNumbersDomNode,u.tw.MOUSE_LEAVE,(()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)}))))}_renderChildNode(e,t,i,n){const o=this._editor._getViewModel();if(!o)return;const s=o.coordinatesConverter.convertModelPositionToViewPosition(new M.L(t,1)).lineNumber,r=o.getViewLineRenderingData(s),a=this._editor.getOption(68);let l;try{l=A.Kp.filter(r.inlineDecorations,s,r.minColumn,r.maxColumn)}catch(e){l=[]}const d=new P.IJ(!0,!0,r.content,r.continuesWithWrappedLine,r.isBasicASCII,r.containsRTL,0,r.tokens,l,r.tabSize,r.startVisibleColumn,1,1,1,500,"none",!0,!0,null),c=new R.HT(2e3),h=(0,P.d1)(d,c);let u;u=B?B.createHTML(c.build()):c.build();const g=document.createElement("span");g.setAttribute(W,String(e)),g.setAttribute(H,""),g.setAttribute("role","listitem"),g.tabIndex=0,g.className="sticky-line-content",g.classList.add(`stickyLine${t}`),g.style.lineHeight=`${this._lineHeight}px`,g.innerHTML=u;const p=document.createElement("span");p.setAttribute(W,String(e)),p.setAttribute("data-sticky-is-line-number",""),p.className="sticky-line-number",p.style.lineHeight=`${this._lineHeight}px`;const m=n.contentLeft;p.style.width=`${m}px`;const f=document.createElement("span");1===a.renderType||3===a.renderType&&t%10==0?f.innerText=t.toString():2===a.renderType&&(f.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),f.className="sticky-line-number-inner",f.style.lineHeight=`${this._lineHeight}px`,f.style.width=`${n.lineNumbersWidth}px`,f.style.paddingLeft=`${n.lineNumbersLeft}px`,p.appendChild(f);const v=this._renderFoldingIconForLine(i,t);v&&p.appendChild(v.domNode),this._editor.applyFontInfo(g),this._editor.applyFontInfo(f),p.style.lineHeight=`${this._lineHeight}px`,g.style.lineHeight=`${this._lineHeight}px`,p.style.height=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`;const _=new j(e,t,g,p,v,h.characterMapping,g.scrollWidth);return this._updateTopAndZIndexOfStickyLine(_)}_updateTopAndZIndexOfStickyLine(e){var t;const i=e.index,n=e.lineDomNode,o=e.lineNumberDomNode,s=i===this._lineNumbers.length-1;n.style.zIndex=s?"0":"1",o.style.zIndex=s?"0":"1";const r=`${i*this._lineHeight+this._lastLineRelativePosition+((null===(t=e.foldingIcon)||void 0===t?void 0:t.isCollapsed)?1:0)}px`,a=i*this._lineHeight+"px";return n.style.top=s?r:a,o.style.top=s?r:a,e}_renderFoldingIconForLine(e,t){const i=this._editor.getOption(110);if(!e||"never"===i)return;const n=e.regions,o=n.findRange(t),s=n.getStartLineNumber(o);if(t!==s)return;const r=n.isCollapsed(o),a=new U(r,s,n.getEndLineNumber(o),this._lineHeight);return a.setVisible(!!this._isOnGlyphMargin||r||"always"===i),a.domNode.setAttribute(V,""),a}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const i=(0,I.dL)(t.characterMapping,e,0);return new M.L(t.lineNumber,i)}getLineNumberFromChildDomNode(e){var t,i;return null!==(i=null===(t=this._getRenderedStickyLineFromChildDomNode(e))||void 0===t?void 0:t.lineNumber)&&void 0!==i?i:null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return null===t||t<0||t>=this._renderedStickyLines.length?null:this._renderedStickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,W);return t?parseInt(t,10):null}isInStickyLine(e){return void 0!==this._getAttributeValue(e,H)}isInFoldingIconDomNode(e){return void 0!==this._getAttributeValue(e,V)}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const i=e.getAttribute(t);if(null!==i)return i;e=e.parentElement}}}class j{constructor(e,t,i,n,o,s,r){this.index=e,this.lineNumber=t,this.lineDomNode=i,this.lineNumberDomNode=n,this.foldingIcon=o,this.characterMapping=s,this.scrollWidth=r}}class U{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=`${n}px`,this.domNode.style.height=`${n}px`,this.domNode.className=m.k.asClassName(e?O.f5:O.Iy)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}var q=i(71050),K=i(15393),$=i(4669),G=i(51381),Z=i(30335),Q=i(63737),Y=i(99155),J=i(84990),X=i(17301);class ee{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class te{constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class ie{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var ne,oe,se=i(53725),re=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ae=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.OUTLINE_MODEL="outlineModel",e.FOLDING_PROVIDER_MODEL="foldingProviderModel",e.INDENTATION_MODEL="indentationModel"}(ne||(ne={})),function(e){e[e.VALID=0]="VALID",e[e.INVALID=1]="INVALID",e[e.CANCELED=2]="CANCELED"}(oe||(oe={}));let le=class extends c.JT{constructor(e,t,i,n){super(),this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=i,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new K.vp(300)),this._updateOperation=this._register(new c.SL);const o=new ce(i),s=new ge(this._editor,i),r=new ue(this._editor,t);switch(n){case ne.OUTLINE_MODEL:this._modelProviders.push(o),this._modelProviders.push(s),this._modelProviders.push(r);break;case ne.FOLDING_PROVIDER_MODEL:this._modelProviders.push(s),this._modelProviders.push(r);break;case ne.INDENTATION_MODEL:this._modelProviders.push(r)}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e,t,i){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger((async()=>{for(const n of this._modelProviders){const{statusPromise:o,modelPromise:s}=n.computeStickyModel(e,t,i);this._modelPromise=s;const r=await o;if(this._modelPromise!==s)return null;switch(r){case oe.CANCELED:return this._updateOperation.clear(),null;case oe.VALID:return n.stickyModel}}return null})).catch((e=>((0,X.dL)(e),null)))}};le=re([ae(1,G.c_),ae(2,h.p)],le);class de{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,oe.INVALID}computeStickyModel(e,t,i){if(i.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};const n=(0,K.PG)((i=>this.createModelFromProvider(e,t,i)));return{statusPromise:n.then((n=>this.isModelValid(n)?i.isCancellationRequested?oe.CANCELED:(this._stickyModel=this.createStickyModel(e,t,i,n),oe.VALID):this._invalid())).then(void 0,(e=>((0,X.dL)(e),oe.CANCELED))),modelPromise:n}}isModelValid(e){return!0}isProviderValid(e){return!0}}let ce=class extends de{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,i){return Z.C3.create(this._languageFeaturesService.documentSymbolProvider,e,i)}createStickyModel(e,t,i,n){var o;const{stickyOutlineElement:s,providerID:r}=this._stickyModelFromOutlineModel(n,null===(o=this._stickyModel)||void 0===o?void 0:o.outlineProviderId);return new ie(e.uri,t,s,r)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let i;if(se.$.first(e.children.values())instanceof Z.H3){const n=se.$.find(e.children.values(),(e=>e.id===t));if(n)i=n.children;else{let n,o="",s=-1;for(const[t,i]of e.children.entries()){const e=this._findSumOfRangesOfGroup(i);e>s&&(n=i,s=e,o=i.id)}t=o,i=n.children}}else i=e.children;const n=[],o=Array.from(i.values()).sort(((e,t)=>{const i=new ee(e.symbol.range.startLineNumber,e.symbol.range.endLineNumber),n=new ee(t.symbol.range.startLineNumber,t.symbol.range.endLineNumber);return this._comparator(i,n)}));for(const e of o)n.push(this._stickyModelFromOutlineElement(e,e.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new te(void 0,n,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const i=[];for(const n of e.children.values())if(n.symbol.selectionRange.startLineNumber!==n.symbol.range.endLineNumber)if(n.symbol.selectionRange.startLineNumber!==t)i.push(this._stickyModelFromOutlineElement(n,n.symbol.selectionRange.startLineNumber));else for(const e of n.children.values())i.push(this._stickyModelFromOutlineElement(e,n.symbol.selectionRange.startLineNumber));i.sort(((e,t)=>this._comparator(e.range,t.range)));const n=new ee(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new te(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 Z.sT?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};ce=re([ae(0,h.p)],ce);class he extends de{constructor(e){super(),this._foldingLimitReporter=new Q.n(e)}createStickyModel(e,t,i,n){const o=this._fromFoldingRegions(n);return new ie(e.uri,t,o,void 0)}isModelValid(e){return null!==e}_fromFoldingRegions(e){const t=e.length,i=[],n=new te(void 0,[],void 0);for(let o=0;o0}createModelFromProvider(e,t,i){const n=Q.f.getFoldingRangeProviders(this._languageFeaturesService,e);return new Y.e(e,n,(()=>this.createModelFromProvider(e,t,i)),this._foldingLimitReporter,void 0).compute(i)}};ge=re([ae(1,h.p)],ge);var pe=function(e,t){return function(i,n){t(i,n,e)}};class me{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=i}}let fe=class extends c.JT{constructor(e,t,i){super(),this._languageFeaturesService=t,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new $.Q5),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new c.SL),this._updateSoon=this._register(new K.pY((()=>this.update()),50)),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(115)&&this.readConfiguration()}))),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(115),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new le(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel((()=>{this._model=null,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.update())}getVersionId(){var e;return null===(e=this._model)||void 0===e?void 0:e.version}async update(){var e;null===(e=this._cts)||void 0===e||e.dispose(!0),this._cts=new q.A,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization())return void(this._model=null);const t=this._editor.getModel(),i=t.getVersionId(),n=await this._stickyModelProvider.update(t,i,e);e.isCancellationRequested||(this._model=n)}updateIndex(e){return-1===e?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,i,n,o){if(0===t.children.length)return;let s=o;const r=[];for(let e=0;ee-t))),l=this.updateIndex((0,p.ry)(r,e.startLineNumber+n,((e,t)=>e-t)));for(let r=a;r<=l;r++){const a=t.children[r];if(!a)return;if(a.range){const t=a.range.startLineNumber,o=a.range.endLineNumber;e.startLineNumber<=o+1&&t-1<=e.endLineNumber&&t!==s&&(s=t,i.push(new me(t,o-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,a,i,n+1,t))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,a,i,n,o)}}getCandidateStickyLinesIntersecting(e){var t,i;if(!(null===(t=this._model)||void 0===t?void 0:t.element))return[];let n=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,n,0,-1);const o=null===(i=this._editor._getViewModel())||void 0===i?void 0:i.getHiddenAreas();if(o)for(const e of o)n=n.filter((t=>!(t.startLineNumber>=e.startLineNumber&&t.endLineNumber<=e.endLineNumber+1)));return n}};fe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([pe(1,h.p),pe(2,G.c_)],fe);var ve,_e=i(72065),be=i(5606),we=i(82005),ye=i(24314),Ce=i(40184),Se=i(58722),xe=i(88191),ke=i(7448),Le=i(71705),Ne=function(e,t){return function(i,n){t(i,n,e)}};let De=ve=class extends c.JT{constructor(e,t,i,n,o,s,r){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=i,this._instaService=n,this._contextKeyService=r,this._sessionStore=new c.SL,this._foldingModel=null,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._showEndForLine=null,this._stickyScrollWidget=new z(this._editor),this._stickyLineCandidateProvider=new fe(this._editor,i,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new F([],[],0),this._onDidResize(),this._readConfiguration();const a=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(115)||e.hasChanged(73)||e.hasChanged(67)||e.hasChanged(110))&&this._readConfiguration()}))),this._register(u.nm(a,u.tw.CONTEXT_MENU,(async e=>{this._onContextMenu(u.Jj(a),e)}))),this._stickyScrollFocusedContextKey=d.u.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=d.u.stickyScrollVisible.bindTo(this._contextKeyService);const l=this._register(u.go(a));this._register(l.onDidBlur((e=>{!1===this._positionRevealed&&0===a.clientHeight?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()}))),this._register(l.onDidFocus((e=>{this.focus()}))),this._registerMouseListeners(),this._register(u.nm(a,u.tw.MOUSE_DOWN,(e=>{this._onMouseDown=!0})))}static get(e){return e.getContribution(ve.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),null===(e=this._focusDisposableStore)||void 0===e||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown)return this._onMouseDown=!1,void this._editor.focus();!0!==this._stickyScrollFocusedContextKey.get()&&(this._focused=!0,this._focusDisposableStore=new c.SL,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(ye.e.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new c.SL),t=this._register(new we.yN(this._editor,{extractLineNumberFromMouseEvent:e=>{const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);return t?t.lineNumber:0}})),i=e=>{if(!this._editor.hasModel())return null;if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return null;const t=e.target.element;if(!t||t.innerText!==t.innerHTML)return null;const i=this._stickyScrollWidget.getEditorPositionFromNode(t);return i?{range:new ye.e(i.lineNumber,i.column,i.lineNumber,i.column+t.innerText.length),textElement:t}:null},n=this._stickyScrollWidget.getDomNode();this._register(u.mu(n,u.tw.CLICK,(e=>{if(e.ctrlKey||e.altKey||e.metaKey)return;if(!e.leftButton)return;if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t)return;const i=new M.L(this._endLineNumbers[t],1);return void this._revealLineInCenterIfOutsideViewport(i)}if(this._stickyScrollWidget.isInFoldingIconDomNode(e.target)){const t=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);return void this._toggleFoldingRegionForLine(t)}if(!this._stickyScrollWidget.isInStickyLine(e.target))return;let t=this._stickyScrollWidget.getEditorPositionFromNode(e.target);if(!t){const i=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);if(null===i)return;t=new M.L(i,1)}this._revealPosition(t)}))),this._register(u.mu(n,u.tw.MOUSE_MOVE,(e=>{if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t||null!==this._showEndForLine&&this._showEndForLine===t)return;return this._showEndForLine=t,void this._renderStickyScroll()}null!==this._showEndForLine&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._register(u.nm(n,u.tw.MOUSE_LEAVE,(e=>{null!==this._showEndForLine&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._register(t.onMouseMoveOrRelevantKeyDown((([t,n])=>{const o=i(t);if(!o||!t.hasTriggerModifier||!this._editor.hasModel())return void e.clear();const{range:s,textElement:r}=o;if(s.equalsRange(this._stickyRangeProjectedOnEditor)){if("underline"===r.style.textDecoration)return}else this._stickyRangeProjectedOnEditor=s,e.clear();const a=new q.A;let l;e.add((0,c.OF)((()=>a.dispose(!0)))),(0,Ce.nD)(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new M.L(s.startLineNumber,s.startColumn+1),a.token).then((t=>{if(!a.token.isCancellationRequested)if(0!==t.length){this._candidateDefinitionsLength=t.length;const i=r;l!==i?(e.clear(),l=i,l.style.textDecoration="underline",e.add((0,c.OF)((()=>{l.style.textDecoration="none"})))):l||(l=i,l.style.textDecoration="underline",e.add((0,c.OF)((()=>{l.style.textDecoration="none"}))))}else e.clear()}))}))),this._register(t.onCancel((()=>{e.clear()}))),this._register(t.onExecute((async e=>{if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return;const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);t&&this._editor.hasModel()&&this._stickyRangeProjectedOnEditor&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:t.lineNumber,column:1})),this._instaService.invokeFunction(Se.K,e,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(e,t){const i=new ke.n(e,t);this._contextMenuService.showContextMenu({menuId:r.eH.StickyScrollContext,getAnchor:()=>i})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||null===e)return;const t=this._stickyScrollWidget.getRenderedStickyLine(e),i=null==t?void 0:t.foldingIcon;if(!i)return;(0,Le.d8)(this._foldingModel,Number.MAX_VALUE,[e]),i.isCollapsed=!i.isCollapsed;const n=(i.isCollapsed?this._editor.getTopForLineNumber(i.foldingEndLine):this._editor.getTopForLineNumber(i.foldingStartLine))-this._editor.getOption(67)*t.index+1;this._editor.setScrollTop(n),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(115);if(!1===e.enabled)return this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),void(this._enabled=!1);e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._sessionStore.add(this._editor.onDidLayoutChange((()=>this._onDidResize()))),this._sessionStore.add(this._editor.onDidChangeModelTokens((e=>this._onTokensChange(e)))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll((()=>{this._showEndForLine=null,this._renderStickyScroll()}))),this._enabled=!0),2===this._editor.getOption(68).renderType&&this._sessionStore.add(this._editor.onDidChangeCursorPosition((()=>{this._showEndForLine=null,this._renderStickyScroll(0)})))}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const t of e.ranges)if(i>=t.fromLineNumber&&i<=t.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){const e=this._editor.getLayoutInfo().height/this._editor.getOption(67);this._maxStickyLines=Math.round(.25*e)}async _renderStickyScroll(e){var t,i;const n=this._editor.getModel();if(!n||n.isTooLargeForTokenization())return this._foldingModel=null,void this._stickyScrollWidget.setState(void 0,null);const o=this._stickyLineCandidateProvider.getVersionId();if(void 0===o||o===n.getVersionId())if(this._foldingModel=null!==(i=await(null===(t=Q.f.get(this._editor))||void 0===t?void 0:t.getFoldingModel()))&&void 0!==i?i:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(!(0===this._widgetState.startLineNumbers.length)),this._focused)if(-1===this._focusedStickyElementIndex)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,-1!==this._focusedStickyElementIndex&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const t=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),0===this._stickyScrollWidget.lineNumberCount?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(t)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}else this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}findScrollWidgetState(){const e=this._editor.getOption(67),t=Math.min(this._maxStickyLines,this._editor.getOption(115).maxLineCount),i=this._editor.getScrollTop();let n=0;const o=[],s=[],r=this._editor.getVisibleRanges();if(0!==r.length){const a=new ee(r[0].startLineNumber,r[r.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(const r of l){const a=r.startLineNumber,l=r.endLineNumber,d=r.nestingDepth;if(l-a>0){const r=(d-1)*e,c=d*e,h=this._editor.getBottomForLineNumber(a)-i,u=this._editor.getTopForLineNumber(l)-i,g=this._editor.getBottomForLineNumber(l)-i;if(r>u&&r<=g){o.push(a),s.push(l+1),n=g-c;break}if(c>h&&c<=g&&(o.push(a),s.push(l+1)),o.length===t)break}}}return this._endLineNumbers=s,new F(o,s,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};De.ID="store.contrib.stickyScrollController",De=ve=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ne(1,be.i),Ne(2,h.p),Ne(3,_e.TG),Ne(4,G.c_),Ne(5,xe.A),Ne(6,l.i6)],De);class Ee extends r.Ke{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...(0,o.vv)("toggleEditorStickyScroll","Toggle Editor Sticky Scroll"),mnemonicTitle:(0,o.NC)({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Editor Sticky Scroll")},category:s.View,toggled:{condition:l.Ao.equals("config.editor.stickyScroll.enabled",!0),title:(0,o.NC)("stickyScroll","Sticky Scroll"),mnemonicTitle:(0,o.NC)({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:r.eH.CommandPalette},{id:r.eH.MenubarAppearanceMenu,group:"4_editor",order:3},{id:r.eH.StickyScrollContext}]})}async run(e){const t=e.get(a.Ui),i=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",i)}}const Ie=100;class Te extends n.x1{constructor(){super({id:"editor.action.focusStickyScroll",title:{...(0,o.vv)("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:(0,o.NC)({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll")},precondition:l.Ao.and(l.Ao.has("config.editor.stickyScroll.enabled"),d.u.stickyScrollVisible),menu:[{id:r.eH.CommandPalette}]})}runEditorCommand(e,t){var i;null===(i=De.get(t))||void 0===i||i.focus()}}class Me extends n.x1{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:(0,o.vv)("selectNextStickyScrollLine.title","Select next sticky scroll line"),precondition:d.u.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Ie,primary:18}})}runEditorCommand(e,t){var i;null===(i=De.get(t))||void 0===i||i.focusNext()}}class Re extends n.x1{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:(0,o.vv)("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),precondition:d.u.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Ie,primary:16}})}runEditorCommand(e,t){var i;null===(i=De.get(t))||void 0===i||i.focusPrevious()}}class Ae extends n.x1{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:(0,o.vv)("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),precondition:d.u.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Ie,primary:3}})}runEditorCommand(e,t){var i;null===(i=De.get(t))||void 0===i||i.goToFocused()}}class Pe extends n.x1{constructor(){super({id:"editor.action.selectEditor",title:(0,o.vv)("selectEditor.title","Select Editor"),precondition:d.u.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Ie,primary:9}})}runEditorCommand(e,t){var i;null===(i=De.get(t))||void 0===i||i.selectEditor()}}(0,n._K)(De.ID,De,1),(0,r.r1)(Ee),(0,r.r1)(Te),(0,r.r1)(Re),(0,r.r1)(Me),(0,r.r1)(Ae),(0,r.r1)(Pe)},74961:(e,t,i)=>{"use strict";i.d(t,{_:()=>a,t:()=>r});var n=i(9488),o=i(13707),s=i(97295);class r{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}}class a{constructor(e,t,i,n,s,r,l=o.mX.default,d=void 0){this.clipboardText=d,this._snippetCompareFn=a._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=l,"top"===r?this._snippetCompareFn=a._compareCompletionItemsSnippetsUp:"bottom"===r&&(this._snippetCompareFn=a._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(){0!==this._refilterKind&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let r="",a="";const l=1===this._refilterKind?this._items:this._filteredItems,d=[],c=!this._options.filterGraceful||l.length>2e3?o.EW:o.l7;for(let n=0;n=p)h.score=o.CL.Default;else if("string"==typeof h.completion.filterText){const t=c(r,a,e,h.completion.filterText,h.filterTextLow,0,this._fuzzyScoreOptions);if(!t)continue;0===(0,s.zY)(h.completion.filterText,h.textLabel)?h.score=t:(h.score=(0,o.jB)(r,a,e,h.textLabel,h.labelLow,0),h.score[0]=t[0])}else{const t=c(r,a,e,h.textLabel,h.labelLow,0,this._fuzzyScoreOptions);if(!t)continue;h.score=t}}h.idx=n,h.distance=this._wordDistance.distance(h.position,h.completion),d.push(h),e.push(h.textLabel.length)}this._filteredItems=d.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?(0,n.HW)(e.length-.85,e,((e,t)=>e-t)):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(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return a._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return a._compareCompletionItems(e,t)}}},55621:(e,t,i)=>{"use strict";i.d(t,{A9:()=>C,GI:()=>w,ZJ:()=>x,_y:()=>b,i5:()=>E,kL:()=>L,tG:()=>I});var n=i(71050),o=i(17301),s=i(13707),r=i(5976),a=i(84013),l=i(98401),d=i(70666),c=i(50187),h=i(24314),u=i(88216),g=i(35084),p=i(63580),m=i(84144),f=i(94565),v=i(93983),_=i(71922);const b={Visible:i(22980).iX,HasFocusedSuggestion:new v.uy("suggestWidgetHasFocusedSuggestion",!1,(0,p.NC)("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new v.uy("suggestWidgetDetailsVisible",!1,(0,p.NC)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new v.uy("suggestWidgetMultipleSuggestions",!1,(0,p.NC)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new v.uy("suggestionMakesTextEdit",!0,(0,p.NC)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new v.uy("acceptSuggestionOnEnter",!0,(0,p.NC)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new v.uy("suggestionHasInsertAndReplaceRange",!1,(0,p.NC)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new v.uy("suggestionInsertMode",void 0,{type:"string",description:(0,p.NC)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new v.uy("suggestionCanResolve",!1,(0,p.NC)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},w=new m.eH("suggestWidgetStatusBar");class y{constructor(e,t,i,n){var o;this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=s.CL.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:null===(o=t.label)||void 0===o?void 0:o.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,h.e.isIRange(t.range)?(this.editStart=new c.L(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new c.L(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new c.L(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||h.e.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new c.L(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new c.L(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new c.L(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||h.e.spansMultipleLines(t.range.insert)||h.e.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!=typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return void 0!==this._resolveDuration}get resolveDuration(){return void 0!==this._resolveDuration?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._resolveDuration=void 0})),i=new a.G(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._resolveDuration=i.elapsed()}),(e=>{(0,o.n2)(e)&&(this._resolveCache=void 0,this._resolveDuration=void 0)})).finally((()=>{t.dispose()}))}return this._resolveCache}}class C{constructor(e=2,t=new Set,i=new Set,n=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=n,this.showDeprecated=o}}let S;function x(){return S}C.default=new C;class k{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}async function L(e,t,i,s=C.default,l={triggerKind:0},d=n.T.None){const c=new a.G;i=i.clone();const u=t.getWordAtPosition(i),p=u?new h.e(i.lineNumber,u.startColumn,i.lineNumber,u.endColumn):h.e.fromPositions(i),m={replace:p,insert:p.setEndPosition(i.lineNumber,i.column)},f=[],v=new r.SL,_=[];let b=!1;const w=(e,t,n)=>{var o,a,l;let d=!1;if(!t)return d;for(const n of t.suggestions)if(!s.kindFilter.has(n.kind)){if(!s.showDeprecated&&(null===(o=null==n?void 0:n.tags)||void 0===o?void 0:o.includes(1)))continue;n.range||(n.range=m),n.sortText||(n.sortText="string"==typeof n.label?n.label:n.label.label),!b&&n.insertTextRules&&4&n.insertTextRules&&(b=g.Yj.guessNeedsClipboard(n.insertText)),f.push(new y(i,n,t,e)),d=!0}return(0,r.Wf)(t)&&v.add(t),_.push({providerName:null!==(a=e._debugDisplayName)&&void 0!==a?a:"unknown_provider",elapsedProvider:null!==(l=t.duration)&&void 0!==l?l:-1,elapsedOverall:n.elapsed()}),d},x=(async()=>{if(!S||s.kindFilter.has(27))return;const e=s.providerItemsToReuse.get(S);if(e)return void e.forEach((e=>f.push(e)));if(s.providerFilter.size>0&&!s.providerFilter.has(S))return;const n=new a.G,o=await S.provideCompletionItems(t,i,l,d);w(S,o,n)})();for(const n of e.orderedGroups(t)){let e=!1;if(await Promise.all(n.map((async n=>{if(s.providerItemsToReuse.has(n)){const t=s.providerItemsToReuse.get(n);return t.forEach((e=>f.push(e))),void(e=e||t.length>0)}if(!(s.providerFilter.size>0)||s.providerFilter.has(n))try{const o=new a.G,s=await n.provideCompletionItems(t,i,l,d);e=w(n,s,o)||e}catch(e){(0,o.Cp)(e)}}))),e||d.isCancellationRequested)break}return await x,d.isCancellationRequested?(v.dispose(),Promise.reject(new o.FU)):new k(f.sort((L=s.snippetSortOrder,D.get(L))),b,{entries:_,elapsed:c.elapsed()},v);var L}function N(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.textLabelt.textLabel?1:e.completion.kind-t.completion.kind}const D=new Map;function E(e,t){var i;null===(i=e.getContribution("editor.contrib.suggestController"))||void 0===i||i.triggerSuggest((new Set).add(t),void 0,!0)}D.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return N(e,t)})),D.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return N(e,t)})),D.set(1,N),f.P.registerCommand("_executeCompletionItemProvider",(async(e,...t)=>{const[i,o,s,r]=t;(0,l.p_)(d.o.isUri(i)),(0,l.p_)(c.L.isIPosition(o)),(0,l.p_)("string"==typeof s||!s),(0,l.p_)("number"==typeof r||!r);const{completionProvider:a}=e.get(_.p),h=await e.get(u.S).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=h.object.textEditorModel.validatePosition(o),l=await L(a,h.object.textEditorModel,i,void 0,{triggerCharacter:null!=s?s:void 0,triggerKind:s?1:0});for(const i of l.items)t.length<(null!=r?r:0)&&t.push(i.resolve(n.T.None)),e.incomplete=e.incomplete||i.container.incomplete,e.suggestions.push(i.completion);try{return await Promise.all(t),e}finally{setTimeout((()=>l.disposable.dispose()),100)}}finally{h.dispose()}}));class I{static isAllOff(e){return"off"===e.other&&"off"===e.comments&&"off"===e.strings}static isAllOn(e){return"on"===e.other&&"on"===e.comments&&"on"===e.strings}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}},49925:(e,t,i)=>{"use strict";i.d(t,{n:()=>nt});var n,o=i(56346),s=i(9488),r=i(71050),a=i(17301),l=i(4669),d=i(8313),c=i(5976),h=i(1432),u=i(84013),g=i(98401),p=i(43407),m=i(16830),f=i(69386),v=i(50187),_=i(24314),b=i(29102),w=i(98762),y=i(35084),C=i(80378),S=i(93983);let x=n=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=n.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(123)&&this._update())),this._update()}dispose(){var e;this._configListener.dispose(),null===(e=this._selectionListener)||void 0===e||e.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(123);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};var k,L;x.AtEnd=new S.uy("atEndOfWord",!1),x=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(k=1,L=S.i6,function(e,t){L(e,t,k)})],x);var N,D=i(63580),E=i(94565),I=i(72065),T=i(43557),M=i(55621);let R=N=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=N.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),null===(e=this._listener)||void 0===e||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){0!==e.items.length&&N._moveIndex(!0,e,t)!==t?(this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(let o=t.items.length;o>0&&(n=(n+t.items.length+(e?1:-1))%t.items.length,n!==i)&&t.items[n].completion.additionalTextEdits;o--);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=N._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};R.OtherSuggestions=new S.uy("hasOtherSuggestions",!1),R=N=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,S.i6)],R);var A=i(44906);class P{constructor(e,t,i,n){this._disposables=new c.SL,this._disposables.add(i.onDidSuggest((e=>{0===e.completionModel.items.length&&this.reset()}))),this._disposables.add(i.onDidCancel((e=>{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((o=>{if(this._active&&!t.isFrozen()&&0!==i.state){const t=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&n(this._active.item)}})))}_onItem(e){if(!e||!(0,s.Of)(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new A.q;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()}}var O=i(85996);class F{constructor(e,t){this._disposables=new c.SL,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType((()=>{if(this._locked||!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;eF._maxSelectionLength)return;this._lastOvertyped[e]={value:o.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}}))),this._disposables.add(t.onDidTrigger((e=>{this._locked=!0}))),this._disposables.add(t.onDidCancel((e=>{this._locked=!1})))}getLastOvertypedInfo(e){if(e>=0&&ee instanceof re.U8?i.createInstance(le,e,void 0):void 0;this._leftActions=new oe.o(this.element,{actionViewItemProvider:s}),this._rightActions=new oe.o(this.element,{actionViewItemProvider:s}),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 t=[],i=[];for(const[n,o]of e.getActions())"left"===n?t.push(...o):i.push(...o);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};de=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ae(2,I.TG),ae(3,re.co),ae(4,S.i6)],de),i(22368);var ce=i(26904),he=i(73910),ue=i(92321),ge=i(97781),pe=i(17735),me=i(64117),fe=i(73046),ve=i(25670),_e=i(59365),be=i(92467);function we(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let ye=class{constructor(e,t){this._editor=e,this._onDidClose=new l.Q5,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new l.Q5,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new c.SL,this._renderDisposeable=new c.SL,this._borderWidth=1,this._size=new B.Ro(330,0),this.domNode=B.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(be.$,{editor:e}),this._body=B.$(".body"),this._scrollbar=new me.s$(this._body,{alwaysConsumeMouseWheel:!0}),B.R3(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=B.R3(this._body,B.$(".header")),this._close=B.R3(this._header,B.$("span"+ve.k.asCSSSelector(fe.l.close))),this._close.title=D.NC("details.close","Close"),this._type=B.R3(this._header,B.$("p.type")),this._docs=B.R3(this._body,B.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(50),i=t.getMassagedFontFamily(),n=e.get(119)||t.fontSize,o=e.get(120)||t.lineHeight,s=t.fontWeight,r=`${n}px`,a=`${o}px`;this.domNode.style.fontSize=r,this.domNode.style.lineHeight=""+o/n,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(120)||this._editor.getOption(50).lineHeight,t=this._borderWidth;return{lineHeight:e,borderWidth:t,borderHeight:2*t,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=D.NC("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:o,documentation:s}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${null!==(i=e.word)&&void 0!==i?i:"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${null===(n=e.completion.commitCharacters)||void 0===n?void 0:n.join("")}\n`,s=(new _e.W5).appendCodeblock("empty",t),o=`Provider: ${e.provider._debugDisplayName}`}if(t||we(e)){if(this.domNode.classList.remove("no-docs","no-type"),o){const e=o.length>1e5?`${o.substr(0,1e5)}…`:o;this._type.textContent=e,this._type.title=e,B.$Z(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else B.PO(this._type),this._type.title="",B.Cp(this._type),this.domNode.classList.add("no-type");if(B.PO(this._docs),"string"==typeof s)this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),B.PO(this._docs);const e=this._markdownRenderer.render(s);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}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 B.Ro(e,t);B.Ro.equals(i,this._size)||(this._size=i,B.dp(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)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};ye=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,I.TG)],ye);class Ce{constructor(e,t){let i,n;this.widget=e,this._editor=t,this.allowEditorOverflow=!0,this._disposables=new c.SL,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new pe.f,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let o=0,s=0;this._disposables.add(this._resizable.onDidWillResize((()=>{i=this._topLeft,n=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(s=n.width-e.dimension.width,t=!0),e.north&&(o=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+o,left:i.left+s})}e.done&&(i=void 0,n=void 0,o=0,s=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{var e;this._anchorBox&&this._placeAtAnchor(this._anchorBox,null!==(e=this._userSize)&&void 0!==e?e: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){var i;const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,null!==(i=this._userSize)&&void 0!==i?i:this.widget.size,t)}_placeAtAnchor(e,t,i){var n;const o=B.D6(this.getDomNode().ownerDocument.body),s=this.widget.getLayoutInfo(),r=new B.Ro(220,2*s.lineHeight),a=e.top,l=function(){const i=o.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),n=-s.borderWidth+e.left+e.width,l=new B.Ro(i,o.height-e.top-s.borderHeight-s.verticalPadding),d=l.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:a,left:n,fit:i-t.width,maxSizeTop:l,maxSizeBottom:d,minSize:r.with(Math.min(i,r.width))}}(),d=function(){const i=e.left-s.borderWidth-s.horizontalPadding,n=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),l=new B.Ro(i,o.height-e.top-s.borderHeight-s.verticalPadding),d=l.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:a,left:n,fit:i-t.width,maxSizeTop:l,maxSizeBottom:d,minSize:r.with(Math.min(i,r.width))}}(),c=function(){const i=e.left,n=-s.borderWidth+e.top+e.height,a=new B.Ro(e.width-s.borderHeight,o.height-e.top-e.height-s.verticalPadding);return{top:n,left:i,fit:a.height-t.height,maxSizeBottom:a,maxSizeTop:a,minSize:r.with(a.width)}}(),h=[l,d,c],u=null!==(n=h.find((e=>e.fit>=0)))&&void 0!==n?n:h.sort(((e,t)=>t.fit-e.fit))[0],g=e.top+e.height-s.borderHeight;let p,m=t.height;const f=Math.max(u.maxSizeTop.height,u.maxSizeBottom.height);let v;m>f&&(m=f),i?m<=u.maxSizeTop.height?(p=!0,v=u.maxSizeTop):(p=!1,v=u.maxSizeBottom):m<=u.maxSizeBottom.height?(p=!1,v=u.maxSizeBottom):(p=!0,v=u.maxSizeTop);let{top:_,left:b}=u;!p&&m>e.height&&(_=g-m);const w=this._editor.getDomNode();if(w){const e=w.getBoundingClientRect();_-=e.top,b-=e.left}this._applyTopLeft({left:b,top:_}),this._resizable.enableSashes(!p,u===l,p,u!==l),this._resizable.minSize=u.minSize,this._resizable.maxSize=v,this._resizable.layout(m,Math.min(v.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this._editor.layoutOverlayWidget(this)}}var Se,xe=i(32107),ke=i(13707),Le=i(70666),Ne=i(96887),De=i(66663),Ee=i(95935),Ie=i(68801);!function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(Se||(Se={}));const Te=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function Me(e,t,i,n,o){if(o)return[`codicon-${o.id}`,"predefined-file-icon"];const s=n===Se.ROOT_FOLDER?["rootfolder-icon"]:n===Se.FOLDER?["folder-icon"]:["file-icon"];if(i){let o;if(i.scheme===De.lg.data)o=Ee.Vb.parseMetaData(i).get(Ee.Vb.META_DATA_LABEL);else{const e=i.path.match(Te);e?(o=Re(e[2].toLowerCase()),e[1]&&s.push(`${Re(e[1].toLowerCase())}-name-dir-icon`)):o=Re(i.authority.toLowerCase())}if(n===Se.ROOT_FOLDER)s.push(`${o}-root-name-folder-icon`);else if(n===Se.FOLDER)s.push(`${o}-name-folder-icon`);else{if(o){if(s.push(`${o}-name-file-icon`),s.push("name-file-icon"),o.length<=255){const e=o.split(".");for(let t=1;t{const e=this._editor.getOptions(),t=e.get(50),o=t.getMassagedFontFamily(),s=t.fontFeatureSettings,a=e.get(119)||t.fontSize,l=e.get(120)||t.lineHeight,d=t.fontWeight,c=`${a}px`,h=`${l}px`,u=`${t.letterSpacing}px`;i.style.fontSize=c,i.style.fontWeight=d,i.style.letterSpacing=u,r.style.fontFamily=o,r.style.fontFeatureSettings=s,r.style.lineHeight=h,n.style.height=h,n.style.width=h,m.style.height=h,m.style.width=h}}}renderElement(e,t,i){i.configureFont();const{completion:n}=e;i.root.id=Be(t),i.colorspan.style.backgroundColor="";const o={labelEscapeNewLines:!0,matches:(0,ke.mB)(e.score)},s=[];if(19===n.kind&&He.extract(e,s))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=s[0];else if(20===n.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const t=Me(this._modelService,this._languageService,Le.o.from({scheme:"fake",path:e.textLabel}),Se.FILE),s=Me(this._modelService,this._languageService,Le.o.from({scheme:"fake",path:n.detail}),Se.FILE);o.extraClasses=t.length>s.length?t:s}else 23===n.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",o.extraClasses=[Me(this._modelService,this._languageService,Le.o.from({scheme:"fake",path:e.textLabel}),Se.FOLDER),Me(this._modelService,this._languageService,Le.o.from({scheme:"fake",path:n.detail}),Se.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...ve.k.asClassNameArray(Ne.gX.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,o),"string"==typeof n.label?(i.parametersLabel.textContent="",i.detailsLabel.textContent=ze(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=ze(n.label.detail||""),i.detailsLabel.textContent=ze(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(118).showInlineDetails?(0,B.$Z)(i.detailsLabel):(0,B.Cp)(i.detailsLabel),we(e)?(i.right.classList.add("can-expand-details"),(0,B.$Z)(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),(0,B.Cp)(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function ze(e){return e.replace(/\r\n|\r|\n/g,"")}Ve=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Fe(1,Pe.q),Fe(2,Oe.O),Fe(3,ge.XE)],Ve);var je,Ue=i(86253),qe=function(e,t){return function(i,n){t(i,n,e)}};(0,he.P6G)("editorSuggestWidget.background",{dark:he.D0T,light:he.D0T,hcDark:he.D0T,hcLight:he.D0T},D.NC("editorSuggestWidgetBackground","Background color of the suggest widget.")),(0,he.P6G)("editorSuggestWidget.border",{dark:he.D1_,light:he.D1_,hcDark:he.D1_,hcLight:he.D1_},D.NC("editorSuggestWidgetBorder","Border color of the suggest widget."));const Ke=(0,he.P6G)("editorSuggestWidget.foreground",{dark:he.NOs,light:he.NOs,hcDark:he.NOs,hcLight:he.NOs},D.NC("editorSuggestWidgetForeground","Foreground color of the suggest widget."));(0,he.P6G)("editorSuggestWidget.selectedForeground",{dark:he.NPS,light:he.NPS,hcDark:he.NPS,hcLight:he.NPS},D.NC("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),(0,he.P6G)("editorSuggestWidget.selectedIconForeground",{dark:he.cbQ,light:he.cbQ,hcDark:he.cbQ,hcLight:he.cbQ},D.NC("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const $e=(0,he.P6G)("editorSuggestWidget.selectedBackground",{dark:he.Vqd,light:he.Vqd,hcDark:he.Vqd,hcLight:he.Vqd},D.NC("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));(0,he.P6G)("editorSuggestWidget.highlightForeground",{dark:he.Gwp,light:he.Gwp,hcDark:he.Gwp,hcLight:he.Gwp},D.NC("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),(0,he.P6G)("editorSuggestWidget.focusHighlightForeground",{dark:he.PX0,light:he.PX0,hcDark:he.PX0,hcLight:he.PX0},D.NC("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused.")),(0,he.P6G)("editorSuggestWidgetStatus.foreground",{dark:(0,he.ZnX)(Ke,.5),light:(0,he.ZnX)(Ke,.5),hcDark:(0,he.ZnX)(Ke,.5),hcLight:(0,he.ZnX)(Ke,.5)},D.NC("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class Ge{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof ne.H}`}restore(){var e;const t=null!==(e=this._service.get(this._key,0))&&void 0!==e?e:"";try{const e=JSON.parse(t);if(B.Ro.is(e))return B.Ro.lift(e)}catch(e){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let Ze=je=class{constructor(e,t,i,n,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new c.XK,this._pendingShowDetails=new c.XK,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new H._F,this._disposables=new c.SL,this._onDidSelect=new l.K3,this._onDidFocus=new l.K3,this._onDidHide=new l.Q5,this._onDidShow=new l.Q5,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new l.Q5,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new pe.f,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new Qe(this,e),this._persistedSize=new Ge(t,e);class s{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let r;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),r=new s(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{var t,i,n,o;if(this._resize(e.dimension.width,e.dimension.height),r&&(r.persistHeight=r.persistHeight||!!e.north||!!e.south,r.persistWidth=r.persistWidth||!!e.east||!!e.west),e.done){if(r){const{itemHeight:e,defaultSize:s}=this.getLayoutInfo(),a=Math.round(e/2);let{width:l,height:d}=this.element.size;(!r.persistHeight||Math.abs(r.currentSize.height-d)<=a)&&(d=null!==(i=null===(t=r.persistedSize)||void 0===t?void 0:t.height)&&void 0!==i?i:s.height),(!r.persistWidth||Math.abs(r.currentSize.width-l)<=a)&&(l=null!==(o=null===(n=r.persistedSize)||void 0===n?void 0:n.width)&&void 0!==o?o:s.width),this._persistedSize.store(new B.Ro(l,d))}this._contentWidget.unlockPreference(),r=void 0}}))),this._messageElement=B.R3(this.element.domNode,B.$(".message")),this._listElement=B.R3(this.element.domNode,B.$(".tree"));const a=this._disposables.add(o.createInstance(ye,this.editor));a.onDidClose(this.toggleDetails,this,this._disposables),this._details=new Ce(a,this.editor);const d=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(118).showIcons);d();const h=o.createInstance(Ve,this.editor);this._disposables.add(h),this._disposables.add(h.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new W.aV("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[h],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>D.NC("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:e=>{let t=e.textLabel;if("string"!=typeof e.completion.label){const{detail:i,description:n}=e.completion.label;i&&n?t=D.NC("label.full","{0} {1}, {2}",t,i,n):i?t=D.NC("label.detail","{0} {1}",t,i):n&&(t=D.NC("label.desc","{0}, {1}",t,n))}if(!e.isResolved||!this._isDetailsVisible())return t;const{documentation:i,detail:n}=e.completion,o=z.WU("{0}{1}",n||"",i?"string"==typeof i?i:i.value:"");return D.NC("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",t,o)}}}),this._list.style((0,Ue.TU)({listInactiveFocusBackground:$e,listInactiveFocusOutline:he.xL1})),this._status=o.createInstance(de,this.element.domNode,M.GI);const u=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(118).showStatusBar);u(),this._disposables.add(n.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(118)&&(u(),d()),this._completionModel&&(e.hasChanged(50)||e.hasChanged(119)||e.hasChanged(120))&&this._list.splice(0,this._list.length,this._completionModel.items)}))),this._ctxSuggestWidgetVisible=M._y.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=M._y.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=M._y.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=M._y.HasFocusedSuggestion.bindTo(i),this._disposables.add(B.mu(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.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(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(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())}_onThemeChange(e){this._details.widget.borderWidth=(0,ue.c3)(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),void this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&(null===(t=this._currentSuggestionDetails)||void 0===t||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=(0,H.PG)((async e=>{const t=(0,H.Vg)((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250),n=e.onCancellationRequested((()=>t.dispose()));try{return await i.resolve(e)}finally{t.dispose(),n.dispose()}})),this._currentSuggestionDetails.then((()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:Be(n)}))})).catch(a.dL)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",4===e),this.element.domNode.classList.remove("message"),e){case 0:B.Cp(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=je.LOADING_MESSAGE,B.Cp(this._listElement,this._status.element),B.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,o.i7)(je.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=je.NO_SUGGESTIONS_MESSAGE,B.Cp(this._listElement,this._status.element),B.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,o.i7)(je.NO_SUGGESTIONS_MESSAGE);break;case 3:case 4:B.Cp(this._messageElement),B.$Z(this._listElement,this._status.element),this._show();break;case 5:B.Cp(this._messageElement),B.$Z(this._listElement,this._status.element),this._details.show(),this._show()}}_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){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=(0,H.Vg)((()=>this._setState(1)),t)))}showSuggestions(e,t,i,n,o){var s,r;if(this._contentWidget.setPosition(this.editor.getPosition()),null===(s=this._loadingTimeout)||void 0===s||s.dispose(),null===(r=this._currentSuggestionDetails)||void 0===r||r.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const a=this._completionModel.items.length,l=0===a;if(this._ctxSuggestWidgetMultipleSuggestions.set(a>1),l)return this._setState(n?0:2),void(this._completionModel=void 0);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),this._list.setFocus(o?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=B.lI(B.Jj(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(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!we(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=B.lI(B.Jj(this.element.domNode),(()=>{this._pendingShowDetails.clear(),this._details.show(),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")),this.editor.focus()}))}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(4.3*this.getLayoutInfo().itemHeight);t&&t.heightl&&(a=l);const d=this._completionModel?this._completionModel.stats.pLabelLen*s.typicalHalfwidthCharacterWidth:a,c=s.statusBarHeight+this._list.contentHeight+s.borderHeight,h=s.itemHeight+s.statusBarHeight,u=B.i(this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),p=u.top+g.top+g.height,m=Math.min(o.height-p-s.verticalPadding,c),f=u.top+g.top-s.verticalPadding,v=Math.min(f,c);let _=Math.min(Math.max(v,m)+s.borderHeight,c);r===(null===(t=this._cappedHeight)||void 0===t?void 0:t.capped)&&(r=this._cappedHeight.wanted),r_&&(r=_);const b=150;r>m||this._forceRenderingAbove&&f>b?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),_=v):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),_=m),this.element.preferredSize=new B.Ro(d,s.defaultSize.height),this.element.maxSize=new B.Ro(l,_),this.element.minSize=new B.Ro(220,h),this._cappedHeight=r===c?{wanted:null!==(n=null===(i=this._cappedHeight)||void 0===i?void 0:i.wanted)&&void 0!==n?n:e.height,capped:r}:void 0}this._resize(a,r)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=t-o+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,2===(null===(e=this._contentWidget.getPosition())||void 0===e?void 0:e.preference[0]))}getLayoutInfo(){const e=this.editor.getOption(50),t=(0,V.uZ)(this.editor.getOption(120)||e.lineHeight,8,1e3),i=this.editor.getOption(118).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,o=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new B.Ro(430,i+12*t+o)}}_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}};Ze.LOADING_MESSAGE=D.NC("suggestWidget.loading","Loading..."),Ze.NO_SUGGESTIONS_MESSAGE=D.NC("suggestWidget.noSuggestions","No suggestions."),Ze=je=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([qe(1,ce.Uy),qe(2,S.i6),qe(3,ge.XE),qe(4,I.TG)],Ze);class Qe{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?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new B.Ro(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 Ye,Je=i(10829),Xe=i(89954),et=i(13961),tt=function(e,t){return function(i,n){t(i,n,e)}};class it{constructor(e,t){if(this._model=e,this._position=t,this._decorationOptions=et.qx.register({description:"suggest-line-suffix",stickiness:1}),e.getLineMaxColumn(t.lineNumber)!==t.column){const i=e.getOffsetAt(t),n=e.getPositionAt(i+1);e.changeDecorations((e=>{this._marker&&e.removeDecoration(this._marker),this._marker=e.addDecoration(_.e.fromPositions(t,n),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)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let nt=Ye=class{static get(e){return e.getContribution(Ye.ID)}constructor(e,t,i,n,o,s,r){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=o,this._logService=s,this._telemetryService=r,this._lineSuffix=new c.XK,this._toDispose=new c.SL,this._selectors=new ot((e=>e.priority)),this._onWillInsertSuggestItem=new l.Q5,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=o.createInstance(O.U,this.editor),this._selectors.register({priority:0,select:(e,t,i)=>this._memoryService.select(e,t,i)});const a=M._y.InsertMode.bindTo(n);a.set(e.getOption(118).insertMode),this._toDispose.add(this.model.onDidTrigger((()=>a.set(e.getOption(118).insertMode)))),this.widget=this._toDispose.add(new B.vx((0,B.Jj)(e.getDomNode()),(()=>{const e=this._instantiationService.createInstance(Ze,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new P(this.editor,e,this.model,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t);const i=M._y.MakesTextEdit.bindTo(this._contextKeyService),n=M._y.HasInsertAndReplaceRange.bindTo(this._contextKeyService),o=M._y.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,c.OF)((()=>{i.reset(),n.reset(),o.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),s=e.editStart.column,r=t.column;let a=!0;"smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.additionalTextEdits||4&e.completion.insertTextRules||r-s!==e.completion.insertText.length||(a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:s,endLineNumber:t.lineNumber,endColumn:r})!==e.completion.insertText),i.set(a),n.set(!v.L.equals(e.editInsertEnd,e.editReplaceEnd)),o.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeyCodeChord().equals(new d.$M(!0,!1,!1,!1,33))||h.dz&&e.toKeyCodeChord().equals(new d.$M(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeyCodeChord().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new B.vx((0,B.Jj)(e.getDomNode()),(()=>this._toDispose.add(new F(this.editor,this.model))))),this._alternatives=this._toDispose.add(new B.vx((0,B.Jj)(e.getDomNode()),(()=>this._toDispose.add(new R(this.editor,this._contextKeyService))))),this._toDispose.add(o.createInstance(x,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new it(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{if(e.triggerOptions.shy)return;let t=-1;for(const i of this._selectors.itemsOrderedByPriorityDesc)if(t=i.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items),-1!==t)break;if(-1===t&&(t=0),0===this.model.state)return;let i=!1;if(e.triggerOptions.auto){const t=this.editor.getOption(118);"never"===t.selectionMode||"always"===t.selectionMode?i="never"===t.selectionMode:"whenTriggerCharacter"===t.selectionMode?i=1!==e.triggerOptions.triggerKind:"whenQuickSuggestion"===t.selectionMode&&(i=1===e.triggerOptions.triggerKind&&!e.triggerOptions.refilter)}this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.triggerOptions.auto,i)}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{this.model.cancel(),this.model.clear()})));const u=M._y.AcceptSuggestionsOnEnter.bindTo(n),g=()=>{const e=this.editor.getOption(1);u.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>g()))),g()}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)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=w.f.get(this.editor);if(!i)return;this._onWillInsertSuggestItem.fire({item:e.item});const n=this.editor.getModel(),o=n.getAlternativeVersionId(),{item:s}=e,l=[],d=new r.A;1&t||this.editor.pushUndoStop();const c=this.getOverwriteInfo(s,Boolean(8&t));this._memoryService.memorize(n,this.editor.getPosition(),s);const h=s.isResolved;let g=-1,m=-1;if(Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();const e=p.Z.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map((e=>{let t=_.e.lift(e.range);if(t.startLineNumber===s.position.lineNumber&&t.startColumn>s.position.column){const e=this.editor.getPosition().column-s.position.column,i=e,n=_.e.spansMultipleLines(t)?0:e;t=new _.e(t.startLineNumber,t.startColumn+i,t.endLineNumber,t.endColumn+n)}return f.h.replaceMove(t,e.text)}))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!h){const e=new u.G;let i;const o=n.onDidChangeContent((e=>{if(e.isFlush)return d.cancel(),void o.dispose();for(const t of e.changes){const e=_.e.getEndPosition(t.range);i&&!v.L.isBefore(e,i)||(i=e)}})),r=t;t|=2;let a=!1;const c=this.editor.onWillType((()=>{c.dispose(),a=!0,2&r||this.editor.pushUndoStop()}));l.push(s.resolve(d.token).then((()=>{if(!s.completion.additionalTextEdits||d.token.isCancellationRequested)return;if(i&&s.completion.additionalTextEdits.some((e=>v.L.isBefore(i,_.e.getStartPosition(e.range)))))return!1;a&&this.editor.pushUndoStop();const e=p.Z.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map((e=>f.h.replaceMove(_.e.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!a&&2&r||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),m=!0===t?1:!1===t?0:-2})).finally((()=>{o.dispose(),c.dispose()})))}let{insertText:b}=s.completion;if(4&s.completion.insertTextRules||(b=y.Yj.escape(b)),this.model.cancel(),i.insert(b,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&s.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),s.completion.command)if(s.completion.command.id===st.id)this.model.trigger({auto:!0,retrigger:!0});else{const e=new u.G;l.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch((e=>{s.completion.extensionId?(0,a.Cp)(e):(0,a.dL)(e)})).finally((()=>{g=e.elapsed()})))}4&t&&this._alternatives.value.set(e,(e=>{for(d.cancel();n.canUndo();){o!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(s),Promise.all(l).finally((()=>{this._reportSuggestionAcceptedTelemetry(s,n,h,g,m),this.model.clear(),d.dispose()}))}_reportSuggestionAcceptedTelemetry(e,t,i,n,o){var s,r,a;0!==Math.floor(100*Math.random())&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:null!==(r=null===(s=e.extensionId)||void 0===s?void 0:s.value)&&void 0!==r?r:"unknown",providerId:null!==(a=e.provider._debugDisplayName)&&void 0!==a?a:"unknown",kind:e.completion.kind,basenameHash:(0,Xe.vp)((0,Ee.EZ)(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:(0,Ee.DZ)(t.uri),resolveInfo:e.provider.resolveCompletionItem?i?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:o})}getOverwriteInfo(e,t){(0,g.p_)(this.editor.hasModel());let i="replace"===this.editor.getOption(118).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,o=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:n+(this.editor.getPosition().column-e.position.column),overwriteAfter:o+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem(e){if((0,s.Of)(e.completion.additionalTextEdits)){const t=D.NC("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);(0,o.Z9)(t)}}triggerSuggest(e,t,i){this.editor.hasModel()&&(this.model.trigger({auto:null!=t&&t,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=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;return n-i!==e.completion.insertText.length||this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n})!==e.completion.insertText};l.ju.once(this.model.onDidTrigger)((e=>{const t=[];l.ju.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{(0,c.B9)(t),i()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if((0,c.B9)(t),0===e.items.length)return void i();const o=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),s=e.items[o];n(s)?(this.editor.pushUndoStop(),this._insertSuggestion({index:o,item:s,model:e},7)):i()}),void 0,t)})),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.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};nt.ID="editor.contrib.suggestController",nt=Ye=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([tt(1,C.Fh),tt(2,E.H),tt(3,S.i6),tt(4,I.TG),tt(5,T.VZ),tt(6,Je.b)],nt);class ot{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(-1!==this._items.indexOf(e))throw new Error("Value is already registered");return this._items.push(e),this._items.sort(((e,t)=>this.prioritySelector(t)-this.prioritySelector(e))),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class st extends m.R6{constructor(){super({id:st.id,label:D.NC("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:S.Ao.and(b.u.writable,b.u.hasCompletionItemProvider,M._y.Visible.toNegated()),kbOpts:{kbExpr:b.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=nt.get(t);if(!n)return;let o;i&&"object"==typeof i&&!0===i.auto&&(o=!0),n.triggerSuggest(void 0,o,void 0)}}st.id="editor.action.triggerSuggest",(0,m._K)(nt.ID,nt,2),(0,m.Qr)(st);const rt=190,at=m._l.bindToContribution(nt.get);(0,m.fK)(new at({id:"acceptSelectedSuggestion",precondition:S.Ao.and(M._y.Visible,M._y.HasFocusedSuggestion),handler(e){e.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:S.Ao.and(M._y.Visible,b.u.textInputFocus),weight:rt},{primary:3,kbExpr:S.Ao.and(M._y.Visible,b.u.textInputFocus,M._y.AcceptSuggestionsOnEnter,M._y.MakesTextEdit),weight:rt}],menuOpts:[{menuId:M.GI,title:D.NC("accept.insert","Insert"),group:"left",order:1,when:M._y.HasInsertAndReplaceRange.toNegated()},{menuId:M.GI,title:D.NC("accept.insert","Insert"),group:"left",order:1,when:S.Ao.and(M._y.HasInsertAndReplaceRange,M._y.InsertMode.isEqualTo("insert"))},{menuId:M.GI,title:D.NC("accept.replace","Replace"),group:"left",order:1,when:S.Ao.and(M._y.HasInsertAndReplaceRange,M._y.InsertMode.isEqualTo("replace"))}]})),(0,m.fK)(new at({id:"acceptAlternativeSelectedSuggestion",precondition:S.Ao.and(M._y.Visible,b.u.textInputFocus,M._y.HasFocusedSuggestion),kbOpts:{weight:rt,kbExpr:b.u.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:M.GI,group:"left",order:2,when:S.Ao.and(M._y.HasInsertAndReplaceRange,M._y.InsertMode.isEqualTo("insert")),title:D.NC("accept.replace","Replace")},{menuId:M.GI,group:"left",order:2,when:S.Ao.and(M._y.HasInsertAndReplaceRange,M._y.InsertMode.isEqualTo("replace")),title:D.NC("accept.insert","Insert")}]})),E.P.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,m.fK)(new at({id:"hideSuggestWidget",precondition:M._y.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:rt,kbExpr:b.u.textInputFocus,primary:9,secondary:[1033]}})),(0,m.fK)(new at({id:"selectNextSuggestion",precondition:S.Ao.and(M._y.Visible,S.Ao.or(M._y.MultipleSuggestions,M._y.HasFocusedSuggestion.negate())),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:rt,kbExpr:b.u.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,m.fK)(new at({id:"selectNextPageSuggestion",precondition:S.Ao.and(M._y.Visible,S.Ao.or(M._y.MultipleSuggestions,M._y.HasFocusedSuggestion.negate())),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:rt,kbExpr:b.u.textInputFocus,primary:12,secondary:[2060]}})),(0,m.fK)(new at({id:"selectLastSuggestion",precondition:S.Ao.and(M._y.Visible,S.Ao.or(M._y.MultipleSuggestions,M._y.HasFocusedSuggestion.negate())),handler:e=>e.selectLastSuggestion()})),(0,m.fK)(new at({id:"selectPrevSuggestion",precondition:S.Ao.and(M._y.Visible,S.Ao.or(M._y.MultipleSuggestions,M._y.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:rt,kbExpr:b.u.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,m.fK)(new at({id:"selectPrevPageSuggestion",precondition:S.Ao.and(M._y.Visible,S.Ao.or(M._y.MultipleSuggestions,M._y.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:rt,kbExpr:b.u.textInputFocus,primary:11,secondary:[2059]}})),(0,m.fK)(new at({id:"selectFirstSuggestion",precondition:S.Ao.and(M._y.Visible,S.Ao.or(M._y.MultipleSuggestions,M._y.HasFocusedSuggestion.negate())),handler:e=>e.selectFirstSuggestion()})),(0,m.fK)(new at({id:"focusSuggestion",precondition:S.Ao.and(M._y.Visible,M._y.HasFocusedSuggestion.negate()),handler:e=>e.focusSuggestion(),kbOpts:{weight:rt,kbExpr:b.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,m.fK)(new at({id:"focusAndAcceptSuggestion",precondition:S.Ao.and(M._y.Visible,M._y.HasFocusedSuggestion.negate()),handler:e=>{e.focusSuggestion(),e.acceptSelectedSuggestion(!0,!1)}})),(0,m.fK)(new at({id:"toggleSuggestionDetails",precondition:S.Ao.and(M._y.Visible,M._y.HasFocusedSuggestion),handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:rt,kbExpr:b.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:M.GI,group:"right",order:1,when:S.Ao.and(M._y.DetailsVisible,M._y.CanResolve),title:D.NC("detail.more","show less")},{menuId:M.GI,group:"right",order:1,when:S.Ao.and(M._y.DetailsVisible.toNegated(),M._y.CanResolve),title:D.NC("detail.less","show more")}]})),(0,m.fK)(new at({id:"toggleExplainMode",precondition:M._y.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),(0,m.fK)(new at({id:"toggleSuggestionFocus",precondition:M._y.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:rt,kbExpr:b.u.textInputFocus,primary:2570,mac:{primary:778}}})),(0,m.fK)(new at({id:"insertBestCompletion",precondition:S.Ao.and(b.u.textInputFocus,S.Ao.equals("config.editor.tabCompletion","on"),x.AtEnd,M._y.Visible.toNegated(),R.OtherSuggestions.toNegated(),w.f.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest((0,g.Kn)(t)?{fallback:"tab",...t}:{fallback:"tab"})},kbOpts:{weight:rt,primary:2}})),(0,m.fK)(new at({id:"insertNextSuggestion",precondition:S.Ao.and(b.u.textInputFocus,S.Ao.equals("config.editor.tabCompletion","on"),R.OtherSuggestions,M._y.Visible.toNegated(),w.f.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:rt,kbExpr:b.u.textInputFocus,primary:2}})),(0,m.fK)(new at({id:"insertPrevSuggestion",precondition:S.Ao.and(b.u.textInputFocus,S.Ao.equals("config.editor.tabCompletion","on"),R.OtherSuggestions,M._y.Visible.toNegated(),w.f.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:rt,kbExpr:b.u.textInputFocus,primary:1026}})),(0,m.Qr)(class extends m.R6{constructor(){super({id:"editor.action.resetSuggestSize",label:D.NC("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){var i;null===(i=nt.get(t))||void 0===i||i.resetWidgetSize()}})},88088:(e,t,i)=>{"use strict";var n=i(71050),o=i(13707),s=i(53725),r=i(5976),a=i(11640),l=i(24314),d=i(10637),c=i(71922),h=i(74961),u=i(55621),g=i(80378),p=i(85996),m=i(24477),f=i(84972),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};class b{constructor(e,t,i,n,o,s){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=o,this.completion=s}}let w=class extends r.L6{constructor(e,t,i,n,o,s){super(o.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=s}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&&i.resolve(n.T.None)}return t}};w=v([_(5,g.Fh)],w);let y=class extends r.JT{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){var o;if(i.selectedSuggestionInfo)return;let s;for(const t of this._editorService.listCodeEditors())if(t.getModel()===e){s=t;break}if(!s)return;const r=s.getOption(89);if(u.tG.isAllOff(r))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const a=e.tokenization.getLineTokens(t.lineNumber),d=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("inline"!==u.tG.valueFor(r,d))return;let c,g,f=e.getWordAtPosition(t);if((null==f?void 0:f.word)||(c=this._getTriggerCharacterInfo(e,t)),!(null==f?void 0:f.word)&&!c)return;if(f||(f=e.getWordUntilPosition(t)),f.endColumn!==t.column)return;const v=e.getValueInRange(new l.e(t.lineNumber,1,t.lineNumber,t.column));if(!c&&(null===(o=this._lastResult)||void 0===o?void 0:o.canBeReused(e,t.lineNumber,f))){const e=new h.t(v,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=e,this._lastResult.acquire(),g=this._lastResult}else{const i=await(0,u.kL)(this._languageFeatureService.completionProvider,e,t,new u.A9(void 0,p.U.createSuggestFilter(s).itemKind,null==c?void 0:c.providers),c&&{triggerKind:1,triggerCharacter:c.ch},n);let o;i.needsClipboard&&(o=await this._clipboardService.readText());const r=new h._(i.items,t.column,new h.t(v,0),m.K.None,s.getOption(118),s.getOption(112),{boostFullMatch:!1,firstMatchCanBeWeak:!1},o);g=new w(e,t.lineNumber,f,r,i,this._suggestMemoryService)}return this._lastResult=g,g}handleItemDidShow(e,t){t.completion.resolve(n.T.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var i;const n=e.getValueInRange(l.e.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),o=new Set;for(const t of this._languageFeatureService.completionProvider.all(e))(null===(i=t.triggerCharacters)||void 0===i?void 0:i.includes(n))&&o.add(t);if(0!==o.size)return{providers:o,ch:n}}};y=v([_(0,c.p),_(1,f.p),_(2,g.Fh),_(3,a.$)],y),(0,d.y)(y)},80378:(e,t,i)=>{"use strict";i.d(t,{Fh:()=>v});var n,o=i(15393),s=i(5976),r=i(43702),a=i(4767),l=i(96887),d=i(33108),c=i(65026),h=i(72065),u=i(26904),g=function(e,t){return function(i,n){t(i,n,e)}};class p{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;const n=i[0].score[0];for(let e=0;ethis._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===u.fk.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){var i;const o=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if((null===(i=this._strategy)||void 0===i?void 0:i.name)!==o){this._saveState();const e=n._strategyCtors.get(o)||m;this._strategy=new e;try{const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=this._storageService.get(`${n._storagePrefix}/${o}`,e);t&&this._strategy.fromJSON(JSON.parse(t))}catch(e){}}return this._strategy}_saveState(){if(this._strategy){const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=JSON.stringify(this._strategy);this._storageService.store(`${n._storagePrefix}/${this._strategy.name}`,t,e,1)}}};f._strategyCtors=new Map([["recentlyUsedByPrefix",class extends p{constructor(){super("recentlyUsedByPrefix"),this._trie=a.Id.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${n}`;this._trie.set(o,{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 o=`${e.getLanguageId()}/${n}`;let s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let e=0;ee.push([i,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),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="number"==typeof i.type?i.type:l.gX.fromString(i.type),this._trie.set(t,i)}}}],["recentlyUsed",class extends p{constructor(){super("recentlyUsed"),this._cache=new r.z6(300,.66),this._seq=0}memorize(e,t,i){const n=`${e.getLanguageId()}/${i.textLabel}`;this._cache.set(n,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(0===i.length)return 0;const n=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(n))return super.select(e,t,i);const o=i[0].score[0];let s=-1,r=-1;for(let t=0;tr&&o.type===i[t].completion.kind&&o.insertText===i[t].completion.insertText&&(r=o.touch,s=t),i[t].completion.preselect)return t}return-1!==s?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,i]of e)i.touch=0,i.type="number"==typeof i.type?i.type:l.gX.fromString(i.type),this._cache.set(t,i);this._seq=this._cache.size}}],["first",m]]),f._storagePrefix="suggest/memories",f=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([g(0,u.Uy),g(1,d.Ui)],f);const v=(0,h.yh)("ISuggestMemories");(0,c.z)(v,f,1)},85996:(e,t,i)=>{"use strict";i.d(t,{U:()=>D});var n,o=i(15393),s=i(71050),r=i(17301),a=i(4669),l=i(5976),d=i(97295),c=i(3860),h=i(85215),u=i(24477),g=i(84972),p=i(33108),m=i(93983),f=i(43557),v=i(10829),_=i(74961),b=i(55621),w=i(71922),y=i(13707),C=i(98401),S=i(78573),x=i(98762),k=i(48814),L=function(e,t){return function(i,n){t(i,n,e)}};class N{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}}let D=n=class{constructor(e,t,i,n,s,r,d,h,u){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=s,this._contextKeyService=r,this._configurationService=d,this._languageFeaturesService=h,this._envService=u,this._toDispose=new l.SL,this._triggerCharacterListener=new l.SL,this._triggerQuickSuggest=new o._F,this._triggerState=void 0,this._completionDisposables=new l.SL,this._onDidCancel=new a.Q5,this._onDidTrigger=new a.Q5,this._onDidSuggest=new a.Q5,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new c.Y(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 g=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{g=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{g=!1,this._onCompositionEnd()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{g||this._onCursorChange(e)}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{g||void 0===this._triggerState||this._refilterCompletionItems()}))),this._updateTriggerCharacters()}dispose(){(0,l.B9)(this._triggerCharacterListener),(0,l.B9)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(91)||!this._editor.hasModel()||!this._editor.getOption(121))return;const e=new Map;for(const t of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const i of t.triggerCharacters||[]){let n=e.get(i);n||(n=new Set,n.add((0,b.ZJ)()),e.set(i,n)),n.add(t)}const t=t=>{var i;if(!function(e,t,i){if(!Boolean(t.getContextKeyValue("inlineSuggestionVisible")))return!0;const n=t.getContextKeyValue(S.f.suppressSuggestions.key);return void 0!==n?!n:!e.getOption(62).suppressSuggestions}(this._editor,this._contextKeyService,this._configurationService))return;if(N.shouldAutoTrigger(this._editor))return;if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let n="";(0,d.YK)(t.charCodeAt(t.length-1))?(0,d.ZG)(t.charCodeAt(t.length-2))&&(n=t.substr(t.length-2)):n=t.charAt(t.length-1);const o=e.get(n);if(o){const e=new Map;if(this._completionModel)for(const[t,i]of this._completionModel.getItemsByProvider())o.has(t)||e.set(t,i);this.trigger({auto:!0,triggerKind:1,triggerCharacter:n,retrigger:Boolean(this._completionModel),clipboardText:null===(i=this._completionModel)||void 0===i?void 0:i.clipboardText,completionOptions:{providerFilter:o,providerItemsToReuse:e}})}};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){var t;void 0!==this._triggerState&&(this._triggerQuickSuggest.cancel(),null===(t=this._requestToken)||void 0===t||t.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(){void 0!==this._triggerState&&(this._editor.hasModel()&&this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.trigger({auto:this._triggerState.auto,retrigger:!0}):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source?this.cancel():void 0===this._triggerState&&0===e.reason?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():void 0!==this._triggerState&&3===e.reason&&this._refilterCompletionItems()}_onCompositionEnd(){void 0===this._triggerState?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;b.tG.isAllOff(this._editor.getOption(89))||this._editor.getOption(118).snippetsPreventQuickSuggestions&&(null===(e=x.f.get(this._editor))||void 0===e?void 0:e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(void 0!==this._triggerState)return;if(!N.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(89);if(!b.tG.isAllOff(i)){if(!b.tG.isAllOn(i)){e.tokenization.tokenizeIfCheap(t.lineNumber);const n=e.tokenization.getLineTokens(t.lineNumber),o=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("on"!==b.tG.valueFor(i,o))return}(function(e,t,i){if(!Boolean(t.getContextKeyValue(S.f.inlineSuggestionVisible.key)))return!0;const n=t.getContextKeyValue(S.f.suppressSuggestions.key);return void 0!==n?!n:!e.getOption(62).suppressSuggestions})(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(e)&&this.trigger({auto:!0})}}),this._editor.getOption(90)))}_refilterCompletionItems(){(0,C.p_)(this._editor.hasModel()),(0,C.p_)(void 0!==this._triggerState);const e=this._editor.getModel(),t=this._editor.getPosition(),i=new N(e,t,{...this._triggerState,refilter:!0});this._onNewContext(i)}trigger(e){var t,i,o,a,l,d;if(!this._editor.hasModel())return;const c=this._editor.getModel(),h=new N(c,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:null!==(t=e.shy)&&void 0!==t&&t,position:this._editor.getPosition()}),this._context=h;let g={triggerKind:null!==(i=e.triggerKind)&&void 0!==i?i:0};e.triggerCharacter&&(g={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new s.A;let p=1;switch(this._editor.getOption(112)){case"top":p=0;break;case"bottom":p=2}const{itemKind:m,showDeprecated:f}=n.createSuggestFilter(this._editor),v=new b.A9(p,null!==(a=null===(o=e.completionOptions)||void 0===o?void 0:o.kindFilter)&&void 0!==a?a:m,null===(l=e.completionOptions)||void 0===l?void 0:l.providerFilter,null===(d=e.completionOptions)||void 0===d?void 0:d.providerItemsToReuse,f),w=u.K.create(this._editorWorkerService,this._editor),C=(0,b.kL)(this._languageFeaturesService.completionProvider,c,this._editor.getPosition(),v,g,this._requestToken.token);Promise.all([C,w]).then((async([t,i])=>{var n;if(null===(n=this._requestToken)||void 0===n||n.dispose(),!this._editor.hasModel())return;let o=null==e?void 0:e.clipboardText;if(!o&&t.needsClipboard&&(o=await this._clipboardService.readText()),void 0===this._triggerState)return;const s=this._editor.getModel(),r=new N(s,this._editor.getPosition(),e),a={...y.mX.default,firstMatchCanBeWeak:!this._editor.getOption(118).matchOnWordStartOnly};if(this._completionModel=new _._(t.items,this._context.column,{leadingLineContent:r.leadingLineContent,characterCountDelta:r.column-this._context.column},i,this._editor.getOption(118),this._editor.getOption(112),a,o),this._completionDisposables.add(t.disposable),this._onNewContext(r),this._reportDurationsTelemetry(t.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const e of t.items)e.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${e.provider._debugDisplayName}`,e.completion)})).catch(r.dL)}_reportDurationsTelemetry(e){this._telemetryGate++%230==0&&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;"none"===e.getOption(112)&&t.add(27);const i=e.getOption(118);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17),i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),{itemKind:t,showDeprecated:i.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if((0,d.V8)(e.leadingLineContent)===(0,d.V8)(this._context.leadingLineContent)){if(e.columnthis._context.leadingWord.startColumn){if(N.shouldAutoTrigger(this._editor)&&this._context){const e=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:e}})}}else if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&0!==e.leadingWord.word.length){const e=new Map,t=new Set;for(const[i,n]of this._completionModel.getItemsByProvider())n.length>0&&n[0].container.incomplete?t.add(i):e.set(i,n);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:t,providerItemsToReuse:e}})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){const n=N.shouldAutoTrigger(this._editor);if(!this._context)return void this.cancel();if(n&&this._context.leadingWord.endColumn0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}else this.cancel();else this.cancel()}};D=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([L(1,h.p),L(2,g.p),L(3,v.b),L(4,f.VZ),L(5,m.i6),L(6,p.Ui),L(7,w.p),L(8,k.Y)],D)},24477:(e,t,i)=>{"use strict";i.d(t,{K:()=>r});var n=i(9488),o=i(24314),s=i(79694);class r{static async create(e,t){if(!t.getOption(118).localityBonus)return r.None;if(!t.hasModel())return r.None;const i=t.getModel(),a=t.getPosition();if(!e.canComputeWordRanges(i.uri))return r.None;const[l]=await(new s.x).provideSelectionRanges(i,[a]);if(0===l.length)return r.None;const d=await e.computeWordRanges(i.uri,l[0].range);if(!d)return r.None;const c=i.getWordUntilPosition(a);return delete d[c.word],new class extends r{distance(e,i){if(!a.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;const s="string"==typeof i.label?i.label:i.label.label,r=d[s];if((0,n.XY)(r))return 2<<20;const c=(0,n.ry)(r,o.e.fromPositions(e),o.e.compareRangesUsingStarts),h=c>=0?r[c]:r[Math.max(0,~c-1)];let u=l.length;for(const e of l){if(!o.e.containsRange(e.range,h))break;u-=1}return u}}}}r.None=new class extends r{distance(){return 0}}},22368:(e,t,i)=>{"use strict";var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),c=i.n(d),h=i(19216),u=i.n(h),g=i(44589),p=i.n(g),m=i(30745),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var v=i(63580),_=i(73910);(0,_.P6G)("symbolIcon.arrayForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.booleanForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,v.NC)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.colorForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.constantForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,v.NC)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,v.NC)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,v.NC)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,v.NC)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,v.NC)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.fileForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.folderForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,v.NC)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,v.NC)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.keyForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.keywordForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,v.NC)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.moduleForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.namespaceForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.nullForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.numberForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.objectForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.operatorForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.packageForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.propertyForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.referenceForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.snippetForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.stringForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.structForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.textForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.typeParameterForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.unitForeground",{dark:_.dRz,light:_.dRz,hcDark:_.dRz,hcLight:_.dRz},(0,v.NC)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,_.P6G)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,v.NC)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))},64662:(e,t,i)=>{"use strict";var n=i(56346),o=i(37940),s=i(63580),r=i(84144);class a extends r.Ke{constructor(){super({id:a.ID,title:s.vv({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(){const e=!o.n.getTabFocusMode();o.n.setTabFocusMode(e),e?(0,n.Z9)(s.NC("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):(0,n.Z9)(s.NC("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}a.ID="editor.action.toggleTabFocusMode",(0,r.r1)(a)},52614:(e,t,i)=>{"use strict";var n=i(84013),o=i(16830),s=i(63580);class r extends o.R6{constructor(){super({id:"editor.action.forceRetokenize",label:s.NC("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const o=new n.G;i.tokenization.forceTokenization(i.getLineCount()),o.stop(),console.log(`tokenization took ${o.elapsed()}`)}}(0,o.Qr)(r)},84677:(e,t,i)=>{"use strict";var n=i(15393),o=i(73046),s=i(59365),r=i(5976),a=i(1432),l=i(97295),d=i(93379),c=i.n(d),h=i(7795),u=i.n(h),g=i(90569),p=i.n(g),m=i(3565),f=i.n(m),v=i(19216),_=i.n(v),b=i(44589),w=i.n(b),y=i(98679),C={};C.styleTagTransform=w(),C.setAttributes=f(),C.insert=p().bind(null,"head"),C.domAPI=u(),C.insertStyleElement=_(),c()(y.Z,C),y.Z&&y.Z.locals&&y.Z.locals;var S=i(16830),x=i(64141),k=i(13961),L=i(31446),N=i(85215),D=i(72042),E=i(30168),I=i(66520),T=i(22374),M=i(98367),R={};R.styleTagTransform=w(),R.setAttributes=f(),R.insert=p().bind(null,"head"),R.domAPI=u(),R.insertStyleElement=_(),c()(M.Z,R),M.Z&&M.Z.locals&&M.Z.locals;var A=i(65321),P=i(90317),O=i(74741),F=i(92467),B=i(72065),W=i(4850),H=i(59069),V=i(10553),z=i(4669),j=i(50988),U=i(57150),q={};q.styleTagTransform=w(),q.setAttributes=f(),q.insert=p().bind(null,"head"),q.domAPI=u(),q.insertStyleElement=_(),c()(U.Z,q),U.Z&&U.Z.locals&&U.Z.locals;let K=class extends r.JT{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){var o;super(),this._link=t,this._enabled=!0,this.el=(0,A.R3)(e,(0,A.$)("a.monaco-link",{tabIndex:null!==(o=t.tabIndex)&&void 0!==o?o:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const s=this._register(new W.Y(this.el,"click")),r=this._register(new W.Y(this.el,"keypress")),a=z.ju.chain(r.event,(e=>e.map((e=>new H.y(e))).filter((e=>3===e.keyCode)))),l=this._register(new W.Y(this.el,V.t.Tap)).event;this._register(V.o.addTarget(this.el));const d=z.ju.any(s.event,a,l);this._register(d((e=>{this.enabled&&(A.zB.stop(e,!0),(null==i?void 0:i.opener)?i.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))}))),this.enabled=!0}};var $,G;K=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([($=3,G=j.v,function(e,t){G(e,t,$)})],K);var Z=i(59554),Q=i(25670),Y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},J=function(e,t){return function(i,n){t(i,n,e)}};let X=class extends r.JT{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(ee))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{var t;this.hide(),null===(t=e.onClose)||void 0===t||t.call(e)}}),this._editor.setBanner(this.banner.element,26)}};X=Y([J(1,B.TG)],X);let ee=class extends r.JT{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(F.$,{}),this.element=(0,A.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){return e.ariaLabel?e.ariaLabel:"string"==typeof e.message?e.message:void 0}getBannerMessage(e){if("string"==typeof e){const t=(0,A.$)("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){(0,A.PO)(this.element)}show(e){(0,A.PO)(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=(0,A.R3)(this.element,(0,A.$)("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild((0,A.$)(`div${Q.k.asCSSSelector(e.icon)}`));const n=(0,A.R3)(this.element,(0,A.$)("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=(0,A.R3)(this.element,(0,A.$)("div.message-actions-container")),e.actions)for(const t of e.actions)this._register(this.instantiationService.createInstance(K,this.messageActionsContainer,{...t,tabIndex:-1},{}));const o=(0,A.R3)(this.element,(0,A.$)("div.action-container"));this.actionBar=this._register(new P.o(o)),this.actionBar.push(this._register(new O.aU("banner.close","Close Banner",Q.k.asClassName(Z.s_),!0,(()=>{"function"==typeof e.onClose&&e.onClose()}))),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};ee=Y([J(0,B.TG)],ee);var te=i(63580),ie=i(33108),ne=i(41157),oe=i(33425),se=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},re=function(e,t){return function(i,n){t(i,n,e)}};const ae=(0,Z.q5)("extensions-warning-message",o.l.warning,te.NC("warningIcon","Icon shown with a warning message in the extensions editor."));let le=class extends r.JT{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=e=>{if(e&&e.hasMore){if(this._bannerClosed)return;const t=Math.max(e.ambiguousCharacterCount,e.nonBasicAsciiCharacterCount,e.invisibleCharacterCount);let i;if(e.nonBasicAsciiCharacterCount>=t)i={message:te.NC("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new ye};else if(e.ambiguousCharacterCount>=t)i={message:te.NC("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new be};else{if(!(e.invisibleCharacterCount>=t))throw new Error("Unreachable");i={message:te.NC("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new we}}this._bannerController.show({id:"unicodeHighlightBanner",message:i.message,icon:ae,actions:[{label:i.command.shortLabel,href:`command:${i.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(X,e)),this._register(this._editor.onDidChangeModel((()=>{this._bannerClosed=!1,this._updateHighlighter()}))),this._options=e.getOption(125),this._register(i.onDidChangeTrust((e=>{this._updateHighlighter()}))),this._register(e.onDidChangeConfiguration((t=>{t.hasChanged(125)&&(this._options=e.getOption(125),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=function(e,t){return{nonBasicASCII:t.nonBasicASCII===x.Av?!e:t.nonBasicASCII,ambiguousCharacters:t.ambiguousCharacters,invisibleCharacters:t.invisibleCharacters,includeComments:t.includeComments===x.Av?!e:t.includeComments,includeStrings:t.includeStrings===x.Av?!e:t.includeStrings,allowedCharacters:t.allowedCharacters,allowedLocales:t.allowedLocales}}(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every((e=>!1===e)))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map((e=>e.codePointAt(0))),allowedLocales:Object.keys(e.allowedLocales).map((e=>"_os"===e?(new Intl.NumberFormat).resolvedOptions().locale:"_vscode"===e?a.dK:e))};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new de(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new ce(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};le.ID="editor.contrib.unicodeHighlighter",le=se([re(1,N.p),re(2,oe.Y),re(3,B.TG)],le);let de=class extends r.JT{constructor(e,t,i,o){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=o,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new n.pY((()=>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())return void this._decorations.clear();const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then((t=>{if(this._model.isDisposed())return;if(this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const e of t.ranges)i.push({range:e,options:fe.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)}))}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();return(0,E.Fd)(t,e)?{reason:me(t.getValueInRange(e.range),this._options),inComment:(0,E.$t)(t,e),inString:(0,E.zg)(t,e)}:null}};de=se([re(3,N.p)],de);class ce extends r.JT{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 n.pY((()=>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())return void this._decorations.clear();const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const t of e){const e=L.a.computeUnicodeHighlights(this._model,this._options,t);for(const t of e.ranges)i.ranges.push(t);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||e.hasMore}if(!i.hasMore)for(const e of i.ranges)t.push({range:e,options:fe.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(0,E.Fd)(t,e)?{reason:me(i,this._options),inComment:(0,E.$t)(t,e),inString:(0,E.zg)(t,e)}:null}}const he=te.NC("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options");let ue=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=this._editor.getContribution(le.ID);if(!n)return[];const o=[],r=new Set;let a=300;for(const e of t){const t=n.getDecorationInfo(e);if(!t)continue;const d=i.getValueInRange(e.range).codePointAt(0),c=pe(d);let h;switch(t.reason.kind){case 0:h=(0,l.$i)(t.reason.confusableWith)?te.NC("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",c,pe(t.reason.confusableWith.codePointAt(0))):te.NC("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",c,pe(t.reason.confusableWith.codePointAt(0)));break;case 1:h=te.NC("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",c);break;case 2:h=te.NC("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",c)}if(r.has(h))continue;r.add(h);const u={codePoint:d,reason:t.reason,inComment:t.inComment,inString:t.inString},g=te.NC("unicodeHighlight.adjustSettings","Adjust settings"),p=`command:${Ce.ID}?${encodeURIComponent(JSON.stringify(u))}`,m=new s.W5("",!0).appendMarkdown(h).appendText(" ").appendLink(p,g,he);o.push(new T.hU(this,e.range,[m],!1,a++))}return o}renderHoverParts(e,t){return(0,T.c)(e,t,this._editor,this._languageService,this._openerService)}};function ge(e){return`U+${e.toString(16).padStart(4,"0")}`}function pe(e){let t=`\`${ge(e)}\``;return l.vU.isInvisibleCharacter(e)||(t+=` "${function(e){return 96===e?"`` ` ``":"`"+String.fromCodePoint(e)+"`"}(e)}"`),t}function me(e,t){return L.a.computeUnicodeHighlightReason(e,t)}ue=se([re(1,D.O),re(2,j.v)],ue);class fe{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=k.qx.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}}fe.instance=new fe;class ve extends S.R6{constructor(){super({id:be.ID,label:te.NC("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=te.NC("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,t,i){const n=null==e?void 0:e.get(ie.Ui);n&&this.runAction(n)}async runAction(e){await e.updateValue(x.qt.includeComments,!1,2)}}class _e extends S.R6{constructor(){super({id:be.ID,label:te.NC("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=te.NC("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,t,i){const n=null==e?void 0:e.get(ie.Ui);n&&this.runAction(n)}async runAction(e){await e.updateValue(x.qt.includeStrings,!1,2)}}class be extends S.R6{constructor(){super({id:be.ID,label:te.NC("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=te.NC("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,t,i){const n=null==e?void 0:e.get(ie.Ui);n&&this.runAction(n)}async runAction(e){await e.updateValue(x.qt.ambiguousCharacters,!1,2)}}be.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class we extends S.R6{constructor(){super({id:we.ID,label:te.NC("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=te.NC("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,t,i){const n=null==e?void 0:e.get(ie.Ui);n&&this.runAction(n)}async runAction(e){await e.updateValue(x.qt.invisibleCharacters,!1,2)}}we.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class ye extends S.R6{constructor(){super({id:ye.ID,label:te.NC("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=te.NC("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,t,i){const n=null==e?void 0:e.get(ie.Ui);n&&this.runAction(n)}async runAction(e){await e.updateValue(x.qt.nonBasicASCII,!1,2)}}ye.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class Ce extends S.R6{constructor(){super({id:Ce.ID,label:te.NC("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,i){const{codePoint:n,reason:o,inString:s,inComment:r}=i,a=String.fromCodePoint(n),d=e.get(ne.eJ),c=e.get(ie.Ui),h=[];if(0===o.kind)for(const e of o.notAmbiguousInLocales)h.push({label:te.NC("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',e),run:async()=>{Se(c,[e])}});if(h.push({label:function(e){return l.vU.isInvisibleCharacter(e)?te.NC("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",ge(e)):te.NC("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${ge(e)} "${a}"`)}(n),run:()=>async function(e,t){const i=e.getValue(x.qt.allowedCharacters);let n;n="object"==typeof i&&i?i:{};for(const e of t)n[String.fromCodePoint(e)]=!0;await e.updateValue(x.qt.allowedCharacters,n,2)}(c,[n])}),r){const e=new ve;h.push({label:e.label,run:async()=>e.runAction(c)})}else if(s){const e=new _e;h.push({label:e.label,run:async()=>e.runAction(c)})}if(0===o.kind){const e=new be;h.push({label:e.label,run:async()=>e.runAction(c)})}else if(1===o.kind){const e=new we;h.push({label:e.label,run:async()=>e.runAction(c)})}else if(2===o.kind){const e=new ye;h.push({label:e.label,run:async()=>e.runAction(c)})}else!function(e){throw new Error(`Unexpected value: ${e}`)}(o);const u=await d.pick(h,{title:he});u&&await u.run()}}async function Se(e,t){var i;const n=null===(i=e.inspect(x.qt.allowedLocales).user)||void 0===i?void 0:i.value;let o;o="object"==typeof n&&n?Object.assign({},n):{};for(const e of t)o[e]=!0;await e.updateValue(x.qt.allowedLocales,o,2)}Ce.ID="editor.action.unicodeHighlight.showExcludeOptions",(0,S.Qr)(be),(0,S.Qr)(we),(0,S.Qr)(ye),(0,S.Qr)(Ce),(0,S._K)(le.ID,le,1),I.Ae.register(ue)},79607:(e,t,i)=>{"use strict";var n=i(5976),o=i(95935),s=i(16830),r=i(11640),a=i(63580),l=i(28820),d=function(e,t){return function(i,n){t(i,n,e)}};const c="ignoreUnusualLineTerminators";let h=class extends n.JT{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(126),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(126)&&(this._config=this._editor.getOption(126),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()}))),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators())return;const t=function(e,t){return e.getModelProperty(t.uri,c)}(this._codeEditorService,e);if(!0===t)return;if(this._editor.getOption(91))return;if("auto"===this._config)return void e.removeUnusualLineTerminators(this._editor.getSelections());if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:a.NC("unusualLineTerminators.title","Unusual Line Terminators"),message:a.NC("unusualLineTerminators.message","Detected unusual line terminators"),detail:a.NC("unusualLineTerminators.detail","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`.",(0,o.EZ)(e.uri)),primaryButton:a.NC({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:a.NC("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}i.confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t,i){e.setModelProperty(t.uri,c,!0)}(this._codeEditorService,e)}};h.ID="editor.contrib.unusualLineTerminatorsDetector",h=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([d(1,l.S),d(2,r.$)],h),(0,s._K)(h.ID,h,1)},45550:(e,t,i)=>{"use strict";i.d(t,{G:()=>R,w:()=>A});var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),c=i.n(d),h=i(19216),u=i.n(h),g=i(44589),p=i.n(g),m=i(19620),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var v=i(84973),_=i(13961),b=i(96887),w=i(63580),y=i(73910),C=i(97781);const S=(0,y.P6G)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},w.NC("wordHighlight","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);(0,y.P6G)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},w.NC("wordHighlightStrong","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),(0,y.P6G)("editor.wordHighlightTextBackground",{light:S,dark:S,hcDark:S,hcLight:S},w.NC("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const x=(0,y.P6G)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:y.xL1,hcLight:y.xL1},w.NC("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));(0,y.P6G)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:y.xL1,hcLight:y.xL1},w.NC("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),(0,y.P6G)("editor.wordHighlightTextBorder",{light:x,dark:x,hcDark:x,hcLight:x},w.NC("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const k=(0,y.P6G)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},w.NC("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),L=(0,y.P6G)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},w.NC("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),N=(0,y.P6G)("editorOverviewRuler.wordHighlightTextForeground",{dark:y.SPM,light:y.SPM,hcDark:y.SPM,hcLight:y.SPM},w.NC("overviewRulerWordHighlightTextForeground","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),D=_.qx.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,C.EN)(L),position:v.sh.Center},minimap:{color:(0,C.EN)(y.IYc),position:v.F5.Inline}}),E=_.qx.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,C.EN)(N),position:v.sh.Center},minimap:{color:(0,C.EN)(y.IYc),position:v.F5.Inline}}),I=_.qx.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,C.EN)(y.SPM),position:v.sh.Center},minimap:{color:(0,C.EN)(y.IYc),position:v.F5.Inline}}),T=_.qx.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),M=_.qx.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,C.EN)(k),position:v.sh.Center},minimap:{color:(0,C.EN)(y.IYc),position:v.F5.Inline}});function R(e){return e===b.MY.Write?D:e===b.MY.Text?E:M}function A(e){return e?T:I}(0,C.Ic)(((e,t)=>{const i=e.getColor(y.Rzx);i&&t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)}))},70943:(e,t,i)=>{"use strict";var n,o,s=i(63580),r=i(9488),a=i(56346),l=i(15393),d=i(71050),c=i(17301),h=i(5976),u=i(65520),g=i(16830),p=i(11640),m=i(24314),f=i(29102),v=i(96887),_=i(84973),b=i(71922),w=i(45550),y=i(93983),C=i(66663),S=i(43702),x=i(22970),k=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L=function(e,t){return function(i,n){t(i,n,e)}};const N=new y.uy("hasWordHighlights",!1);function D(e,t,i,n){const o=e.ordered(t);return(0,l.Ps)(o.map((e=>()=>Promise.resolve(e.provideDocumentHighlights(t,i,n)).then(void 0,c.Cp))),r.Of).then((e=>{if(e){const i=new S.Y9;return i.set(t.uri,e),i}return new S.Y9}))}class E{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=(0,l.PG)((e=>this._compute(this._model,this._selection,this._wordSeparators,e)))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new m.e(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,o=t.startColumn,s=t.endColumn,r=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(r));for(let e=0,t=i.length;!a&&e=s&&(a=!0)}return a}cancel(){this.result.cancel()}}class I extends E{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return D(this._providers,e,t.getPosition(),n).then((e=>e||new S.Y9))}}class T extends E{constructor(e,t,i,n,o){super(e,t,i),this._providers=n,this._otherModels=o}_compute(e,t,i,n){return function(e,t,i,n,o,s){const r=e.ordered(t);return(0,l.Ps)(r.map((e=>()=>{const n=s.filter((e=>(0,_.pt)(e))).filter((t=>(0,x.G)(e.selector,t.uri,t.getLanguageId(),!0,void 0,void 0)>0));return Promise.resolve(e.provideMultiDocumentHighlights(t,i,n,o)).then(void 0,c.Cp)})),(e=>e instanceof S.Y9&&e.size>0))}(this._providers,e,t.getPosition(),0,n,this._otherModels).then((e=>e||new S.Y9))}}class M extends E{constructor(e,t,i,n,o){super(e,t,n),this._otherModels=o,this._selectionIsEmpty=t.isEmpty(),this._word=i}_compute(e,t,i,n){return(0,l.Vs)(250,n).then((()=>{const n=new S.Y9;let o;if(o=this._word?this._word:e.getWordAtPosition(t.getPosition()),!o)return new S.Y9;const s=[e,...this._otherModels];for(const e of s){if(e.isDisposed())continue;const t=e.findMatches(o.word,!0,!1,!0,i,!1).map((e=>({range:e.range,kind:v.MY.Text})));t&&n.set(e.uri,t)}return n}))}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty===n&&super.isValid(e,t,i)}}(0,g.sb)("_executeDocumentHighlights",(async(e,t,i)=>{const n=e.get(b.p),o=await D(n.documentHighlightProvider,t,i,d.T.None);return null==o?void 0:o.get(t.uri)}));let R=n=class{constructor(e,t,i,o,s){this.toUnhook=new h.SL,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new S.Y9,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=s,this._hasWordHighlights=N.bindTo(o),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(81),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||"off"!==this.occurrencesHighlight&&this._onPositionChanged(e)}))),this.toUnhook.add(e.onDidFocusEditorText((e=>{"off"!==this.occurrencesHighlight&&(this.workerRequest||this._run())}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{this._stopAll()}))),this.toUnhook.add(e.onDidChangeModel((e=>{!e.newModelUrl&&e.oldModelUrl?this._stopSingular():n.query&&this._run()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{const t=this.editor.getOption(81);this.occurrencesHighlight!==t&&(this.occurrencesHighlight=t,this._stopAll())}))),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,n.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){"off"!==this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(m.e.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))+1)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const n=this._getWord();if(n){const o=this.editor.getModel().getLineContent(i.startLineNumber);(0,a.Z9)(`${o}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))-1+e.length)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const n=this._getWord();if(n){const o=this.editor.getModel().getLineContent(i.startLineNumber);(0,a.Z9)(`${o}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=n.storedDecorations.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),n.storedDecorations.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(){const e=this.codeEditorService.listCodeEditors(),t=[];for(const i of e){if(!i.hasModel())continue;const e=n.storedDecorations.get(i.getModel().uri);if(!e)continue;i.removeDecorations(e),t.push(i.getModel().uri);const o=A.get(i);(null==o?void 0:o.wordHighlighter)&&o.wordHighlighter.decorations.length>0&&(o.wordHighlighter.decorations.clear(),o.wordHighlighter.workerRequest=null,o.wordHighlighter._hasWordHighlights.set(!1))}for(const e of t)n.storedDecorations.delete(e)}_stopSingular(){var e,t,i,o;this._removeSingleDecorations(),this.editor.hasTextFocus()&&((null===(e=this.editor.getModel())||void 0===e?void 0:e.uri.scheme)!==C.lg.vscodeNotebookCell&&(null===(i=null===(t=n.query)||void 0===t?void 0:t.modelInfo)||void 0===i?void 0:i.model.uri.scheme)!==C.lg.vscodeNotebookCell?(n.query=null,this._run()):(null===(o=n.query)||void 0===o?void 0:o.modelInfo)&&(n.query.modelInfo=null)),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(){this._removeAllDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){var t;"off"===this.occurrencesHighlight||3!==e.reason&&(null===(t=this.editor.getModel())||void 0===t?void 0:t.uri.scheme)!==C.lg.vscodeNotebookCell?this._stopAll():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===C.lg.vscodeNotebookCell){const t=[],i=this.codeEditorService.listCodeEditors();for(const n of i){const i=n.getModel();i&&i!==e&&i.uri.scheme===C.lg.vscodeNotebookCell&&t.push(i)}return t}const t=[],i=this.codeEditorService.listCodeEditors();for(const n of i){if(!(0,u.QI)(n))continue;const i=n.getModel();i&&e===i.modified&&t.push(i.modified)}if(t.length)return t;if("singleFile"===this.occurrencesHighlight)return[];for(const n of i){const i=n.getModel();i&&i!==e&&t.push(i)}return t}_run(){var e;let t;if(this.editor.hasTextFocus()){const e=this.editor.getSelection();if(!e||e.startLineNumber!==e.endLineNumber)return n.query=null,void this._stopAll();const i=e.startColumn,o=e.endColumn,s=this._getWord();if(!s||s.startColumn>i||s.endColumn{t===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=e||[],this._beginRenderDecorations())}),c.dL)}}computeWithModel(e,t,i,n){return n.length?function(e,t,i,n,o,s){return e.has(t)?new T(t,i,o,e,s):new M(t,i,n,o,s)}(this.multiDocumentProviders,e,t,i,this.editor.getOption(130),n):function(e,t,i,n,o){return e.has(t)?new I(t,i,o,e):new M(t,i,n,o,[])}(this.providers,e,t,i,this.editor.getOption(130))}_beginRenderDecorations(){const e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){var e,t,i;this.renderDecorationsTimer=-1;const o=this.codeEditorService.listCodeEditors();for(const s of o){const o=A.get(s);if(!o)continue;const r=[],a=null===(e=s.getModel())||void 0===e?void 0:e.uri;if(a&&this.workerRequestValue.has(a)){const e=n.storedDecorations.get(a),l=this.workerRequestValue.get(a);if(l)for(const e of l)e.range&&r.push({range:e.range,options:(0,w.G)(e.kind)});let d=[];s.changeDecorations((t=>{d=t.deltaDecorations(null!=e?e:[],r)})),n.storedDecorations=n.storedDecorations.set(a,d),r.length>0&&(null===(t=o.wordHighlighter)||void 0===t||t.decorations.set(r),null===(i=o.wordHighlighter)||void 0===i||i._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};R.storedDecorations=new S.Y9,R.query=null,R=n=k([L(4,p.$)],R);let A=o=class extends h.JT{static get(e){return e.getContribution(o.ID)}constructor(e,t,i,n){super(),this._wordHighlighter=null;const o=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new R(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,n))};this._register(e.onDidChangeModel((e=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),o()}))),o()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!(!this._wordHighlighter||!this._wordHighlighter.hasDecorations())}moveNext(){var e;null===(e=this._wordHighlighter)||void 0===e||e.moveNext()}moveBack(){var e;null===(e=this._wordHighlighter)||void 0===e||e.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};A.ID="editor.contrib.wordHighlighter",A=o=k([L(1,y.i6),L(2,b.p),L(3,p.$)],A);class P extends g.R6{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=A.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class O extends g.R6{constructor(){super({id:"editor.action.wordHighlight.trigger",label:s.NC("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:N.toNegated(),kbOpts:{kbExpr:f.u.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=A.get(t);n&&n.restoreViewState(!0)}}(0,g._K)(A.ID,A,0),(0,g.Qr)(class extends P{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:s.NC("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:N,kbOpts:{kbExpr:f.u.editorTextFocus,primary:65,weight:100}})}}),(0,g.Qr)(class extends P{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:s.NC("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:N,kbOpts:{kbExpr:f.u.editorTextFocus,primary:1089,weight:100}})}}),(0,g.Qr)(O)},37181:(e,t,i)=>{"use strict";i.d(t,{IA:()=>_,t8:()=>y});var n=i(16830),o=i(61329),s=i(64141),r=i(55343),a=i(92896),l=i(24929),d=i(50187),c=i(24314),h=i(3860),u=i(29102),g=i(51381),p=i(63580),m=i(31106),f=i(93983),v=i(39282);class _ extends n._l{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=(0,l.u)(t.getOption(130)),o=t.getModel(),s=t.getSelections().map((e=>{const t=new d.L(e.positionLineNumber,e.positionColumn),i=this._move(n,o,t,this._wordNavigationType);return this._moveTo(e,i,this._inSelectionMode)}));if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,s.map((e=>r.Vi.fromModelSelection(e)))),1===s.length){const e=new d.L(s[0].positionLineNumber,s[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new h.Y(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new h.Y(t.lineNumber,t.column,t.lineNumber,t.column)}}class b extends _{_move(e,t,i,n){return a.w.moveWordLeft(e,t,i,n)}}class w extends _{_move(e,t,i,n){return a.w.moveWordRight(e,t,i,n)}}class y extends n._l{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(g.c_);if(!t.hasModel())return;const s=(0,l.u)(t.getOption(130)),r=t.getModel(),a=t.getSelections(),d=t.getOption(6),c=t.getOption(11),h=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),p=a.map((e=>{const i=this._delete({wordSeparators:s,model:r,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:d,autoClosingQuotes:c,autoClosingPairs:h,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new o.T4(i,"")}));t.pushUndoStop(),t.executeCommands(this.id,p),t.pushUndoStop()}}class C extends y{_delete(e,t){return a.w.deleteWordLeft(e,t)||new c.e(1,1,1,1)}}class S extends y{_delete(e,t){const i=a.w.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new c.e(n,o,n,o)}}class x extends n.R6{constructor(){super({id:"deleteInsideWord",precondition:u.u.writable,label:p.NC("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=(0,l.u)(t.getOption(130)),s=t.getModel(),r=t.getSelections().map((e=>{const t=a.w.deleteInsideWord(n,s,e);return new o.T4(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}}(0,n.fK)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}),(0,n.fK)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}),(0,n.fK)(new class extends b{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(u.u.textInputFocus,null===(e=f.Ao.and(m.U,v.cv))||void 0===e?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}),(0,n.fK)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}),(0,n.fK)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}),(0,n.fK)(new class extends b{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(u.u.textInputFocus,null===(e=f.Ao.and(m.U,v.cv))||void 0===e?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}),(0,n.fK)(new class extends w{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}),(0,n.fK)(new class extends w{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(u.u.textInputFocus,null===(e=f.Ao.and(m.U,v.cv))||void 0===e?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}),(0,n.fK)(new class extends w{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}),(0,n.fK)(new class extends w{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}),(0,n.fK)(new class extends w{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(u.u.textInputFocus,null===(e=f.Ao.and(m.U,v.cv))||void 0===e?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}),(0,n.fK)(new class extends w{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}),(0,n.fK)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(s.BH.wordSeparators.defaultValue),t,i,n)}}),(0,n.fK)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(s.BH.wordSeparators.defaultValue),t,i,n)}}),(0,n.fK)(new class extends w{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(s.BH.wordSeparators.defaultValue),t,i,n)}}),(0,n.fK)(new class extends w{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(s.BH.wordSeparators.defaultValue),t,i,n)}}),(0,n.fK)(new class extends C{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:u.u.writable})}}),(0,n.fK)(new class extends C{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:u.u.writable})}}),(0,n.fK)(new class extends C{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:u.u.writable,kbOpts:{kbExpr:u.u.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}),(0,n.fK)(new class extends S{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:u.u.writable})}}),(0,n.fK)(new class extends S{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:u.u.writable})}}),(0,n.fK)(new class extends S{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:u.u.writable,kbOpts:{kbExpr:u.u.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}),(0,n.Qr)(x)},86709:(e,t,i)=>{"use strict";var n=i(16830),o=i(92896),s=i(24314),r=i(29102),a=i(37181),l=i(94565);class d extends a.t8{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:r.u.writable,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){return o.L.deleteWordPartLeft(e)||new s.e(1,1,1,1)}}class c extends a.t8{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:r.u.writable,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=o.L.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),r=e.model.getLineMaxColumn(n);return new s.e(n,r,n,r)}}class h extends a.IA{_move(e,t,i,n){return o.L.moveWordPartLeft(e,t,i)}}l.P.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft"),l.P.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class u extends a.IA{_move(e,t,i,n){return o.L.moveWordPartRight(e,t,i)}}(0,n.fK)(new d),(0,n.fK)(new c),(0,n.fK)(new class extends h{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}),(0,n.fK)(new class extends h{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}),(0,n.fK)(new class extends u{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}),(0,n.fK)(new class extends u{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}})},41321:(e,t,i)=>{"use strict";var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),c=i.n(d),h=i(19216),u=i.n(h),g=i(44589),p=i.n(g),m=i(21556),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var v=i(65321),_=i(5976),b=i(16830),w=i(1432);class y extends _.JT{constructor(e){super(),this.editor=e,this.widget=null,w.gn&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(91);!this.widget&&e?this.widget=new C(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}y.ID="editor.contrib.iPadShowKeyboard";class C extends _.JT{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(v.nm(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(v.nm(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return C.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}C.ID="editor.contrib.ShowKeyboardWidget",(0,b._K)(y.ID,y,3)},95733:(e,t,i)=>{"use strict";var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),c=i.n(d),h=i(19216),u=i.n(h),g=i(44589),p=i.n(g),m=i(75189),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var v,_=i(65321),b=i(41264),w=i(5976),y=i(16830),C=i(96887),S=i(45797),x=i(276),k=i(72042),L=i(44156),N=i(20913),D=function(e,t){return function(i,n){t(i,n,e)}};let E=v=class extends w.JT{static get(e){return e.getContribution(v.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(C.RW.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new T(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};E.ID="editor.contrib.inspectTokens",E=v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([D(1,L.Z),D(2,k.O)],E);class I extends y.R6{constructor(){super({id:"editor.action.inspectTokens",label:N.ug.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=E.get(t);null==i||i.launch()}}class T extends w.JT{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=function(e,t){const i=C.RW.get(t);if(i)return i;const n=e.encodeLanguageId(t);return{getInitialState:()=>x.TJ,tokenize:(e,i,n)=>(0,x.Ri)(t,n),tokenizeEncoded:(e,t,i)=>(0,x.Dy)(n,i)}}(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return T._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let n=t.tokens1.length-1;n>=0;n--){const o=t.tokens1[n];if(e.column-1>=o.offset){i=n;break}}let n=0;for(let i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){n=i;break}const o=this._model.getLineContent(e.lineNumber);let s="";if(i{"use strict";var n=i(89872),o=i(90725),s=i(20913),r=i(11640),a=i(21212),l=i(9488),d=i(98401),c=i(63580);function h(e,t){return t&&(e.stack||e.stacktrace)?c.NC("stackTrace.format","{0}: {1}",g(e),u(e.stack)||u(e.stacktrace)):g(e)}function u(e){return Array.isArray(e)?e.join("\n"):e}function g(e){return"ERR_UNC_HOST_NOT_ALLOWED"===e.code?`${e.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?c.NC("nodeExceptionMessage","A system error occurred ({0})",e.message):e.message||c.NC("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function p(e=null,t=!1){if(!e)return c.NC("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){const i=l.kX(e),n=p(i[0],t);return i.length>1?c.NC("error.moreErrors","{0} ({1} errors in total)",n,i.length):n}if(d.HD(e))return e;if(e.detail){const i=e.detail;if(i.error)return h(i.error,t);if(i.exception)return h(i.exception,t)}return e.stack?h(e,t):e.message?e.message:c.NC("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var m=i(17301),f=i(13707),v=i(88289),_=i(5976),b=i(43702);class w{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),n=new Map,o=[];for(const[e,s]of this.documents){if(t.isCancellationRequested)return[];for(const t of s.chunks){const s=this.computeSimilarityScore(t,i,n);s>0&&o.push({key:e,score:s})}}return o}static termFrequencies(e){return function(e){var t;const i=new Map;for(const n of e)i.set(n,(null!==(t=i.get(n))&&void 0!==t?t:0)+1);return i}(w.splitTerms(e))}static*splitTerms(e){const t=e=>e.toLowerCase();for(const[i]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(i);const e=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(e.length>1)for(const i of e)i.length>2&&/\p{Letter}{3,}/gu.test(i)&&(yield t(i))}}updateDocuments(e){var t;for(const{key:t}of e)this.deleteDocument(t);for(const i of e){const e=[];for(const n of i.textChunks){const i=w.termFrequencies(n);for(const e of i.keys())this.chunkOccurrences.set(e,(null!==(t=this.chunkOccurrences.get(e))&&void 0!==t?t:0)+1);e.push({text:n,tf:i})}this.chunkCount+=e.length,this.documents.set(i.key,{chunks:e})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const e of t.chunks)for(const t of e.tf.keys()){const e=this.chunkOccurrences.get(t);if("number"==typeof e){const i=e-1;i<=0?this.chunkOccurrences.delete(t):this.chunkOccurrences.set(t,i)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[o,s]of Object.entries(t)){const t=e.tf.get(o);if(!t)continue;let r=i.get(o);"number"!=typeof r&&(r=this.computeIdf(o),i.set(o,r)),n+=t*r*s}return n}computeEmbedding(e){const t=w.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){var t;const i=null!==(t=this.chunkOccurrences.get(e))&&void 0!==t?t:0;return i>0?Math.log((this.chunkCount+1)/i):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const e=this.computeIdf(i);e>0&&(t[i]=n*e)}return t}}var y,C=i(94565),S=i(33108),x=i(28820),k=i(72065),L=i(91847),N=i(15393),D=i(71050);function E(e){const t=e;return Array.isArray(t.items)}function I(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(y||(y={}));class T extends _.JT{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){var n;const o=new _.SL;let s;e.canAcceptInBackground=!!(null===(n=this.options)||void 0===n?void 0:n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const r=o.add(new _.XK),a=async()=>{var n;const o=r.value=new _.SL;null==s||s.dispose(!0),e.busy=!1,s=new D.A(t);const a=s.token;let l=e.value.substring(this.prefix.length);(null===(n=this.options)||void 0===n?void 0:n.shouldSkipTrimPickFilter)||(l=l.trim());const c=this._getPicks(l,o,a,i),h=(t,i)=>{var n;let o,s;if(E(t)?(o=t.items,s=t.active):o=t,0===o.length){if(i)return!1;(l.length>0||e.hideInput)&&(null===(n=this.options)||void 0===n?void 0:n.noResultsPick)&&(o=(0,d.mf)(this.options.noResultsPick)?[this.options.noResultsPick(l)]:[this.options.noResultsPick])}return e.items=o,s&&(e.activeItems=[s]),!0},u=async t=>{let i=!1,n=!1;await Promise.all([(async()=>{"number"==typeof t.mergeDelay&&(await(0,N.Vs)(t.mergeDelay),a.isCancellationRequested)||n||(i=h(t.picks,!0))})(),(async()=>{e.busy=!0;try{const n=await t.additionalPicks;if(a.isCancellationRequested)return;let o,s,r,l;if(E(t.picks)?(o=t.picks.items,s=t.picks.active):o=t.picks,E(n)?(r=n.items,l=n.active):r=n,r.length>0||!i){let t;if(!s&&!l){const i=e.activeItems[0];i&&-1!==o.indexOf(i)&&(t=i)}h({items:[...o,...r],active:s||l||t})}}finally{a.isCancellationRequested||(e.busy=!1),n=!0}})()])};if(null===c);else if(I(c))await u(c);else if(c instanceof Promise){e.busy=!0;try{const e=await c;if(a.isCancellationRequested)return;I(e)?await u(e):h(e)}finally{a.isCancellationRequested||(e.busy=!1)}}else h(c)};return o.add(e.onDidChangeValue((()=>a()))),a(),o.add(e.onDidAccept((t=>{const[i]=e.selectedItems;"function"==typeof(null==i?void 0:i.accept)&&(t.inBackground||e.hide(),i.accept(e.keyMods,t))}))),o.add(e.onDidTriggerItemButton((async({button:i,item:n})=>{var o,s;if("function"==typeof n.trigger){const r=null!==(s=null===(o=n.buttons)||void 0===o?void 0:o.indexOf(i))&&void 0!==s?s:-1;if(r>=0){const i=n.trigger(r,e.keyMods),o="number"==typeof i?i:await i;if(t.isCancellationRequested)return;switch(o){case y.NO_ACTION:break;case y.CLOSE_PICKER:e.hide();break;case y.REFRESH_PICKER:a();break;case y.REMOVE_ITEM:{const t=e.items.indexOf(n);if(-1!==t){const i=e.items.slice(),n=i.splice(t,1),o=e.activeItems.filter((e=>e!==n[0])),s=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,o&&(e.activeItems=o),e.keepScrollPosition=s}break}}}}}))),o}}var M,R,A=i(26904),P=i(10829),O=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},F=function(e,t){return function(i,n){t(i,n,e)}};let B=M=class extends T{constructor(e,t,i,n,o,s){super(M.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(W)),this.options=e}async _getPicks(e,t,i,n){var o,s,r,a;const l=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const d=(0,v.M)((()=>{const t=new w;return t.updateDocuments(l.map((e=>({key:e.commandId,textChunks:[this.getTfIdfChunk(e)]})))),function(e){var t,i;const n=e.slice(0);n.sort(((e,t)=>t.score-e.score));const o=null!==(i=null===(t=n[0])||void 0===t?void 0:t.score)&&void 0!==i?i:0;if(o>0)for(const e of n)e.score/=o;return n}(t.calculateScores(e,i)).filter((e=>e.score>M.TFIDF_THRESHOLD)).slice(0,M.TFIDF_MAX_RESULTS)})),h=[];for(const t of l){const n=null!==(o=M.WORD_FILTER(e,t.label))&&void 0!==o?o:void 0,r=t.commandAlias&&null!==(s=M.WORD_FILTER(e,t.commandAlias))&&void 0!==s?s:void 0;if(n||r)t.highlights={label:n,detail:this.options.showAlias?r:void 0},h.push(t);else if(e===t.commandId)h.push(t);else if(e.length>=3){const e=d();if(i.isCancellationRequested)return[];const n=e.find((e=>e.key===t.commandId));n&&(t.tfIdfScore=n.score,h.push(t))}}const u=new Map;for(const e of h){const t=u.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):u.set(e.label,e)}h.sort(((e,t)=>{if(e.tfIdfScore&&t.tfIdfScore)return e.tfIdfScore===t.tfIdfScore?e.label.localeCompare(t.label):t.tfIdfScore-e.tfIdfScore;if(e.tfIdfScore)return 1;if(t.tfIdfScore)return-1;const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);if(i&&n)return i>n?-1:1;if(i)return-1;if(n)return 1;if(this.options.suggestedCommandIds){const i=this.options.suggestedCommandIds.has(e.commandId),n=this.options.suggestedCommandIds.has(t.commandId);if(i&&n)return 0;if(i)return-1;if(n)return 1}return e.label.localeCompare(t.label)}));const g=[];let p=!1,m=!0,f=!!this.options.suggestedCommandIds;for(let e=0;e{var t;const o=await this.getAdditionalCommandPicks(l,h,e,i);if(i.isCancellationRequested)return[];const s=o.map((e=>this.toCommandPick(e,n)));return m&&"separator"!==(null===(t=s[0])||void 0===t?void 0:t.type)&&s.unshift({type:"separator",label:(0,c.NC)("suggested","similar commands")}),s})()}:g}toCommandPick(e,t){if("separator"===e.type)return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?(0,c.NC)("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{var i,n;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:null!==(i=null==t?void 0:t.from)&&void 0!==i?i:"quick open"});try{(null===(n=e.args)||void 0===n?void 0:n.length)?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(t){(0,m.n2)(t)||this.dialogService.error((0,c.NC)("canNotRun","Command '{0}' resulted in an error",e.label),p(t))}}}}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}};B.PREFIX=">",B.TFIDF_THRESHOLD=.5,B.TFIDF_MAX_RESULTS=5,B.WORD_FILTER=(0,f.or)(f.Ji,f.KZ,f.ir),B=M=O([F(1,k.TG),F(2,L.d),F(3,C.H),F(4,P.b),F(5,x.S)],B);let W=R=class extends _.JT{constructor(e,t){super(),this.storageService=e,this.configurationService=t,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===A.fk.SHUTDOWN&&this.saveState()})))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=R.getConfiguredCommandHistoryLength(this.configurationService),R.cache&&R.cache.limit!==this.configuredCommandsHistoryLength&&(R.cache.limit=this.configuredCommandsHistoryLength,R.hasChanges=!0))}load(){const e=this.storageService.get(R.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(e){}const i=R.cache=new b.z6(this.configuredCommandsHistoryLength,1);if(t){let e;e=t.usesLRU?t.entries:t.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>i.set(e.key,e.value)))}R.counter=this.storageService.getNumber(R.PREF_KEY_COUNTER,0,R.counter)}push(e){R.cache&&(R.cache.set(e,R.counter++),R.hasChanges=!0)}peek(e){var t;return null===(t=R.cache)||void 0===t?void 0:t.peek(e)}saveState(){if(!R.cache)return;if(!R.hasChanges)return;const e={usesLRU:!0,entries:[]};R.cache.forEach(((t,i)=>e.entries.push({key:i,value:t}))),this.storageService.store(R.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(R.PREF_KEY_COUNTER,R.counter,0,0),R.hasChanges=!1}static getConfiguredCommandHistoryLength(e){var t,i;const n=null===(i=null===(t=e.getValue().workbench)||void 0===t?void 0:t.commandPalette)||void 0===i?void 0:i.history;return"number"==typeof n?n:R.DEFAULT_COMMANDS_HISTORY_LENGTH}};W.DEFAULT_COMMANDS_HISTORY_LENGTH=50,W.PREF_KEY_CACHE="commandPalette.mru.cache",W.PREF_KEY_COUNTER="commandPalette.mru.counter",W.counter=1,W.hasChanges=!1,W=R=O([F(0,A.Uy),F(1,S.Ui)],W);class H extends B{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:(0,a.x$)(i.label)||i.id});return t}}var V=i(16830),z=i(29102),j=i(41157),U=function(e,t){return function(i,n){t(i,n,e)}};let q=class extends H{get activeTextEditorControl(){var e;return null!==(e=this.codeEditorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}constructor(e,t,i,n,o,s){super({showAlias:!1},e,i,n,o,s),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([U(0,k.TG),U(1,r.$),U(2,L.d),U(3,C.H),U(4,P.b),U(5,x.S)],q);class K extends V.R6{constructor(){super({id:K.ID,label:s.UX.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:z.u.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(j.eJ).quickAccess.show(q.PREFIX)}}K.ID="editor.action.quickCommand",(0,V.Qr)(K),n.B.as(o.IP.Quickaccess).registerQuickAccessProvider({ctor:q,prefix:q.PREFIX,helpEntries:[{description:s.UX.quickCommandHelp,commandId:K.ID}]})},43588:(e,t,i)=>{"use strict";var n=i(5976),o=i(65520),s=i(83943),r=i(63580);class a extends s.X{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=(0,r.NC)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,n.JT.None}provideWithTextEditor(e,t,i){const s=e.editor,r=new n.SL;r.add(t.onDidAccept((i=>{const[n]=t.selectedItems;if(n){if(!this.isValidLineNumber(s,n.lineNumber))return;this.gotoLocation(e,{range:this.toRange(n.lineNumber,n.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}})));const l=()=>{const e=this.parsePosition(s,t.value.trim().substr(a.PREFIX.length)),i=this.getPickLabel(s,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(s,e.lineNumber))return void this.clearDecorations(s);const n=this.toRange(e.lineNumber,e.column);s.revealRangeInCenter(n,0),this.addDecorations(s,n)};l(),r.add(t.onDidChangeValue((()=>l())));const d=(0,o.Pi)(s);return d&&2===d.getOptions().get(68).renderType&&(d.updateOptions({lineNumbers:"on"}),r.add((0,n.OF)((()=>d.updateOptions({lineNumbers:"relative"}))))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,r.NC)("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):(0,r.NC)("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?(0,r.NC)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,o):(0,r.NC)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const o={lineNumber:t,column:i};return n.validatePosition(o).equals(o)}lineCount(e){var t,i;return null!==(i=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==i?i:0}}a.PREFIX=":";var l=i(89872),d=i(90725),c=i(11640),h=i(20913),u=i(4669),g=i(16830),p=i(29102),m=i(41157);let f=class extends a{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=u.ju.None}get activeTextEditorControl(){var e;return null!==(e=this.editorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}};var v,_;f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(v=0,_=c.$,function(e,t){_(e,t,v)})],f);class b extends g.R6{constructor(){super({id:b.ID,label:h.qq.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:p.u.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(m.eJ).quickAccess.show(f.PREFIX)}}b.ID="editor.action.gotoLine",(0,g.Qr)(b),l.B.as(d.IP.Quickaccess).registerQuickAccessProvider({ctor:f,prefix:f.PREFIX,helpEntries:[{description:h.qq.gotoLineActionLabel,commandId:b.ID}]})},48766:(e,t,i)=>{"use strict";i(89899),i(22368);var n=i(15393),o=i(71050),s=i(73046),r=i(25670),a=i(13707),l=i(82663),d=i(1432),c=i(97295);const h=[void 0,[]];function u(e,t,i=0,n=0){const o=t;return o.values&&o.values.length>1?function(e,t,i,n){let o=0;const s=[];for(const r of t){const[t,a]=g(e,r,i,n);if("number"!=typeof t)return h;o+=t,s.push(...a)}return[o,p(s)]}(e,o.values,i,n):g(e,t,i,n)}function g(e,t,i,n){const o=(0,a.EW)(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return o?[o[0],(0,a.mB)(o)]:h}function p(e){const t=e.sort(((e,t)=>e.start-t.start)),i=[];let n;for(const e of t)!n||(s=e,(o=n).end=0,r=m(e);let a;const d=e.split(f);if(d.length>1)for(const e of d){const t=m(e),{pathNormalized:i,normalized:n,normalizedLowercase:o}=_(e);n&&(a||(a=[]),a.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:i,normalized:n,normalizedLowercase:o,expectContiguousMatch:t}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:o,values:a,containsPathSeparator:s,expectContiguousMatch:r}}function _(e){let t;t=d.ED?e.replace(/\//g,l.ir):e.replace(/\\/g,l.ir);const i=(0,c.R1)(t).replace(/\s|"/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function b(e){return Array.isArray(e)?v(e.map((e=>e.original)).join(f)):v(e.original)}var w,y=i(5976),C=i(24314),S=i(96887),x=i(30335),k=i(83943),L=i(63580),N=i(71922),D=i(35534),E=function(e,t){return function(i,n){t(i,n,e)}};let I=w=class extends k.X{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,(0,L.NC)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),y.JT.None}provideWithTextEditor(e,t,i){const n=e.editor,o=this.getModel(n);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,i):this.doProvideWithoutEditorSymbols(e,o,t,i):y.JT.None}doProvideWithoutEditorSymbols(e,t,i,n){const o=new y.SL;return this.provideLabelPick(i,(0,L.NC)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>{await this.waitForLanguageSymbolRegistry(t,o)&&!n.isCancellationRequested&&o.add(this.doProvideWithEditorSymbols(e,t,i,n))})(),o}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 n.CR,o=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(o.dispose(),i.complete(!0))})));return t.add((0,y.OF)((()=>i.complete(!1)))),i.p}doProvideWithEditorSymbols(e,t,i,n){var s;const r=e.editor,a=new y.SL;a.add(i.onDidAccept((t=>{const[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),t.inBackground||i.hide())}))),a.add(i.onDidTriggerItemButton((({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())})));const l=this.getDocumentSymbols(t,n);let d;const c=async e=>{null==d||d.dispose(!0),i.busy=!1,d=new o.A(n),i.busy=!0;try{const t=v(i.value.substr(w.PREFIX.length).trim()),o=await this.doGetSymbolPicks(l,t,void 0,d.token);if(n.isCancellationRequested)return;if(o.length>0){if(i.items=o,e&&0===t.original.length){const t=(0,D.dF)(o,(t=>Boolean("separator"!==t.type&&t.range&&C.e.containsPosition(t.range.decoration,e))));t&&(i.activeItems=[t])}}else t.original.length>0?this.provideLabelPick(i,(0,L.NC)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,(0,L.NC)("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return a.add(i.onDidChangeValue((()=>c(void 0)))),c(null===(s=r.getSelection())||void 0===s?void 0:s.getPosition()),a.add(i.onDidChangeActive((()=>{const[e]=i.activeItems;e&&e.range&&(r.revealRangeInCenter(e.range.selection,0),this.addDecorations(r,e.range.decoration))}))),a}async doGetSymbolPicks(e,t,i,n){var o,a;const l=await e;if(n.isCancellationRequested)return[];const d=0===t.original.indexOf(w.SCOPE_PREFIX),h=d?1:0;let g,p,m;t.values&&t.values.length>1?(g=b(t.values[0]),p=b(t.values.slice(1))):g=t;const f=null===(a=null===(o=this.options)||void 0===o?void 0:o.openSideBySideDirection)||void 0===a?void 0:a.call(o);f&&(m=[{iconClass:"right"===f?r.k.asClassName(s.l.splitHorizontal):r.k.asClassName(s.l.splitVertical),tooltip:"right"===f?(0,L.NC)("openToSide","Open to the Side"):(0,L.NC)("openToBottom","Open to the Bottom")}]);const v=[];for(let x=0;xh){let B=!1;if(g!==t&&([I,R]=u(D,{...t,values:void 0},h,E),"number"==typeof I&&(B=!0)),"number"!=typeof I&&([I,R]=u(D,g,h,E),"number"!=typeof I))continue;if(!B&&p){if(O&&p.original.length>0&&([A,P]=u(O,p)),"number"!=typeof A)continue;"number"==typeof I&&(I+=A)}}const F=k.tags&&k.tags.indexOf(1)>=0;v.push({index:x,kind:k.kind,score:I,label:D,ariaLabel:(0,S.R4)(k.name,k.kind),description:O,highlights:F?void 0:{label:R,description:P},range:{selection:C.e.collapseToStart(k.selectionRange),decoration:k.range},strikethrough:F,buttons:m})}const _=v.sort(((e,t)=>d?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let y=[];if(d){let W,H,V=0;function z(){H&&"number"==typeof W&&V>0&&(H.label=(0,c.WU)(M[W]||T,V))}for(const j of _)W!==j.kind?(z(),W=j.kind,V=1,H={type:"separator"},y.push(H)):V++,y.push(j);z()}else _.length>0&&(y=[{label:(0,L.NC)("symbols","symbols ({0})",v.length),type:"separator"},..._]);return y}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=M[e.kind]||T,n=M[t.kind]||T,o=i.localeCompare(n);return 0===o?this.compareByScore(e,t):o}async getDocumentSymbols(e,t){const i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}};I.PREFIX="@",I.SCOPE_PREFIX=":",I.PREFIX_BY_CATEGORY=`${w.PREFIX}${w.SCOPE_PREFIX}`,I=w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([E(0,N.p),E(1,x.Je)],I);const T=(0,L.NC)("property","properties ({0})"),M={5:(0,L.NC)("method","methods ({0})"),11:(0,L.NC)("function","functions ({0})"),8:(0,L.NC)("_constructor","constructors ({0})"),12:(0,L.NC)("variable","variables ({0})"),4:(0,L.NC)("class","classes ({0})"),22:(0,L.NC)("struct","structs ({0})"),23:(0,L.NC)("event","events ({0})"),24:(0,L.NC)("operator","operators ({0})"),10:(0,L.NC)("interface","interfaces ({0})"),2:(0,L.NC)("namespace","namespaces ({0})"),3:(0,L.NC)("package","packages ({0})"),25:(0,L.NC)("typeParameter","type parameters ({0})"),1:(0,L.NC)("modules","modules ({0})"),6:(0,L.NC)("property","properties ({0})"),9:(0,L.NC)("enum","enumerations ({0})"),21:(0,L.NC)("enumMember","enumeration members ({0})"),14:(0,L.NC)("string","strings ({0})"),0:(0,L.NC)("file","files ({0})"),17:(0,L.NC)("array","arrays ({0})"),15:(0,L.NC)("number","numbers ({0})"),16:(0,L.NC)("boolean","booleans ({0})"),18:(0,L.NC)("object","objects ({0})"),19:(0,L.NC)("key","keys ({0})"),7:(0,L.NC)("field","fields ({0})"),13:(0,L.NC)("constant","constants ({0})")};var R=i(89872),A=i(90725),P=i(11640),O=i(20913),F=i(4669),B=i(16830),W=i(29102),H=i(41157),V=function(e,t){return function(i,n){t(i,n,e)}};let z=class extends I{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=F.ju.None}get activeTextEditorControl(){var e;return null!==(e=this.editorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}};z=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([V(0,P.$),V(1,N.p),V(2,x.Je)],z);class j extends B.R6{constructor(){super({id:j.ID,label:O.aq.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:W.u.hasDocumentSymbolProvider,kbOpts:{kbExpr:W.u.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(H.eJ).quickAccess.show(I.PREFIX,{itemActivation:H.jG.NONE})}}j.ID="editor.action.quickOutline",(0,B.Qr)(j),R.B.as(A.IP.Quickaccess).registerQuickAccessProvider({ctor:z,prefix:I.PREFIX,helpEntries:[{description:O.aq.quickOutlineActionLabel,prefix:I.PREFIX,commandId:j.ID},{description:O.aq.quickOutlineByCategoryActionLabel,prefix:I.PREFIX_BY_CATEGORY}]})},78944:(e,t,i)=>{"use strict";var n,o=i(89872),s=i(90725),r=i(20913),a=i(63580),l=i(5976),d=i(91847),c=i(41157),h=function(e,t){return function(i,n){t(i,n,e)}};let u=n=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=o.B.as(s.IP.Quickaccess)}provide(e){const t=new l.SL;return t.add(e.onDidAccept((()=>{const[t]=e.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),t.add(e.onDidChangeValue((e=>{const t=this.registry.getQuickAccessProvider(e.substr(n.PREFIX.length));t&&t.prefix&&t.prefix!==n.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),e.items=this.getQuickAccessProviders().filter((e=>e.prefix!==n.PREFIX)),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))).flatMap((e=>this.createPicks(e)))}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:(0,a.NC)("helpPickAriaLabel","{0}, {1}",n,t.description),description:t.description}}))}};u.PREFIX="?",u=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([h(0,c.eJ),h(1,d.d)],u),o.B.as(s.IP.Quickaccess).registerQuickAccessProvider({ctor:u,prefix:"",helpEntries:[{description:r.ld.helpQuickAccessActionLabel}]})},45048:(e,t,i)=>{"use strict";var n=i(16830),o=i(11640),s=i(88802),r=i(33108),a=i(93983),l=i(72065),d=i(59422),c=i(26904),h=function(e,t){return function(i,n){t(i,n,e)}};let u=class extends s.J{constructor(e,t,i,n,o,s,r){super(!0,e,t,i,n,o,s,r)}};u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([h(1,a.i6),h(2,o.$),h(3,d.lT),h(4,l.TG),h(5,c.Uy),h(6,r.Ui)],u),(0,n._K)(s.J.ID,u,4)},58763:(e,t,i)=>{"use strict";i.d(t,{kR:()=>M,MU:()=>R,nI:()=>H,rW:()=>T,TG:()=>I});var n=i(65321),o=i(16268),s=i(41264),r=i(4669),a=i(96887),l=i(45797);class d{constructor(e,t,i,n,o){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=o}}const c=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class h{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(c);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=s.Il.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class u{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];const t=[];let i=0;for(let n=0,o=e.length;n{const i=function(e,t){return et?1:0}(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",o="ffffff";for(;e.length>=1&&""===e[0].token;){const t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(o=t.background)}const s=new h;for(const e of t)s.getId(e);const r=s.getId(n),a=s.getId(o),l=new p(i,r,a),d=new m(l);for(let t=0,i=e.length;t>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const g=/\b(comment|string|regex|regexp)\b/;class p{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 p(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class m{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;-1===t?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const o=this._children.get(i);return void 0!==o?o.match(n):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);const o=e.indexOf(".");let s,r;-1===o?(s=e,r=""):(s=e.substring(0,o),r=e.substring(o+1));let a=this._children.get(s);void 0===a&&(a=new m(this._mainRule.clone()),this._children.set(s,a)),a.insert(r,t,i,n)}}var f=i(8625),v=i(73910);const _={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:{[v.cvW]:"#FFFFFE",[v.NOs]:"#000000",[v.ES4]:"#E5EBF1",[f.gS]:"#D3D3D3",[f.qe]:"#939393",[v.Rzx]:"#ADD6FF4D"}},b={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:{[v.cvW]:"#1E1E1E",[v.NOs]:"#D4D4D4",[v.ES4]:"#3A3D41",[f.gS]:"#404040",[f.qe]:"#707070",[v.Rzx]:"#ADD6FF26"}},w={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:{[v.cvW]:"#000000",[v.NOs]:"#FFFFFF",[f.gS]:"#FFFFFF",[f.qe]:"#FFFFFF"}},y={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:{[v.cvW]:"#FFFFFF",[v.NOs]:"#292929",[f.gS]:"#292929",[f.qe]:"#292929"}};var C=i(89872),S=i(97781),x=i(5976),k=i(92321),L=i(25670),N=i(59554);class D{getIcon(e){const t=(0,N.Ks)();let i=e.defaults;for(;L.k.isThemeIcon(i);){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}var E=i(48906);const I="vs",T="vs-dark",M="hc-black",R="hc-light",A=C.B.as(v.IPX.ColorContribution),P=C.B.as(S.IP.ThemingContribution);class O{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(F(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,s.Il.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=B(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,s.Il.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){return this.getColors().get(e)||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=A.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case I:return k.eL.LIGHT;case M:return k.eL.HIGH_CONTRAST_DARK;case R:return k.eL.HIGH_CONTRAST_LIGHT;default:return k.eL.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const i=B(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=u.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=l.N.getForeground(n),s=l.N.getFontStyle(n);return{foreground:o,italic:Boolean(1&s),bold:Boolean(2&s),underline:Boolean(4&s),strikethrough:Boolean(8&s)}}}function F(e){return e===I||e===T||e===M||e===R}function B(e){switch(e){case I:return _;case T:return b;case M:return w;case R:return y}}function W(e){const t=B(e);return new O(e,t)}class H extends x.JT{constructor(){super(),this._onColorThemeChange=this._register(new r.Q5),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new r.Q5),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new D,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(I,W(I)),this._knownThemes.set(T,W(T)),this._knownThemes.set(M,W(M)),this._knownThemes.set(R,W(R));const e=this._register(function(e){const t=new x.SL,i=t.add(new r.Q5),o=(0,N.Ks)();return t.add(o.onDidChange((()=>i.fire()))),e&&t.add(e.onDidProductIconThemeChange((()=>i.fire()))),{dispose:()=>t.dispose(),onDidChange:i.event,getCSS(){const t=e?e.getProductIconTheme():new D,i={},s=e=>{const o=t.getIcon(e);if(!o)return;const s=o.font;return s?(i[s.id]=s.definition,`.codicon-${e.id}:before { content: '${o.fontCharacter}'; font-family: ${(0,n._h)(s.id)}; }`):`.codicon-${e.id}:before { content: '${o.fontCharacter}'; }`},r=[];for(const e of o.getIcons()){const t=s(e);t&&r.push(t)}for(const e in i){const t=i[e],o=t.weight?`font-weight: ${t.weight};`:"",s=t.style?`font-style: ${t.style};`:"",a=t.src.map((e=>`${(0,n.wY)(e.location)} format('${e.format}')`)).join(", ");r.push(`@font-face { src: ${a}; font-family: ${(0,n._h)(e)};${o}${s} font-display: block; }`)}return r.join("\n")}}}(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(I),this._onOSSchemeChanged(),this._register(e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}))),(0,o.uB)(E.Ex,"(forced-colors: active)",(()=>{this._onOSSchemeChanged()}))}registerEditorContainer(e){return n.OO(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=n.dS(void 0,(e=>{e.className="monaco-colors",e.textContent=this._allCSS})),this._styleElements.push(this._globalStyleElement)),x.JT.None}_registerShadowDomContainer(e){const t=n.dS(e,(e=>{e.className="monaco-colors",e.textContent=this._allCSS}));return this._styleElements.push(t),{dispose:()=>{for(let e=0;e{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(I),this._updateActualTheme(t)}_updateActualTheme(e){e&&this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=E.Ex.matchMedia("(forced-colors: active)").matches;if(e!==(0,k.c3)(this._theme.type)){let t;t=(0,k._T)(this._theme.type)?e?M:T:e?R:I,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};P.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=[];for(const e of A.getColors()){const t=this._theme.getColor(e.id,!0);t&&n.push(`${(0,v.QO2)(e.id)}: ${t.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join("\n")} }`);const o=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){const t=[];for(let i=1,n=e.length;ie.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}},15662:(e,t,i)=>{"use strict";var n=i(16830),o=i(44156),s=i(20913),r=i(92321),a=i(58763);class l extends n.R6{constructor(){super({id:"editor.action.toggleHighContrast",label:s.xi.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(o.Z),n=i.getColorTheme();(0,r.c3)(n.type)?(i.setTheme(this._originalThemeName||((0,r._T)(n.type)?a.rW:a.TG)),this._originalThemeName=null):(i.setTheme((0,r._T)(n.type)?a.kR:a.MU),this._originalThemeName=n.themeName)}}(0,n.Qr)(l)},44156:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});const n=(0,i(72065).yh)("themeService")},40605:(e,t,i)=>{"use strict";var n=i(36566),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},d={};l(d,n,"default");var c=class{constructor(e,t,i){this._onDidChange=new d.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},h={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},u={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},g=new c("css",h,u),p=new c("scss",h,u),m=new c("less",h,u);function f(){return i.e(5288).then(i.bind(i,45288))}d.languages.css={cssDefaults:g,lessDefaults:m,scssDefaults:p},d.languages.onLanguage("less",(()=>{f().then((e=>e.setupMode(m)))})),d.languages.onLanguage("scss",(()=>{f().then((e=>e.setupMode(p)))})),d.languages.onLanguage("css",(()=>{f().then((e=>e.setupMode(g)))}))},68423:(e,t,i)=>{"use strict";var n=i(36566),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},d={};l(d,n,"default");var c=class{constructor(e,t,i){this._onDidChange=new d.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},h={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},suggest:{},data:{useDefaultDataProvider:!0}};function u(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===g,documentFormattingEdits:e===g,documentRangeFormattingEdits:e===g}}var g="html",p="handlebars",m="razor",f=C(g,h,u(g)),v=f.defaults,_=C(p,h,u(p)),b=_.defaults,w=C(m,h,u(m)),y=w.defaults;function C(e,t=h,n=u(e)){const o=new c(e,t,n);let s;const r=d.languages.onLanguage(e,(async()=>{s=(await i.e(5377).then(i.bind(i,15377))).setupMode(o)}));return{defaults:o,dispose(){r.dispose(),s?.dispose(),s=void 0}}}d.languages.html={htmlDefaults:v,razorDefaults:y,handlebarDefaults:b,htmlLanguageService:f,handlebarLanguageService:_,razorLanguageService:w,registerHTMLLanguageService:C}},72323:(e,t,i)=>{"use strict";var n=i(36566),o=new class{constructor(e,t,i){this._onDidChange=new n.Emitter,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});function s(){return i.e(665).then(i.bind(i,90665))}n.languages.json={jsonDefaults:o,getWorker:()=>s().then((e=>e.getWorker()))},n.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),n.languages.onLanguage("json",(()=>{s().then((e=>e.setupMode(o)))}))},39585:(e,t,i)=>{"use strict";i.d(t,{TG:()=>v});var n=i(36566),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},d={};l(d,n,"default");var c=(e=>(e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext",e))(c||{}),h=(e=>(e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev",e))(h||{}),u=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(u||{}),g=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(g||{}),p=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e))(p||{}),m=class{constructor(e,t,i,n,o){this._onDidChange=new d.Emitter,this._onDidExtraLibsChange=new d.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(o),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(i=void 0===t?`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let e=this._extraLibs[i];e&&e.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const e=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=t.content;let n=1;this._removedExtraLibs[e]&&(n=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){-1===this._onDidExtraLibsChangeTimeout&&(this._onDidExtraLibsChangeTimeout=window.setTimeout((()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)}),0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},f={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},v=new m({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},f),_=new m({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},f);function b(){return i.e(8401).then(i.bind(i,78401))}d.languages.typescript={ModuleKind:c,JsxEmit:h,NewLineKind:u,ScriptTarget:g,ModuleResolutionKind:p,typescriptVersion:"5.0.2",typescriptDefaults:v,javascriptDefaults:_,getTypeScriptWorker:()=>b().then((e=>e.getTypeScriptWorker())),getJavaScriptWorker:()=>b().then((e=>e.getJavaScriptWorker()))},d.languages.onLanguage("typescript",(()=>b().then((e=>e.setupTypeScript(v))))),d.languages.onLanguage("javascript",(()=>b().then((e=>e.setupJavaScript(_)))))},63580:(e,t,i)=>{"use strict";i.d(t,{NC:()=>s,aj:()=>a,vv:()=>r});let n="undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function o(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,i)=>{const n=i[0],o=t[n];let s=e;return"string"==typeof o?s=o:"number"!=typeof o&&"boolean"!=typeof o&&null!=o||(s=String(o)),s})),n&&(i="["+i.replace(/[aouei]/g,"$&$&")+"]"),i}function s(e,t,...i){return o(t,i)}function r(e,t,...i){const n=o(t,i);return{value:n,original:n}}function a(e){}},31106:(e,t,i)=>{"use strict";i.d(t,{F:()=>o,U:()=>s});var n=i(93983);const o=(0,i(72065).yh)("accessibilityService"),s=new n.uy("accessibilityModeEnabled",!1)},38832:(e,t,i)=>{"use strict";i.d(t,{IV:()=>s,iP:()=>l});var n=i(72065),o=i(63580);const s=(0,n.yh)("accessibilitySignalService");class r{static register(e){return new r(e.fileName)}constructor(e){this.fileName=e}}r.error=r.register({fileName:"error.mp3"}),r.warning=r.register({fileName:"warning.mp3"}),r.foldedArea=r.register({fileName:"foldedAreas.mp3"}),r.break=r.register({fileName:"break.mp3"}),r.quickFixes=r.register({fileName:"quickFixes.mp3"}),r.taskCompleted=r.register({fileName:"taskCompleted.mp3"}),r.taskFailed=r.register({fileName:"taskFailed.mp3"}),r.terminalBell=r.register({fileName:"terminalBell.mp3"}),r.diffLineInserted=r.register({fileName:"diffLineInserted.mp3"}),r.diffLineDeleted=r.register({fileName:"diffLineDeleted.mp3"}),r.diffLineModified=r.register({fileName:"diffLineModified.mp3"}),r.chatRequestSent=r.register({fileName:"chatRequestSent.mp3"}),r.chatResponsePending=r.register({fileName:"chatResponsePending.mp3"}),r.chatResponseReceived1=r.register({fileName:"chatResponseReceived1.mp3"}),r.chatResponseReceived2=r.register({fileName:"chatResponseReceived2.mp3"}),r.chatResponseReceived3=r.register({fileName:"chatResponseReceived3.mp3"}),r.chatResponseReceived4=r.register({fileName:"chatResponseReceived4.mp3"}),r.clear=r.register({fileName:"clear.mp3"}),r.save=r.register({fileName:"save.mp3"}),r.format=r.register({fileName:"format.mp3"});class a{constructor(e){this.randomOneOf=e}}class l{static register(e){const t=new a("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new l(t,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage);return l._signals.add(i),i}constructor(e,t,i,n,o,s){this.sound=e,this.name=t,this.legacySoundSettingsKey=i,this.settingsKey=n,this.legacyAnnouncementSettingsKey=o,this.announcementMessage=s}}l._signals=new Set,l.error=l.register({name:(0,o.NC)("accessibilitySignals.lineHasError.name","Error on Line"),sound:r.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:(0,o.NC)("accessibility.signals.lineHasError","Error"),settingsKey:"accessibility.signals.lineHasError"}),l.warning=l.register({name:(0,o.NC)("accessibilitySignals.lineHasWarning.name","Warning on Line"),sound:r.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:(0,o.NC)("accessibility.signals.lineHasWarning","Warning"),settingsKey:"accessibility.signals.lineHasWarning"}),l.foldedArea=l.register({name:(0,o.NC)("accessibilitySignals.lineHasFoldedArea.name","Folded Area on Line"),sound:r.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:(0,o.NC)("accessibility.signals.lineHasFoldedArea","Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"}),l.break=l.register({name:(0,o.NC)("accessibilitySignals.lineHasBreakpoint.name","Breakpoint on Line"),sound:r.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:(0,o.NC)("accessibility.signals.lineHasBreakpoint","Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"}),l.inlineSuggestion=l.register({name:(0,o.NC)("accessibilitySignals.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:r.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"}),l.terminalQuickFix=l.register({name:(0,o.NC)("accessibilitySignals.terminalQuickFix.name","Terminal Quick Fix"),sound:r.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:(0,o.NC)("accessibility.signals.terminalQuickFix","Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"}),l.onDebugBreak=l.register({name:(0,o.NC)("accessibilitySignals.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:r.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:(0,o.NC)("accessibility.signals.onDebugBreak","Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"}),l.noInlayHints=l.register({name:(0,o.NC)("accessibilitySignals.noInlayHints","No Inlay Hints on Line"),sound:r.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:(0,o.NC)("accessibility.signals.noInlayHints","No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"}),l.taskCompleted=l.register({name:(0,o.NC)("accessibilitySignals.taskCompleted","Task Completed"),sound:r.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:(0,o.NC)("accessibility.signals.taskCompleted","Task Completed"),settingsKey:"accessibility.signals.taskCompleted"}),l.taskFailed=l.register({name:(0,o.NC)("accessibilitySignals.taskFailed","Task Failed"),sound:r.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:(0,o.NC)("accessibility.signals.taskFailed","Task Failed"),settingsKey:"accessibility.signals.taskFailed"}),l.terminalCommandFailed=l.register({name:(0,o.NC)("accessibilitySignals.terminalCommandFailed","Terminal Command Failed"),sound:r.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:(0,o.NC)("accessibility.signals.terminalCommandFailed","Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"}),l.terminalBell=l.register({name:(0,o.NC)("accessibilitySignals.terminalBell","Terminal Bell"),sound:r.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:(0,o.NC)("accessibility.signals.terminalBell","Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"}),l.notebookCellCompleted=l.register({name:(0,o.NC)("accessibilitySignals.notebookCellCompleted","Notebook Cell Completed"),sound:r.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:(0,o.NC)("accessibility.signals.notebookCellCompleted","Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"}),l.notebookCellFailed=l.register({name:(0,o.NC)("accessibilitySignals.notebookCellFailed","Notebook Cell Failed"),sound:r.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:(0,o.NC)("accessibility.signals.notebookCellFailed","Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"}),l.diffLineInserted=l.register({name:(0,o.NC)("accessibilitySignals.diffLineInserted","Diff Line Inserted"),sound:r.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"}),l.diffLineDeleted=l.register({name:(0,o.NC)("accessibilitySignals.diffLineDeleted","Diff Line Deleted"),sound:r.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"}),l.diffLineModified=l.register({name:(0,o.NC)("accessibilitySignals.diffLineModified","Diff Line Modified"),sound:r.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"}),l.chatRequestSent=l.register({name:(0,o.NC)("accessibilitySignals.chatRequestSent","Chat Request Sent"),sound:r.chatRequestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:(0,o.NC)("accessibility.signals.chatRequestSent","Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"}),l.chatResponseReceived=l.register({name:(0,o.NC)("accessibilitySignals.chatResponseReceived","Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[r.chatResponseReceived1,r.chatResponseReceived2,r.chatResponseReceived3,r.chatResponseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"}),l.chatResponsePending=l.register({name:(0,o.NC)("accessibilitySignals.chatResponsePending","Chat Response Pending"),sound:r.chatResponsePending,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.chatResponsePending",announcementMessage:(0,o.NC)("accessibility.signals.chatResponsePending","Chat Response Pending"),settingsKey:"accessibility.signals.chatResponsePending"}),l.clear=l.register({name:(0,o.NC)("accessibilitySignals.clear","Clear"),sound:r.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:(0,o.NC)("accessibility.signals.clear","Clear"),settingsKey:"accessibility.signals.clear"}),l.save=l.register({name:(0,o.NC)("accessibilitySignals.save","Save"),sound:r.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:(0,o.NC)("accessibility.signals.save","Save"),settingsKey:"accessibility.signals.save"}),l.format=l.register({name:(0,o.NC)("accessibilitySignals.format","Format"),sound:r.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:(0,o.NC)("accessibility.signals.format","Format"),settingsKey:"accessibility.signals.format"})},44691:(e,t,i)=>{"use strict";i.d(t,{Mm:()=>q,Id:()=>Z,vr:()=>j,LJ:()=>z});var n=i(65321),o=i(59069),s=i(10244),r=i(98324),a=i(74741),l=i(8030),d=i(5976),c=i(1432),h=i(93379),u=i.n(h),g=i(7795),p=i.n(g),m=i(90569),f=i.n(m),v=i(3565),_=i.n(v),b=i(19216),w=i.n(b),y=i(44589),C=i.n(y),S=i(51854),x={};x.styleTagTransform=C(),x.setAttributes=_(),x.insert=f().bind(null,"head"),x.domAPI=p(),x.insertStyleElement=w(),u()(S.Z,x),S.Z&&S.Z.locals&&S.Z.locals;var k=i(63580),L=i(84144),N=i(93983),D=i(5606),E=i(72065),I=i(91847),T=i(59422),M=i(26904),R=i(97781),A=i(25670),P=i(92321),O=i(98401),F=i(73910),B=i(86253),W=i(31106),H=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},V=function(e,t){return function(i,n){t(i,n,e)}};function z(e,t,i,o){const s=e.getActions(t),r=n._q.getInstance();U(s,i,r.keyStatus.altKey||(c.ED||c.IJ)&&r.keyStatus.shiftKey,o?e=>e===o:e=>"navigation"===e)}function j(e,t,i,n,o,s){U(e.getActions(t),i,!1,"string"==typeof n?e=>e===n:n,o,s)}function U(e,t,i,n=(e=>"navigation"===e),o=(()=>!1),s=!1){let r,l;Array.isArray(t)?(r=t,l=t):(r=t.primary,l=t.secondary);const d=new Set;for(const[t,o]of e){let e;n(t)?(e=r,e.length>0&&s&&e.push(new a.Z0)):(e=l,e.length>0&&e.push(new a.Z0));for(let n of o){i&&(n=n instanceof L.U8&&n.alt?n.alt:n);const o=e.push(n);n instanceof a.wY&&d.add({group:t,action:n,index:o-1})}}for(const{group:e,action:t,index:i}of d){const s=n(e)?r:l,a=t.actions;o(t,e,s.length)&&s.splice(i,1,...a)}}let q=class extends s.gU{constructor(e,t,i,o,s,r,a,l){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:null==t?void 0:t.draggable,keybinding:null==t?void 0:t.keybinding,hoverDelegate:null==t?void 0:t.hoverDelegate}),this._keybindingService=i,this._notificationService=o,this._contextKeyService=s,this._themeService=r,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new d.XK),this._altKey=n._q.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}}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=()=>{var e;const i=!!(null===(e=this._menuItemAction.alt)||void 0===e?void 0:e.enabled)&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);i!==this._wantsAltCommand&&(this._wantsAltCommand=i,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register((0,n.nm)(e,"mouseleave",(e=>{t=!1,i()}))),this._register((0,n.nm)(e,"mouseenter",(e=>{t=!0,i()}))),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;const t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),i=t&&t.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let o=i?(0,k.NC)("titleAndKb","{0} ({1})",n,i):n;if(!this._wantsAltCommand&&(null===(e=this._menuItemAction.alt)||void 0===e?void 0:e.enabled)){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),i=t&&t.getLabel(),n=i?(0,k.NC)("titleAndKb","{0} ({1})",e,i):e;o=(0,k.NC)("titleAndKbAndAlt","{0}\n[{1}] {2}",o,l.xo.modifierLabels[c.OS].altKey,n)}return o}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 o=this._commandAction.checked&&(s=e.toggled)&&void 0!==s.condition&&e.toggled.icon?e.toggled.icon:e.icon;var s;if(o)if(A.k.isThemeIcon(o)){const e=A.k.asClassNameArray(o);i.classList.add(...e),this._itemClassDispose.value=(0,d.OF)((()=>{i.classList.remove(...e)}))}else i.style.backgroundImage=(0,P._T)(this._themeService.getColorTheme().type)?(0,n.wY)(o.dark):(0,n.wY)(o.light),i.classList.add("icon"),this._itemClassDispose.value=(0,d.F8)((0,d.OF)((()=>{i.style.backgroundImage="",i.classList.remove("icon")})),this._themeService.onDidColorThemeChange((()=>{this.updateClass()})))}};q=H([V(2,I.d),V(3,T.lT),V(4,N.i6),V(5,R.XE),V(6,D.i),V(7,W.F)],q);let K=class extends r.C{constructor(e,t,i,n,o){var s,r,a;const l={...t,menuAsChild:null!==(s=null==t?void 0:t.menuAsChild)&&void 0!==s&&s,classNames:null!==(r=null==t?void 0:t.classNames)&&void 0!==r?r:A.k.isThemeIcon(e.item.icon)?A.k.asClassName(e.item.icon):void 0,keybindingProvider:null!==(a=null==t?void 0:t.keybindingProvider)&&void 0!==a?a:e=>i.lookupKeybinding(e.id)};super(e,{getActions:()=>e.actions},n,l),this._keybindingService=i,this._contextMenuService=n,this._themeService=o}render(e){super.render(e),(0,O.p_)(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!A.k.isThemeIcon(i)){this.element.classList.add("icon");const e=()=>{this.element&&(this.element.style.backgroundImage=(0,P._T)(this._themeService.getColorTheme().type)?(0,n.wY)(i.dark):(0,n.wY)(i.light))};e(),this._register(this._themeService.onDidColorThemeChange((()=>{e()})))}}};K=H([V(2,I.d),V(3,D.i),V(4,R.XE)],K);let $=class extends s.YH{constructor(e,t,i,n,o,s,l,d){var c,h,u;let g;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=o,this._menuService=s,this._instaService=l,this._storageService=d,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;const p=(null==t?void 0:t.persistLastActionId)?d.get(this._storageKey,1):void 0;p&&(g=e.actions.find((e=>p===e.id))),g||(g=e.actions[0]),this._defaultAction=this._instaService.createInstance(q,g,{keybinding:this._getDefaultActionKeybindingLabel(g)});const m={keybindingProvider:e=>this._keybindingService.lookupKeybinding(e.id),...t,menuAsChild:null===(c=null==t?void 0:t.menuAsChild)||void 0===c||c,classNames:null!==(h=null==t?void 0:t.classNames)&&void 0!==h?h:["codicon","codicon-chevron-down"],actionRunner:null!==(u=null==t?void 0:t.actionRunner)&&void 0!==u?u:new a.Wi};this._dropdown=new r.C(e,e.actions,this._contextMenuService,m),this._register(this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof L.U8&&this.update(e.action)})))}update(e){var t;(null===(t=this._options)||void 0===t?void 0:t.persistLastActionId)&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(q,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends a.Wi{async runAction(e,t){await e.run(void 0)}},this._container&&this._defaultAction.render((0,n.Ce)(this._container,(0,n.$)(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(null===(t=this._options)||void 0===t?void 0:t.renderKeybindingWithDefaultActionLabel){const t=this._keybindingService.lookupKeybinding(e.id);t&&(i=`(${t.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=(0,n.$)(".action-container");this._defaultAction.render((0,n.R3)(this._container,t)),this._register((0,n.nm)(t,n.tw.KEY_DOWN,(e=>{const t=new o.y(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=(0,n.$)(".dropdown-action-container");this._dropdown.render((0,n.R3)(this._container,i)),this._register((0,n.nm)(i,n.tw.KEY_DOWN,(e=>{var t;const i=new o.y(e);i.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),null===(t=this._defaultAction.element)||void 0===t||t.focus(),i.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))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};$=H([V(2,I.d),V(3,T.lT),V(4,D.i),V(5,L.co),V(6,E.TG),V(7,M.Uy)],$);let G=class extends s.Lc{constructor(e,t){super(null,e,e.actions.map((e=>({text:e.id===a.Z0.ID?"─────────":e.label,isDisabled:!e.enabled}))),0,t,B.BM,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex((e=>e.checked))))}render(e){super.render(e),e.style.borderColor=(0,F.n_1)(F.a9O)}runAction(e,t){const i=this.action.actions[t];i&&this.actionRunner.run(i)}};function Z(e,t,i){return t instanceof L.U8?e.createInstance(q,t,i):t instanceof L.NZ?t.item.isSelection?e.createInstance(G,t):t.item.rememberDefaultAction?e.createInstance($,t,{...i,persistLastActionId:!0}):e.createInstance(K,t,i):void 0}G=H([V(1,D.u)],G)},75194:(e,t,i)=>{"use strict";i.d(t,{r:()=>j,T:()=>z});var n=i(65321),o=i(7448),s=i(90317),r=i(98324),a=i(74741),l=i(73046),d=i(25670),c=i(4669),h=i(5976),u=i(93379),g=i.n(u),p=i(7795),m=i.n(p),f=i(90569),v=i.n(f),_=i(3565),b=i.n(_),w=i(19216),y=i.n(w),C=i(44589),S=i.n(C),x=i(56651),k={};k.styleTagTransform=S(),k.setAttributes=b(),k.insert=v().bind(null,"head"),k.domAPI=m(),k.insertStyleElement=y(),g()(x.Z,k),x.Z&&x.Z.locals&&x.Z.locals;var L=i(63580),N=i(17057);class D extends h.JT{constructor(e,t,i={orientation:0}){var n;super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new c.z5),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new h.SL),i.hoverDelegate=null!==(n=i.hoverDelegate)&&void 0!==n?n:this._register((0,N.t)("element",!0)),this.options=i,this.lookupKeybindings="function"==typeof this.options.getKeyBinding,this.toggleMenuAction=this._register(new E((()=>{var e;return null===(e=this.toggleMenuActionViewItem)||void 0===e?void 0:e.show()}),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new s.o(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,hoverDelegate:i.hoverDelegate,actionViewItemProvider:(e,n)=>{var o;if(e.id===E.ID)return this.toggleMenuActionViewItem=new r.C(e,e.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:d.k.asClassNameArray(null!==(o=i.moreIcon)&&void 0!==o?o:l.l.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 t=i.actionViewItemProvider(e,n);if(t)return t}if(e instanceof a.wY){const i=new r.C(e,e.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:e.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return i.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(i),this.disposables.add(this._onDidChangeDropdownVisibility.add(i.onDidChangeVisibility)),i}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach((e=>{this.actionBar.push(e,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(e)})}))}getKeybindingLabel(e){var t,i,n;const o=this.lookupKeybindings?null===(i=(t=this.options).getKeyBinding)||void 0===i?void 0:i.call(t,e):void 0;return null!==(n=null==o?void 0:o.getLabel())&&void 0!==n?n:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class E extends a.aU{constructor(e,t){t=t||L.NC("moreActions","More Actions..."),super(E.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}}E.ID="toolbar.toggle.more";var I=i(9488),T=i(6626),M=i(17301),R=i(53725),A=i(44691),P=i(84144),O=i(93983),F=i(5606),B=i(91847),W=i(10829),H=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},V=function(e,t){return function(i,n){t(i,n,e)}};let z=class extends D{constructor(e,t,i,n,o,s,r){super(e,o,{getKeyBinding:e=>{var t;return null!==(t=s.lookupKeybinding(e.id))&&void 0!==t?t:void 0},...t,allowContextMenu:!0,skipTelemetry:"string"==typeof(null==t?void 0:t.telemetrySource)}),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=o,this._sessionDisposables=this._store.add(new h.SL);const a=null==t?void 0:t.telemetrySource;a&&this._store.add(this.actionBar.onDidRun((e=>r.publicLog2("workbenchActionExecuted",{id:e.action.id,from:a}))))}setActions(e,t=[],i){var s,r,l;this._sessionDisposables.clear();const d=e.slice(),c=t.slice(),h=[];let u=0;const g=[];let p=!1;if(-1!==(null===(s=this._options)||void 0===s?void 0:s.hiddenItemStrategy))for(let e=0;enull==e?void 0:e.id))),t=this._options.overflowBehavior.maxItems-e.size;let i=0;for(let n=0;n=t&&(d[n]=void 0,g[n]=o))}}(0,I.Rs)(d),(0,I.Rs)(g),super.setActions(d,a.Z0.join(g,c)),h.length>0&&this._sessionDisposables.add((0,n.nm)(this.getElement(),"contextmenu",(e=>{var t,s,r,l,d;const c=new o.n((0,n.Jj)(this.getElement()),e),g=this.getItemAction(c.target);if(!g)return;c.preventDefault(),c.stopPropagation();let m,f=!1;if(1===u&&0===(null===(t=this._options)||void 0===t?void 0:t.hiddenItemStrategy)){f=!0;for(let e=0;ethis._menuService.resetHiddenStates(i)}))),this._contextMenuService.showContextMenu({getAnchor:()=>c,getActions:()=>v,menuId:null===(r=this._options)||void 0===r?void 0:r.contextMenu,menuActionOptions:{renderShortTitle:!0,...null===(l=this._options)||void 0===l?void 0:l.menuOptions},skipTelemetry:"string"==typeof(null===(d=this._options)||void 0===d?void 0:d.telemetrySource),contextKeyService:this._contextKeyService})})))}};z=H([V(2,P.co),V(3,O.i6),V(4,F.i),V(5,B.d),V(6,W.b)],z);let j=class extends z{constructor(e,t,i,n,o,s,r,a){super(e,{resetMenu:t,...i},n,o,s,r,a),this._onDidChangeMenuItems=this._store.add(new c.Q5);const l=this._store.add(n.createMenu(t,o,{emitEventsForSubmenuChanges:!0})),d=()=>{var t,n,o;const s=[],r=[];(0,A.vr)(l,null==i?void 0:i.menuOptions,{primary:s,secondary:r},null===(t=null==i?void 0:i.toolbarOptions)||void 0===t?void 0:t.primaryGroup,null===(n=null==i?void 0:i.toolbarOptions)||void 0===n?void 0:n.shouldInlineSubmenu,null===(o=null==i?void 0:i.toolbarOptions)||void 0===o?void 0:o.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",0===s.length&&0===r.length),super.setActions(s,r)};this._store.add(l.onDidChange((()=>{d(),this._onDidChangeMenuItems.fire(this)}))),d()}setActions(){throw new M.he("This toolbar is populated from a menu.")}};j=H([V(3,P.co),V(4,O.i6),V(5,F.i),V(6,B.d),V(7,W.b)],j)},84144:(e,t,i)=>{"use strict";i.d(t,{BH:()=>b,Ke:()=>C,NZ:()=>w,U8:()=>y,co:()=>v,eH:()=>f,f6:()=>m,r1:()=>S,vr:()=>p});var n,o=i(74741),s=i(25670),r=i(4669),a=i(5976),l=i(91741),d=i(94565),c=i(93983),h=i(72065),u=i(49989),g=function(e,t){return function(i,n){t(i,n,e)}};function p(e){return void 0!==e.command}function m(e){return void 0!==e.submenu}class f{constructor(e){if(f._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);f._instances.set(e,this),this.id=e}}f._instances=new Map,f.CommandPalette=new f("CommandPalette"),f.DebugBreakpointsContext=new f("DebugBreakpointsContext"),f.DebugCallStackContext=new f("DebugCallStackContext"),f.DebugConsoleContext=new f("DebugConsoleContext"),f.DebugVariablesContext=new f("DebugVariablesContext"),f.NotebookVariablesContext=new f("NotebookVariablesContext"),f.DebugHoverContext=new f("DebugHoverContext"),f.DebugWatchContext=new f("DebugWatchContext"),f.DebugToolBar=new f("DebugToolBar"),f.DebugToolBarStop=new f("DebugToolBarStop"),f.EditorContext=new f("EditorContext"),f.SimpleEditorContext=new f("SimpleEditorContext"),f.EditorContent=new f("EditorContent"),f.EditorLineNumberContext=new f("EditorLineNumberContext"),f.EditorContextCopy=new f("EditorContextCopy"),f.EditorContextPeek=new f("EditorContextPeek"),f.EditorContextShare=new f("EditorContextShare"),f.EditorTitle=new f("EditorTitle"),f.EditorTitleRun=new f("EditorTitleRun"),f.EditorTitleContext=new f("EditorTitleContext"),f.EditorTitleContextShare=new f("EditorTitleContextShare"),f.EmptyEditorGroup=new f("EmptyEditorGroup"),f.EmptyEditorGroupContext=new f("EmptyEditorGroupContext"),f.EditorTabsBarContext=new f("EditorTabsBarContext"),f.EditorTabsBarShowTabsSubmenu=new f("EditorTabsBarShowTabsSubmenu"),f.EditorTabsBarShowTabsZenModeSubmenu=new f("EditorTabsBarShowTabsZenModeSubmenu"),f.EditorActionsPositionSubmenu=new f("EditorActionsPositionSubmenu"),f.ExplorerContext=new f("ExplorerContext"),f.ExplorerContextShare=new f("ExplorerContextShare"),f.ExtensionContext=new f("ExtensionContext"),f.GlobalActivity=new f("GlobalActivity"),f.CommandCenter=new f("CommandCenter"),f.CommandCenterCenter=new f("CommandCenterCenter"),f.LayoutControlMenuSubmenu=new f("LayoutControlMenuSubmenu"),f.LayoutControlMenu=new f("LayoutControlMenu"),f.MenubarMainMenu=new f("MenubarMainMenu"),f.MenubarAppearanceMenu=new f("MenubarAppearanceMenu"),f.MenubarDebugMenu=new f("MenubarDebugMenu"),f.MenubarEditMenu=new f("MenubarEditMenu"),f.MenubarCopy=new f("MenubarCopy"),f.MenubarFileMenu=new f("MenubarFileMenu"),f.MenubarGoMenu=new f("MenubarGoMenu"),f.MenubarHelpMenu=new f("MenubarHelpMenu"),f.MenubarLayoutMenu=new f("MenubarLayoutMenu"),f.MenubarNewBreakpointMenu=new f("MenubarNewBreakpointMenu"),f.PanelAlignmentMenu=new f("PanelAlignmentMenu"),f.PanelPositionMenu=new f("PanelPositionMenu"),f.ActivityBarPositionMenu=new f("ActivityBarPositionMenu"),f.MenubarPreferencesMenu=new f("MenubarPreferencesMenu"),f.MenubarRecentMenu=new f("MenubarRecentMenu"),f.MenubarSelectionMenu=new f("MenubarSelectionMenu"),f.MenubarShare=new f("MenubarShare"),f.MenubarSwitchEditorMenu=new f("MenubarSwitchEditorMenu"),f.MenubarSwitchGroupMenu=new f("MenubarSwitchGroupMenu"),f.MenubarTerminalMenu=new f("MenubarTerminalMenu"),f.MenubarViewMenu=new f("MenubarViewMenu"),f.MenubarHomeMenu=new f("MenubarHomeMenu"),f.OpenEditorsContext=new f("OpenEditorsContext"),f.OpenEditorsContextShare=new f("OpenEditorsContextShare"),f.ProblemsPanelContext=new f("ProblemsPanelContext"),f.SCMInputBox=new f("SCMInputBox"),f.SCMChangesSeparator=new f("SCMChangesSeparator"),f.SCMIncomingChanges=new f("SCMIncomingChanges"),f.SCMIncomingChangesContext=new f("SCMIncomingChangesContext"),f.SCMIncomingChangesSetting=new f("SCMIncomingChangesSetting"),f.SCMOutgoingChanges=new f("SCMOutgoingChanges"),f.SCMOutgoingChangesContext=new f("SCMOutgoingChangesContext"),f.SCMOutgoingChangesSetting=new f("SCMOutgoingChangesSetting"),f.SCMIncomingChangesAllChangesContext=new f("SCMIncomingChangesAllChangesContext"),f.SCMIncomingChangesHistoryItemContext=new f("SCMIncomingChangesHistoryItemContext"),f.SCMOutgoingChangesAllChangesContext=new f("SCMOutgoingChangesAllChangesContext"),f.SCMOutgoingChangesHistoryItemContext=new f("SCMOutgoingChangesHistoryItemContext"),f.SCMChangeContext=new f("SCMChangeContext"),f.SCMResourceContext=new f("SCMResourceContext"),f.SCMResourceContextShare=new f("SCMResourceContextShare"),f.SCMResourceFolderContext=new f("SCMResourceFolderContext"),f.SCMResourceGroupContext=new f("SCMResourceGroupContext"),f.SCMSourceControl=new f("SCMSourceControl"),f.SCMSourceControlInline=new f("SCMSourceControlInline"),f.SCMSourceControlTitle=new f("SCMSourceControlTitle"),f.SCMTitle=new f("SCMTitle"),f.SearchContext=new f("SearchContext"),f.SearchActionMenu=new f("SearchActionContext"),f.StatusBarWindowIndicatorMenu=new f("StatusBarWindowIndicatorMenu"),f.StatusBarRemoteIndicatorMenu=new f("StatusBarRemoteIndicatorMenu"),f.StickyScrollContext=new f("StickyScrollContext"),f.TestItem=new f("TestItem"),f.TestItemGutter=new f("TestItemGutter"),f.TestMessageContext=new f("TestMessageContext"),f.TestMessageContent=new f("TestMessageContent"),f.TestPeekElement=new f("TestPeekElement"),f.TestPeekTitle=new f("TestPeekTitle"),f.TouchBarContext=new f("TouchBarContext"),f.TitleBarContext=new f("TitleBarContext"),f.TitleBarTitleContext=new f("TitleBarTitleContext"),f.TunnelContext=new f("TunnelContext"),f.TunnelPrivacy=new f("TunnelPrivacy"),f.TunnelProtocol=new f("TunnelProtocol"),f.TunnelPortInline=new f("TunnelInline"),f.TunnelTitle=new f("TunnelTitle"),f.TunnelLocalAddressInline=new f("TunnelLocalAddressInline"),f.TunnelOriginInline=new f("TunnelOriginInline"),f.ViewItemContext=new f("ViewItemContext"),f.ViewContainerTitle=new f("ViewContainerTitle"),f.ViewContainerTitleContext=new f("ViewContainerTitleContext"),f.ViewTitle=new f("ViewTitle"),f.ViewTitleContext=new f("ViewTitleContext"),f.CommentEditorActions=new f("CommentEditorActions"),f.CommentThreadTitle=new f("CommentThreadTitle"),f.CommentThreadActions=new f("CommentThreadActions"),f.CommentThreadAdditionalActions=new f("CommentThreadAdditionalActions"),f.CommentThreadTitleContext=new f("CommentThreadTitleContext"),f.CommentThreadCommentContext=new f("CommentThreadCommentContext"),f.CommentTitle=new f("CommentTitle"),f.CommentActions=new f("CommentActions"),f.InteractiveToolbar=new f("InteractiveToolbar"),f.InteractiveCellTitle=new f("InteractiveCellTitle"),f.InteractiveCellDelete=new f("InteractiveCellDelete"),f.InteractiveCellExecute=new f("InteractiveCellExecute"),f.InteractiveInputExecute=new f("InteractiveInputExecute"),f.IssueReporter=new f("IssueReporter"),f.NotebookToolbar=new f("NotebookToolbar"),f.NotebookStickyScrollContext=new f("NotebookStickyScrollContext"),f.NotebookCellTitle=new f("NotebookCellTitle"),f.NotebookCellDelete=new f("NotebookCellDelete"),f.NotebookCellInsert=new f("NotebookCellInsert"),f.NotebookCellBetween=new f("NotebookCellBetween"),f.NotebookCellListTop=new f("NotebookCellTop"),f.NotebookCellExecute=new f("NotebookCellExecute"),f.NotebookCellExecuteGoTo=new f("NotebookCellExecuteGoTo"),f.NotebookCellExecutePrimary=new f("NotebookCellExecutePrimary"),f.NotebookDiffCellInputTitle=new f("NotebookDiffCellInputTitle"),f.NotebookDiffCellMetadataTitle=new f("NotebookDiffCellMetadataTitle"),f.NotebookDiffCellOutputsTitle=new f("NotebookDiffCellOutputsTitle"),f.NotebookOutputToolbar=new f("NotebookOutputToolbar"),f.NotebookEditorLayoutConfigure=new f("NotebookEditorLayoutConfigure"),f.NotebookKernelSource=new f("NotebookKernelSource"),f.BulkEditTitle=new f("BulkEditTitle"),f.BulkEditContext=new f("BulkEditContext"),f.TimelineItemContext=new f("TimelineItemContext"),f.TimelineTitle=new f("TimelineTitle"),f.TimelineTitleContext=new f("TimelineTitleContext"),f.TimelineFilterSubMenu=new f("TimelineFilterSubMenu"),f.AccountsContext=new f("AccountsContext"),f.SidebarTitle=new f("SidebarTitle"),f.PanelTitle=new f("PanelTitle"),f.AuxiliaryBarTitle=new f("AuxiliaryBarTitle"),f.TerminalInstanceContext=new f("TerminalInstanceContext"),f.TerminalEditorInstanceContext=new f("TerminalEditorInstanceContext"),f.TerminalNewDropdownContext=new f("TerminalNewDropdownContext"),f.TerminalTabContext=new f("TerminalTabContext"),f.TerminalTabEmptyAreaContext=new f("TerminalTabEmptyAreaContext"),f.TerminalStickyScrollContext=new f("TerminalStickyScrollContext"),f.WebviewContext=new f("WebviewContext"),f.InlineCompletionsActions=new f("InlineCompletionsActions"),f.InlineEditActions=new f("InlineEditActions"),f.NewFile=new f("NewFile"),f.MergeInput1Toolbar=new f("MergeToolbar1Toolbar"),f.MergeInput2Toolbar=new f("MergeToolbar2Toolbar"),f.MergeBaseToolbar=new f("MergeBaseToolbar"),f.MergeInputResultToolbar=new f("MergeToolbarResultToolbar"),f.InlineSuggestionToolbar=new f("InlineSuggestionToolbar"),f.InlineEditToolbar=new f("InlineEditToolbar"),f.ChatContext=new f("ChatContext"),f.ChatCodeBlock=new f("ChatCodeblock"),f.ChatMessageTitle=new f("ChatMessageTitle"),f.ChatExecute=new f("ChatExecute"),f.ChatInputSide=new f("ChatInputSide"),f.AccessibleView=new f("AccessibleView"),f.MultiDiffEditorFileToolbar=new f("MultiDiffEditorFileToolbar");const v=(0,h.yh)("menuService");class _{static for(e){let t=this._all.get(e);return t||(t=new _(e),this._all.set(e,t)),t}static merge(e){const t=new Set;for(const i of e)i instanceof _&&t.add(i.id);return t}constructor(e){this.id=e,this.has=t=>t===e}}_._all=new Map;const b=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new r.SZ({merge:_.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(e){return this._commands.set(e.id,e),this._onDidChangeMenu.fire(_.for(f.CommandPalette)),(0,a.OF)((()=>{this._commands.delete(e.id)&&this._onDidChangeMenu.fire(_.for(f.CommandPalette))}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){let i=this._menuItems.get(e);i||(i=new l.S,this._menuItems.set(e,i));const n=i.push(t);return this._onDidChangeMenu.fire(_.for(e)),(0,a.OF)((()=>{n(),this._onDidChangeMenu.fire(_.for(e))}))}appendMenuItems(e){const t=new a.SL;for(const{id:i,item:n}of e)t.add(this.appendMenuItem(i,n));return t}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===f.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)p(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class w extends o.wY{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let y=n=class{static label(e,t){return(null==t?void 0:t.renderShortTitle)&&e.shortTitle?"string"==typeof e.shortTitle?e.shortTitle:e.shortTitle.value:"string"==typeof e.title?e.title:e.title.value}constructor(e,t,i,o,r,a){var l,d;let c;if(this.hideActions=o,this._commandService=a,this.id=e.id,this.label=n.label(e,i),this.tooltip=null!==(d="string"==typeof e.tooltip?e.tooltip:null===(l=e.tooltip)||void 0===l?void 0:l.value)&&void 0!==d?d:"",this.enabled=!e.precondition||r.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){const t=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=r.contextMatchesRules(t.condition),this.checked&&t.tooltip&&(this.tooltip="string"==typeof t.tooltip?t.tooltip:t.tooltip.value),this.checked&&s.k.isThemeIcon(t.icon)&&(c=t.icon),this.checked&&t.title&&(this.label="string"==typeof t.title?t.title:t.title.value)}c||(c=s.k.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new n(t,void 0,i,o,r,a):void 0,this._options=i,this.class=c&&s.k.asClassName(c)}run(...e){var t,i;let n=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(n=[...n,this._options.arg]),(null===(i=this._options)||void 0===i?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};y=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([g(4,c.i6),g(5,d.H)],y);class C{constructor(e){this.desc=e}}function S(e){const t=new a.SL,i=new e,{f1:n,menu:o,keybinding:s,...r}=i.desc;if(d.P.getCommand(r.id))throw new Error(`Cannot register two commands with the same id: ${r.id}`);if(t.add(d.P.registerCommand({id:r.id,handler:(e,...t)=>i.run(e,...t),metadata:r.metadata})),Array.isArray(o))for(const e of o)t.add(b.appendMenuItem(e.id,{command:{...r,precondition:null===e.precondition?void 0:r.precondition},...e}));else o&&t.add(b.appendMenuItem(o.id,{command:{...r,precondition:null===o.precondition?void 0:r.precondition},...o}));if(n&&(t.add(b.appendMenuItem(f.CommandPalette,{command:r,when:r.precondition})),t.add(b.addCommand(r))),Array.isArray(s))for(const e of s)t.add(u.W.registerKeybindingRule({...e,id:r.id,when:r.precondition?c.Ao.and(r.precondition,e.when):e.when}));else s&&t.add(u.W.registerKeybindingRule({...s,id:r.id,when:r.precondition?c.Ao.and(r.precondition,s.when):s.when}));return t}},84972:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});const n=(0,i(72065).yh)("clipboardService")},94565:(e,t,i)=>{"use strict";i.d(t,{H:()=>l,P:()=>d});var n=i(4669),o=i(53725),s=i(5976),r=i(91741),a=i(98401);const l=(0,i(72065).yh)("commandService"),d=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new n.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.metadata&&Array.isArray(e.metadata.args)){const t=[];for(const i of e.metadata.args)t.push(i.constraint);const i=e.handler;e.handler=function(e,...n){return(0,a.D8)(n,t),i(e,...n)}}const{id:i}=e;let n=this._commands.get(i);n||(n=new r.S,this._commands.set(i,n));const o=n.unshift(e),l=(0,s.OF)((()=>{o();const e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),l}registerCommandAlias(e,t){return d.registerCommand(e,((e,...i)=>e.get(l).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return o.$.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};d.registerCommand("noop",(()=>{}))},33108:(e,t,i)=>{"use strict";i.d(t,{KV:()=>s,Mt:()=>l,Od:()=>o,UI:()=>d,Ui:()=>n,xL:()=>r});const n=(0,i(72065).yh)("configurationService");function o(e,t){const i=Object.create(null);for(const n in e)s(i,n,e[n],t);return i}function s(e,t,i,n){const o=t.split("."),s=o.pop();let r=e;for(let e=0;e{"use strict";i.d(t,{IP:()=>c,eU:()=>C,ny:()=>S});var n=i(9488),o=i(4669),s=i(98401),r=i(63580),a=i(33108),l=i(81294),d=i(89872);const c={Configuration:"base.contributions.configuration"},h={properties:{},patternProperties:{}},u={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},v="vscode://schemas/settings/resourceLanguage",_=d.B.as(l.I.JSONContribution),b="\\[([^\\]]+)\\]",w=new RegExp(b,"g"),y=`^(${b})+$`,C=new RegExp(y);function S(e){const t=[];if(C.test(e)){let i=w.exec(e);for(;null==i?void 0:i.length;){const n=i[1].trim();n&&t.push(n),i=w.exec(e)}}return(0,n.EB)(t)}const x=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new o.Q5,this._onDidUpdateConfiguration=new o.Q5,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:r.NC("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},_.registerSchema(v,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=new Set;this.doRegisterConfigurations(e,t,i),_.registerSchema(v,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){var i;const n=[];for(const{overrides:o,source:l}of e)for(const e in o)if(t.add(e),C.test(e)){const t=this.configurationDefaultsOverrides.get(e),d=null!==(i=null==t?void 0:t.valuesSources)&&void 0!==i?i:new Map;if(l)for(const t of Object.keys(o[e]))d.set(t,l);const c={...(null==t?void 0:t.value)||{},...o[e]};this.configurationDefaultsOverrides.set(e,{source:l,value:c,valuesSources:d});const h=(0,a.UI)(e),u={type:"object",default:c,description:r.NC("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",h),$ref:v,defaultDefaultValue:c,source:s.HD(l)?void 0:l,defaultValueSource:l};n.push(...S(e)),this.configurationProperties[e]=u,this.defaultLanguageConfigurationOverridesNode.properties[e]=u}else{this.configurationDefaultsOverrides.set(e,{value:o[e],source:l});const t=this.configurationProperties[e];t&&(this.updatePropertyDefaultValue(e,t),this.updateSchema(e,t))}this.doRegisterOverrideIdentifiers(n)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,i){e.forEach((e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,i),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,i,n,o=3,r){var a;o=s.Jp(e.scope)?o:e.scope;const l=e.properties;if(l)for(const e in l){const d=l[e];t&&k(e,d)?delete l[e]:(d.source=i,d.defaultDefaultValue=l[e].default,this.updatePropertyDefaultValue(e,d),C.test(e)?d.scope=void 0:(d.scope=s.Jp(d.scope)?o:d.scope,d.restricted=s.Jp(d.restricted)?!!(null==n?void 0:n.includes(e)):d.restricted),!l[e].hasOwnProperty("included")||l[e].included?(this.configurationProperties[e]=l[e],(null===(a=l[e].policy)||void 0===a?void 0:a.name)&&this.policyConfigurations.set(l[e].policy.name,e),!l[e].deprecationMessage&&l[e].markdownDeprecationMessage&&(l[e].deprecationMessage=l[e].markdownDeprecationMessage),r.add(e)):(this.excludedConfigurationProperties[e]=l[e],delete l[e]))}const d=e.allOf;if(d)for(const e of d)this.validateAndRegisterProperties(e,t,i,n,o,r)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);const n=e.allOf;null==n||n.forEach(t)};t(e)}updateSchema(e,t){switch(h.properties[e]=t,t.scope){case 1:u.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:p.properties[e]=t;break;case 3:m.properties[e]=t;break;case 4:f.properties[e]=t;break;case 5:f.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:r.NC("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.NC("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:v};this.updatePropertyDefaultValue(t,i),h.properties[t]=i,u.properties[t]=i,g.properties[t]=i,p.properties[t]=i,m.properties[t]=i,f.properties[t]=i}}registerOverridePropertyPatternKey(){const e={type:"object",description:r.NC("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.NC("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:v};h.patternProperties[y]=e,u.patternProperties[y]=e,g.patternProperties[y]=e,p.patternProperties[y]=e,m.patternProperties[y]=e,f.patternProperties[y]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e);let n=null==i?void 0:i.value,o=null==i?void 0:i.source;s.o8(n)&&(n=t.defaultDefaultValue,o=void 0),s.o8(n)&&(n=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n,t.defaultValueSource=o}};function k(e,t){var i,n,o,s;return e.trim()?C.test(e)?r.NC("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==x.getConfigurationProperties()[e]?r.NC("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):(null===(i=t.policy)||void 0===i?void 0:i.name)&&void 0!==x.getPolicyConfigurations().get(null===(n=t.policy)||void 0===n?void 0:n.name)?r.NC("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,null===(o=t.policy)||void 0===o?void 0:o.name,x.getPolicyConfigurations().get(null===(s=t.policy)||void 0===s?void 0:s.name)):null:r.NC("config.property.empty","Cannot register an empty property")}d.B.add(c.Configuration,x)},93983:(e,t,i)=>{"use strict";i.d(t,{cP:()=>I,Ao:()=>x,i6:()=>K,uy:()=>q,Fb:()=>k,K8:()=>Z});var n=i(1432),o=i(97295),s=i(17301),r=i(63580);function a(...e){switch(e.length){case 1:return(0,r.NC)("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",e[0]);case 2:return(0,r.NC)("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",e[0],e[1]);case 3:return(0,r.NC)("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}const l=(0,r.NC)("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),d=(0,r.NC)("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class c{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:case 8:return">=";case 9:return"=~";case 10:case 17:case 18:case 19:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 20:return"EOF";default:throw(0,s.L6)(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(a("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(a("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(a("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&this._input.charCodeAt(this._current)===e&&(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,i=this._input.substring(this._start,this._current),n={type:19,offset:this._start,lexeme:i};this._errors.push({offset:t,lexeme:i,additionalInfo:e}),this._tokens.push(n)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),i=c._keywords.get(t);i?this._addToken(i):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;39!==this._peek()&&!this._isAtEnd();)this._advance();this._isAtEnd()?this._error(l):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,i=!1;for(;;){if(e>=this._input.length)return this._current=e,void this._error(d);const n=this._input.charCodeAt(e);if(t)t=!1;else{if(47===n&&!i){e++;break}91===n?i=!0:92===n?t=!0:93===n&&(i=!1)}e++}for(;e=this._input.length}}c._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0)))),c._keywords=new Map([["not",14],["in",13],["false",12],["true",11]]);var h=i(72065);const u=new Map;u.set("false",!1),u.set("true",!0),u.set("isMac",n.dz),u.set("isLinux",n.IJ),u.set("isWindows",n.ED),u.set("isWeb",n.$L),u.set("isMacNative",n.dz&&!n.$L),u.set("isEdge",n.un),u.set("isFirefox",n.vU),u.set("isChrome",n.i7),u.set("isSafari",n.G6);const g=Object.prototype.hasOwnProperty,p={regexParsingWithErrorRecovery:!0},m=(0,r.NC)("contextkey.parser.error.emptyString","Empty context key expression"),f=(0,r.NC)("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),v=(0,r.NC)("contextkey.parser.error.noInAfterNot","'in' after 'not'."),_=(0,r.NC)("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),b=(0,r.NC)("contextkey.parser.error.unexpectedToken","Unexpected token"),w=(0,r.NC)("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),y=(0,r.NC)("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),C=(0,r.NC)("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");class S{constructor(e=p){this._config=e,this._scanner=new c,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?w:void 0;throw this._parsingErrors.push({message:b,offset:e.offset,lexeme:c.getLexeme(e),additionalInfo:t}),S._parseError}return e}catch(e){if(e!==S._parseError)throw e;return}}else this._parsingErrors.push({message:m,offset:0,lexeme:"",additionalInfo:f})}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const t=this._and();e.push(t)}return 1===e.length?e[0]:x.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const t=this._term();e.push(t)}return 1===e.length?e[0]:x.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),N.INSTANCE;case 12:return this._advance(),D.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,_),null==e?void 0:e.negate()}case 17:return this._advance(),A.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),x.true();case 12:return this._advance(),x.false();case 0:{this._advance();const e=this._expr();return this._consume(1,_),e}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const i=e.lexeme,n=i.lastIndexOf("/"),o=n===i.length-1?void 0:this._removeFlagsGY(i.substring(n+1));let s;try{s=new RegExp(i.substring(1,n),o)}catch(t){throw this._errExpectedButGot("REGEX",e)}return H.create(t,s)}switch(e.type){case 10:case 19:{const i=[e.lexeme];this._advance();let n=this._peek(),o=0;for(let t=0;t=0){const s=i.slice(t+1,o),r="i"===i[o+1]?"i":"";try{n=new RegExp(s,r)}catch(t){throw this._errExpectedButGot("REGEX",e)}}}if(null===n)throw this._errExpectedButGot("REGEX",e);return H.create(t,n)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,v);const e=this._value();return x.notIn(t,e)}switch(this._peek().type){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return x.equals(t,e);switch(e){case"true":return x.has(t);case"false":return x.not(t);default:return x.equals(t,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return x.notEquals(t,e);switch(e){case"true":return x.not(t);case"false":return x.has(t);default:return x.notEquals(t,e)}}case 5:return this._advance(),B.create(t,this._value());case 6:return this._advance(),W.create(t,this._value());case 7:return this._advance(),O.create(t,this._value());case 8:return this._advance(),F.create(t,this._value());case 13:return this._advance(),x.in(t,this._value());default:return x.has(t)}}case 20:throw this._parsingErrors.push({message:y,offset:e.offset,lexeme:"",additionalInfo:C}),S._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,i){const n=(0,r.NC)("contextkey.parser.error.expectedButGot","Expected: {0}\nReceived: '{1}'.",e,c.getLexeme(t)),o=t.offset,s=c.getLexeme(t);return this._parsingErrors.push({message:n,offset:o,lexeme:s,additionalInfo:i}),S._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}S._parseError=new Error;class x{static false(){return N.INSTANCE}static true(){return D.INSTANCE}static has(e){return E.create(e)}static equals(e,t){return I.create(e,t)}static notEquals(e,t){return R.create(e,t)}static regex(e,t){return H.create(e,t)}static in(e,t){return T.create(e,t)}static notIn(e,t){return M.create(e,t)}static not(e){return A.create(e)}static and(...e){return j.create(e,null,!0)}static or(...e){return U.create(e,null,!0)}static deserialize(e){if(null!=e)return this._parser.parse(e)}}function k(e,t){const i=e?e.substituteConstants():void 0,n=t?t.substituteConstants():void 0;return!i&&!n||!(!i||!n)&&i.equals(n)}function L(e,t){return e.cmp(t)}x._parser=new S({regexParsingWithErrorRecovery:!1});class N{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return D.INSTANCE}}N.INSTANCE=new N;class D{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return N.INSTANCE}}D.INSTANCE=new D;class E{static create(e,t=null){const i=u.get(e);return"boolean"==typeof i?i?D.INSTANCE:N.INSTANCE:new E(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=u.get(this.key);return"boolean"==typeof e?e?D.INSTANCE:N.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this)),this.negated}}class I{static create(e,t,i=null){if("boolean"==typeof t)return t?E.create(e,i):A.create(e,i);const n=u.get(e);return"boolean"==typeof n?t===(n?"true":"false")?D.INSTANCE:N.INSTANCE:new I(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=u.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?D.INSTANCE:N.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}class T{static create(e,t){return new T(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&this.key===e.key&&this.valueKey===e.valueKey}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):"string"==typeof i&&"object"==typeof t&&null!==t&&g.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=M.create(this.key,this.valueKey)),this.negated}}class M{static create(e,t){return new M(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=T.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class R{static create(e,t,i=null){if("boolean"==typeof t)return t?A.create(e,i):E.create(e,i);const n=u.get(e);return"boolean"==typeof n?t===(n?"true":"false")?N.INSTANCE:D.INSTANCE:new R(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=u.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?N.INSTANCE:D.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this.value,this)),this.negated}}class A{static create(e,t=null){const i=u.get(e);return"boolean"==typeof i?i?N.INSTANCE:D.INSTANCE:new A(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=u.get(this.key);return"boolean"==typeof e?e?N.INSTANCE:D.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this)),this.negated}}function P(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):N.INSTANCE}class O{static create(e,t,i=null){return P(t,(t=>new O(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=W.create(this.key,this.value,this)),this.negated}}class F{static create(e,t,i=null){return P(t,(t=>new F(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class B{static create(e,t,i=null){return P(t,(t=>new B(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))new W(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this.value,this)),this.negated}}class H{static create(e,t){return new H(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=V.create(this)),this.negated}}class V{static create(e){return new V(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function z(e){let t=null;for(let i=0,n=e.length;ie.expr.length)return 1;for(let t=0,i=this.expr.length;t1;){const e=n[n.length-1];if(9!==e.type)break;n.pop();const t=n.pop(),o=0===n.length,s=U.create(e.expr.map((e=>j.create([e,t],null,i))),null,o);s&&(n.push(s),n.sort(L))}if(1===n.length)return n[0];if(i){for(let e=0;ee.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=U.create(e,this,!0)}return this.negated}}class U{static create(e,t,i){return U._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const e of Y(t))for(const t of Y(i))n.push(j.create([e,t],null,!1));e.unshift(U.create(n,null,!1))}this.negated=U.create(e,this,!0)}return this.negated}}class q extends E{static all(){return q._info.values()}constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?q._info.push({...i,key:e}):!0!==i&&q._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return I.create(this.key,e)}}q._info=[];const K=(0,h.yh)("contextKeyService");function $(e,t){return et?1:0}function G(e,t,i,n){return ei?1:tn?1:0}function Z(e,t){if(0===e.type||1===t.type)return!0;if(9===e.type)return 9===t.type&&Q(e.expr,t.expr);if(9===t.type){for(const i of t.expr)if(Z(e,i))return!0;return!1}if(6===e.type){if(6===t.type)return Q(t.expr,e.expr);for(const i of e.expr)if(Z(i,t))return!0;return!1}return e.equals(t)}function Q(e,t){let i=0,n=0;for(;i{"use strict";i.d(t,{Pf:()=>a,Ul:()=>d,cv:()=>r,d0:()=>l});var n=i(1432),o=i(63580),s=i(93983);new s.uy("isMac",n.dz,(0,o.NC)("isMac","Whether the operating system is macOS")),new s.uy("isLinux",n.IJ,(0,o.NC)("isLinux","Whether the operating system is Linux"));const r=new s.uy("isWindows",n.ED,(0,o.NC)("isWindows","Whether the operating system is Windows")),a=new s.uy("isWeb",n.$L,(0,o.NC)("isWeb","Whether the platform is a web browser")),l=(new s.uy("isMacNative",n.dz&&!n.$L,(0,o.NC)("isMacNative","Whether the operating system is macOS on a non-browser platform")),new s.uy("isIOS",n.gn,(0,o.NC)("isIOS","Whether the operating system is iOS")),new s.uy("isMobile",n.tq,(0,o.NC)("isMobile","Whether the platform is a mobile web browser")),new s.uy("isDevelopment",!1,!0),new s.uy("productQualityType","",(0,o.NC)("productQualityType","Quality type of VS Code")),"inputFocus"),d=new s.uy(l,!1,(0,o.NC)("inputFocus","Whether keyboard focus is inside an input box"))},5606:(e,t,i)=>{"use strict";i.d(t,{i:()=>s,u:()=>o});var n=i(72065);const o=(0,n.yh)("contextViewService"),s=(0,n.yh)("contextMenuService")},28820:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const n=(0,i(72065).yh)("dialogService")},16021:(e,t,i)=>{"use strict";i.d(t,{Ej:()=>s,Km:()=>o});var n=i(89872);const o={EDITORS:"CodeEditors",FILES:"CodeFiles"};n.B.add("workbench.contributions.dragAndDrop",new class{});class s{constructor(){}static getInstance(){return s.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}s.INSTANCE=new s},48814:(e,t,i)=>{"use strict";i.d(t,{Y:()=>n});const n=(0,i(72065).yh)("environmentService")},22980:(e,t,i)=>{"use strict";i.d(t,{Yb:()=>N,Nq:()=>D,iX:()=>w});var n=i(3070),o=i(65321),s=i(98892),r=i(44299),a=i(93794),l=i(73046),d=i(4669),c=(i(30340),i(63580));const h=c.NC("defaultLabel","input"),u=c.NC("label.preserveCaseToggle","Preserve Case");class g extends s.Z{constructor(e){super({icon:l.l.preserveCase,title:u+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class p extends a.${constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new d.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new d.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new d.Q5),this._onInput=this._register(new d.Q5),this._onKeyUp=this._register(new d.Q5),this._onPreserveCaseKeyDown=this._register(new d.Q5),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||h;const s=n.appendPreserveCaseLabel||"",a=n.history||[],l=!!n.flexibleHeight,c=!!n.flexibleWidth,u=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new r.pG(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:a,showHistoryHint:n.showHistoryHint,flexibleHeight:l,flexibleWidth:c,flexibleMaxHeight:u,inputBoxStyles:n.inputBoxStyles})),this.preserveCase=this._register(new g({appendTitle:s,isChecked:!1,...n.toggleStyles})),this._register(this.preserveCase.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const p=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){const t=p.indexOf(this.domNode.ownerDocument.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%p.length:e.equals(15)&&(i=0===t?p.length-1:t-1),e.equals(9)?(p[t].blur(),this.inputBox.focus()):i>=0&&p[i].focus(),o.zB.stop(e,!0)}}}));const m=document.createElement("div");m.className="controls",m.style.display=this._showOptionButtons?"block":"none",m.appendChild(this.preserveCase.domNode),this.domNode.appendChild(m),null==e||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}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(){var e;null===(e=this.inputBox)||void 0===e||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var m=i(93983),f=i(49989),v=i(5976),_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=function(e,t){return function(i,n){t(i,n,e)}};const w=new m.uy("suggestWidgetVisible",!1,(0,c.NC)("suggestWidgetVisible","Whether suggestion are visible")),y="historyNavigationWidgetFocus",C="historyNavigationForwardsEnabled",S="historyNavigationBackwardsEnabled";let x;const k=[];function L(e,t){if(k.includes(t))throw new Error("Cannot register the same widget multiple times");k.push(t);const i=new v.SL,n=new m.uy(y,!1).bindTo(e),s=new m.uy(C,!0).bindTo(e),r=new m.uy(S,!0).bindTo(e),a=()=>{n.set(!0),x=t},l=()=>{n.set(!1),x===t&&(x=void 0)};return(0,o.H9)(t.element)&&a(),i.add(t.onDidFocus((()=>a()))),i.add(t.onDidBlur((()=>l()))),i.add((0,v.OF)((()=>{k.splice(k.indexOf(t),1),l()}))),{historyNavigationForwardsEnablement:s,historyNavigationBackwardsEnablement:r,dispose(){i.dispose()}}}let N=class extends n.V{constructor(e,t,i,n){super(e,t,i);const o=this._register(n.createScoped(this.inputBox.element));this._register(L(o,this.inputBox))}};N=_([b(3,m.i6)],N);let D=class extends p{constructor(e,t,i,n,o=!1){super(e,t,o,i);const s=this._register(n.createScoped(this.inputBox.element));this._register(L(s,this.inputBox))}};D=_([b(3,m.i6)],D),f.W.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:m.Ao.and(m.Ao.has(y),m.Ao.equals(S,!0),m.Ao.not("isComposing"),w.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{null==x||x.showPreviousValue()}}),f.W.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:m.Ao.and(m.Ao.has(y),m.Ao.equals(C,!0),m.Ao.not("isComposing"),w.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{null==x||x.showNextValue()}})},97108:(e,t,i)=>{"use strict";i.d(t,{M:()=>n});class n{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},65026:(e,t,i)=>{"use strict";i.d(t,{d:()=>r,z:()=>s});var n=i(97108);const o=[];function s(e,t,i){t instanceof n.M||(t=new n.M(t,[],Boolean(i))),o.push([e,t])}function r(){return o}},72065:(e,t,i)=>{"use strict";var n;i.d(t,{I8:()=>n,TG:()=>o,yh:()=>s}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(n||(n={}));const o=s("instantiationService");function s(e){if(n.serviceIds.has(e))return n.serviceIds.get(e);const t=function(e,i,o){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,i){t[n.DI_TARGET]===t?t[n.DI_DEPENDENCIES].push({id:e,index:i}):(t[n.DI_DEPENDENCIES]=[{id:e,index:i}],t[n.DI_TARGET]=t)}(t,e,o)};return t.toString=()=>e,n.serviceIds.set(e,t),t}},60972:(e,t,i)=>{"use strict";i.d(t,{y:()=>n});class n{constructor(...e){this._entries=new Map;for(const[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}get(e){return this._entries.get(e)}}},81294:(e,t,i)=>{"use strict";i.d(t,{I:()=>s});var n=i(4669),o=i(89872);const s={JSONContribution:"base.contributions.json"},r=new class{constructor(){this._onDidChangeSchema=new n.Q5,this.schemasById={}}registerSchema(e,t){var i;this.schemasById[(i=e,i.length>0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};o.B.add(s.JSONContribution,r)},91847:(e,t,i)=>{"use strict";i.d(t,{d:()=>n});const n=(0,i(72065).yh)("keybindingService")},49989:(e,t,i)=>{"use strict";i.d(t,{W:()=>c});var n=i(8313),o=i(1432),s=i(94565),r=i(89872),a=i(5976),l=i(91741);class d{constructor(){this._coreKeybindings=new l.S,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===o.OS){if(e&&e.win)return e.win}else if(2===o.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=d.bindToCurrentPlatform(e),i=new a.SL;if(t&&t.primary){const s=(0,n.Z9)(t.primary,o.OS);s&&i.add(this._registerDefaultKeybinding(s,e.id,e.args,e.weight,0,e.when))}if(t&&Array.isArray(t.secondary))for(let s=0,r=t.secondary.length;s{r(),this._cachedMergedKeybindings=null}))}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(h)),this._cachedMergedKeybindings.slice(0)}}const c=new d;function h(e,t){if(e.weight1!==t.weight1)return e.weight1-t.weight1;if(e.command&&t.command){if(e.commandt.command)return 1}return e.weight2-t.weight2}r.B.add("platform.keybindingsRegistry",c)},44349:(e,t,i)=>{"use strict";i.d(t,{e:()=>n});const n=(0,i(72065).yh)("labelService")},95191:(e,t,i)=>{"use strict";i.d(t,{Lw:()=>_t,XN:()=>bt,ls:()=>mi,ev:()=>oi,CQ:()=>xt,PS:()=>It,uJ:()=>Mt});var n=i(65321),o=i(9488),s=i(71050),r=i(4669),a=i(5976),l=(i(33164),i(43799));class d{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:a.JT.None}}renderElement(e,t,i,n){var o;if(null===(o=i.disposable)||void 0===o||o.dispose(),!i.data)return;const r=this.modelProvider();if(r.isResolved(e))return this.renderer.renderElement(r.get(e),e,i.data,n);const a=new s.A,l=r.resolve(e,a.token);i.disposable={dispose:()=>a.cancel()},this.renderer.renderPlaceholder(e,i.data),l.then((t=>this.renderer.renderElement(t,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 c{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}}class h{constructor(e,t,i,n,o={}){const s=()=>this.model,r=n.map((e=>new d(e,s)));this.list=new l.aV(e,t,i,r,function(e,t){return{...t,accessibilityProvider:t.accessibilityProvider&&new c(e,t.accessibilityProvider)}}(s,o))}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 r.ju.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return r.ju.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return r.ju.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,(0,o.w6)(e.length))}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()}}var u=i(17057),g=i(51433),p=i(89782),m=i(93379),f=i.n(m),v=i(7795),_=i.n(v),b=i(90569),w=i.n(b),y=i(3565),C=i.n(y),S=i(19216),x=i.n(S),k=i(44589),L=i.n(k),N=i(1728),D={};D.styleTagTransform=L(),D.setAttributes=C(),D.insert=w().bind(null,"head"),D.domAPI=_(),D.insertStyleElement=x(),f()(N.Z,D),N.Z&&N.Z.locals&&N.Z.locals;class E{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=E.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const t of e){const e=n.get(t.templateId);if(!e)throw new Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=(0,n.R3)(e,(0,n.$)(".monaco-table-tr")),i=[],o=[];for(let e=0;ethis.disposables.add(new I(e,t)))),h={size:c.reduce(((e,t)=>e+t.column.weight),0),views:c.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new p.z(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:h})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const u=new E(o,s,(e=>this.splitview.getViewSize(e)));var g;this.list=this.disposables.add(new l.aV(e,this.domNode,(g=i,{getHeight:e=>g.getHeight(e),getTemplateId:()=>E.TemplateId}),[u],d)),r.ju.any(...c.map((e=>e.onDidLayout)))((([e,t])=>u.layoutColumn(e,t)),null,this.disposables),this.splitview.onDidSashReset((e=>{const t=o.reduce(((e,t)=>e+t.weight),0),i=o[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)}),null,this.disposables),this.styleElement=(0,n.dS)(this.domNode),this.style(l.uZ)}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 {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}T.InstanceCount=0,i(4850);var M,R,A=i(59069),P=(i(90317),i(3070),i(44299)),O=i(25707),F=i(98892);!function(e){e[e.Expanded=0]="Expanded",e[e.Collapsed=1]="Collapsed",e[e.PreserveOrExpanded=2]="PreserveOrExpanded",e[e.PreserveOrCollapsed=3]="PreserveOrCollapsed"}(M||(M={})),function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element",e[e.Filter=3]="Filter"}(R||(R={}));class B extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class W{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}}var H=i(15393),V=i(5635),z=i(2484),j=i(53725);function U(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function q(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function K(e){return"boolean"==typeof e.collapsible}class ${constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new r.E7,this._onDidChangeCollapseState=new r.Q5,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new r.Q5,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new r.Q5,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new H.vp(V.n),this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=j.$.empty(),n={}){if(0===e.length)throw new B(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,o,s){var r;void 0===n&&(n=j.$.empty()),void 0===s&&(s=null!==(r=o.diffDepth)&&void 0!==r?r:0);const{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,o);const l=[...n],d=t[t.length-1],c=new z.Hs({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,d),...l,...a.children.slice(d+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(c.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,l,o);const h=t.slice(0,-1),u=(t,i,n)=>{if(s>0)for(let r=0;rt.originalStart-e.originalStart)))u(g,p,g-(e.originalStart+e.originalLength)),g=e.originalStart,p=e.modifiedStart-d,this.spliceSimple([...h,g],e.originalLength,j.$.slice(l,p,p+e.modifiedLength),o);u(g,p,g)}spliceSimple(e,t,i=j.$.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:r}){const{parentNode:a,listIndex:l,revealed:d,visible:c}=this.getParentNodeWithListIndex(e),h=[],u=j.$.map(i,(e=>this.createTreeNode(e,a,a.visible?1:0,d,h,n))),g=e[e.length-1];let p=0;for(let e=g;e>=0&&er.getId(e.element).toString()))):a.lastDiffIds=a.children.map((e=>r.getId(e.element).toString())):a.lastDiffIds=void 0;let b=0;for(const e of _)e.visible&&b++;if(0!==b)for(let e=g+m.length;ee+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(a,v-e),this.list.splice(l,e,h)}if(_.length>0&&s){const e=t=>{s(t),t.children.forEach(e)};_.forEach(e)}this._onDidSplice.fire({insertedNodes:m,deletedNodes:_});let w=a;for(;w;){if(2===w.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}w=w.parent}}rerender(e){if(0===e.length)throw new B(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[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);void 0===t&&(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);void 0===t&&(t=!n.collapsed);const o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,o)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&s&&!K(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}n>-1&&this._setCollapseState([...e,n],t)}return s}_setListNodeCollapseState(e,t,i,n){const o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;const s=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=s-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(K(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})),!K(t)&&t.recursive)for(const i of e.children)n=this._setNodeCollapseState(i,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.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,o,s){const r={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(r,i);r.visibility=a,n&&o.push(r);const l=e.children||j.$.empty(),d=n&&0!==a&&!r.collapsed;let c=0,h=1;for(const e of l){const t=this.createTreeNode(e,r,a,d,o,s);r.children.push(t),h+=t.renderNodeCount,t.visible&&(t.visibleChildIndex=c++)}return r.collapsible=r.collapsible||r.children.length>0,r.visibleChildrenCount=c,r.visible=2===a?c>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=h):(r.renderNodeCount=0,n&&o.pop()),null==s||s(r),r}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)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 o;if(e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const s=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const s of e.children)r=this._updateNodeAfterFilterChange(s,o,i,n&&!e.collapsed)||r,s.visible&&(s.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?r:1===o,e.visibility=o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-s):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)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"boolean"==typeof i?(e.filterData=void 0,i?1:0):U(i)?(e.filterData=i.data,q(i.visibility)):(e.filterData=void 0,q(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new B(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:o}=this.getParentNodeWithListIndex(e),s=e[e.length-1];if(s<0||s>t.children.length)throw new B(this.user,"Invalid tree location");const r=t.children[s];return{node:r,listIndex:i,revealed:n,visible:o&&r.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,o=!0){const[s,...r]=e;if(s<0||s>t.children.length)throw new B(this.user,"Invalid tree location");for(let e=0;ee.element))),this.data=e}}function ae(e){return e instanceof O.kX?new re(e):e}class le{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=a.JT.None,this.disposables=new a.SL}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,ae(e),t)}onDragOver(e,t,i,n,s,r=!0){const a=this.dnd.onDragOver(ae(e),t&&t.element,i,n,s),l=this.autoExpandNode!==t;if(l&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return a;if(l&&"boolean"!=typeof a&&a.autoExpand&&(this.autoExpandDisposable=(0,H.Vg)((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500,this.disposables)),"boolean"==typeof a||!a.accept||void 0===a.bubble||a.feedback)return r?a:{accept:"boolean"==typeof a?a:a.accept,effect:"boolean"==typeof a?void 0:a.effect,feedback:[i]};if(1===a.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),r=i.getParentNodeLocation(o),a=i.getNode(r),l=r&&i.getListIndex(r);return this.onDragOver(e,a,l,n,s,!1)}const d=this.modelProvider(),c=d.getNodeLocation(t),h=d.getListIndex(c),u=d.getListRenderCount(c);return{...a,feedback:(0,o.w6)(h,h+u)}}drop(e,t,i,n,o){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(ae(e),t&&t.element,i,n,o)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function de(e,t){return t&&{...t,identityProvider:t.identityProvider&&{getId:e=>t.identityProvider.getId(e.element)},dnd:t.dnd&&new le(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>t.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element}),isSelectionRangeChangeEvent:e=>t.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})},accessibilityProvider:t.accessibilityProvider&&{...t.accessibilityProvider,getSetSize(t){const i=e(),n=i.getNodeLocation(t),o=i.getParentNodeLocation(n);return i.getNode(o).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?e=>t.accessibilityProvider.isChecked(e.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>t.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>t.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?e=>t.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))},keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getKeyboardNavigationLabel:e=>t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}}class ce{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){var i,n;null===(n=(i=this.delegate).setDynamicHeight)||void 0===n||n.call(i,e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(ie||(ie={}));class he{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new a.SL,this.onDidChange=r.ju.forEach(e,(e=>this._elements=e),this.disposables)}dispose(){this.disposables.dispose()}}class ue{constructor(e,t,i,n,o,s={}){var l;this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedIndentGuides=o,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=ue.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=a.JT.None,this.disposables=new a.SL,this.templateId=e.templateId,this.updateOptions(s),r.ju.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),null===(l=e.onDidChangeTwistieState)||void 0===l||l.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent){const t=(0,J.uZ)(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[e,t]of this.renderedNodes)this.renderTreeElement(e,t)}}if(void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==ie.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[e,t]of this.renderedNodes)this._renderIndentGuides(e,t);if(this.indentGuidesDisposable.dispose(),t){const e=new a.SL;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=(0,n.R3)(e,(0,n.$)(".monaco-tl-row")),i=(0,n.R3)(t,(0,n.$)(".monaco-tl-indent")),o=(0,n.R3)(t,(0,n.$)(".monaco-tl-twistie")),s=(0,n.R3)(t,(0,n.$)(".monaco-tl-contents")),r=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:o,indentGuidesDisposable:a.JT.None,templateData:r}}renderElement(e,t,i,n){this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){var o,s;i.indentGuidesDisposable.dispose(),null===(s=(o=this.renderer).disposeElement)||void 0===s||s.call(o,e,t,i.templateData,n),"number"==typeof n&&(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){const i=ue.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${i}px`,t.indent.style.width=i+this.indent-16+"px",e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...Z.k.asClassNameArray(G.l.treeItemExpanded));let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...Z.k.asClassNameArray(G.l.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if((0,n.PO)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new a.SL,o=this.modelProvider();for(;;){const s=o.getNodeLocation(e),r=o.getParentNodeLocation(s);if(!r)break;const l=o.getNode(r),d=(0,n.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&d.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(d):t.indent.insertBefore(d,t.indent.firstElementChild),this.renderedIndentGuides.add(l,d),i.add((0,a.OF)((()=>this.renderedIndentGuides.delete(l,d)))),e=l}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch(e){}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,a.B9)(this.disposables)}}ue.DefaultIndent=8;class ge{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new a.SL,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let i=1;if(this._filter){const n=this._filter.filter(e,t);if(i="boolean"==typeof n?n?1:0:U(n)?q(n.visibility):n,0===i)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:Y.CL.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),o=Array.isArray(n)?n:[n];for(const e of o){const t=e&&e.toString();if(void 0===t)return{data:Y.CL.Default,visibility:i};let n;if(this.tree.findMatchType===oe.Contiguous){const e=t.toLowerCase().indexOf(this._lowercasePattern);if(e>-1){n=[Number.MAX_SAFE_INTEGER,0];for(let t=this._lowercasePattern.length;t>0;t--)n.push(e+t-1)}}else n=(0,Y.EW)(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(n)return this._matchCount++,1===o.length?{data:n,visibility:i}:{data:{label:t,score:n},visibility:i}}return this.tree.findMode===ne.Filter?"number"==typeof this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:Y.CL.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,a.B9)(this.disposables)}}P.g4,F.D,function(e){e[e.Highlight=0]="Highlight",e[e.Filter=1]="Filter"}(ne||(ne={})),function(e){e[e.Fuzzy=0]="Fuzzy",e[e.Contiguous=1]="Contiguous"}(oe||(oe={}));class pe{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n,o,s={}){var l,d;this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=o,this.options=s,this._pattern="",this.width=0,this._onDidChangeMode=new r.Q5,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new r.Q5,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new r.Q5,this._onDidChangeOpenState=new r.Q5,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new a.SL,this.disposables=new a.SL,this._mode=null!==(l=e.options.defaultFindMode)&&void 0!==l?l:ne.Highlight,this._matchType=null!==(d=e.options.defaultFindMatchType)&&void 0!==d?d:oe.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){void 0!==e.defaultFindMode&&(this.mode=e.defaultFindMode),void 0!==e.defaultFindMatchType&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){this.widget&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}render(){var e,t,i,n;const o=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&o?null===(e=this.tree.options.showNotFoundMessage)||void 0===e||e?null===(t=this.widget)||void 0===t||t.showMessage({type:2,content:(0,se.NC)("not found","No elements found.")}):null===(i=this.widget)||void 0===i||i.showMessage({type:2}):null===(n=this.widget)||void 0===n||n.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1||!Y.CL.isDefault(e.filterData)}layout(e){var t;this.width=e,null===(t=this.widget)||void 0===t||t.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function me(e,t){return e.position===t.position&&fe(e,t)}function fe(e,t){return e.node.element===t.node.element&&e.startIndex===t.startIndex&&e.height===t.height&&e.endIndex===t.endIndex}class ve{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return(0,o.fS)(this.stickyNodes,e.stickyNodes,me)}lastNodePartiallyVisible(){if(0===this.count)return!1;const e=this.stickyNodes[this.count-1];if(1===this.count)return 0!==e.position;const t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!(0,o.fS)(this.stickyNodes,e.stickyNodes,fe))return!1;if(0===this.count)return!1;const t=this.stickyNodes[this.count-1],i=e.stickyNodes[e.count-1];return t.position!==i.position}}class _e{constrainStickyScrollNodes(e,t,i){for(let n=0;ni||n>=t)return e.slice(0,n)}return e}}class be extends a.JT{constructor(e,t,i,n,o,s={}){var r;super(),this.tree=e,this.model=t,this.view=i,this.treeDelegate=o,this.maxWidgetViewRatio=.4;const a=this.validateStickySettings(s);this.stickyScrollMaxItemCount=a.stickyScrollMaxItemCount,this.stickyScrollDelegate=null!==(r=s.stickyScrollDelegate)&&void 0!==r?r:new _e,this._widget=this._register(new we(i.getScrollableElement(),i,e,n,o,s.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.update()}getNodeAtHeight(e){let t;if(t=0===e?this.view.firstVisibleIndex:this.view.indexAt(e+this.view.scrollTop),!(t<0||t>=this.view.length))return this.view.element(t)}update(){const e=this.getNodeAtHeight(0);if(!e||0===this.tree.scrollTop)return void this._widget.setState(void 0);const t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){const t=[];let i=e,n=0,o=this.getNextStickyNode(i,void 0,n);for(;o&&(t.push(o),n+=o.height,!(t.length<=this.stickyScrollMaxItemCount)||(i=this.getNextVisibleNode(o),i));)o=this.getNextStickyNode(i,o.node,n);const s=this.constrainStickyNodes(t);return s.length?new ve(s):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,i){const n=this.getAncestorUnderPrevious(e,t);if(n){if(n===e){if(!this.nodeIsUncollapsedParent(e))return;if(this.nodeTopAlignsWithStickyNodesBottom(e,i))return}return this.createStickyScrollNode(n,i)}}nodeTopAlignsWithStickyNodesBottom(e,t){const i=this.getNodeIndex(e),n=this.view.getElementTop(i),o=t;return this.view.scrollTop===n-o}createStickyScrollNode(e,t){const i=this.treeDelegate.getHeight(e),{startIndex:n,endIndex:o}=this.getNodeRange(e);return{node:e,position:this.calculateStickyNodePosition(o,t,i),height:i,startIndex:n,endIndex:o}}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(void 0===t)return i}calculateStickyNodePosition(e,t,i){let n=this.view.getRelativeTop(e);if(null===n&&this.view.firstVisibleIndex===e&&e+1r&&t<=r?r-i:t}constrainStickyNodes(e){if(0===e.length)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 o=n[n.length-1];if(n.length>this.stickyScrollMaxItemCount||o.position+o.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");return{startIndex:i,endIndex:i+this.model.getListRenderCount(t)-1}}nodePositionTopBelowWidget(e){const t=[];let i=this.getParentNode(e);for(;i;)t.push(i),i=this.getParentNode(i);let n=0;for(let e=0;e0,i=!!e&&e.count>0;if(!t&&!i||t&&i&&this._previousState.equal(e))return;if(t!==i&&this.setVisible(i),!i)return this._previousState=void 0,this._previousElements=[],void this._previousStateDisposables.clear();const n=e.stickyNodes[e.count-1];if(this._previousState&&e.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${n.position}px`;else{this._previousStateDisposables.clear();const t=Array(e.count);for(let i=e.count-1;i>=0;i--){const n=e.stickyNodes[i],{element:o,disposable:s}=this.createElement(n,i,e.count);t[i]=o,this._rootDomNode.appendChild(o),this._previousStateDisposables.add(s)}this.stickyScrollFocus.updateElements(t,e),this._previousElements=t}this._previousState=e,this._rootDomNode.style.height=`${n.position+n.height}px`}createElement(e,t,i){const n=e.startIndex,o=document.createElement("div");o.style.top=`${e.position}px`,o.style.height=`${e.height}px`,o.style.lineHeight=`${e.height}px`,o.classList.add("monaco-tree-sticky-row"),o.classList.add("monaco-list-row"),o.setAttribute("data-index",`${n}`),o.setAttribute("data-parity",n%2==0?"even":"odd"),o.setAttribute("id",this.view.getElementID(n)),this.setAccessibilityAttributes(o,e.node.element,t,i);const s=this.treeDelegate.getTemplateId(e.node),r=this.treeRenderers.find((e=>e.templateId===s));if(!r)throw new Error(`No renderer found for template id ${s}`);let l=e.node;l===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(l=new Proxy(e.node,{}));const d=r.renderTemplate(o);r.renderElement(l,e.startIndex,d,e.height);const c=(0,a.OF)((()=>{r.disposeElement(l,e.startIndex,d,e.height),r.disposeTemplate(d),o.remove()}));return{element:o,disposable:c}}setAccessibilityAttributes(e,t,i,n){var o;if(!this.accessibilityProvider)return;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",null!==(o=this.accessibilityProvider.getRole(t))&&void 0!==o?o:"treeitem");const s=this.accessibilityProvider.getAriaLabel(t);s&&e.setAttribute("aria-label",s);const r=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);"number"==typeof r&&e.setAttribute("aria-level",`${r}`),e.setAttribute("aria-selected",String(!1))}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 ye extends a.JT{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=new r.Q5,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new r.Q5,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this.container.addEventListener("focus",(()=>this.onFocus())),this.container.addEventListener("blur",(()=>this.onBlur())),this._register(this.view.onDidFocus((()=>this.toggleStickyScrollFocused(!1)))),this._register(this.view.onKeyDown((e=>this.onKeyDown(e)))),this._register(this.view.onMouseDown((e=>this.onMouseDown(e)))),this._register(this.view.onContextMenu((e=>this.handleContextMenu(e))))}handleContextMenu(e){const t=e.browserEvent.target;if(!(0,l.xf)(t)&&!(0,l.Et)(t))return void(this.focusedLast()&&this.view.domFocus());if(!(0,n.vd)(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");const t=this.state.stickyNodes.findIndex((t=>{var i;return t.node.element===(null===(i=e.element)||void 0===i?void 0:i.element)}));if(-1===t)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");return this.container.focus(),void this.setFocus(t)}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 i=this.state.stickyNodes[this.focusedIndex].node.element,o=this.elements[this.focusedIndex];this._onContextMenu.fire({element:i,anchor:o,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state)if("ArrowUp"===e.key)this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if("ArrowDown"===e.key||"ArrowRight"===e.key){if(this.focusedIndex>=this.state.count-1){const e=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([e]),this.scrollNodeUnderWidget(e,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}onMouseDown(e){const t=e.browserEvent.target;((0,l.xf)(t)||(0,l.Et)(t))&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&0===t.count)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 e=(0,J.uZ)(i,0,t.count-1);this.setFocus(e)}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,o=this.view.getElementTop(e),s=n?n.position+n.height+i.height:i.height;this.view.scrollTop=o-s}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")}removeFocus(){-1!==this.focusedIndex&&(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){e.classList.toggle("focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||0===this.elements.length)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),-1===this.focusedIndex&&this.setFocus(0)}onBlur(){this.domHasFocus=!1}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function Ce(e){let t=R.Unknown;return(0,n.uU)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=R.Twistie:(0,n.uU)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=R.Element:(0,n.uU)(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=R.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function Se(e,t){t(e),e.children.forEach((e=>Se(e,t)))}class xe{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 r.Q5,this.onDidChange=this._onDidChange.event}set(e,t){!(null==t?void 0:t.__forceEvent)&&(0,o.fS)(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 e=this;this._onDidChange.fire({get elements(){return e.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 e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>Se(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>Se(e,n)));const o=new Map,s=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>Se(e,s)));const r=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(i.has(t)){const e=o.get(t);e&&e.visible&&r.push(e)}else r.push(e)}if(this.nodes.length>0&&0===r.length){const e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class ke extends l.sx{constructor(e,t,i){super(e),this.tree=t,this.stickyScrollProvider=i}onViewPointer(e){if((0,l.iK)(e.browserEvent.target)||(0,l.cK)(e.browserEvent.target)||(0,l.hD)(e.browserEvent.target))return;if(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,o=(0,l.Et)(e.browserEvent.target);let s=!1;if(s=!!o||("function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick),o)this.handleStickyScrollMouseEvent(e,t);else{if(s&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e)}if(t.collapsible&&(!o||n)){const i=this.tree.getNodeLocation(t),o=e.browserEvent.altKey;if(this.tree.setFocus([i]),this.tree.toggleCollapsed(i,o),s&&n)return void(e.browserEvent.isHandledByList=!0)}o||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if((0,l.$B)(e.browserEvent.target)||(0,l.dk)(e.browserEvent.target))return;const i=this.stickyScrollProvider();if(!i)throw new Error("Sticky scroll controller not found");const n=this.list.indexOf(t),o=this.list.getElementTop(n),s=i.nodePositionTopBelowWidget(t);this.tree.scrollTop=o-s,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;(0,l.xf)(t)||(0,l.Et)(t)||super.onMouseDown(e)}onContextMenu(e){const t=e.browserEvent.target;(0,l.xf)(t)||(0,l.Et)(t)||super.onContextMenu(e)}}class Le extends l.aV{constructor(e,t,i,n,o,s,r,a){super(e,t,i,n,a),this.focusTrait=o,this.selectionTrait=s,this.anchorTrait=r}createMouseController(e){return new ke(this,e.tree,e.stickyScrollProvider)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],s=[];let r;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&s.push(e+i),this.anchorTrait.has(t)&&(r=e+i)})),n.length>0&&super.setFocus((0,o.EB)([...super.getFocus(),...n])),s.length>0&&super.setSelection((0,o.EB)([...super.getSelection(),...s])),"number"==typeof r&&super.setAnchor(r)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class Ne{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 r.ju.filter(r.ju.map(this.view.onMouseDblClick,Ce),(e=>e.target!==R.Filter))}get onPointer(){return r.ju.map(this.view.onPointer,Ce)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return r.ju.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.mode)&&void 0!==t?t:ne.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.matchType)&&void 0!==t?t:oe.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,o,s={}){var d;this._user=e,this._options=s,this.eventBufferer=new r.E7,this.onDidChangeFindOpenState=r.ju.None,this.onDidChangeStickyScrollFocused=r.ju.None,this.disposables=new a.SL,this._onWillRefilter=new r.Q5,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new r.Q5,this.treeDelegate=new ce(i);const c=new r.ZD,h=new r.ZD,u=this.disposables.add(new he(h.event)),g=new Q.ri;this.renderers=o.map((e=>new ue(e,(()=>this.model),c.event,u,g,s)));for(const e of this.renderers)this.disposables.add(e);let p;s.keyboardNavigationLabelProvider&&(p=new ge(this,s.keyboardNavigationLabelProvider,s.filter),s={...s,filter:p},this.disposables.add(p)),this.focus=new xe((()=>this.view.getFocusedElements()[0]),s.identityProvider),this.selection=new xe((()=>this.view.getSelectedElements()[0]),s.identityProvider),this.anchor=new xe((()=>this.view.getAnchorElement()),s.identityProvider),this.view=new Le(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...de((()=>this.model),s),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,s),c.input=this.model.onDidChangeCollapseState;const m=r.ju.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}),this.disposables);m((()=>null),null,this.disposables);const f=this.disposables.add(new r.Q5),v=this.disposables.add(new H.vp(0));if(this.disposables.add(r.ju.any(m,this.focus.onDidChange,this.selection.onDidChange)((()=>{v.trigger((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);f.fire([...e.values()])}))}))),h.input=f.event,!1!==s.keyboardSupport){const e=r.ju.chain(this.view.onKeyDown,(e=>e.filter((e=>!(0,l.cK)(e.target))).map((e=>new A.y(e)))));r.ju.chain(e,(e=>e.filter((e=>15===e.keyCode))))(this.onLeftArrow,this,this.disposables),r.ju.chain(e,(e=>e.filter((e=>17===e.keyCode))))(this.onRightArrow,this,this.disposables),r.ju.chain(e,(e=>e.filter((e=>10===e.keyCode))))(this.onSpace,this,this.disposables)}if((null===(d=s.findWidgetEnabled)||void 0===d||d)&&s.keyboardNavigationLabelProvider&&s.contextViewProvider){const e=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new pe(this,this.model,this.view,p,s.contextViewProvider,e),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=r.ju.None,this.onDidChangeFindMatchType=r.ju.None;s.enableStickyScroll&&(this.stickyScrollController=new be(this,this.model,this.view,this.renderers,this.treeDelegate,s),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=(0,n.dS)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===ie.Always)}updateOptions(e={}){var t;this._options={...this._options,...e};for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(this._options),null===(t=this.findController)||void 0===t||t.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===ie.Always)}get options(){return this._options}updateStickyScroll(e){var t;!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new be(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=r.ju.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),null===(t=this.stickyScrollController)||void 0===t||t.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}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}domFocus(){var e;(null===(e=this.stickyScrollController)||void 0===e?void 0:e.focusedLast())?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,t){var i;this.view.layout(e,t),(0,X.hj)(t)&&(null===(i=this.findController)||void 0===i||i.layout(t))}style(e){var t;const i=`.${this.view.domId}`,o=[];e.treeIndentGuidesStroke&&(o.push(`.monaco-list${i}:hover .monaco-tl-indent > .indent-guide, .monaco-list${i}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),o.push(`.monaco-list${i} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),e.listBackground&&(o.push(`.monaco-list${i} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${e.listBackground}; }`),o.push(`.monaco-list${i} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${e.listBackground}; }`)),e.listFocusForeground&&(o.push(`.monaco-list${i}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),o.push(`.monaco-list${i}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));const s=(0,n.XT)(e.listFocusAndSelectionOutline,(0,n.XT)(e.listSelectionOutline,null!==(t=e.listFocusOutline)&&void 0!==t?t:""));s&&(o.push(`.monaco-list${i}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),o.push(`.monaco-list${i}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(o.push(`.monaco-list${i}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),o.push(`.monaco-list${i}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),o.push(`.monaco-workbench.context-menu-visible .monaco-list${i}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),o.push(`.monaco-workbench.context-menu-visible .monaco-list${i}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=o.join("\n"),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((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}))}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents((()=>{const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}))}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);if(-1!==i)if(this.stickyScrollController){const n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}else this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){var e;(0,a.B9)(this.disposables),null===(e=this.stickyScrollController)||void 0===e||e.dispose(),this.view.dispose()}}class De{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new $(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare:(e,t)=>i.sorter.compare(e.element,t.element)}),this.identityProvider=i.identityProvider}setChildren(e,t=j.$.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=j.$.empty(),i){const n=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,{...i,onDidCreateNode:e=>{var t;if(null===e.element)return;const s=e;if(n.add(s.element),this.nodes.set(s.element,s),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.add(e),this.nodesByIdentity.set(e,s)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,s)},onDidDeleteNode:e=>{var t;if(null===e.element)return;const s=e;if(n.has(s.element)||this.nodes.delete(s.element),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,s)}})}preserveCollapseState(e=j.$.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),j.$.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t){let t;return t=void 0===e.collapsed?void 0:e.collapsed===M.Collapsed||e.collapsed===M.PreserveOrCollapsed||e.collapsed!==M.Expanded&&e.collapsed!==M.PreserveOrExpanded&&Boolean(e.collapsed),{...e,children:this.preserveCollapseState(e.children),collapsed:t}}const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible;let n;return n=void 0===e.collapsed||e.collapsed===M.PreserveOrCollapsed||e.collapsed===M.PreserveOrExpanded?t.collapsed:e.collapsed===M.Collapsed||e.collapsed!==M.Expanded&&Boolean(e.collapsed),{...e,collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)}}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}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(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new B(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new B(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new B(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(null===e)return[];const t=this.nodes.get(e);if(!t)throw new B(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function Ee(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:j.$.map(j.$.from(e.children),Ee),collapsible:e.collapsible,collapsed:e.collapsed}}function Ie(e){const t=[e.element],i=e.incompressible||!1;let n,o;for(;[o,n]=j.$.consume(j.$.from(e.children),2),1===o.length&&!o[0].incompressible;)e=o[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:j.$.map(j.$.concat(o,n),Ie),collapsible:e.collapsible,collapsed:e.collapsed}}function Te(e,t=0){let i;return i=tTe(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function Me(e){return Te(e,0)}function Re(e,t,i){return e.element===t?{...e,children:i}:{...e,children:j.$.map(j.$.from(e.children),(e=>Re(e,t,i)))}}class Ae{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new De(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}setChildren(e,t=j.$.empty(),i){const n=i.diffIdentityProvider&&(s=i.diffIdentityProvider,{getId:e=>e.elements.map((e=>s.getId(e).toString())).join("\0")});var s;if(null===e){const e=j.$.map(t,this.enabled?Ie:Ee);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const r=this.nodes.get(e);if(!r)throw new B(this.user,"Unknown compressed tree node");const a=this.model.getNode(r),l=this.model.getParentNodeLocation(r),d=this.model.getNode(l),c=Re(Me(a),e,t),h=(this.enabled?Ie:Ee)(c),u=i.diffIdentityProvider?(e,t)=>i.diffIdentityProvider.getId(e)===i.diffIdentityProvider.getId(t):void 0;if((0,o.fS)(h.element.elements,a.element.elements,u))return void this._setChildren(r,h.children||j.$.empty(),{diffIdentityProvider:n,diffDepth:1});const g=d.children.map((e=>e===a?h:e));this._setChildren(d.element,g,{diffIdentityProvider:n,diffDepth:a.depth-d.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=j.$.map(t,Me),n=j.$.map(i,e?Ie:Ee);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,{...i,onDidCreateNode:e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)}})}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(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?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()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new B(this.user,`Tree element not found: ${e}`);return t}}const Pe=e=>e[e.length-1];class Oe{get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new Oe(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}}class Fe{get onDidSplice(){return r.ju.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return r.ju.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return r.ju.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||Pe;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new W((e=>new Oe(n,e))),this.model=new Ae(e,function(e,t){return{splice(i,n,o){t.splice(i,n,o.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,t),function(e,t){return{...t,identityProvider:t.identityProvider&&{getId:i=>t.identityProvider.getId(e(i))},sorter:t.sorter&&{compare:(e,i)=>t.sorter.compare(e.elements[0],i.elements[0])},filter:t.filter&&{filter:(i,n)=>t.filter.filter(e(i),n)}}}(n,i))}setChildren(e,t=j.$.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 null==t?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()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var Be=i(49898);class We extends Ne{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,o={}){super(e,t,i,n,o),this.user=e}setChildren(e,t=j.$.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new De(e,t,i)}}class He{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 o=this.stickyScrollDelegate.getCompressedNode(e);o||(o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){var o,s,r,a;i.compressedTreeNode?null===(s=(o=this.renderer).disposeCompressedElements)||void 0===s||s.call(o,i.compressedTreeNode,t,i.data,n):null===(a=(r=this.renderer).disposeElement)||void 0===a||a.call(r,e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}!function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);s>3&&r&&Object.defineProperty(t,i,r)}([Be.H],He.prototype,"compressedTreeNodeProvider",null);class Ve{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,t,i){if(this.compressedStickyNodes.clear(),0===e.length)return[];for(let n=0;ni||n>=t-1&&tthis,r=new Ve((()=>this.model));super(e,t,i,n.map((e=>new He(s,r,e))),{...ze(s,o),stickyScrollDelegate:r})}setChildren(e,t=j.$.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new Fe(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var Ue=i(17301);function qe(e){return{...e,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function Ke(e,t){return!!t.parent&&(t.parent===e||Ke(e,t.parent))}class $e{get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new $e(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 Ge{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(...Z.k.asClassNameArray(G.l.treeItemLoading)),!0):(t.classList.remove(...Z.k.asClassNameArray(G.l.treeItemLoading)),!1)}disposeElement(e,t,i,n){var o,s;null===(s=(o=this.renderer).disposeElement)||void 0===s||s.call(o,this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function Ze(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function Qe(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class Ye extends O.kX{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function Je(e){return e instanceof O.kX?new Ye(e):e}class Xe{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((e=>e.element)),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,Je(e),t)}onDragOver(e,t,i,n,o,s=!0){return this.dnd.onDragOver(Je(e),t&&t.element,i,n,o)}drop(e,t,i,n,o){this.dnd.drop(Je(e),t&&t.element,i,n,o)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}dispose(){this.dnd.dispose()}}function et(e){return e&&{...e,collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new Xe(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent({...t,element:t.element}),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent({...t,element:t.element})},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))},filter:e.filter&&{filter:(t,i)=>e.filter.filter(t.element,i)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)},sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),defaultFindVisibility:t=>t.hasChildren&&t.stale?1:"number"==typeof e.defaultFindVisibility?e.defaultFindVisibility:void 0===e.defaultFindVisibility?2:e.defaultFindVisibility(t.element)}}function tt(e,t){t(e),e.children.forEach((e=>tt(e,t)))}class it{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return r.ju.map(this.tree.onDidChangeFocus,Ze)}get onDidChangeSelection(){return r.ju.map(this.tree.onDidChangeSelection,Ze)}get onMouseDblClick(){return r.ju.map(this.tree.onMouseDblClick,Qe)}get onPointer(){return r.ju.map(this.tree.onPointer,Qe)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,o,s={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new r.Q5,this._onDidChangeNodeSlowState=new r.Q5,this.nodeMapper=new W((e=>new $e(e))),this.disposables=new a.SL,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=void 0!==s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.getDefaultCollapseState=e=>s.collapseByDefault?s.collapseByDefault(e)?M.PreserveOrCollapsed:M.PreserveOrExpanded:void 0,this.tree=this.createTree(e,t,i,n,s),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=qe({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)}createTree(e,t,i,n,o){const s=new ce(i),r=n.map((e=>new Ge(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=et(o)||{};return new We(e,t,s,r,a)}updateOptions(e={}){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.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),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&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}async _updateChildren(e=this.root.element,t=!0,i=!1,n,o){if(void 0===this.root.element)throw new B(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await r.ju.toPromise(this._onDidRender.event));const s=this.getDataNode(e);if(await this.refreshAndRenderNode(s,t,n,o),i)try{this.tree.rerender(s)}catch(e){}}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();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(void 0===this.root.element)throw new B(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await r.ju.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(await this.root.refreshPromise,await r.ju.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 this.root.refreshPromise,await r.ju.toPromise(this._onDidRender.event)),n}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map((e=>e.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)throw new B(this.user,`Data tree node not found: ${e}`);return t}async refreshAndRenderNode(e,t,i,n){await this.refreshNode(e,t,i),this.disposables.isDisposed||this.render(e,i,n)}async refreshNode(e,t,i){let n;return this.subTreeRefreshPromises.forEach(((o,s)=>{!n&&function(e,t){return e===t||Ke(e,t)||Ke(t,e)}(s,e)&&(n=o.then((()=>this.refreshNode(e,t,i))))})),n||(e!==this.root&&this.tree.getNode(e).collapsed?(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,void this.setChildren(e,[],t,i)):this.doRefreshSubTree(e,t,i))}async doRefreshSubTree(e,t,i){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const n=await this.doRefreshNode(e,t,i);e.stale=!1,await H.jT.settled(n.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}async doRefreshNode(e,t,i){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=this.doGetChildren(e);if((0,X.TW)(t))n=Promise.resolve(t);else{const i=(0,H.Vs)(800);i.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=t.finally((()=>i.cancel()))}}else n=Promise.resolve(j.$.empty());try{const o=await n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),(0,Ue.n2)(t))return[];throw t}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(0,X.TW)(i)?this.processChildren(i):(t=(0,H.PG)((async()=>this.processChildren(await i))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(Ue.dL))}setChildren(e,t,i,n){const o=[...t];if(0===e.children.length&&0===o.length)return[];const s=new Map,r=new Map;for(const t of e.children)s.set(t.element,t),this.identityProvider&&r.set(t.id,{node:t,collapsed:this.tree.hasElement(t)&&this.tree.isCollapsed(t)});const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=qe({element:t,parent:e,hasChildren:o,defaultCollapseState:this.getDefaultCollapseState(t)});return o&&i.defaultCollapseState===M.PreserveOrExpanded&&a.push(i),i}const l=this.identityProvider.getId(t).toString(),d=r.get(l);if(d){const e=d.node;return s.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?d.collapsed?(e.children.forEach((e=>tt(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&!d.collapsed&&a.push(e),e}const c=qe({element:t,parent:e,id:l,hasChildren:o,defaultCollapseState:this.getDefaultCollapseState(t)});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(c),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(c),(n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1||o&&c.defaultCollapseState===M.PreserveOrExpanded)&&a.push(c),c}));for(const e of s.values())tt(e,(e=>this.nodes.delete(e.element)));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].forceExpanded=!0,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),o=i&&{...i,diffIdentityProvider:i.diffIdentityProvider&&{getId:e=>i.diffIdentityProvider.getId(e.element)}};this.tree.setChildren(e===this.root?null:e,n,o),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?j.$.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class nt{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 nt(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 ot{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(...Z.k.asClassNameArray(G.l.treeItemLoading)),!0):(t.classList.remove(...Z.k.asClassNameArray(G.l.treeItemLoading)),!1)}disposeElement(e,t,i,n){var o,s;null===(s=(o=this.renderer).disposeElement)||void 0===s||s.call(o,this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){var o,s;null===(s=(o=this.renderer).disposeCompressedElements)||void 0===s||s.call(o,this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,a.B9)(this.disposables)}}class st extends it{constructor(e,t,i,n,o,s,r={}){super(e,t,i,o,s,r),this.compressionDelegate=n,this.compressibleNodeMapper=new W((e=>new nt(e))),this.filter=r.filter}createTree(e,t,i,n,o){const s=new ce(i),r=n.map((e=>new ot(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&et(e);return t&&{...t,keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))}}}(o)||{};return new je(e,t,s,r,a)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t,i){if(!this.identityProvider)return super.render(e,t);const n=e=>this.identityProvider.getId(e).toString(),o=e=>{const t=new Set;for(const i of e){const e=this.tree.getCompressedTreeNode(i===this.root?null:i);if(e.element)for(const i of e.element.elements)t.add(n(i.element))}return t},s=o(this.tree.getSelection()),r=o(this.tree.getFocus());super.render(e,t,i);const a=this.getSelection();let l=!1;const d=this.getFocus();let c=!1;const h=e=>{const t=e.element;if(t)for(let e=0;e{const t="boolean"==typeof(i=this.filter.filter(e,1))?i?1:0:U(i)?q(i.visibility):q(i);var i;if(2===t)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===t}))),super.processChildren(e)}}class rt extends Ne{constructor(e,t,i,n,o,s={}){super(e,t,i,n,s),this.user=e,this.dataSource=o,this.identityProvider=s.identityProvider}createModel(e,t,i){return new De(e,t,i)}}var at=i(33108),lt=i(23193),dt=i(93983),ct=i(39282),ht=i(5606),ut=i(72065),gt=i(91847),pt=i(89872),mt=i(86253),ft=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},vt=function(e,t){return function(i,n){t(i,n,e)}};const _t=(0,ut.yh)("listService");class bt{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new a.SL,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&(null===(t=this._lastFocusedWidget)||void 0===t||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,null===(i=this._lastFocusedWidget)||void 0===i||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new l.wD((0,n.dS)(),"").style(mt.O2)),this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),(0,n.H9)(e.getHTMLElement())&&this.setLastFocusedList(e),(0,a.F8)(e.onDidFocus((()=>this.setLastFocusedList(e))),(0,a.OF)((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)})))}dispose(){this.disposables.dispose()}}const wt=new dt.uy("listScrollAtBoundary","none"),yt=(dt.Ao.or(wt.isEqualTo("top"),wt.isEqualTo("both")),dt.Ao.or(wt.isEqualTo("bottom"),wt.isEqualTo("both")),new dt.uy("listFocus",!0)),Ct=new dt.uy("treestickyScrollFocused",!1),St=new dt.uy("listSupportsMultiselect",!0),xt=dt.Ao.and(yt,dt.Ao.not(ct.d0),Ct.negate()),kt=new dt.uy("listHasSelectionOrFocus",!1),Lt=new dt.uy("listDoubleSelection",!1),Nt=new dt.uy("listMultiSelection",!1),Dt=new dt.uy("listSelectionNavigation",!1),Et=new dt.uy("listSupportsFind",!0),It=new dt.uy("treeElementCanCollapse",!1),Tt=new dt.uy("treeElementHasParent",!1),Mt=new dt.uy("treeElementCanExpand",!1),Rt=new dt.uy("treeElementHasChild",!1),At=new dt.uy("treeFindOpen",!1),Pt="listTypeNavigationMode",Ot="listAutomaticKeyboardNavigation";function Ft(e,t){const i=e.createScoped(t.getHTMLElement());return yt.bindTo(i),i}function Bt(e,t){const i=wt.bindTo(e),n=()=>{const e=0===t.scrollTop,n=t.scrollHeight-t.renderHeight-t.scrollTop<1;e&&n?i.set("both"):e?i.set("top"):n?i.set("bottom"):i.set("none")};return n(),t.onDidScroll(n)}const Wt="workbench.list.multiSelectModifier",Ht="workbench.list.openMode",Vt="workbench.list.horizontalScrolling",zt="workbench.list.defaultFindMode",jt="workbench.list.typeNavigationMode",Ut="workbench.list.keyboardNavigation",qt="workbench.list.scrollByPage",Kt="workbench.list.defaultFindMatchType",$t="workbench.tree.indent",Gt="workbench.tree.renderIndentGuides",Zt="workbench.list.smoothScrolling",Qt="workbench.list.mouseWheelScrollSensitivity",Yt="workbench.list.fastScrollSensitivity",Jt="workbench.tree.expandMode",Xt="workbench.tree.enableStickyScroll",ei="workbench.tree.stickyScrollMaxItemCount";function ti(e){return"alt"===e.getValue(Wt)}class ii extends a.JT{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=ti(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(Wt)&&(this.useAltAsMultipleSelectionModifier=ti(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:(0,l.Zo)(e)}isSelectionRangeChangeEvent(e){return(0,l.wn)(e)}}function ni(e,t){var i;const n=e.get(at.Ui),o=e.get(gt.d),s=new a.SL;return[{...t,keyboardNavigationDelegate:{mightProducePrintableCharacter:e=>o.mightProducePrintableCharacter(e)},smoothScrolling:Boolean(n.getValue(Zt)),mouseWheelScrollSensitivity:n.getValue(Qt),fastScrollSensitivity:n.getValue(Yt),multipleSelectionController:null!==(i=t.multipleSelectionController)&&void 0!==i?i:s.add(new ii(n)),keyboardNavigationEventFilter:hi(o),scrollByPage:Boolean(n.getValue(qt))},s]}let oi=class extends l.aV{constructor(e,t,i,n,o,s,r,a,l){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(a.getValue(Vt)),[c,h]=l.invokeFunction(ni,o);super(e,t,i,n,{keyboardSupport:!1,...c,horizontalScrolling:d}),this.disposables.add(h),this.contextKeyService=Ft(s,this),this.disposables.add(Bt(this.contextKeyService,this)),this.listSupportsMultiSelect=St.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),Dt.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=kt.bindTo(this.contextKeyService),this.listDoubleSelection=Lt.bindTo(this.contextKeyService),this.listMultiSelection=Nt.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=ti(a),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(a.onDidChangeConfiguration((e=>{e.affectsConfiguration(Wt)&&(this._useAltAsMultipleSelectionModifier=ti(a));let t={};if(e.affectsConfiguration(Vt)&&void 0===this.horizontalScrolling){const e=Boolean(a.getValue(Vt));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(qt)){const e=Boolean(a.getValue(qt));t={...t,scrollByPage:e}}if(e.affectsConfiguration(Zt)){const e=Boolean(a.getValue(Zt));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(Qt)){const e=a.getValue(Qt);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(Yt)){const e=a.getValue(Yt);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new li(this,{configurationService:a,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,mt.TU)(e):mt.O2)}};oi=ft([vt(5,dt.i6),vt(6,_t),vt(7,at.Ui),vt(8,ut.TG)],oi);let si=class extends h{constructor(e,t,i,n,o,s,r,l,d){const c=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(Vt)),[h,u]=d.invokeFunction(ni,o);super(e,t,i,n,{keyboardSupport:!1,...h,horizontalScrolling:c}),this.disposables=new a.SL,this.disposables.add(u),this.contextKeyService=Ft(s,this),this.disposables.add(Bt(this.contextKeyService,this.widget)),this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=St.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),Dt.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this._useAltAsMultipleSelectionModifier=ti(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(Wt)&&(this._useAltAsMultipleSelectionModifier=ti(l));let t={};if(e.affectsConfiguration(Vt)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Vt));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(qt)){const e=Boolean(l.getValue(qt));t={...t,scrollByPage:e}}if(e.affectsConfiguration(Zt)){const e=Boolean(l.getValue(Zt));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(Qt)){const e=l.getValue(Qt);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(Yt)){const e=l.getValue(Yt);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new li(this,{configurationService:l,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,mt.TU)(e):mt.O2)}dispose(){this.disposables.dispose(),super.dispose()}};si=ft([vt(5,dt.i6),vt(6,_t),vt(7,at.Ui),vt(8,ut.TG)],si);let ri=class extends T{constructor(e,t,i,n,o,s,r,a,l,d){const c=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(l.getValue(Vt)),[h,u]=d.invokeFunction(ni,s);super(e,t,i,n,o,{keyboardSupport:!1,...h,horizontalScrolling:c}),this.disposables.add(u),this.contextKeyService=Ft(r,this),this.disposables.add(Bt(this.contextKeyService,this)),this.listSupportsMultiSelect=St.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport),Dt.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=kt.bindTo(this.contextKeyService),this.listDoubleSelection=Lt.bindTo(this.contextKeyService),this.listMultiSelection=Nt.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=ti(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(Wt)&&(this._useAltAsMultipleSelectionModifier=ti(l));let t={};if(e.affectsConfiguration(Vt)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Vt));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(qt)){const e=Boolean(l.getValue(qt));t={...t,scrollByPage:e}}if(e.affectsConfiguration(Zt)){const e=Boolean(l.getValue(Zt));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(Qt)){const e=l.getValue(Qt);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(Yt)){const e=l.getValue(Yt);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new di(this,{configurationService:l,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,mt.TU)(e):mt.O2)}dispose(){this.disposables.dispose(),super.dispose()}};ri=ft([vt(6,dt.i6),vt(7,_t),vt(8,at.Ui),vt(9,ut.TG)],ri);class ai extends a.JT{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new r.Q5),this.onDidOpen=this._onDidOpen.event,this._register(r.ju.filter(this.widget.onDidChangeSelection,(e=>(0,n.vd)(e.browserEvent)))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(Ht)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(Ht)&&(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(Ht)))})))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const i=1===t.button,n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,i,n,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 n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,n,t)}_open(e,t,i,n,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:o})}}class li extends ai{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class di extends ai{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class ci extends ai{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function hi(e){let t=!1;return i=>{if(i.toKeyCodeChord().isModifierKey())return!1;if(t)return t=!1,!1;const n=e.softDispatch(i,i.target);return 1===n.kind?(t=!0,!1):(t=!1,0===n.kind)}}let ui=class extends We{constructor(e,t,i,n,o,s,r,a,l){const{options:d,getTypeNavigationMode:c,disposable:h}=s.invokeFunction(bi,o);super(e,t,i,n,d),this.disposables.add(h),this.internals=new wi(this,o,c,o.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};ui=ft([vt(5,ut.TG),vt(6,dt.i6),vt(7,_t),vt(8,at.Ui)],ui);let gi=class extends je{constructor(e,t,i,n,o,s,r,a,l){const{options:d,getTypeNavigationMode:c,disposable:h}=s.invokeFunction(bi,o);super(e,t,i,n,d),this.disposables.add(h),this.internals=new wi(this,o,c,o.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};gi=ft([vt(5,ut.TG),vt(6,dt.i6),vt(7,_t),vt(8,at.Ui)],gi);let pi=class extends rt{constructor(e,t,i,n,o,s,r,a,l,d){const{options:c,getTypeNavigationMode:h,disposable:u}=r.invokeFunction(bi,s);super(e,t,i,n,o,c),this.disposables.add(u),this.internals=new wi(this,s,h,s.overrideStyles,a,l,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),void 0!==e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};pi=ft([vt(6,ut.TG),vt(7,dt.i6),vt(8,_t),vt(9,at.Ui)],pi);let mi=class extends it{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,o,s,r,a,l,d){const{options:c,getTypeNavigationMode:h,disposable:u}=r.invokeFunction(bi,s);super(e,t,i,n,o,c),this.disposables.add(u),this.internals=new wi(this,s,h,s.overrideStyles,a,l,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};mi=ft([vt(6,ut.TG),vt(7,dt.i6),vt(8,_t),vt(9,at.Ui)],mi);let fi=class extends st{constructor(e,t,i,n,o,s,r,a,l,d,c){const{options:h,getTypeNavigationMode:u,disposable:g}=a.invokeFunction(bi,r);super(e,t,i,n,o,s,h),this.disposables.add(g),this.internals=new wi(this,r,u,r.overrideStyles,l,d,c),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function vi(e){const t=e.getValue(zt);if("highlight"===t)return ne.Highlight;if("filter"===t)return ne.Filter;const i=e.getValue(Ut);return"simple"===i||"highlight"===i?ne.Highlight:"filter"===i?ne.Filter:void 0}function _i(e){const t=e.getValue(Kt);return"fuzzy"===t?oe.Fuzzy:"contiguous"===t?oe.Contiguous:void 0}function bi(e,t){var i;const n=e.get(at.Ui),o=e.get(ht.u),s=e.get(dt.i6),r=e.get(ut.TG),a=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(n.getValue(Vt)),[d,c]=r.invokeFunction(ni,t),h=t.paddingBottom,u=void 0!==t.renderIndentGuides?t.renderIndentGuides:n.getValue(Gt);return{getTypeNavigationMode:()=>{const e=s.getContextKeyValue(Pt);if("automatic"===e)return l.AA.Automatic;if("trigger"===e)return l.AA.Trigger;if(!1===s.getContextKeyValue(Ot))return l.AA.Trigger;const t=n.getValue(jt);return"automatic"===t?l.AA.Automatic:"trigger"===t?l.AA.Trigger:void 0},disposable:c,options:{keyboardSupport:!1,...d,indent:"number"==typeof n.getValue($t)?n.getValue($t):void 0,renderIndentGuides:u,smoothScrolling:Boolean(n.getValue(Zt)),defaultFindMode:vi(n),defaultFindMatchType:_i(n),horizontalScrolling:a,scrollByPage:Boolean(n.getValue(qt)),paddingBottom:h,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(i=t.expandOnlyOnTwistieClick)&&void 0!==i?i:"doubleClick"===n.getValue(Jt),contextViewProvider:o,findWidgetStyles:mt.uX,enableStickyScroll:Boolean(n.getValue(Xt)),stickyScrollMaxItemCount:Number(n.getValue(ei))}}}fi=ft([vt(7,ut.TG),vt(8,dt.i6),vt(9,_t),vt(10,at.Ui)],fi);let wi=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,o,s,r){var a;this.tree=e,this.disposables=[],this.contextKeyService=Ft(o,e),this.disposables.push(Bt(this.contextKeyService,e)),this.listSupportsMultiSelect=St.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport),Dt.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.listSupportFindWidget=Et.bindTo(this.contextKeyService),this.listSupportFindWidget.set(null===(a=t.findWidgetEnabled)||void 0===a||a),this.hasSelectionOrFocus=kt.bindTo(this.contextKeyService),this.hasDoubleSelection=Lt.bindTo(this.contextKeyService),this.hasMultiSelection=Nt.bindTo(this.contextKeyService),this.treeElementCanCollapse=It.bindTo(this.contextKeyService),this.treeElementHasParent=Tt.bindTo(this.contextKeyService),this.treeElementCanExpand=Mt.bindTo(this.contextKeyService),this.treeElementHasChild=Rt.bindTo(this.contextKeyService),this.treeFindOpen=At.bindTo(this.contextKeyService),this.treeStickyScrollFocused=Ct.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=ti(r),this.updateStyleOverrides(n);const l=()=>{const t=e.getFocus()[0];if(!t)return;const i=e.getNode(t);this.treeElementCanCollapse.set(i.collapsible&&!i.collapsed),this.treeElementHasParent.set(!!e.getParentElement(t)),this.treeElementCanExpand.set(i.collapsible&&i.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(t))},d=new Set;d.add(Pt),d.add(Ot),this.disposables.push(this.contextKeyService,s.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0),l()})),e.onDidChangeCollapseState(l),e.onDidChangeModel(l),e.onDidChangeFindOpenState((e=>this.treeFindOpen.set(e))),e.onDidChangeStickyScrollFocused((e=>this.treeStickyScrollFocused.set(e))),r.onDidChangeConfiguration((n=>{let o={};if(n.affectsConfiguration(Wt)&&(this._useAltAsMultipleSelectionModifier=ti(r)),n.affectsConfiguration($t)){const e=r.getValue($t);o={...o,indent:e}}if(n.affectsConfiguration(Gt)&&void 0===t.renderIndentGuides){const e=r.getValue(Gt);o={...o,renderIndentGuides:e}}if(n.affectsConfiguration(Zt)){const e=Boolean(r.getValue(Zt));o={...o,smoothScrolling:e}}if(n.affectsConfiguration(zt)||n.affectsConfiguration(Ut)){const e=vi(r);o={...o,defaultFindMode:e}}if(n.affectsConfiguration(jt)||n.affectsConfiguration(Ut)){const e=i();o={...o,typeNavigationMode:e}}if(n.affectsConfiguration(Kt)){const e=_i(r);o={...o,defaultFindMatchType:e}}if(n.affectsConfiguration(Vt)&&void 0===t.horizontalScrolling){const e=Boolean(r.getValue(Vt));o={...o,horizontalScrolling:e}}if(n.affectsConfiguration(qt)){const e=Boolean(r.getValue(qt));o={...o,scrollByPage:e}}if(n.affectsConfiguration(Jt)&&void 0===t.expandOnlyOnTwistieClick&&(o={...o,expandOnlyOnTwistieClick:"doubleClick"===r.getValue(Jt)}),n.affectsConfiguration(Xt)){const e=r.getValue(Xt);o={...o,enableStickyScroll:e}}if(n.affectsConfiguration(ei)){const e=Math.max(1,r.getValue(ei));o={...o,stickyScrollMaxItemCount:e}}if(n.affectsConfiguration(Qt)){const e=r.getValue(Qt);o={...o,mouseWheelScrollSensitivity:e}}if(n.affectsConfiguration(Yt)){const e=r.getValue(Yt);o={...o,fastScrollSensitivity:e}}Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(d)&&e.updateOptions({typeNavigationMode:i()})}))),this.navigator=new ci(e,{configurationService:r,...t}),this.disposables.push(this.navigator)}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?(0,mt.TU)(e):mt.O2)}dispose(){this.disposables=(0,a.B9)(this.disposables)}};wi=ft([vt(4,dt.i6),vt(5,_t),vt(6,at.Ui)],wi),pt.B.as(lt.IP.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,se.NC)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Wt]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,se.NC)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,se.NC)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,se.NC)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"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.")},[Ht]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,se.NC)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"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.")},[Vt]:{type:"boolean",default:!1,description:(0,se.NC)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[qt]:{type:"boolean",default:!1,description:(0,se.NC)("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[$t]:{type:"number",default:8,minimum:4,maximum:40,description:(0,se.NC)("tree indent setting","Controls tree indentation in pixels.")},[Gt]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,se.NC)("render tree indent guides","Controls whether the tree should render indent guides.")},[Zt]:{type:"boolean",default:!1,description:(0,se.NC)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Qt]:{type:"number",default:1,markdownDescription:(0,se.NC)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Yt]:{type:"number",default:5,markdownDescription:(0,se.NC)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[zt]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,se.NC)("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),(0,se.NC)("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:(0,se.NC)("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[Ut]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,se.NC)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,se.NC)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,se.NC)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,se.NC)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:(0,se.NC)("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and\t'workbench.list.typeNavigationMode' instead.")},[Kt]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[(0,se.NC)("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),(0,se.NC)("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:(0,se.NC)("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[Jt]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,se.NC)("expand mode","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.")},[Xt]:{type:"boolean",default:!0,description:(0,se.NC)("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[ei]:{type:"number",minimum:1,default:7,markdownDescription:(0,se.NC)("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when `#workbench.tree.enableStickyScroll#` is enabled.")},[jt]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:(0,se.NC)("typeNavigationMode2","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.")}}})},43557:(e,t,i)=>{"use strict";i.d(t,{VZ:()=>r,in:()=>a,kw:()=>c,qA:()=>h});var n=i(4669),o=i(5976),s=i(93983);const r=(0,i(72065).yh)("logService");var a;!function(e){e[e.Off=0]="Off",e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warning=4]="Warning",e[e.Error=5]="Error"}(a||(a={}));const l=a.Info;class d extends o.JT{constructor(){super(...arguments),this.level=l,this._onDidChangeLogLevel=this._register(new n.Q5),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==a.Off&&this.level<=e}}class c extends d{constructor(e=l,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(a.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(a.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(a.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(a.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(a.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}}class h extends d{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.loggers)i.trace(e,...t)}debug(e,...t){for(const i of this.loggers)i.debug(e,...t)}info(e,...t){for(const i of this.loggers)i.info(e,...t)}warn(e,...t){for(const i of this.loggers)i.warn(e,...t)}error(e,...t){for(const i of this.loggers)i.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose();super.dispose()}}new s.uy("logLevel",function(e){switch(e){case a.Trace:return"trace";case a.Debug:return"debug";case a.Info:return"info";case a.Warning:return"warn";case a.Error:return"error";case a.Off:return"off"}}(a.Info))},98674:(e,t,i)=>{"use strict";i.d(t,{H0:()=>o,ZL:()=>n,lT:()=>l});var n,o,s=i(14603),r=i(63580),a=i(72065);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(n||(n={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=(0,r.NC)("sev.error","Error"),t[e.Warning]=(0,r.NC)("sev.warning","Warning"),t[e.Info]=(0,r.NC)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case s.Z.Error:return e.Error;case s.Z.Warning:return e.Warning;case s.Z.Info:return e.Info;case s.Z.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return s.Z.Error;case e.Warning:return s.Z.Warning;case e.Info:return s.Z.Info;case e.Hint:return s.Z.Ignore}}}(n||(n={})),function(e){const t="";function i(e,i){const o=[t];return e.source?o.push(e.source.replace("¦","\\¦")):o.push(t),e.code?"string"==typeof e.code?o.push(e.code.replace("¦","\\¦")):o.push(e.code.value.replace("¦","\\¦")):o.push(t),void 0!==e.severity&&null!==e.severity?o.push(n.toString(e.severity)):o.push(t),e.message&&i?o.push(e.message.replace("¦","\\¦")):o.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?o.push(e.startLineNumber.toString()):o.push(t),void 0!==e.startColumn&&null!==e.startColumn?o.push(e.startColumn.toString()):o.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?o.push(e.endLineNumber.toString()):o.push(t),void 0!==e.endColumn&&null!==e.endColumn?o.push(e.endColumn.toString()):o.push(t),o.push(t),o.join("¦")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(o||(o={}));const l=(0,a.yh)("markerService")},59422:(e,t,i)=>{"use strict";i.d(t,{EO:()=>a,lT:()=>r,zb:()=>s});var n=i(14603),o=i(72065),s=n.Z;const r=(0,o.yh)("notificationService");class a{}},50988:(e,t,i)=>{"use strict";i.d(t,{v:()=>n,x:()=>o});const n=(0,i(72065).yh)("openerService");function o(e){let t;const i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},e=e.with({fragment:""})),{selection:t,uri:e}}},90535:(e,t,i)=>{"use strict";i.d(t,{Ex:()=>s,R9:()=>o,ek:()=>r});var n=i(72065);const o=(0,n.yh)("progressService");Object.freeze({total(){},worked(){},done(){}});class s{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}s.None=Object.freeze({report(){}});const r=(0,n.yh)("editorProgressService")},90725:(e,t,i)=>{"use strict";i.d(t,{IP:()=>a,Ry:()=>n});var n,o=i(9488),s=i(5976),r=i(89872);!function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(n||(n={}));const a={Quickaccess:"workbench.contributions.quickaccess"};r.B.add(a.Quickaccess,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),(0,s.OF)((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return(0,o.kX)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||this.defaultProvider}})},41157:(e,t,i)=>{"use strict";i.d(t,{Jq:()=>s,X5:()=>o,eJ:()=>a,jG:()=>r});var n=i(72065);const o={ctrlCmd:!1,alt:!1};var s,r;!function(e){e[e.Blur=1]="Blur",e[e.Gesture=2]="Gesture",e[e.Other=3]="Other"}(s||(s={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(r||(r={})),new class{constructor(e){this.options=e}};const a=(0,n.yh)("quickInputService")},89872:(e,t,i)=>{"use strict";i.d(t,{B:()=>s});var n=i(35146),o=i(98401);const s=new class{constructor(){this.data=new Map}add(e,t){n.ok(o.HD(e)),n.ok(o.Kn(t)),n.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},26904:(e,t,i)=>{"use strict";i.d(t,{Uy:()=>p,vm:()=>v,fk:()=>m});var n,o,s=i(4669),r=i(5976),a=i(98401),l=i(15393),d=i(23897);!function(e){e[e.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",e[e.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"}(n||(n={})),function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(o||(o={}));class c extends r.JT{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new s.K3),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=o.None,this.cache=new Map,this.flushDelayer=this._register(new l.rH(c.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){var t,i;this._onDidChangeStorage.pause();try{null===(t=e.changed)||void 0===t||t.forEach(((e,t)=>this.acceptExternal(t,e))),null===(i=e.deleted)||void 0===i||i.forEach((e=>this.acceptExternal(e,void 0)))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===o.Closed)return;let i=!1;(0,a.Jp)(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(0,a.Jp)(i)?t:i}getBoolean(e,t){const i=this.get(e);return(0,a.Jp)(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return(0,a.Jp)(i)?t:parseInt(i,10)}async set(e,t,i=!1){if(this.state===o.Closed)return;if((0,a.Jp)(t))return this.delete(e,i);const n=(0,a.Kn)(t)||Array.isArray(t)?(0,d.Pz)(t):String(t);return this.cache.get(e)!==n?(this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()):void 0}async delete(e,t=!1){if(this.state!==o.Closed)return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()):void 0}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((()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()}))}async doFlush(e){return this.options.hint===n.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger((()=>this.flushPending()),e)}}c.DEFAULT_FLUSH_DELAY=100;class h{constructor(){this.onDidChangeItemsExternal=s.ju.None,this.items=new Map}async updateItems(e){var t,i;null===(t=e.insert)||void 0===t||t.forEach(((e,t)=>this.items.set(t,e))),null===(i=e.delete)||void 0===i||i.forEach((e=>this.items.delete(e)))}}var u=i(72065);const g="__$__targetStorageMarker",p=(0,u.yh)("storageService");var m;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(m||(m={}));class f extends r.JT{constructor(e={flushInterval:f.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new s.K3),this._onDidChangeTarget=this._register(new s.K3),this._onWillSaveState=this._register(new s.Q5),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,i){return s.ju.filter(this._onDidChangeValue.event,(i=>i.scope===e&&(void 0===t||i.key===t)),i)}emitDidChangeValue(e,t){const{key:i,external:n}=t;if(i===g){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:n})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n,o=!1){(0,a.Jp)(t)?this.remove(e,i,o):this.withPausedEmitters((()=>{var s;this.updateKeyTarget(e,i,n),null===(s=this.getStorage(i))||void 0===s||s.set(e,t,o)}))}remove(e,t,i=!1){this.withPausedEmitters((()=>{var n;this.updateKeyTarget(e,t,void 0),null===(n=this.getStorage(t))||void 0===n||n.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){var o,s;const r=this.getKeyTargets(t);"number"==typeof i?r[e]!==i&&(r[e]=i,null===(o=this.getStorage(t))||void 0===o||o.set(g,JSON.stringify(r),n)):"number"==typeof r[e]&&(delete r[e],null===(s=this.getStorage(t))||void 0===s||s.set(g,JSON.stringify(r),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}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?function(e){const t=e.get(g);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}(t):Object.create(null)}}f.DEFAULT_FLUSH_INTERVAL=6e4;class v extends f{constructor(){super(),this.applicationStorage=this._register(new c(new h,{hint:n.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new c(new h,{hint:n.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new c(new h,{hint:n.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))))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}},10829:(e,t,i)=>{"use strict";i.d(t,{b:()=>n});const n=(0,i(72065).yh)("telemetryService")},86253:(e,t,i)=>{"use strict";i.d(t,{BM:()=>p,Hc:()=>d,O2:()=>u,TU:()=>g,ZR:()=>m,b5:()=>a,eO:()=>s,ku:()=>h,pl:()=>l,uX:()=>c,wG:()=>r});var n=i(73910),o=i(41264);const s={keybindingLabelBackground:(0,n.n_1)(n.oQ$),keybindingLabelForeground:(0,n.n_1)(n.lWp),keybindingLabelBorder:(0,n.n_1)(n.AWI),keybindingLabelBottomBorder:(0,n.n_1)(n.K19),keybindingLabelShadow:(0,n.n_1)(n.rh)},r={buttonForeground:(0,n.n_1)(n.j5u),buttonSeparator:(0,n.n_1)(n.iFQ),buttonBackground:(0,n.n_1)(n.b7$),buttonHoverBackground:(0,n.n_1)(n.GO4),buttonSecondaryForeground:(0,n.n_1)(n.qBU),buttonSecondaryBackground:(0,n.n_1)(n.ESD),buttonSecondaryHoverBackground:(0,n.n_1)(n.xEn),buttonBorder:(0,n.n_1)(n.GYc)},a={progressBarBackground:(0,n.n_1)(n.zRJ)},l={inputActiveOptionBorder:(0,n.n_1)(n.PRb),inputActiveOptionForeground:(0,n.n_1)(n.Pvw),inputActiveOptionBackground:(0,n.n_1)(n.XEs)},d=((0,n.n_1)(n.SUp),(0,n.n_1)(n.nd),(0,n.n_1)(n.BQ0),(0,n.n_1)(n.D0T),(0,n.n_1)(n.Hfx),(0,n.n_1)(n.rh),(0,n.n_1)(n.lRK),(0,n.n_1)(n.JpG),(0,n.n_1)(n.BOY),(0,n.n_1)(n.OLZ),(0,n.n_1)(n.url),{inputBackground:(0,n.n_1)(n.sEe),inputForeground:(0,n.n_1)(n.zJb),inputBorder:(0,n.n_1)(n.dt_),inputValidationInfoBorder:(0,n.n_1)(n.EPQ),inputValidationInfoBackground:(0,n.n_1)(n._lC),inputValidationInfoForeground:(0,n.n_1)(n.YI3),inputValidationWarningBorder:(0,n.n_1)(n.C3g),inputValidationWarningBackground:(0,n.n_1)(n.RV_),inputValidationWarningForeground:(0,n.n_1)(n.SUG),inputValidationErrorBorder:(0,n.n_1)(n.OZR),inputValidationErrorBackground:(0,n.n_1)(n.paE),inputValidationErrorForeground:(0,n.n_1)(n._t9)}),c={listFilterWidgetBackground:(0,n.n_1)(n.vGG),listFilterWidgetOutline:(0,n.n_1)(n.oSI),listFilterWidgetNoMatchesOutline:(0,n.n_1)(n.Saq),listFilterWidgetShadow:(0,n.n_1)(n.y65),inputBoxStyles:d,toggleStyles:l},h={badgeBackground:(0,n.n_1)(n.g8u),badgeForeground:(0,n.n_1)(n.qeD),badgeBorder:(0,n.n_1)(n.lRK)},u=((0,n.n_1)(n.ixd),(0,n.n_1)(n.l80),(0,n.n_1)(n.H6q),(0,n.n_1)(n.H6q),(0,n.n_1)(n.fSI),{listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,n.n_1)(n._bK),listFocusForeground:(0,n.n_1)(n._2n),listFocusOutline:(0,n.n_1)(n.Oop),listActiveSelectionBackground:(0,n.n_1)(n.dCr),listActiveSelectionForeground:(0,n.n_1)(n.M6C),listActiveSelectionIconForeground:(0,n.n_1)(n.Tnx),listFocusAndSelectionOutline:(0,n.n_1)(n.Bqu),listFocusAndSelectionBackground:(0,n.n_1)(n.dCr),listFocusAndSelectionForeground:(0,n.n_1)(n.M6C),listInactiveSelectionBackground:(0,n.n_1)(n.rg2),listInactiveSelectionIconForeground:(0,n.n_1)(n.kvU),listInactiveSelectionForeground:(0,n.n_1)(n.ytC),listInactiveFocusBackground:(0,n.n_1)(n.s$),listInactiveFocusOutline:(0,n.n_1)(n.F3d),listHoverBackground:(0,n.n_1)(n.mV1),listHoverForeground:(0,n.n_1)(n.$d5),listDropOverBackground:(0,n.n_1)(n.pdn),listDropBetweenBackground:(0,n.n_1)(n.XVp),listSelectionOutline:(0,n.n_1)(n.xL1),listHoverOutline:(0,n.n_1)(n.xL1),treeIndentGuidesStroke:(0,n.n_1)(n.UnT),treeInactiveIndentGuidesStroke:(0,n.n_1)(n.KjV),tableColumnsBorder:(0,n.n_1)(n.uxu),tableOddRowsBackgroundColor:(0,n.n_1)(n.EQn)});function g(e){return function(e,t){const i={...t};for(const t in e){const o=e[t];i[t]=void 0!==o?(0,n.n_1)(o):void 0}return i}(e,u)}const p={selectBackground:(0,n.n_1)(n.XV0),selectListBackground:(0,n.n_1)(n.Fgs),selectForeground:(0,n.n_1)(n._g0),decoratorRightForeground:(0,n.n_1)(n.kJk),selectBorder:(0,n.n_1)(n.a9O),focusBorder:(0,n.n_1)(n.R80),listFocusBackground:(0,n.n_1)(n.Vqd),listInactiveSelectionIconForeground:(0,n.n_1)(n.cbQ),listFocusForeground:(0,n.n_1)(n.NPS),listFocusOutline:(0,n.BtC)(n.xL1,o.Il.transparent.toString()),listHoverBackground:(0,n.n_1)(n.mV1),listHoverForeground:(0,n.n_1)(n.$d5),listHoverOutline:(0,n.n_1)(n.xL1),selectListBorder:(0,n.n_1)(n.D1_),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0},m={shadowColor:(0,n.n_1)(n.rh),borderColor:(0,n.n_1)(n.Cdg),foregroundColor:(0,n.n_1)(n.DEr),backgroundColor:(0,n.n_1)(n.Hz8),selectionForegroundColor:(0,n.n_1)(n.jbW),selectionBackgroundColor:(0,n.n_1)(n.$DX),selectionBorderColor:(0,n.n_1)(n.E3h),separatorColor:(0,n.n_1)(n.ZGJ),scrollbarShadow:(0,n.n_1)(n._wn),scrollbarSliderBackground:(0,n.n_1)(n.etL),scrollbarSliderHoverBackground:(0,n.n_1)(n.ABB),scrollbarSliderActiveBackground:(0,n.n_1)(n.ynu)}},73910:(e,t,i)=>{"use strict";i.d(t,{$DX:()=>At,$d5:()=>lt,A42:()=>S,ABB:()=>te,AWI:()=>xe,BOY:()=>ai,BQ0:()=>xt,Bqu:()=>Je,BtC:()=>u,C3g:()=>P,CNo:()=>Ae,Cdg:()=>It,CzK:()=>je,D0T:()=>pe,D1_:()=>fe,DEr:()=>Tt,Dut:()=>he,E3h:()=>Pt,EPQ:()=>M,EQn:()=>Ct,ES4:()=>De,ESD:()=>Z,EiJ:()=>Te,F3d:()=>rt,F9q:()=>Ge,Fgs:()=>H,Fm_:()=>Qt,GO4:()=>K,GYc:()=>$,Gj_:()=>ni,Gvr:()=>ti,Gwp:()=>ht,H6q:()=>Ht,HCL:()=>He,Hfx:()=>me,Hz8:()=>Mt,IPX:()=>g,IYc:()=>Xt,Itd:()=>si,Ivo:()=>ii,JpG:()=>ri,K19:()=>ke,KjV:()=>wt,M6C:()=>et,MUv:()=>Ie,NOs:()=>ge,NPS:()=>Nt,OLZ:()=>li,OZR:()=>B,Oop:()=>Ye,P4M:()=>Ke,P6G:()=>m,P6Y:()=>$e,PRb:()=>N,PX0:()=>ut,PpC:()=>Fe,Pvw:()=>E,QO2:()=>c,R80:()=>_,RV_:()=>R,Rzx:()=>Ee,SPM:()=>Yt,SUG:()=>A,SUY:()=>Jt,SUp:()=>St,Saq:()=>vt,T83:()=>ce,Tnx:()=>tt,UnT:()=>bt,VVv:()=>Oe,Vqd:()=>Et,XEs:()=>D,XV0:()=>W,XVp:()=>ct,XZx:()=>v,YI3:()=>T,ZGJ:()=>Ot,ZnX:()=>hi,_2n:()=>Qe,_Yy:()=>Pe,_bK:()=>Ze,_g0:()=>V,_lC:()=>I,_t9:()=>F,_wn:()=>X,a9O:()=>z,b6y:()=>se,b7$:()=>q,bKB:()=>We,c63:()=>de,cbQ:()=>Dt,cvW:()=>ue,dCr:()=>Xe,dRz:()=>f,dt_:()=>L,etL:()=>ee,fSI:()=>Vt,g8u:()=>Y,gkn:()=>Me,gpD:()=>re,hEj:()=>Le,hX8:()=>Be,iFQ:()=>U,ixd:()=>Wt,j5u:()=>j,jbW:()=>Rt,kJk:()=>we,kVY:()=>oi,keg:()=>Ue,kvU:()=>ot,kwl:()=>ui,l80:()=>Bt,lRK:()=>b,lWp:()=>Se,lXJ:()=>oe,loF:()=>be,mV1:()=>at,n_1:()=>h,nd:()=>kt,oQ$:()=>Ce,oSI:()=>ft,opG:()=>ye,ov3:()=>ei,pW3:()=>le,paE:()=>O,pdn:()=>dt,phM:()=>Ve,qBU:()=>G,qeD:()=>J,rg2:()=>it,rh:()=>C,s$:()=>st,sEe:()=>x,tZ6:()=>_e,uoC:()=>ae,url:()=>y,uxu:()=>yt,vGG:()=>mt,xEn:()=>Q,xL1:()=>w,y65:()=>_t,yJx:()=>Re,yb5:()=>Ne,ynu:()=>ie,ypS:()=>qe,ytC:()=>nt,zJb:()=>k,zKr:()=>ve,zRJ:()=>ne});var n=i(35146),o=i(15393),s=i(41264),r=i(4669),a=i(63580),l=i(81294),d=i(89872);function c(e){return`--vscode-${e.replace(/\./g,"-")}`}function h(e){return`var(${c(e)})`}function u(e,t){return`var(${c(e)}, ${t})`}const g={ColorContribution:"base.contributions.colors"},p=new class{constructor(){this._onDidChangeSchema=new r.Q5,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){const s={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=s;const r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(r.deprecationMessage=o),n&&(r.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",r.patternErrorMessage="This color must be transparent or it will obscure content"),this.colorSchema.properties[e]=r,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults)return pi(i.defaults[t.type],t)}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{const i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function m(e,t,i,n,o){return p.registerColor(e,t,i,n,o)}d.B.add(g.ColorContribution,p);const f=m("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},a.NC("foreground","Overall foreground color. This color is only used if not overridden by a component.")),v=(m("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},a.NC("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),m("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},a.NC("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),m("descriptionForeground",{light:"#717171",dark:hi(f,.7),hcDark:hi(f,.7),hcLight:hi(f,.7)},a.NC("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),m("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},a.NC("iconForeground","The default color for icons in the workbench."))),_=m("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},a.NC("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),b=m("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},a.NC("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),w=m("contrastActiveBorder",{light:null,dark:null,hcDark:_,hcLight:_},a.NC("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),y=(m("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},a.NC("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),m("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:s.Il.black,hcLight:"#292929"},a.NC("textSeparatorForeground","Color for text separators.")),m("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},a.NC("textLinkForeground","Foreground color for links in text."))),C=(m("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},a.NC("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),m("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},a.NC("textPreformatForeground","Foreground color for preformatted text segments.")),m("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},a.NC("textPreformatBackground","Background color for preformatted text segments.")),m("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},a.NC("textBlockQuoteBackground","Background color for block quotes in text.")),m("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:s.Il.white,hcLight:"#292929"},a.NC("textBlockQuoteBorder","Border color for block quotes in text.")),m("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:s.Il.black,hcLight:"#F2F2F2"},a.NC("textCodeBlockBackground","Background color for code blocks in text.")),m("widget.shadow",{dark:hi(s.Il.black,.36),light:hi(s.Il.black,.16),hcDark:null,hcLight:null},a.NC("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),S=m("widget.border",{dark:null,light:null,hcDark:b,hcLight:b},a.NC("widgetBorder","Border color of widgets such as find/replace inside the editor.")),x=m("input.background",{dark:"#3C3C3C",light:s.Il.white,hcDark:s.Il.black,hcLight:s.Il.white},a.NC("inputBoxBackground","Input box background.")),k=m("input.foreground",{dark:f,light:f,hcDark:f,hcLight:f},a.NC("inputBoxForeground","Input box foreground.")),L=m("input.border",{dark:null,light:null,hcDark:b,hcLight:b},a.NC("inputBoxBorder","Input box border.")),N=m("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:b,hcLight:b},a.NC("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),D=(m("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},a.NC("inputOption.hoverBackground","Background color of activated options in input fields.")),m("inputOption.activeBackground",{dark:hi(_,.4),light:hi(_,.2),hcDark:s.Il.transparent,hcLight:s.Il.transparent},a.NC("inputOption.activeBackground","Background hover color of options in input fields."))),E=m("inputOption.activeForeground",{dark:s.Il.white,light:s.Il.black,hcDark:f,hcLight:f},a.NC("inputOption.activeForeground","Foreground color of activated options in input fields.")),I=(m("input.placeholderForeground",{light:hi(f,.5),dark:hi(f,.5),hcDark:hi(f,.7),hcLight:hi(f,.7)},a.NC("inputPlaceholderForeground","Input box foreground color for placeholder text.")),m("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:s.Il.black,hcLight:s.Il.white},a.NC("inputValidationInfoBackground","Input validation background color for information severity."))),T=m("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:f},a.NC("inputValidationInfoForeground","Input validation foreground color for information severity.")),M=m("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:b,hcLight:b},a.NC("inputValidationInfoBorder","Input validation border color for information severity.")),R=m("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:s.Il.black,hcLight:s.Il.white},a.NC("inputValidationWarningBackground","Input validation background color for warning severity.")),A=m("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:f},a.NC("inputValidationWarningForeground","Input validation foreground color for warning severity.")),P=m("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:b,hcLight:b},a.NC("inputValidationWarningBorder","Input validation border color for warning severity.")),O=m("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:s.Il.black,hcLight:s.Il.white},a.NC("inputValidationErrorBackground","Input validation background color for error severity.")),F=m("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:f},a.NC("inputValidationErrorForeground","Input validation foreground color for error severity.")),B=m("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:b,hcLight:b},a.NC("inputValidationErrorBorder","Input validation border color for error severity.")),W=m("dropdown.background",{dark:"#3C3C3C",light:s.Il.white,hcDark:s.Il.black,hcLight:s.Il.white},a.NC("dropdownBackground","Dropdown background.")),H=m("dropdown.listBackground",{dark:null,light:null,hcDark:s.Il.black,hcLight:s.Il.white},a.NC("dropdownListBackground","Dropdown list background.")),V=m("dropdown.foreground",{dark:"#F0F0F0",light:f,hcDark:s.Il.white,hcLight:f},a.NC("dropdownForeground","Dropdown foreground.")),z=m("dropdown.border",{dark:W,light:"#CECECE",hcDark:b,hcLight:b},a.NC("dropdownBorder","Dropdown border.")),j=m("button.foreground",{dark:s.Il.white,light:s.Il.white,hcDark:s.Il.white,hcLight:s.Il.white},a.NC("buttonForeground","Button foreground color.")),U=m("button.separator",{dark:hi(j,.4),light:hi(j,.4),hcDark:hi(j,.4),hcLight:hi(j,.4)},a.NC("buttonSeparator","Button separator color.")),q=m("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},a.NC("buttonBackground","Button background color.")),K=m("button.hoverBackground",{dark:ci(q,.2),light:di(q,.2),hcDark:q,hcLight:q},a.NC("buttonHoverBackground","Button background color when hovering.")),$=m("button.border",{dark:b,light:b,hcDark:b,hcLight:b},a.NC("buttonBorder","Button border color.")),G=m("button.secondaryForeground",{dark:s.Il.white,light:s.Il.white,hcDark:s.Il.white,hcLight:f},a.NC("buttonSecondaryForeground","Secondary button foreground color.")),Z=m("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:s.Il.white},a.NC("buttonSecondaryBackground","Secondary button background color.")),Q=m("button.secondaryHoverBackground",{dark:ci(Z,.2),light:di(Z,.2),hcDark:null,hcLight:null},a.NC("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),Y=m("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:s.Il.black,hcLight:"#0F4A85"},a.NC("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),J=m("badge.foreground",{dark:s.Il.white,light:"#333",hcDark:s.Il.white,hcLight:s.Il.white},a.NC("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),X=m("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},a.NC("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),ee=m("scrollbarSlider.background",{dark:s.Il.fromHex("#797979").transparent(.4),light:s.Il.fromHex("#646464").transparent(.4),hcDark:hi(b,.6),hcLight:hi(b,.4)},a.NC("scrollbarSliderBackground","Scrollbar slider background color.")),te=m("scrollbarSlider.hoverBackground",{dark:s.Il.fromHex("#646464").transparent(.7),light:s.Il.fromHex("#646464").transparent(.7),hcDark:hi(b,.8),hcLight:hi(b,.8)},a.NC("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),ie=m("scrollbarSlider.activeBackground",{dark:s.Il.fromHex("#BFBFBF").transparent(.4),light:s.Il.fromHex("#000000").transparent(.6),hcDark:b,hcLight:b},a.NC("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),ne=m("progressBar.background",{dark:s.Il.fromHex("#0E70C0"),light:s.Il.fromHex("#0E70C0"),hcDark:b,hcLight:b},a.NC("progressBarBackground","Background color of the progress bar that can show for long running operations.")),oe=(m("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},a.NC("editorError.foreground","Foreground color of error squigglies in the editor."))),se=m("editorError.border",{dark:null,light:null,hcDark:s.Il.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},a.NC("errorBorder","If set, color of double underlines for errors in the editor.")),re=m("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ae=m("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},a.NC("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),le=m("editorWarning.border",{dark:null,light:null,hcDark:s.Il.fromHex("#FFCC00").transparent(.8),hcLight:s.Il.fromHex("#FFCC00").transparent(.8)},a.NC("warningBorder","If set, color of double underlines for warnings in the editor.")),de=(m("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},a.NC("editorInfo.foreground","Foreground color of info squigglies in the editor."))),ce=m("editorInfo.border",{dark:null,light:null,hcDark:s.Il.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},a.NC("infoBorder","If set, color of double underlines for infos in the editor.")),he=m("editorHint.foreground",{dark:s.Il.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},a.NC("editorHint.foreground","Foreground color of hint squigglies in the editor.")),ue=(m("editorHint.border",{dark:null,light:null,hcDark:s.Il.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},a.NC("hintBorder","If set, color of double underlines for hints in the editor.")),m("sash.hoverBorder",{dark:_,light:_,hcDark:_,hcLight:_},a.NC("sashActiveBorder","Border color of active sashes.")),m("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:s.Il.black,hcLight:s.Il.white},a.NC("editorBackground","Editor background color."))),ge=m("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:s.Il.white,hcLight:f},a.NC("editorForeground","Editor default foreground color.")),pe=(m("editorStickyScroll.background",{light:ue,dark:ue,hcDark:ue,hcLight:ue},a.NC("editorStickyScrollBackground","Background color of sticky scroll in the editor")),m("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:s.Il.fromHex("#0F4A85").transparent(.1)},a.NC("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),m("editorStickyScroll.border",{dark:null,light:null,hcDark:b,hcLight:b},a.NC("editorStickyScrollBorder","Border color of sticky scroll in the editor")),m("editorStickyScroll.shadow",{dark:X,light:X,hcDark:X,hcLight:X},a.NC("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),m("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:s.Il.white},a.NC("editorWidgetBackground","Background color of editor widgets, such as find/replace."))),me=m("editorWidget.foreground",{dark:f,light:f,hcDark:f,hcLight:f},a.NC("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),fe=m("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:b,hcLight:b},a.NC("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),ve=(m("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},a.NC("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),m("quickInput.background",{dark:pe,light:pe,hcDark:pe,hcLight:pe},a.NC("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette."))),_e=m("quickInput.foreground",{dark:me,light:me,hcDark:me,hcLight:me},a.NC("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),be=m("quickInputTitle.background",{dark:new s.Il(new s.VS(255,255,255,.105)),light:new s.Il(new s.VS(0,0,0,.06)),hcDark:"#000000",hcLight:s.Il.white},a.NC("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),we=m("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:s.Il.white,hcLight:"#0F4A85"},a.NC("pickerGroupForeground","Quick picker color for grouping labels.")),ye=m("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:s.Il.white,hcLight:"#0F4A85"},a.NC("pickerGroupBorder","Quick picker color for grouping borders.")),Ce=m("keybindingLabel.background",{dark:new s.Il(new s.VS(128,128,128,.17)),light:new s.Il(new s.VS(221,221,221,.4)),hcDark:s.Il.transparent,hcLight:s.Il.transparent},a.NC("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Se=m("keybindingLabel.foreground",{dark:s.Il.fromHex("#CCCCCC"),light:s.Il.fromHex("#555555"),hcDark:s.Il.white,hcLight:f},a.NC("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),xe=m("keybindingLabel.border",{dark:new s.Il(new s.VS(51,51,51,.6)),light:new s.Il(new s.VS(204,204,204,.4)),hcDark:new s.Il(new s.VS(111,195,223)),hcLight:b},a.NC("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),ke=m("keybindingLabel.bottomBorder",{dark:new s.Il(new s.VS(68,68,68,.6)),light:new s.Il(new s.VS(187,187,187,.4)),hcDark:new s.Il(new s.VS(111,195,223)),hcLight:f},a.NC("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),Le=m("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},a.NC("editorSelectionBackground","Color of the editor selection.")),Ne=m("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:s.Il.white},a.NC("editorSelectionForeground","Color of the selected text for high contrast.")),De=m("editor.inactiveSelectionBackground",{light:hi(Le,.5),dark:hi(Le,.5),hcDark:hi(Le,.7),hcLight:hi(Le,.5)},a.NC("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),Ee=m("editor.selectionHighlightBackground",{light:gi(Le,ue,.3,.6),dark:gi(Le,ue,.3,.6),hcDark:null,hcLight:null},a.NC("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),Ie=(m("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:w,hcLight:w},a.NC("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),m("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},a.NC("editorFindMatch","Color of the current search match.")),m("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},a.NC("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0)),Te=(m("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},a.NC("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.findMatchBorder",{light:null,dark:null,hcDark:w,hcLight:w},a.NC("editorFindMatchBorder","Border color of the current search match.")),m("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:w,hcLight:w},a.NC("findMatchHighlightBorder","Border color of the other search matches."))),Me=m("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:hi(w,.4),hcLight:hi(w,.4)},a.NC("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Re=(m("searchEditor.findMatchBackground",{light:hi(Ie,.66),dark:hi(Ie,.66),hcDark:Ie,hcLight:Ie},a.NC("searchEditor.queryMatch","Color of the Search Editor query matches.")),m("searchEditor.findMatchBorder",{light:hi(Te,.66),dark:hi(Te,.66),hcDark:Te,hcLight:Te},a.NC("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches.")),m("search.resultsInfoForeground",{light:f,dark:hi(f,.65),hcDark:f,hcLight:f},a.NC("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),m("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},a.NC("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorHoverWidget.background",{light:pe,dark:pe,hcDark:pe,hcLight:pe},a.NC("hoverBackground","Background color of the editor hover."))),Ae=(m("editorHoverWidget.foreground",{light:me,dark:me,hcDark:me,hcLight:me},a.NC("hoverForeground","Foreground color of the editor hover.")),m("editorHoverWidget.border",{light:fe,dark:fe,hcDark:fe,hcLight:fe},a.NC("hoverBorder","Border color of the editor hover."))),Pe=(m("editorHoverWidget.statusBarBackground",{dark:ci(Re,.2),light:di(Re,.05),hcDark:pe,hcLight:pe},a.NC("statusBarBackground","Background color of the editor hover status bar.")),m("editorLink.activeForeground",{dark:"#4E94CE",light:s.Il.blue,hcDark:s.Il.cyan,hcLight:"#292929"},a.NC("activeLinkForeground","Color of active links."))),Oe=m("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:s.Il.white,hcLight:s.Il.black},a.NC("editorInlayHintForeground","Foreground color of inline hints")),Fe=m("editorInlayHint.background",{dark:hi(Y,.1),light:hi(Y,.1),hcDark:hi(s.Il.white,.1),hcLight:hi(Y,.1)},a.NC("editorInlayHintBackground","Background color of inline hints")),Be=m("editorInlayHint.typeForeground",{dark:Oe,light:Oe,hcDark:Oe,hcLight:Oe},a.NC("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),We=m("editorInlayHint.typeBackground",{dark:Fe,light:Fe,hcDark:Fe,hcLight:Fe},a.NC("editorInlayHintBackgroundTypes","Background color of inline hints for types")),He=m("editorInlayHint.parameterForeground",{dark:Oe,light:Oe,hcDark:Oe,hcLight:Oe},a.NC("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),Ve=m("editorInlayHint.parameterBackground",{dark:Fe,light:Fe,hcDark:Fe,hcLight:Fe},a.NC("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),ze=m("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},a.NC("editorLightBulbForeground","The color used for the lightbulb actions icon.")),je=(m("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},a.NC("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),m("editorLightBulbAi.foreground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},a.NC("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),new s.Il(new s.VS(155,185,85,.2))),Ue=new s.Il(new s.VS(255,0,0,.2)),qe=m("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},a.NC("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Ke=m("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},a.NC("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),$e=(m("diffEditor.insertedLineBackground",{dark:je,light:je,hcDark:null,hcLight:null},a.NC("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.removedLineBackground",{dark:Ue,light:Ue,hcDark:null,hcLight:null},a.NC("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),m("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),m("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content."))),Ge=m("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),Ze=(m("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},a.NC("diffEditorInsertedOutline","Outline color for the text that got inserted.")),m("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},a.NC("diffEditorRemovedOutline","Outline color for text that got removed.")),m("diffEditor.border",{dark:null,light:null,hcDark:b,hcLight:b},a.NC("diffEditorBorder","Border color between the two text editors.")),m("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},a.NC("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),m("diffEditor.unchangedRegionBackground",{dark:"sideBar.background",light:"sideBar.background",hcDark:"sideBar.background",hcLight:"sideBar.background"},a.NC("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),m("diffEditor.unchangedRegionForeground",{dark:"foreground",light:"foreground",hcDark:"foreground",hcLight:"foreground"},a.NC("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),m("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},a.NC("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),m("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."))),Qe=m("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Ye=m("list.focusOutline",{dark:_,light:_,hcDark:w,hcLight:w},a.NC("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Je=m("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),Xe=m("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:s.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),et=m("list.activeSelectionForeground",{dark:s.Il.white,light:s.Il.white,hcDark:null,hcLight:null},a.NC("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tt=m("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),it=m("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:s.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),nt=m("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ot=m("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),st=m("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),rt=m("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),at=m("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:s.Il.white.transparent(.1),hcLight:s.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listHoverBackground","List/Tree background when hovering over items using the mouse.")),lt=m("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),dt=m("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},a.NC("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),ct=m("list.dropBetweenBackground",{dark:v,light:v,hcDark:null,hcLight:null},a.NC("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),ht=m("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:_,hcLight:_},a.NC("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),ut=m("list.focusHighlightForeground",{dark:ht,light:(gt=Xe,pt=ht,"#BBE7FF",{op:6,if:gt,then:pt,else:"#BBE7FF"}),hcDark:ht,hcLight:ht},a.NC("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));var gt,pt;m("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},a.NC("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),m("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},a.NC("listErrorForeground","Foreground color of list items containing errors.")),m("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},a.NC("listWarningForeground","Foreground color of list items containing warnings."));const mt=m("listFilterWidget.background",{light:di(pe,0),dark:ci(pe,0),hcDark:pe,hcLight:pe},a.NC("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),ft=m("listFilterWidget.outline",{dark:s.Il.transparent,light:s.Il.transparent,hcDark:"#f38518",hcLight:"#007ACC"},a.NC("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),vt=m("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:b,hcLight:b},a.NC("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),_t=m("listFilterWidget.shadow",{dark:C,light:C,hcDark:C,hcLight:C},a.NC("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),bt=(m("list.filterMatchBackground",{dark:Ie,light:Ie,hcDark:null,hcLight:null},a.NC("listFilterMatchHighlight","Background color of the filtered match.")),m("list.filterMatchBorder",{dark:Te,light:Te,hcDark:b,hcLight:w},a.NC("listFilterMatchHighlightBorder","Border color of the filtered match.")),m("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},a.NC("treeIndentGuidesStroke","Tree stroke color for the indentation guides."))),wt=m("tree.inactiveIndentGuidesStroke",{dark:hi(bt,.4),light:hi(bt,.4),hcDark:hi(bt,.4),hcLight:hi(bt,.4)},a.NC("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),yt=m("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},a.NC("tableColumnsBorder","Table border color between columns.")),Ct=m("tree.tableOddRowsBackground",{dark:hi(f,.04),light:hi(f,.04),hcDark:null,hcLight:null},a.NC("tableOddRowsBackgroundColor","Background color for odd table rows.")),St=(m("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},a.NC("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. ")),m("checkbox.background",{dark:W,light:W,hcDark:W,hcLight:W},a.NC("checkbox.background","Background color of checkbox widget."))),xt=(m("checkbox.selectBackground",{dark:pe,light:pe,hcDark:pe,hcLight:pe},a.NC("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),m("checkbox.foreground",{dark:V,light:V,hcDark:V,hcLight:V},a.NC("checkbox.foreground","Foreground color of checkbox widget."))),kt=m("checkbox.border",{dark:z,light:z,hcDark:z,hcLight:z},a.NC("checkbox.border","Border color of checkbox widget.")),Lt=(m("checkbox.selectBorder",{dark:v,light:v,hcDark:v,hcLight:v},a.NC("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),m("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,a.NC("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead"))),Nt=m("quickInputList.focusForeground",{dark:et,light:et,hcDark:et,hcLight:et},a.NC("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),Dt=m("quickInputList.focusIconForeground",{dark:tt,light:tt,hcDark:tt,hcLight:tt},a.NC("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),Et=m("quickInputList.focusBackground",{dark:ui(Lt,Xe),light:ui(Lt,Xe),hcDark:null,hcLight:null},a.NC("quickInput.listFocusBackground","Quick picker background color for the focused item.")),It=m("menu.border",{dark:null,light:null,hcDark:b,hcLight:b},a.NC("menuBorder","Border color of menus.")),Tt=m("menu.foreground",{dark:V,light:V,hcDark:V,hcLight:V},a.NC("menuForeground","Foreground color of menu items.")),Mt=m("menu.background",{dark:W,light:W,hcDark:W,hcLight:W},a.NC("menuBackground","Background color of menu items.")),Rt=m("menu.selectionForeground",{dark:et,light:et,hcDark:et,hcLight:et},a.NC("menuSelectionForeground","Foreground color of the selected menu item in menus.")),At=m("menu.selectionBackground",{dark:Xe,light:Xe,hcDark:Xe,hcLight:Xe},a.NC("menuSelectionBackground","Background color of the selected menu item in menus.")),Pt=m("menu.selectionBorder",{dark:null,light:null,hcDark:w,hcLight:w},a.NC("menuSelectionBorder","Border color of the selected menu item in menus.")),Ot=m("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:b,hcLight:b},a.NC("menuSeparatorBackground","Color of a separator menu item in menus.")),Ft=m("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},a.NC("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),Bt=(m("toolbar.hoverOutline",{dark:null,light:null,hcDark:w,hcLight:w},a.NC("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),m("toolbar.activeBackground",{dark:ci(Ft,.1),light:di(Ft,.1),hcDark:null,hcLight:null},a.NC("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),m("editor.snippetTabstopHighlightBackground",{dark:new s.Il(new s.VS(124,124,124,.3)),light:new s.Il(new s.VS(10,50,100,.2)),hcDark:new s.Il(new s.VS(124,124,124,.3)),hcLight:new s.Il(new s.VS(10,50,100,.2))},a.NC("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),m("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),m("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),m("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new s.Il(new s.VS(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},a.NC("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),m("breadcrumb.foreground",{light:hi(f,.8),dark:hi(f,.8),hcDark:hi(f,.8),hcLight:hi(f,.8)},a.NC("breadcrumbsFocusForeground","Color of focused breadcrumb items."))),Wt=m("breadcrumb.background",{light:ue,dark:ue,hcDark:ue,hcLight:ue},a.NC("breadcrumbsBackground","Background color of breadcrumb items.")),Ht=m("breadcrumb.focusForeground",{light:di(f,.2),dark:ci(f,.1),hcDark:ci(f,.1),hcLight:ci(f,.1)},a.NC("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),Vt=m("breadcrumb.activeSelectionForeground",{light:di(f,.2),dark:ci(f,.1),hcDark:ci(f,.1),hcLight:ci(f,.1)},a.NC("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),zt=(m("breadcrumbPicker.background",{light:pe,dark:pe,hcDark:pe,hcLight:pe},a.NC("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),s.Il.fromHex("#40C8AE").transparent(.5)),jt=s.Il.fromHex("#40A6FF").transparent(.5),Ut=s.Il.fromHex("#606060").transparent(.4),qt=.4,Kt=m("merge.currentHeaderBackground",{dark:zt,light:zt,hcDark:null,hcLight:null},a.NC("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),$t=(m("merge.currentContentBackground",{dark:hi(Kt,qt),light:hi(Kt,qt),hcDark:hi(Kt,qt),hcLight:hi(Kt,qt)},a.NC("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.incomingHeaderBackground",{dark:jt,light:jt,hcDark:null,hcLight:null},a.NC("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),Gt=(m("merge.incomingContentBackground",{dark:hi($t,qt),light:hi($t,qt),hcDark:hi($t,qt),hcLight:hi($t,qt)},a.NC("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.commonHeaderBackground",{dark:Ut,light:Ut,hcDark:null,hcLight:null},a.NC("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),Zt=(m("merge.commonContentBackground",{dark:hi(Gt,qt),light:hi(Gt,qt),hcDark:hi(Gt,qt),hcLight:hi(Gt,qt)},a.NC("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},a.NC("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."))),Qt=(m("editorOverviewRuler.currentContentForeground",{dark:hi(Kt,1),light:hi(Kt,1),hcDark:Zt,hcLight:Zt},a.NC("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.incomingContentForeground",{dark:hi($t,1),light:hi($t,1),hcDark:Zt,hcLight:Zt},a.NC("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.commonContentForeground",{dark:hi(Gt,1),light:hi(Gt,1),hcDark:Zt,hcLight:Zt},a.NC("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},a.NC("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0)),Yt=m("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},a.NC("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Jt=m("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},a.NC("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),Xt=m("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},a.NC("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),ei=m("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},a.NC("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),ti=m("minimap.infoHighlight",{dark:de,light:de,hcDark:ce,hcLight:ce},a.NC("minimapInfo","Minimap marker color for infos.")),ii=m("minimap.warningHighlight",{dark:ae,light:ae,hcDark:le,hcLight:le},a.NC("overviewRuleWarning","Minimap marker color for warnings.")),ni=m("minimap.errorHighlight",{dark:new s.Il(new s.VS(255,18,18,.7)),light:new s.Il(new s.VS(255,18,18,.7)),hcDark:new s.Il(new s.VS(255,50,50,1)),hcLight:"#B5200D"},a.NC("minimapError","Minimap marker color for errors.")),oi=m("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("minimapBackground","Minimap background color.")),si=m("minimap.foregroundOpacity",{dark:s.Il.fromHex("#000f"),light:s.Il.fromHex("#000f"),hcDark:s.Il.fromHex("#000f"),hcLight:s.Il.fromHex("#000f")},a.NC("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),ri=(m("minimapSlider.background",{light:hi(ee,.5),dark:hi(ee,.5),hcDark:hi(ee,.5),hcLight:hi(ee,.5)},a.NC("minimapSliderBackground","Minimap slider background color.")),m("minimapSlider.hoverBackground",{light:hi(te,.5),dark:hi(te,.5),hcDark:hi(te,.5),hcLight:hi(te,.5)},a.NC("minimapSliderHoverBackground","Minimap slider background color when hovering.")),m("minimapSlider.activeBackground",{light:hi(ie,.5),dark:hi(ie,.5),hcDark:hi(ie,.5),hcLight:hi(ie,.5)},a.NC("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),m("problemsErrorIcon.foreground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},a.NC("problemsErrorIconForeground","The color used for the problems error icon."))),ai=m("problemsWarningIcon.foreground",{dark:ae,light:ae,hcDark:ae,hcLight:ae},a.NC("problemsWarningIconForeground","The color used for the problems warning icon.")),li=m("problemsInfoIcon.foreground",{dark:de,light:de,hcDark:de,hcLight:de},a.NC("problemsInfoIconForeground","The color used for the problems info icon."));function di(e,t){return{op:0,value:e,factor:t}}function ci(e,t){return{op:1,value:e,factor:t}}function hi(e,t){return{op:2,value:e,factor:t}}function ui(...e){return{op:4,values:e}}function gi(e,t,i,n){return{op:5,value:e,background:t,factor:i,transparency:n}}function pi(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?s.Il.fromHex(e):t.getColor(e):e instanceof s.Il?e:"object"==typeof e?function(e,t){var i,o,r,a;switch(e.op){case 0:return null===(i=pi(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(o=pi(e.value,t))||void 0===o?void 0:o.lighten(e.factor);case 2:return null===(r=pi(e.value,t))||void 0===r?void 0:r.transparent(e.factor);case 3:{const i=pi(e.background,t);return i?null===(a=pi(e.value,t))||void 0===a?void 0:a.makeOpaque(i):pi(e.value,t)}case 4:for(const i of e.values){const e=pi(i,t);if(e)return e}return;case 6:return pi(t.defines(e.if)?e.then:e.else,t);case 5:{const i=pi(e.value,t);if(!i)return;const n=pi(e.background,t);return n?i.isDarkerThan(n)?s.Il.getLighterColor(i,n,e.factor).transparent(e.transparency):s.Il.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw(0,n.vE)(e)}}(e,t):void 0}m("charts.foreground",{dark:f,light:f,hcDark:f,hcLight:f},a.NC("chartsForeground","The foreground color used in charts.")),m("charts.lines",{dark:hi(f,.5),light:hi(f,.5),hcDark:hi(f,.5),hcLight:hi(f,.5)},a.NC("chartsLines","The color used for horizontal lines in charts.")),m("charts.red",{dark:oe,light:oe,hcDark:oe,hcLight:oe},a.NC("chartsRed","The red color used in chart visualizations.")),m("charts.blue",{dark:de,light:de,hcDark:de,hcLight:de},a.NC("chartsBlue","The blue color used in chart visualizations.")),m("charts.yellow",{dark:ae,light:ae,hcDark:ae,hcLight:ae},a.NC("chartsYellow","The yellow color used in chart visualizations.")),m("charts.orange",{dark:Jt,light:Jt,hcDark:Jt,hcLight:Jt},a.NC("chartsOrange","The orange color used in chart visualizations.")),m("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},a.NC("chartsGreen","The green color used in chart visualizations.")),m("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},a.NC("chartsPurple","The purple color used in chart visualizations."));const mi="vscode://schemas/workbench-colors",fi=d.B.as(l.I.JSONContribution);fi.registerSchema(mi,p.getColorSchema());const vi=new o.pY((()=>fi.notifySchemaChanged(mi)),200);p.onDidChangeSchema((()=>{vi.isScheduled()||vi.schedule()}))},59554:(e,t,i)=>{"use strict";i.d(t,{Ks:()=>f,q5:()=>m,s_:()=>w});var n,o,s=i(15393),r=i(73046),a=i(25670),l=i(4669),d=i(98401),c=i(70666),h=i(63580),u=i(81294),g=i(89872);!function(e){e.getDefinition=function(e,t){let i=e.defaults;for(;a.k.isThemeIcon(i);){const e=p.getIcon(i.id);if(!e)return;i=e.defaults}return i}}(n||(n={})),function(e){e.toJSONObject=function(e){return{weight:e.weight,style:e.style,src:e.src.map((e=>({format:e.format,location:e.location.toString()})))}},e.fromJSONObject=function(e){const t=e=>(0,d.HD)(e)?e:void 0;if(e&&Array.isArray(e.src)&&e.src.every((e=>(0,d.HD)(e.format)&&(0,d.HD)(e.location))))return{weight:t(e.weight),style:t(e.style),src:e.src.map((e=>({format:e.format,location:c.o.parse(e.location)})))}}}(o||(o={}));const p=new class{constructor(){this._onDidChange=new l.Q5,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,h.NC)("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,h.NC)("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${a.k.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const o=this.iconsById[e];if(o){if(i&&!o.description){o.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return o}const s={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=s;const r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,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=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;a.k.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const o of n.filter((e=>!!e.description)).sort(e))i.push(`||${o.id}|${a.k.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const o of n.filter((e=>!a.k.isThemeIcon(e.defaults))).sort(e))i.push(`||${o.id}|`);return i.join("\n")}};function m(e,t,i,n){return p.registerIcon(e,t,i,n)}function f(){return p}g.B.add("base.contributions.icons",p),function(){const e=(0,r.u)();for(const t in e){const i="\\"+e[t].toString(16);p.registerIcon(t,{fontCharacter:i})}}();const v="vscode://schemas/icons",_=g.B.as(u.I.JSONContribution);_.registerSchema(v,p.getIconSchema());const b=new s.pY((()=>_.notifySchemaChanged(v)),200);p.onDidChange((()=>{b.isScheduled()||b.schedule()}));const w=m("widget-close",r.l.close,(0,h.NC)("widgetClose","Icon for the close action in widgets."));m("goto-previous-location",r.l.arrowUp,(0,h.NC)("previousChangeIcon","Icon for goto previous editor location.")),m("goto-next-location",r.l.arrowDown,(0,h.NC)("nextChangeIcon","Icon for goto next editor location.")),a.k.modify(r.l.sync,"spin"),a.k.modify(r.l.loading,"spin")},92321:(e,t,i)=>{"use strict";var n;function o(e){return e===n.HIGH_CONTRAST_DARK||e===n.HIGH_CONTRAST_LIGHT}function s(e){return e===n.DARK||e===n.HIGH_CONTRAST_DARK}i.d(t,{_T:()=>s,c3:()=>o,eL:()=>n}),function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST_DARK="hcDark",e.HIGH_CONTRAST_LIGHT="hcLight"}(n||(n={}))},97781:(e,t,i)=>{"use strict";i.d(t,{EN:()=>d,IP:()=>h,Ic:()=>g,XE:()=>l,bB:()=>p,m6:()=>c});var n=i(4669),o=i(5976),s=i(72065),r=i(89872),a=i(92321);const l=(0,s.yh)("themeService");function d(e){return{id:e}}function c(e){switch(e){case a.eL.DARK:return"vs-dark";case a.eL.HIGH_CONTRAST_DARK:return"hc-black";case a.eL.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const h={ThemingContribution:"base.contributions.theming"},u=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new n.Q5}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,o.OF)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function g(e){return u.onColorThemeChange(e)}r.B.add(h.ThemingContribution,u);class p extends o.JT{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},64862:(e,t,i)=>{"use strict";i.d(t,{Xt:()=>s,YO:()=>o,gJ:()=>r,tJ:()=>n});const n=(0,i(72065).yh)("undoRedoService");class o{constructor(e,t){this.resource=e,this.elements=t}}class s{constructor(){this.id=s._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}s._ID=0,s.None=new s;class r{constructor(){this.id=r._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}r._ID=0,r.None=new r},40382:(e,t,i)=>{"use strict";i.d(t,{A6:()=>g,c$:()=>l,eb:()=>a,ec:()=>r,md:()=>u,p$:()=>p,uT:()=>h,x:()=>m});var n=i(63580),o=i(82663),s=(i(4767),i(70666));const r=(0,i(72065).yh)("contextService");function a(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&s.o.isUri(t.uri)}function l(e){return"string"==typeof(null==e?void 0:e.id)&&!a(e)&&!function(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&s.o.isUri(t.configPath)}(e)}const d={id:"ext-dev"},c={id:"empty-window"};function h(e,t){if("string"==typeof e||void 0===e)return"string"==typeof e?{id:(0,o.EZ)(e)}:t?d:c;const i=e;return i.configuration?{id:i.id,configPath:i.configuration}:1===i.folders.length?{id:i.id,uri:i.folders[0].uri}:{id:i.id}}class u{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 g="code-workspace",p=((0,n.NC)("codeWorkspace","Code Workspace"),"4064f6ec-cb38-4ad0-af64-ee6467e63c82");function m(e){return e.id===p}},33425:(e,t,i)=>{"use strict";i.d(t,{Y:()=>n});const n=(0,i(72065).yh)("workspaceTrustManagementService")},57129:(e,t)=>{"use strict";var i=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var n,s,r=[];for(s in"string"!=typeof t&&(t="?"),e)if(i.call(e,s)){if((n=e[s])||null!=n&&!isNaN(n)||(n=""),s=o(s),n=o(n),null===s||null===n)continue;r.push(s+"="+n)}return r.length?t+r.join("&"):""},t.parse=function(e){for(var t,i=/([^=?#&]+)=?([^&]*)/g,o={};t=i.exec(e);){var s=n(t[1]),r=n(t[2]);null===s||null===r||s in o||(o[s]=r)}return o}},47418:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},28e3:(e,t,i)=>{"use strict";var n=i(87581);e.exports=i(93626)(n),"_sockjs_onload"in i.g&&setTimeout(i.g._sockjs_onload,1)},12530:(e,t,i)=>{"use strict";var n=i(35717),o=i(20685);function s(){o.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}n(s,o),e.exports=s},63212:(e,t,i)=>{"use strict";var n=i(35717),o=i(53184);function s(){o.call(this)}n(s,o),s.prototype.removeAllListeners=function(e){e?delete this._listeners[e]:this._listeners={}},s.prototype.once=function(e,t){var i=this,n=!1;this.on(e,(function o(){i.removeListener(e,o),n||(n=!0,t.apply(this,arguments))}))},s.prototype.emit=function(){var e=arguments[0],t=this._listeners[e];if(t){for(var i=arguments.length,n=new Array(i-1),o=1;o{"use strict";function t(e){this.type=e}t.prototype.initEvent=function(e,t,i){return this.type=e,this.bubbles=t,this.cancelable=i,this.timeStamp=+new Date,this},t.prototype.stopPropagation=function(){},t.prototype.preventDefault=function(){},t.CAPTURING_PHASE=1,t.AT_TARGET=2,t.BUBBLING_PHASE=3,e.exports=t},53184:e=>{"use strict";function t(){this._listeners={}}t.prototype.addEventListener=function(e,t){e in this._listeners||(this._listeners[e]=[]);var i=this._listeners[e];-1===i.indexOf(t)&&(i=i.concat([t])),this._listeners[e]=i},t.prototype.removeEventListener=function(e,t){var i=this._listeners[e];if(i){var n=i.indexOf(t);-1===n||(i.length>1?this._listeners[e]=i.slice(0,n).concat(i.slice(n+1)):delete this._listeners[e])}},t.prototype.dispatchEvent=function(){var e=arguments[0],t=e.type,i=1===arguments.length?[e]:Array.apply(null,arguments);if(this["on"+t]&&this["on"+t].apply(this,i),t in this._listeners)for(var n=this._listeners[t],o=0;o{"use strict";var n=i(35717),o=i(20685);function s(e){o.call(this),this.initEvent("message",!1,!1),this.data=e}n(s,o),e.exports=s},80691:(e,t,i)=>{"use strict";var n=i(3683);function o(e){this._transport=e,e.on("message",this._transportMessage.bind(this)),e.on("close",this._transportClose.bind(this))}o.prototype._transportClose=function(e,t){n.postMessage("c",JSON.stringify([e,t]))},o.prototype._transportMessage=function(e){n.postMessage("t",e)},o.prototype._send=function(e){this._transport.send(e)},o.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},e.exports=o},80551:(e,t,i)=>{"use strict";var n=i(70273),o=i(97705),s=i(80691),r=i(16311),a=i(3683),l=i(47486);e.exports=function(e,t){var i,d={};t.forEach((function(e){e.facadeTransport&&(d[e.facadeTransport.transportName]=e.facadeTransport)})),d[r.transportName]=r,e.bootstrap_iframe=function(){var t;a.currentWindowId=l.hash.slice(1),o.attachEvent("message",(function(o){if(o.source===parent&&(void 0===i&&(i=o.origin),o.origin===i)){var r;try{r=JSON.parse(o.data)}catch(e){return void o.data}if(r.windowId===a.currentWindowId)switch(r.type){case"s":var c;try{c=JSON.parse(r.data)}catch(e){r.data;break}var h=c[0],u=c[1],g=c[2],p=c[3];if(h!==e.version)throw new Error('Incompatible SockJS! Main site uses: "'+h+'", the iframe: "'+e.version+'".');if(!n.isOriginEqual(g,l.href)||!n.isOriginEqual(p,l.href))throw new Error("Can't connect to different domain from within an iframe. ("+l.href+", "+g+", "+p+")");t=new s(new d[u](g,p));break;case"m":t._send(r.data);break;case"c":t&&t._close(),t=null}}})),a.postMessage("s")}}},32550:(e,t,i)=>{"use strict";var n=i(63212).v,o=i(35717),s=i(72217);function r(e,t){n.call(this);var i=this,o=+new Date;this.xo=new t("GET",e),this.xo.once("finish",(function(e,t){var n,r;if(200===e){if(r=+new Date-o,t)try{n=JSON.parse(t)}catch(e){}s.isObject(n)||(n={})}i.emit("finish",n,r),i.removeAllListeners()}))}o(r,n),r.prototype.close=function(){this.removeAllListeners(),this.xo.close()},e.exports=r},16311:(e,t,i)=>{"use strict";var n=i(35717),o=i(63212).v,s=i(43515),r=i(32550);function a(e){var t=this;o.call(this),this.ir=new r(e,s),this.ir.once("finish",(function(e,i){t.ir=null,t.emit("message",JSON.stringify([e,i]))}))}n(a,o),a.transportName="iframe-info-receiver",a.prototype.close=function(){this.ir&&(this.ir.close(),this.ir=null),this.removeAllListeners()},e.exports=a},93616:(e,t,i)=>{"use strict";var n=i(63212).v,o=i(35717),s=i(97705),r=i(55088),a=i(16311);function l(e,t){var o=this;n.call(this);var l=function(){var i=o.ifr=new r(a.transportName,t,e);i.once("message",(function(e){if(e){var t;try{t=JSON.parse(e)}catch(e){return o.emit("finish"),void o.close()}var i=t[0],n=t[1];o.emit("finish",i,n)}o.close()})),i.once("close",(function(){o.emit("finish"),o.close()}))};i.g.document.body?l():s.attachEvent("load",l)}o(l,n),l.enabled=function(){return r.enabled()},l.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},e.exports=l},85172:(e,t,i)=>{"use strict";var n=i(63212).v,o=i(35717),s=i(70273),r=i(56073),a=i(79033),l=i(43515),d=i(57103),c=i(93616),h=i(32550);function u(e,t){var i=this;n.call(this),setTimeout((function(){i.doXhr(e,t)}),0)}o(u,n),u._getReceiver=function(e,t,i){return i.sameOrigin?new h(t,l):a.enabled?new h(t,a):r.enabled&&i.sameScheme?new h(t,r):c.enabled()?new c(e,t):new h(t,d)},u.prototype.doXhr=function(e,t){var i=this,n=s.addPath(e,"/info");this.xo=u._getReceiver(e,n,t),this.timeoutRef=setTimeout((function(){i._cleanup(!1),i.emit("finish")}),u.timeout),this.xo.once("finish",(function(e,t){i._cleanup(!0),i.emit("finish",e,t)}))},u.prototype._cleanup=function(e){clearTimeout(this.timeoutRef),this.timeoutRef=null,!e&&this.xo&&this.xo.close(),this.xo=null},u.prototype.close=function(){this.removeAllListeners(),this._cleanup(!1)},u.timeout=8e3,e.exports=u},47486:(e,t,i)=>{"use strict";e.exports=i.g.location||{origin:"http://localhost:80",protocol:"http:",host:"localhost",port:80,href:"http://localhost/",hash:""}},93626:(e,t,i)=>{"use strict";i(21247);var n,o=i(84564),s=i(35717),r=i(28915),a=i(98028),l=i(70273),d=i(97705),c=i(95581),h=i(72217),u=i(38510),g=i(54886),p=i(20685),m=i(53184),f=i(47486),v=i(12530),_=i(13326),b=i(85172);function w(e,t,i){if(!(this instanceof w))return new w(e,t,i);if(arguments.length<1)throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");m.call(this),this.readyState=w.CONNECTING,this.extensions="",this.protocol="",(i=i||{}).protocols_whitelist&&g.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."),this._transportsWhitelist=i.transports,this._transportOptions=i.transportOptions||{},this._timeout=i.timeout||0;var n=i.sessionId||8;if("function"==typeof n)this._generateSessionId=n;else{if("number"!=typeof n)throw new TypeError("If sessionId is used in the options, it needs to be a number or a function.");this._generateSessionId=function(){return r.string(n)}}this._server=i.server||r.numberString(1e3);var s=new o(e);if(!s.host||!s.protocol)throw new SyntaxError("The URL '"+e+"' is invalid");if(s.hash)throw new SyntaxError("The URL must not contain a fragment");if("http:"!==s.protocol&&"https:"!==s.protocol)throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '"+s.protocol+"' is not allowed.");var a="https:"===s.protocol;if("https:"===f.protocol&&!a&&!l.isLoopbackAddr(s.hostname))throw new Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");t?Array.isArray(t)||(t=[t]):t=[];var d=t.sort();d.forEach((function(e,t){if(!e)throw new SyntaxError("The protocols entry '"+e+"' is invalid.");if(t=3e3&&e<=4999}s(w,m),w.prototype.close=function(e,t){if(e&&!y(e))throw new Error("InvalidAccessError: Invalid code");if(t&&t.length>123)throw new SyntaxError("reason argument has an invalid length");this.readyState!==w.CLOSING&&this.readyState!==w.CLOSED&&this._close(e||1e3,t||"Normal closure",!0)},w.prototype.send=function(e){if("string"!=typeof e&&(e=""+e),this.readyState===w.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===w.OPEN&&this._transport.send(a.quote(e))},w.version=i(32828),w.CONNECTING=0,w.OPEN=1,w.CLOSING=2,w.CLOSED=3,w.prototype._receiveInfo=function(e,t){if(this._ir=null,e){this._rto=this.countRTO(t),this._transUrl=e.base_url?e.base_url:this.url,e=h.extend(e,this._urlInfo);var i=n.filterToEnabled(this._transportsWhitelist,e);this._transports=i.main,this._transports.length,this._connect()}else this._close(1002,"Cannot connect to server")},w.prototype._connect=function(){for(var e=this._transports.shift();e;e=this._transports.shift()){if(e.transportName,e.needBody&&(!i.g.document.body||void 0!==i.g.document.readyState&&"complete"!==i.g.document.readyState&&"interactive"!==i.g.document.readyState))return this._transports.unshift(e),void d.attachEvent("load",this._connect.bind(this));var t=Math.max(this._timeout,this._rto*e.roundTrips||5e3);this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),t);var n=l.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),o=this._transportOptions[e.transportName],s=new e(n,this._transUrl,o);return s.on("message",this._transportMessage.bind(this)),s.once("close",this._transportClose.bind(this)),s.transportName=e.transportName,void(this._transport=s)}this._close(2e3,"All transports failed",!1)},w.prototype._transportTimeout=function(){this.readyState===w.CONNECTING&&(this._transport&&this._transport.close(),this._transportClose(2007,"Transport timed out"))},w.prototype._transportMessage=function(e){var t,i=this,n=e.slice(0,1),o=e.slice(1);switch(n){case"o":return void this._open();case"h":return this.dispatchEvent(new p("heartbeat")),void this.transport}if(o)try{t=JSON.parse(o)}catch(e){}if(void 0!==t)switch(n){case"a":Array.isArray(t)&&t.forEach((function(e){i.transport,i.dispatchEvent(new _(e))}));break;case"m":this.transport,this.dispatchEvent(new _(t));break;case"c":Array.isArray(t)&&2===t.length&&this._close(t[0],t[1],!0)}},w.prototype._transportClose=function(e,t){this.transport,this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),y(e)||2e3===e||this.readyState!==w.CONNECTING?this._close(e,t):this._connect()},w.prototype._open=function(){this._transport&&this._transport.transportName,this.readyState,this.readyState===w.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=w.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new p("open")),this.transport):this._close(1006,"Server lost session")},w.prototype._close=function(e,t,i){this.transport,this.readyState;var n=!1;if(this._ir&&(n=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===w.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=w.CLOSING,setTimeout(function(){this.readyState=w.CLOSED,n&&this.dispatchEvent(new p("error"));var o=new v("close");o.wasClean=i||!1,o.code=e||1e3,o.reason=t,this.dispatchEvent(o),this.onmessage=this.onclose=this.onerror=null}.bind(this),0)},w.prototype.countRTO=function(e){return e>100?4*e:300+e},e.exports=function(e){return n=c(e),i(80551)(w,e),w}},21247:()=>{"use strict";var e,t=Array.prototype,i=Object.prototype,n=Function.prototype,o=String.prototype,s=t.slice,r=i.toString,a=function(e){return"[object Function]"===i.toString.call(e)},l=function(e){return"[object String]"===r.call(e)},d=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}();e=d?function(e,t,i,n){!n&&t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:i})}:function(e,t,i,n){!n&&t in e||(e[t]=i)};var c=function(t,n,o){for(var s in n)i.hasOwnProperty.call(n,s)&&e(t,s,n[s],o)},h=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)};function u(){}c(n,{bind:function(e){var t=this;if(!a(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var i=s.call(arguments,1),n=Math.max(0,t.length-i.length),o=[],r=0;r>>0;if(!a(e))throw new TypeError;for(;++o>>0;if(!i)return-1;var n,o=0;for(arguments.length>1&&((n=+arguments[1])!=n?n=0:0!==n&&n!==1/0&&n!==-1/0&&(n=(n>0||-1)*Math.floor(Math.abs(n))),o=n),o=o>=0?o:Math.max(0,i+o);o1?(b=void 0===/()??/.exec("")[1],o.split=function(e,i){var n=this;if(void 0===e&&0===i)return[];if("[object RegExp]"!==r.call(e))return w.call(this,e,i);var o,s,a,l,d=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),h=0;for(e=new RegExp(e.source,c+"g"),n+="",b||(o=new RegExp("^"+e.source+"$(?!\\s)",c)),i=void 0===i?-1>>>0:i>>>0;(s=e.exec(n))&&!((a=s.index+s[0].length)>h&&(d.push(n.slice(h,s.index)),!b&&s.length>1&&s[0].replace(o,(function(){for(var e=1;e1&&s.index=i));)e.lastIndex===s.index&&e.lastIndex++;return h===n.length?!l&&e.test("")||d.push(""):d.push(n.slice(h)),d.length>i?d.slice(0,i):d}):"0".split(void 0,0).length&&(o.split=function(e,t){return void 0===e&&0===t?[]:w.call(this,e,t)});var y=o.substr;c(o,{substr:function(e,t){return y.call(this,e<0&&(e=this.length+e)<0?0:e,t)}},"".substr&&"b"!=="0b".substr(-1))},87581:(e,t,i)=>{"use strict";e.exports=[i(22412),i(69842),i(94620),i(43004),i(40882)(i(43004)),i(65616),i(40882)(i(65616)),i(62387),i(69998),i(40882)(i(62387)),i(95375)]},82940:(e,t,i)=>{"use strict";var n=i(63212).v,o=i(35717),s=i(97705),r=i(70273),a=i.g.XMLHttpRequest;function l(e,t,i,o){var s=this;n.call(this),setTimeout((function(){s._start(e,t,i,o)}),0)}o(l,n),l.prototype._start=function(e,t,i,n){var o=this;try{this.xhr=new a}catch(e){}if(!this.xhr)return this.emit("finish",0,"no xhr support"),void this._cleanup();t=r.addQuery(t,"t="+ +new Date),this.unloadRef=s.unloadAdd((function(){o._cleanup(!0)}));try{this.xhr.open(e,t,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){o.emit("finish",0,""),o._cleanup(!1)})}catch(e){return this.emit("finish",0,""),void this._cleanup(!1)}if(n&&n.noCredentials||!l.supportsCORS||(this.xhr.withCredentials=!0),n&&n.headers)for(var d in n.headers)this.xhr.setRequestHeader(d,n.headers[d]);this.xhr.onreadystatechange=function(){if(o.xhr){var e,t,i=o.xhr;switch(i.readyState,i.readyState){case 3:try{t=i.status,e=i.responseText}catch(e){}1223===t&&(t=204),200===t&&e&&e.length>0&&o.emit("chunk",t,e);break;case 4:1223===(t=i.status)&&(t=204),12005!==t&&12029!==t||(t=0),i.responseText,o.emit("finish",t,i.responseText),o._cleanup(!1)}}};try{o.xhr.send(i)}catch(e){o.emit("finish",0,""),o._cleanup(!1)}},l.prototype._cleanup=function(e){if(this.xhr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),e)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},l.prototype.close=function(){this._cleanup(!0)},l.enabled=!!a;var d=["Active"].concat("Object").join("X");!l.enabled&&d in i.g&&(a=function(){try{return new i.g[d]("Microsoft.XMLHTTP")}catch(e){return null}},l.enabled=!!new a);var c=!1;try{c="withCredentials"in new a}catch(e){}l.supportsCORS=c,e.exports=l},3759:(e,t,i)=>{e.exports=i.g.EventSource},69334:(e,t,i)=>{"use strict";var n=i.g.WebSocket||i.g.MozWebSocket;e.exports=n?function(e){return new n(e)}:void 0},43004:(e,t,i)=>{"use strict";var n=i(35717),o=i(99395),s=i(46709),r=i(79033),a=i(3759);function l(e){if(!l.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/eventsource",s,r)}n(l,o),l.enabled=function(){return!!a},l.transportName="eventsource",l.roundTrips=2,e.exports=l},65616:(e,t,i)=>{"use strict";var n=i(35717),o=i(53608),s=i(43515),r=i(99395);function a(e){if(!o.enabled)throw new Error("Transport created when disabled");r.call(this,e,"/htmlfile",o,s)}n(a,r),a.enabled=function(e){return o.enabled&&e.sameOrigin},a.transportName="htmlfile",a.roundTrips=2,e.exports=a},55088:(e,t,i)=>{"use strict";var n=i(35717),o=i(63212).v,s=i(32828),r=i(70273),a=i(3683),l=i(97705),d=i(28915);function c(e,t,i){if(!c.enabled())throw new Error("Transport created when disabled");o.call(this);var n=this;this.origin=r.getOrigin(i),this.baseUrl=i,this.transUrl=t,this.transport=e,this.windowId=d.string(8);var s=r.addPath(i,"/iframe.html")+"#"+this.windowId;this.iframeObj=a.createIframe(s,(function(e){n.emit("close",1006,"Unable to load an iframe ("+e+")"),n.close()})),this.onmessageCallback=this._message.bind(this),l.attachEvent("message",this.onmessageCallback)}n(c,o),c.prototype.close=function(){if(this.removeAllListeners(),this.iframeObj){l.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(e){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},c.prototype._message=function(e){if(e.data,!r.isOriginEqual(e.origin,this.origin))return e.origin,void this.origin;var t;try{t=JSON.parse(e.data)}catch(t){return void e.data}if(t.windowId!==this.windowId)return t.windowId,void this.windowId;switch(t.type){case"s":this.iframeObj.loaded(),this.postMessage("s",JSON.stringify([s,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",t.data);break;case"c":var i;try{i=JSON.parse(t.data)}catch(e){return void t.data}this.emit("close",i[0],i[1]),this.close()}},c.prototype.postMessage=function(e,t){this.iframeObj.post(JSON.stringify({windowId:this.windowId,type:e,data:t||""}),this.origin)},c.prototype.send=function(e){this.postMessage("m",e)},c.enabled=function(){return a.iframeEnabled},c.transportName="iframe",c.roundTrips=2,e.exports=c},95375:(e,t,i)=>{"use strict";var n=i(35717),o=i(48347),s=i(514),r=i(20771);function a(e){if(!a.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/jsonp",r,s)}n(a,o),a.enabled=function(){return!!i.g.document},a.transportName="jsonp-polling",a.roundTrips=1,a.needBody=!0,e.exports=a},99395:(e,t,i)=>{"use strict";var n=i(35717),o=i(70273),s=i(48347);function r(e,t,i,n){s.call(this,e,t,function(e){return function(t,i,n){var s={};"string"==typeof i&&(s.headers={"Content-type":"text/plain"});var r=o.addPath(t,"/xhr_send"),a=new e("POST",r,i,s);return a.once("finish",(function(e){if(a=null,200!==e&&204!==e)return n(new Error("http status "+e));n()})),function(){a.close(),a=null;var e=new Error("Aborted");e.code=1e3,n(e)}}}(n),i,n)}n(r,s),e.exports=r},31851:(e,t,i)=>{"use strict";var n=i(35717),o=i(63212).v;function s(e,t){o.call(this),this.sendBuffer=[],this.sender=t,this.url=e}n(s,o),s.prototype.send=function(e){this.sendBuffer.push(e),this.sendStop||this.sendSchedule()},s.prototype.sendScheduleWait=function(){var e,t=this;this.sendStop=function(){t.sendStop=null,clearTimeout(e)},e=setTimeout((function(){t.sendStop=null,t.sendSchedule()}),25)},s.prototype.sendSchedule=function(){this.sendBuffer.length;var e=this;if(this.sendBuffer.length>0){var t="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,t,(function(t){e.sendStop=null,t?(e.emit("close",t.code||1006,"Sending error: "+t),e.close()):e.sendScheduleWait()})),this.sendBuffer=[]}},s.prototype._cleanup=function(){this.removeAllListeners()},s.prototype.close=function(){this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},e.exports=s},40882:(e,t,i)=>{"use strict";var n=i(35717),o=i(55088),s=i(72217);e.exports=function(e){function t(t,i){o.call(this,e.transportName,t,i)}return n(t,o),t.enabled=function(t,n){if(!i.g.document)return!1;var r=s.extend({},n);return r.sameOrigin=!0,e.enabled(r)&&o.enabled()},t.transportName="iframe-"+e.transportName,t.needBody=!0,t.roundTrips=o.roundTrips+e.roundTrips-1,t.facadeTransport=e,t}},61265:(e,t,i)=>{"use strict";var n=i(35717),o=i(63212).v;function s(e,t,i){o.call(this),this.Receiver=e,this.receiveUrl=t,this.AjaxObject=i,this._scheduleReceiver()}n(s,o),s.prototype._scheduleReceiver=function(){var e=this,t=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);t.on("message",(function(t){e.emit("message",t)})),t.once("close",(function(i,n){e.pollIsClosing,e.poll=t=null,e.pollIsClosing||("network"===n?e._scheduleReceiver():(e.emit("close",i||1006,n),e.removeAllListeners()))}))},s.prototype.abort=function(){this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},e.exports=s},48347:(e,t,i)=>{"use strict";var n=i(35717),o=i(70273),s=i(31851),r=i(61265);function a(e,t,i,n,a){var l=o.addPath(e,t),d=this;s.call(this,e,i),this.poll=new r(n,l,a),this.poll.on("message",(function(e){d.emit("message",e)})),this.poll.once("close",(function(e,t){d.poll=null,d.emit("close",e,t),d.close()}))}n(a,s),a.prototype.close=function(){s.prototype.close.call(this),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},e.exports=a},46709:(e,t,i)=>{"use strict";var n=i(35717),o=i(63212).v,s=i(3759);function r(e){o.call(this);var t=this,i=this.es=new s(e);i.onmessage=function(e){e.data,t.emit("message",decodeURI(e.data))},i.onerror=function(e){i.readyState;var n=2!==i.readyState?"network":"permanent";t._cleanup(),t._close(n)}}n(r,o),r.prototype.abort=function(){this._cleanup(),this._close("user")},r.prototype._cleanup=function(){var e=this.es;e&&(e.onmessage=e.onerror=null,e.close(),this.es=null)},r.prototype._close=function(e){var t=this;setTimeout((function(){t.emit("close",null,e),t.removeAllListeners()}),200)},e.exports=r},53608:(e,t,i)=>{"use strict";var n=i(35717),o=i(3683),s=i(70273),r=i(63212).v,a=i(28915);function l(e){r.call(this);var t=this;o.polluteGlobalNamespace(),this.id="a"+a.string(6),e=s.addQuery(e,"c="+decodeURIComponent(o.WPrefix+"."+this.id)),l.htmlfileEnabled;var n=l.htmlfileEnabled?o.createHtmlfile:o.createIframe;i.g[o.WPrefix][this.id]={start:function(){t.iframeObj.loaded()},message:function(e){t.emit("message",e)},stop:function(){t._cleanup(),t._close("network")}},this.iframeObj=n(e,(function(){t._cleanup(),t._close("permanent")}))}n(l,r),l.prototype.abort=function(){this._cleanup(),this._close("user")},l.prototype._cleanup=function(){this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete i.g[o.WPrefix][this.id]},l.prototype._close=function(e){this.emit("close",null,e),this.removeAllListeners()},l.htmlfileEnabled=!1;var d=["Active"].concat("Object").join("X");if(d in i.g)try{l.htmlfileEnabled=!!new i.g[d]("htmlfile")}catch(e){}l.enabled=l.htmlfileEnabled||o.iframeEnabled,e.exports=l},514:(e,t,i)=>{"use strict";var n=i(3683),o=i(28915),s=i(38510),r=i(70273),a=i(35717),l=i(63212).v;function d(e){var t=this;l.call(this),n.polluteGlobalNamespace(),this.id="a"+o.string(6);var s=r.addQuery(e,"c="+encodeURIComponent(n.WPrefix+"."+this.id));i.g[n.WPrefix][this.id]=this._callback.bind(this),this._createScript(s),this.timeoutId=setTimeout((function(){t._abort(new Error("JSONP script loaded abnormally (timeout)"))}),d.timeout)}a(d,l),d.prototype.abort=function(){if(i.g[n.WPrefix][this.id]){var e=new Error("JSONP user aborted read");e.code=1e3,this._abort(e)}},d.timeout=35e3,d.scriptErrorTimeout=1e3,d.prototype._callback=function(e){this._cleanup(),this.aborting||(e&&this.emit("message",e),this.emit("close",null,"network"),this.removeAllListeners())},d.prototype._abort=function(e){this._cleanup(),this.aborting=!0,this.emit("close",e.code,e.message),this.removeAllListeners()},d.prototype._cleanup=function(){if(clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var e=this.script;e.parentNode.removeChild(e),e.onreadystatechange=e.onerror=e.onload=e.onclick=null,this.script=null}delete i.g[n.WPrefix][this.id]},d.prototype._scriptError=function(){var e=this;this.errorTimer||(this.errorTimer=setTimeout((function(){e.loadedOkay||e._abort(new Error("JSONP script loaded abnormally (onerror)"))}),d.scriptErrorTimeout))},d.prototype._createScript=function(e){var t,n=this,r=this.script=i.g.document.createElement("script");if(r.id="a"+o.string(8),r.src=e,r.type="text/javascript",r.charset="UTF-8",r.onerror=this._scriptError.bind(this),r.onload=function(){n._abort(new Error("JSONP script loaded abnormally (onload)"))},r.onreadystatechange=function(){if(r.readyState,/loaded|closed/.test(r.readyState)){if(r&&r.htmlFor&&r.onclick){n.loadedOkay=!0;try{r.onclick()}catch(e){}}r&&n._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))}},void 0===r.async&&i.g.document.attachEvent)if(s.isOpera())(t=this.script2=i.g.document.createElement("script")).text="try{var a = document.getElementById('"+r.id+"'); if(a)a.onerror();}catch(x){};",r.async=t.async=!1;else{try{r.htmlFor=r.id,r.event="onclick"}catch(e){}r.async=!0}void 0!==r.async&&(r.async=!0);var a=i.g.document.getElementsByTagName("head")[0];a.insertBefore(r,a.firstChild),t&&a.insertBefore(t,a.firstChild)},e.exports=d},31044:(e,t,i)=>{"use strict";var n=i(35717),o=i(63212).v;function s(e,t){o.call(this);var i=this;this.bufferPosition=0,this.xo=new t("POST",e,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",(function(e,t){i._chunkHandler(e,t),i.xo=null;var n=200===e?"network":"permanent";i.emit("close",null,n),i._cleanup()}))}n(s,o),s.prototype._chunkHandler=function(e,t){if(200===e&&t)for(var i=-1;;this.bufferPosition+=i+1){var n=t.slice(this.bufferPosition);if(-1===(i=n.indexOf("\n")))break;var o=n.slice(0,i);o&&this.emit("message",o)}},s.prototype._cleanup=function(){this.removeAllListeners()},s.prototype.abort=function(){this.xo&&(this.xo.close(),this.emit("close",null,"user"),this.xo=null),this._cleanup()},e.exports=s},20771:(e,t,i)=>{"use strict";var n,o,s=i(28915),r=i(70273);e.exports=function(e,t,a){n||((n=i.g.document.createElement("form")).style.display="none",n.style.position="absolute",n.method="POST",n.enctype="application/x-www-form-urlencoded",n.acceptCharset="UTF-8",(o=i.g.document.createElement("textarea")).name="d",n.appendChild(o),i.g.document.body.appendChild(n));var l="a"+s.string(8);n.target=l,n.action=r.addQuery(r.addPath(e,"/jsonp_send"),"i="+l);var d=function(e){try{return i.g.document.createElement('