diff --git a/ade705761eb7e702770d.ttf b/ade705761eb7e702770d.ttf new file mode 100644 index 0000000..7eba314 Binary files /dev/null and b/ade705761eb7e702770d.ttf differ diff --git a/app.bundle.js b/app.bundle.js new file mode 100644 index 0000000..5debd29 --- /dev/null +++ b/app.bundle.js @@ -0,0 +1,2 @@ +/*! For license information please see app.bundle.js.LICENSE.txt */ +(()=>{var e={2294:e=>{"use strict";function t(e,t,o){e instanceof RegExp&&(e=i(e,o)),t instanceof RegExp&&(t=i(t,o));var s=n(e,t,o);return s&&{start:s[0],end:s[1],pre:o.slice(0,s[0]),body:o.slice(s[0]+e.length,s[1]),post:o.slice(s[1]+t.length)}}function i(e,t){var i=t.match(e);return i?i[0]:null}function n(e,t,i){var n,o,s,r,a,l=i.indexOf(e),c=i.indexOf(t,l+1),d=l;if(l>=0&&c>0){if(e===t)return[l,c];for(n=[],s=i.length;d>=0&&!a;)d==l?(n.push(d),l=i.indexOf(e,d+1)):1==n.length?a=[n.pop(),c]:((o=n.pop())=0?l:c;n.length&&(a=[s,r])}return a}e.exports=t,t.range=n},402:(e,t,i)=>{var n=i(4114),o=i(2294);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),_(function(e){return e.split("\\\\").join(s).split("\\{").join(r).split("\\}").join(a).split("\\,").join(l).split("\\.").join(c)}(e),!0).map(h)):[]};var s="\0SLASH"+Math.random()+"\0",r="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",l="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function d(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function h(e){return e.split(s).join("\\").split(r).join("{").split(a).join("}").split(l).join(",").split(c).join(".")}function u(e){if(!e)return[""];var t=[],i=o("{","}",e);if(!i)return e.split(",");var n=i.pre,s=i.body,r=i.post,a=n.split(",");a[a.length-1]+="{"+s+"}";var l=u(r);return r.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}function g(e){return"{"+e+"}"}function p(e){return/^-?0\d/.test(e)}function m(e,t){return e<=t}function f(e,t){return e>=t}function _(e,t){var i=[],s=o("{","}",e);if(!s||/\$$/.test(s.pre))return[e];var r,l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),h=l||c,v=s.body.indexOf(",")>=0;if(!h&&!v)return s.post.match(/,.*\}/)?_(e=s.pre+"{"+s.body+a+s.post):[e];if(h)r=s.body.split(/\.\./);else if(1===(r=u(s.body)).length&&1===(r=_(r[0],!1).map(g)).length)return(w=s.post.length?_(s.post,!1):[""]).map((function(e){return s.pre+r[0]+e}));var b,C=s.pre,w=s.post.length?_(s.post,!1):[""];if(h){var y=d(r[0]),S=d(r[1]),x=Math.max(r[0].length,r[1].length),k=3==r.length?Math.abs(d(r[2])):1,D=m;S0){var T=new Array(I+1).join("0");N=E<0?"-"+T+N.slice(1):T+N}}b.push(N)}}else b=n(r,(function(e){return _(e,!1)}));for(var M=0;M{e.exports=function(e,i){for(var n=[],o=0;o{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\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\topacity: 0.4;\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-label {\n\tmargin-right: 1px;\n}\n",""]);const a=r},6548:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},6263:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\ttext-align: center;\n\tcursor: pointer;\n\tjustify-content: center;\n\talign-items: center;\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-button-dropdown {\n\tdisplay: flex;\n\tcursor: pointer;\n}\n\n.monaco-button-dropdown > .monaco-dropdown-button {\n\tmargin-left: 1px;\n}\n\n.monaco-description-button {\n\tflex-direction: column;\n}\n\n.monaco-description-button .monaco-button-label {\n\tfont-weight: 500;\n}\n\n.monaco-description-button .monaco-button-description {\n\tfont-style: italic;\n}\n\n.monaco-description-button .monaco-button-label,\n.monaco-description-button .monaco-button-description\n{\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{\n\tmargin: 0 0.2em;\n\tcolor: inherit !important;\n}\n",""]);const a=r},4163:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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-checkbox {\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\t-ms-user-select: none;\n}\n\n.monaco-custom-checkbox:hover {\n\tbackground-color: var(--vscode-inputOption-hoverBackground);\n}\n\n.hc-black .monaco-custom-checkbox:hover {\n\tborder: 1px dashed var(--vscode-focusBorder);\n}\n\n.hc-black .monaco-custom-checkbox {\n\tbackground: none;\n}\n\n.hc-black .monaco-custom-checkbox:hover {\n\tbackground: none;\n}\n\n.monaco-custom-checkbox.monaco-simple-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/* hide check when unchecked */\n.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked)::before {\n\tvisibility: hidden;\n}\n",""]);const a=r},5090:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},2253:(e,t,i)=>{"use strict";i.d(t,{Z:()=>u});var n=i(9601),o=i.n(n),s=i(2609),r=i.n(s),a=i(8991),l=i.n(a),c=new URL(i(5023),i.b),d=r()(o()),h=l()(c);d.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\t-ms-user-select: none;\n}\n\n/* icon rules are dynamically created by the platform theme service (see iconsStyleSheet.ts) */\n",""]);const u=d},6288:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\tz-index: 2500;\n}\n\n.context-view.fixed {\n\tall: initial;\n\tfont-family: inherit;\n\tfont-size: 13px;\n\tposition: fixed;\n\tz-index: 2500;\n\tcolor: inherit;\n}\n",""]);const a=r},9907:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},5398:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},2529:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\n}\n.monaco-findInput.highlight-1 .controls {\n\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\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.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}",""]);const a=r},7907:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\tz-index: 50;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\t-ms-user-select: text;\n\tbox-sizing: initial;\n\tanimation: fadein 100ms linear;\n\tline-height: 1.5em;\n}\n\n.monaco-hover.hidden {\n\tdisplay: none;\n}\n\n.monaco-hover a:hover {\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: 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\tmargin: 8px 0;\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: 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 .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}\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},4306:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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 > .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-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},6004:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\n\t/* Customizable */\n\tfont-size: inherit;\n}\n\n.monaco-inputbox.idle {\n\tborder: 1px solid transparent;\n}\n\n.monaco-inputbox > .ibwrapper > .input,\n.monaco-inputbox > .ibwrapper > .mirror {\n\n\t/* Customizable */\n\tpadding: 4px;\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\t-ms-overflow-style: none; /* IE 10+: hide scrollbars */\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},701:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},2431:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\t-ms-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/* 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/* Type filter */\n\n.monaco-list-type-filter {\n\tdisplay: flex;\n\talign-items: center;\n\tposition: absolute;\n\tborder-radius: 2px;\n\tpadding: 0px 3px;\n\tmax-width: calc(100% - 10px);\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\ttext-align: right;\n\tbox-sizing: border-box;\n\tcursor: all-scroll;\n\tfont-size: 13px;\n\tline-height: 18px;\n\theight: 20px;\n\tz-index: 1;\n\ttop: 4px;\n}\n\n.monaco-list-type-filter.dragging {\n\ttransition: top 0.2s, left 0.2s;\n}\n\n.monaco-list-type-filter.ne {\n\tright: 4px;\n}\n\n.monaco-list-type-filter.nw {\n\tleft: 4px;\n}\n\n.monaco-list-type-filter > .controls {\n\tdisplay: flex;\n\talign-items: center;\n\tbox-sizing: border-box;\n\ttransition: width 0.2s;\n\twidth: 0;\n}\n\n.monaco-list-type-filter.dragging > .controls,\n.monaco-list-type-filter:hover > .controls {\n\twidth: 36px;\n}\n\n.monaco-list-type-filter > .controls > * {\n\tborder: none;\n\tbox-sizing: border-box;\n\t-webkit-appearance: none;\n\t-moz-appearance: none;\n\tbackground: none;\n\twidth: 16px;\n\theight: 16px;\n\tflex-shrink: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: pointer;\n}\n\n.monaco-list-type-filter > .controls > .filter {\n\tmargin-left: 4px;\n}\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\n/* Electron */\n\n.monaco-list-type-filter {\n\tcursor: grab;\n}\n\n.monaco-list-type-filter.dragging {\n\tcursor: grabbing;\n}\n",""]);const a=r},8809:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},3918:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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: 5px;\n\toverflow: hidden; /* keep progress bit in bounds */\n}\n\n.monaco-progress-container .progress-bit {\n\twidth: 2%;\n\theight: 5px;\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},6820:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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--sash-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(--sash-size);\n\theight: 100%;\n}\n\n.monaco-sash.horizontal {\n\tcursor: ns-resize;\n\tleft: 0;\n\twidth: 100%;\n\theight: var(--sash-size);\n}\n\n.monaco-sash:not(.disabled) > .orthogonal-drag-handle {\n\tcontent: \" \";\n\theight: calc(var(--sash-size) * 2);\n\twidth: calc(var(--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(--sash-size) * -0.5);\n\ttop: calc(var(--sash-size) * -1);\n}\n.monaco-sash.vertical > .orthogonal-drag-handle.end {\n\tleft: calc(var(--sash-size) * -0.5);\n\tbottom: calc(var(--sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.start {\n\ttop: calc(var(--sash-size) * -0.5);\n\tleft: calc(var(--sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.end {\n\ttop: calc(var(--sash-size) * -0.5);\n\tright: calc(var(--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\ttransition: background-color 0.1s ease-out;\n\tbackground: transparent;\n}\n\n.monaco-sash.vertical:before {\n\twidth: var(--sash-hover-size);\n\tleft: calc(50% - (var(--sash-hover-size) / 2));\n}\n\n.monaco-sash.horizontal:before {\n\theight: var(--sash-hover-size);\n\ttop: calc(50% - (var(--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},4584:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}\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}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\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",""]);const a=r},2672:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},9237:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}\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(--sash-size) / 2);\n\twidth: 0;\n\tborder-left: 1px solid transparent;\n}\n\n.monaco-table > .monaco-split-view2,\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\ttransition: border-color 0.2s ease-out;\n}\n/*\n.monaco-table:hover > .monaco-split-view2,\n.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\tborder-color: rgba(204, 204, 204, 0.2);\n} */\n',""]);const a=r},2103:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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-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-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",""]);const a=r},4195:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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: 2000;\n\tpadding: 0 1px 1px 1px;\n\tleft: 50%;\n\tmargin-left: -300px;\n}\n\n.quick-input-titlebar {\n\tdisplay: flex;\n\talign-items: center;\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;\n}\n\n.quick-input-header .quick-input-description {\n\tmargin: 4px 2px;\n}\n\n.quick-input-header {\n\tdisplay: flex;\n\tpadding: 6px 6px 0px 6px;\n\tmargin-bottom: -2px;\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: 27.5px;\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.quick-input-progress.monaco-progress-container {\n\tposition: relative;\n}\n\n.quick-input-progress.monaco-progress-container,\n.quick-input-progress.monaco-progress-container .progress-bit {\n\theight: 2px;\n}\n\n.quick-input-list {\n\tline-height: 22px;\n\tmargin-top: 6px;\n}\n\n.quick-input-widget.hidden-input .quick-input-list {\n\tmargin-top: 0; /* reduce margins when input box hidden */\n}\n\n.quick-input-list .monaco-list {\n\toverflow: hidden;\n\tmax-height: calc(20 * 22px);\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[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-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: 8px; /* 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",""]);const a=r},7953:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}\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}*/\n.monaco-editor .inputarea.ime-input {\n\tz-index: 10;\n}\n",""]);const a=r},1136:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},8592:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},3640:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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 .margin-view-overlays .cgmr {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n",""]);const a=r},7946:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},1107:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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",""]);const a=r},2342:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},5305:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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.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\t-ms-user-select: none;\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 .mtkz {\n\tdisplay: inline-block;\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},2136:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},1922:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\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",""]);const a=r},3181:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},7830:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}",""]);const a=r},6748:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}",""]);const a=r},7660:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\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",""]);const a=r},4274:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}\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\tbox-sizing: border-box;\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\tbox-sizing: border-box;\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\tbox-sizing: border-box;\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},8824:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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/* ---------- 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\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\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\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/* ---------- 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",""]);const a=r},4310:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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-diff-editor .diff-review-line-number {\n\ttext-align: right;\n\tdisplay: inline-block;\n}\n\n.monaco-diff-editor .diff-review {\n\tposition: absolute;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n.monaco-diff-editor .diff-review-summary {\n\tpadding-left: 10px;\n}\n\n.monaco-diff-editor .diff-review-shadow {\n\tposition: absolute;\n}\n\n.monaco-diff-editor .diff-review-row {\n\twhite-space: pre;\n}\n\n.monaco-diff-editor .diff-review-table {\n\tdisplay: table;\n\tmin-width: 100%;\n}\n\n.monaco-diff-editor .diff-review-row {\n\tdisplay: table-row;\n\twidth: 100%;\n}\n\n.monaco-diff-editor .diff-review-spacer {\n\tdisplay: inline-block;\n\twidth: 10px;\n\tvertical-align: middle;\n}\n\n.monaco-diff-editor .diff-review-spacer > .codicon {\n\tfont-size: 9px !important;\n}\n\n.monaco-diff-editor .diff-review-actions {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tright: 10px;\n\ttop: 2px;\n}\n\n.monaco-diff-editor .diff-review-actions .action-label {\n\twidth: 16px;\n\theight: 16px;\n\tmargin: 2px 0;\n}\n",""]);const a=r},1724:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}\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",""]);const a=r},8852:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},8070:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}\n",""]);const a=r},1199:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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 .contentWidgets .codicon-light-bulb,\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.monaco-editor .contentWidgets .codicon-light-bulb:hover,\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover {\n\tcursor: pointer;\n}\n",""]);const a=r},3708:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}\n\n.monaco-editor .codelens-decoration > span,\n.monaco-editor .codelens-decoration > a {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-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}\n\n.monaco-editor .codelens-decoration > a:hover .codicon::before {\n\tcursor: pointer;\n}\n\n@keyframes fadein {\n\t0% { opacity: 0; visibility: visible;}\n\t100% { opacity: 1; }\n}\n\n.monaco-editor .codelens-decoration.fadein {\n\tanimation: fadein 0.1s linear;\n}\n",""]);const a=r},101:(e,t,i)=>{"use strict";i.d(t,{Z:()=>u});var n=i(9601),o=i.n(n),s=i(2609),r=i.n(s),a=i(8991),l=i.n(a),c=new URL(i(4748),i.b),d=r()(o()),h=l()(c);d.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\t-ms-user-select: none;\n}\n\n/* Decoration */\n\n.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: 216px;\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}\n\n.colorpicker-header .picked-color .codicon {\n\tcolor: inherit;\n\tfont-size: 14px;\n\tposition: absolute;\n\tleft: 8px;\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\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 .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",""]);const u=d},3143:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\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\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\tcursor: copy;\n}",""]);const a=r},7276:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}\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.monaco-editor .find-widget .monaco-inputbox.synthetic-focus {\n\toutline: 1px solid -webkit-focus-ring-color;\n\toutline-offset: -1px;\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: 4px 0 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\topacity: 0.3;\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 .findMatch {\n\tanimation-duration: 0;\n\tanimation-name: inherit !important;\n}\n\n.monaco-editor .find-widget .monaco-sash {\n\tleft: 0 !important;\n}\n\n.monaco-editor.hc-black .find-widget .button:before {\n\tposition: relative;\n\ttop: 1px;\n\tleft: 2px;\n}\n",""]);const a=r},1621:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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 .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-editor .margin-view-overlays:hover .codicon,\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-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: "⋯";\n\tdisplay: inline;\n\tline-height: 1em;\n\tcursor: pointer;\n}\n',""]);const a=r},7034:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\t-ms-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-foreground);\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link > span {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .filename {\n\tcursor: pointer;\n}\n",""]);const a=r},5626:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}",""]);const a=r},6941:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\tfont-weight: bold;\n}\n\n.monaco-editor.hc-black .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},3887:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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 {\n\tfont-style: italic;\n}\n\n.monaco-editor .suggest-preview-text {\n\tfont-style: italic;\n}\n",""]);const a=r},5106:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}\n",""]);const a=r},3698:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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: 1px 4px;\n\tcolor: var(--vscode-inputValidation-infoForeground);\n\tbackground-color: var(--vscode-inputValidation-infoBackground);\n\tborder: 1px solid var(--vscode-inputValidation-infoBorder);\n}\n\n.monaco-editor.hc-black .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}\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},577:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}\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.visible {\n\ttransition: left .05s ease-in-out;\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}\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 .markdown-docs {\n\twhite-space: initial;\n}\n\n.monaco-editor .parameter-hints-widget .docs .markdown-docs code {\n\tfont-family: var(--monaco-monospace-font);\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 .docs code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\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\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},1799:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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: center;\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\ttext-overflow: ellipsis;\n\toverflow: hidden;\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\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}\n\n.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon {\n\tcolor: inherit !important;\n}\n",""]);const a=r},7165:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}\n\n.monaco-editor .rename-box.preview {\n\tpadding: 3px 3px 0 3px;\n}\n\n.monaco-editor .rename-box .rename-input {\n\tpadding: 3px;\n\twidth: calc(100% - 6px);\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},8798:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},7059:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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}\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\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\t-ms-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, .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, .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},3386:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},9909:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\tbox-sizing: border-box;\n}\n",""]);const a=r},8209:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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},3106:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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 .accessibilityHelpWidget {\n\tpadding: 10px;\n\tvertical-align: middle;\n\toverflow: scroll;\n}",""]);const a=r},6496:(e,t,i)=>{"use strict";i.d(t,{Z:()=>p});var n=i(9601),o=i.n(n),s=i(2609),r=i.n(s),a=i(8991),l=i.n(a),c=new URL(i(6161),i.b),d=new URL(i(1096),i.b),h=r()(o()),u=l()(c),g=l()(d);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},3042:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\t-ms-user-select: text;\n\tpadding: 10px;\n}\n\n.tokens-inspect-separator {\n\theight: 1px;\n\tborder: 0;\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},8097:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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.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.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},9888:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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\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/* The hc-black theme is already high contrast optimized */\n.monaco-editor.hc-black {\n\t-ms-high-contrast-adjust: none;\n}\n/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */\n@media screen and (-ms-high-contrast:active) {\n\n\t/* current line highlight */\n\t.monaco-editor.vs .view-overlays .current-line,\n\t.monaco-editor.vs-dark .view-overlays .current-line {\n\t\tborder-color: windowtext !important;\n\t\tborder-left: 0;\n\t\tborder-right: 0;\n\t}\n\n\t/* view cursors */\n\t.monaco-editor.vs .cursor,\n\t.monaco-editor.vs-dark .cursor {\n\t\tbackground-color: windowtext !important;\n\t}\n\t/* dnd target */\n\t.monaco-editor.vs .dnd-target,\n\t.monaco-editor.vs-dark .dnd-target {\n\t\tborder-color: windowtext !important;\n\t}\n\n\t/* selected text background */\n\t.monaco-editor.vs .selected-text,\n\t.monaco-editor.vs-dark .selected-text {\n\t\tbackground-color: highlight !important;\n\t}\n\n\t/* allow the text to have a transparent background. */\n\t.monaco-editor.vs .view-line,\n\t.monaco-editor.vs-dark .view-line {\n\t\t-ms-high-contrast-adjust: none;\n\t}\n\n\t/* text color */\n\t.monaco-editor.vs .view-line span,\n\t.monaco-editor.vs-dark .view-line span {\n\t\tcolor: windowtext !important;\n\t}\n\t/* selected text color */\n\t.monaco-editor.vs .view-line span.inline-selected-text,\n\t.monaco-editor.vs-dark .view-line span.inline-selected-text {\n\t\tcolor: highlighttext !important;\n\t}\n\n\t/* allow decorations */\n\t.monaco-editor.vs .view-overlays,\n\t.monaco-editor.vs-dark .view-overlays {\n\t\t-ms-high-contrast-adjust: none;\n\t}\n\n\t/* various decorations */\n\t.monaco-editor.vs .selectionHighlight,\n\t.monaco-editor.vs-dark .selectionHighlight,\n\t.monaco-editor.vs .wordHighlight,\n\t.monaco-editor.vs-dark .wordHighlight,\n\t.monaco-editor.vs .wordHighlightStrong,\n\t.monaco-editor.vs-dark .wordHighlightStrong,\n\t.monaco-editor.vs .reference-decoration,\n\t.monaco-editor.vs-dark .reference-decoration {\n\t\tborder: 2px dotted highlight !important;\n\t\tbackground: transparent !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .rangeHighlight,\n\t.monaco-editor.vs-dark .rangeHighlight {\n\t\tbackground: transparent !important;\n\t\tborder: 1px dotted activeborder !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .bracket-match,\n\t.monaco-editor.vs-dark .bracket-match {\n\t\tborder-color: windowtext !important;\n\t\tbackground: transparent !important;\n\t}\n\n\t/* find widget */\n\t.monaco-editor.vs .findMatch,\n\t.monaco-editor.vs-dark .findMatch,\n\t.monaco-editor.vs .currentFindMatch,\n\t.monaco-editor.vs-dark .currentFindMatch {\n\t\tborder: 2px dotted activeborder !important;\n\t\tbackground: transparent !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .find-widget,\n\t.monaco-editor.vs-dark .find-widget {\n\t\tborder: 1px solid windowtext;\n\t}\n\n\t/* list - used by suggest widget */\n\t.monaco-editor.vs .monaco-list .monaco-list-row,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row {\n\t\t-ms-high-contrast-adjust: none;\n\t\tcolor: windowtext !important;\n\t}\n\t.monaco-editor.vs .monaco-list .monaco-list-row.focused,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused {\n\t\tcolor: highlighttext !important;\n\t\tbackground-color: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-list .monaco-list-row:hover,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover {\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight;\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* scrollbars */\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\n\t\t-ms-high-contrast-adjust: none;\n\t\tbackground: background !important;\n\t\tborder: 1px solid windowtext;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\n\t\tbackground: windowtext !important;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\tbackground: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\n\t\tbackground: highlight !important;\n\t}\n\n\t/* overview ruler */\n\t.monaco-editor.vs .decorationsOverviewRuler,\n\t.monaco-editor.vs-dark .decorationsOverviewRuler {\n\t\topacity: 0;\n\t}\n\n\t/* minimap */\n\t.monaco-editor.vs .minimap,\n\t.monaco-editor.vs-dark .minimap {\n\t\tdisplay: none;\n\t}\n\n\t/* squiggles */\n\t.monaco-editor.vs .squiggly-d-error,\n\t.monaco-editor.vs-dark .squiggly-d-error {\n\t\tbackground: transparent !important;\n\t\tborder-bottom: 4px double #E47777;\n\t}\n\t.monaco-editor.vs .squiggly-c-warning,\n\t.monaco-editor.vs-dark .squiggly-c-warning {\n\t\tborder-bottom: 4px double #71B771;\n\t}\n\t.monaco-editor.vs .squiggly-b-info,\n\t.monaco-editor.vs-dark .squiggly-b-info {\n\t\tborder-bottom: 4px double #71B771;\n\t}\n\t.monaco-editor.vs .squiggly-a-hint,\n\t.monaco-editor.vs-dark .squiggly-a-hint {\n\t\tborder-bottom: 4px double #6c6c6c;\n\t}\n\n\t/* contextmenu */\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\t\t-ms-high-contrast-adjust: none;\n\t\tcolor: highlighttext !important;\n\t\tbackground-color: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\n\t\t-ms-high-contrast-adjust: none;\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight;\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* diff editor */\n\t.monaco-diff-editor.vs .diffOverviewRuler,\n\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\n\t\tdisplay: none;\n\t}\n\t.monaco-editor.vs .line-insert,\n\t.monaco-editor.vs-dark .line-insert,\n\t.monaco-editor.vs .line-delete,\n\t.monaco-editor.vs-dark .line-delete {\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .char-insert,\n\t.monaco-editor.vs-dark .char-insert,\n\t.monaco-editor.vs .char-delete,\n\t.monaco-editor.vs-dark .char-delete {\n\t\tbackground: transparent !important;\n\t}\n}\n\n/*.monaco-editor.vs [tabindex="0"]:focus {\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}\n\n.monaco-editor.vs-dark [tabindex="0"]:focus {\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}*/\n',""]);const a=r},6440:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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-action-bar .action-item.menu-entry .action-label {\n\tbackground-image: var(--menu-entry-icon-light);\n}\n\n.vs-dark .monaco-action-bar .action-item.menu-entry .action-label,\n.hc-black .monaco-action-bar .action-item.menu-entry .action-label {\n\tbackground-image: var(--menu-entry-icon-dark);\n}\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 > .action-container.menu-entry > .action-label {\n\tbackground-image: var(--menu-entry-icon-light);\n}\n\n.vs-dark .monaco-dropdown-with-default > .action-container.menu-entry > .action-label,\n.hc-black .monaco-dropdown-with-default > .action-container.menu-entry > .action-label {\n\tbackground-image: var(--menu-entry-icon-dark);\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},2799:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),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 .monaco-menu {\n\tmin-width: 130px;\n}\n\n",""]);const a=r},6830:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(9601),o=i.n(n),s=i(2609),r=i.n(s)()(o());r.push([e.id,':root {\r\n --blue:#033c73;\r\n --indigo:#6610f2;\r\n --purple:#6f42c1;\r\n --pink:#e83e8c;\r\n --red:#c71c22;\r\n --orange:#fd7e14;\r\n --yellow:#dd5600;\r\n --green:#73a839;\r\n --teal:#20c997;\r\n --cyan:#2fa4e7;\r\n --white:#fff;\r\n --gray:#868e96;\r\n --gray-dark:#343a40;\r\n --primary:#2fa4e7;\r\n --secondary:#e9ecef;\r\n --success:#73a839;\r\n --info:#033c73;\r\n --warning:#dd5600;\r\n --danger:#c71c22;\r\n --light:#f8f9fa;\r\n --text:#343a40;\r\n --dark:#343a40;\r\n --body-bg: #fff;\r\n --text-bg-mark: #fcf8e3;\r\n --custom-select: #fff;\r\n --breakpoint-xs:0;\r\n --breakpoint-sm:576px;\r\n --breakpoint-md:768px;\r\n --breakpoint-lg:992px;\r\n --breakpoint-xl:1200px;\r\n --font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";\r\n --font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace\r\n}\r\n\r\na {\r\n color: mediumslateblue;\r\n}\r\n\r\na:visited {\r\n color: silver;\r\n}\r\n\r\nbody {\r\n display: flex;\r\n height: 100vh;\r\n background-color: black;\r\n color: white;\r\n}\r\n\r\ndiv[id=container] {\r\n display: grid;\r\n width: 75%;\r\n height: 90%;\r\n min-width: 800px;\r\n min-height: 600px;\r\n grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto;\r\n grid-template-columns: repeat(2, minmax(0, 1fr));\r\n margin: auto;\r\n}\r\n\r\nh1[id=title] {\r\n grid-column: 1 / 3;\r\n grid-row: 1;\r\n font-family: monospace;\r\n font-size: 2em;\r\n}\r\n\r\np[id=synopsis] {\r\n color: lightgrey;\r\n grid-column: 1 / 3;\r\n grid-row: 2;\r\n margin: 0;\r\n font-family: sans-serif;\r\n font-size: 10pt;\r\n line-height: 1.5em;\r\n}\r\n\r\np[id=features] {\r\n grid-column: 1 / 3;\r\n grid-row: 3;\r\n text-align: center;\r\n font-family: sans-serif;\r\n font-style: italic;\r\n font-size: 10pt;\r\n line-height: 1.5em;\r\n color: lightgrey;\r\n}\r\n\r\ndiv[id=cell-editor] {\r\n grid-column: 1 / 2;\r\n grid-row: 4;\r\n}\r\n\r\n[id=cell-editor] div[id=editor] {\r\n border: 1px solid black;\r\n height: calc(100% - 1px);\r\n padding-right: 1.5em;\r\n}\r\n\r\ndiv[id=cell-syntax] {\r\n grid-column: 2 / 3;\r\n grid-row: 4;\r\n}\r\n\r\ndiv[id=cell-syntax] textarea {\r\n height: 100%;\r\n}\r\n\r\n[id=container] label {\r\n display: block;\r\n font-family: monospace;\r\n font-size: 14pt;\r\n}\r\n\r\ndiv[id=cell-console] {\r\n grid-column: 1 / 3;\r\n grid-row: 5;\r\n margin-top: 2em;\r\n overflow: hidden;\r\n}\r\n\r\ndiv[id=cell-client] {\r\n grid-column: 1 / 3;\r\n grid-row: 6;\r\n overflow: hidden;\r\n}\r\n\r\ndiv[id=cell-server] {\r\n grid-column: 1 / 3;\r\n grid-row: 7;\r\n overflow: hidden;\r\n}\r\n\r\ndiv[id=container] textarea {\r\n display: block;\r\n box-sizing: border-box;\r\n width: 100%;\r\n resize: none;\r\n overflow-y: auto;\r\n font-family: monospace;\r\n font-family: 10pt;\r\n}\r\n',""]),r.locals={};const a=r},2609: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(d[5]):""," {").concat(d[1],"}")),d[5]=s),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},8991: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}},9601:e=>{"use strict";e.exports=function(e){return e[1]}},6386:e=>{function t(e,t,i){var n,o,s,r,a;function l(){var c=Date.now()-r;c=0?n=setTimeout(l,t-c):(n=null,i||(a=e.apply(s,o),s=o=null))}null==t&&(t=100);var c=function(){s=this,o=arguments,r=Date.now();var c=i&&!n;return n||(n=setTimeout(l,t)),c&&(a=e.apply(s,o),s=o=null),a};return c.clear=function(){n&&(clearTimeout(n),n=null)},c.flush=function(){n&&(a=e.apply(s,o),s=o=null,clearTimeout(n),n=null)},c}t.debounce=t,e.exports=t},450:e=>{e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");for(var i,n=String(e),o="",s=!!t&&!!t.extended,r=!!t&&!!t.globstar,a=!1,l=t&&"string"==typeof t.flags?t.flags:"",c=0,d=n.length;c1)||"/"!==h&&void 0!==h||"/"!==g&&void 0!==g?o+="([^/]*)":(o+="((?:[^/]*(?:/|$))*)",c++):o+=".*";break;default:o+=i}return l&&~l.indexOf("g")||(o="^"+o+"$"),new RegExp(o,l)}},6451:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(!((o=(o=r.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){r=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultErrorCode=void 0,t.DefaultErrorCode=0},3797:(e,t)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.createJSONRPCNotification=t.createJSONRPCRequest=t.createJSONRPCSuccessResponse=t.createJSONRPCErrorResponse=t.JSONRPCErrorCode=t.isJSONRPCResponses=t.isJSONRPCResponse=t.isJSONRPCRequests=t.isJSONRPCRequest=t.isJSONRPCID=t.JSONRPC=void 0,t.JSONRPC="2.0",t.isJSONRPCID=function(e){return"string"==typeof e||"number"==typeof e||null===e},t.isJSONRPCRequest=function(e){return e.jsonrpc===t.JSONRPC&&void 0!==e.method&&void 0===e.result&&void 0===e.error},t.isJSONRPCRequests=function(e){return Array.isArray(e)&&e.every(t.isJSONRPCRequest)},t.isJSONRPCResponse=function(e){return e.jsonrpc===t.JSONRPC&&void 0!==e.id&&(void 0!==e.result||void 0!==e.error)},t.isJSONRPCResponses=function(e){return Array.isArray(e)&&e.every(t.isJSONRPCResponse)},(i=t.JSONRPCErrorCode||(t.JSONRPCErrorCode={}))[i.ParseError=-32700]="ParseError",i[i.InvalidRequest=-32600]="InvalidRequest",i[i.MethodNotFound=-32601]="MethodNotFound",i[i.InvalidParams=-32602]="InvalidParams",i[i.InternalError=-32603]="InternalError",t.createJSONRPCErrorResponse=function(e,i,n,o){var s={code:i,message:n};return o&&(s.data=o),{jsonrpc:t.JSONRPC,id:e,error:s}},t.createJSONRPCSuccessResponse=function(e,i){return{jsonrpc:t.JSONRPC,id:e,result:null!=i?i:null}},t.createJSONRPCRequest=function(e,i,n){return{jsonrpc:t.JSONRPC,id:e,method:i,params:n}},t.createJSONRPCNotification=function(e,i){return{jsonrpc:t.JSONRPC,method:e,params:i}}},9206:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(!((o=(o=r.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){r=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){r=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{e.exports=u,u.Minimatch=g;var n=function(){try{return i(1023)}catch(e){}}()||{sep:"/"};u.sep=n.sep;var o=u.GLOBSTAR=g.GLOBSTAR={},s=i(402),r={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="[^/]",l="[^/]*?",c="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{}),d=/\/+/;function h(e,t){t=t||{};var i={};return Object.keys(e).forEach((function(t){i[t]=e[t]})),Object.keys(t).forEach((function(e){i[e]=t[e]})),i}function u(e,t,i){return m(t),i||(i={}),!(!i.nocomment&&"#"===t.charAt(0))&&new g(t,i).match(e)}function g(e,t){if(!(this instanceof g))return new g(e,t);m(e),t||(t={}),e=e.trim(),t.allowWindowsEscape||"/"===n.sep||(e=e.split(n.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}function p(e,t){return t||(t=this instanceof g?this.options:{}),e=void 0===e?this.pattern:e,m(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:s(e)}u.filter=function(e,t){return t=t||{},function(i,n,o){return u(i,e,t)}},u.defaults=function(e){if(!e||"object"!=typeof e||!Object.keys(e).length)return u;var t=u,i=function(i,n,o){return t(i,n,h(e,o))};return(i.Minimatch=function(i,n){return new t.Minimatch(i,h(e,n))}).defaults=function(i){return t.defaults(h(e,i)).Minimatch},i.filter=function(i,n){return t.filter(i,h(e,n))},i.defaults=function(i){return t.defaults(h(e,i))},i.makeRe=function(i,n){return t.makeRe(i,h(e,n))},i.braceExpand=function(i,n){return t.braceExpand(i,h(e,n))},i.match=function(i,n,o){return t.match(i,n,h(e,o))},i},g.defaults=function(e){return u.defaults(e).Minimatch},g.prototype.debug=function(){},g.prototype.make=function(){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var i=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,i),i=this.globParts=i.map((function(e){return e.split(d)})),this.debug(this.pattern,i),i=i.map((function(e,t,i){return e.map(this.parse,this)}),this),this.debug(this.pattern,i),i=i.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,i),this.set=i}else this.empty=!0;else this.comment=!0},g.prototype.parseNegate=function(){var e=this.pattern,t=!1,i=0;if(!this.options.nonegate){for(var n=0,o=e.length;n65536)throw new TypeError("pattern is too long")};g.prototype.parse=function(e,t){m(e);var i=this.options;if("**"===e){if(!i.noglobstar)return o;e="*"}if(""===e)return"";var n,s="",d=!!i.nocase,h=!1,u=[],g=[],p=!1,_=-1,v=-1,b="."===e.charAt(0)?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",C=this;function w(){if(n){switch(n){case"*":s+=l,d=!0;break;case"?":s+=a,d=!0;break;default:s+="\\"+n}C.debug("clearStateChar %j %j",n,s),n=!1}}for(var y,S=0,x=e.length;S-1;T--){var M=g[T],R=s.slice(0,M.reStart),P=s.slice(M.reStart,M.reEnd-8),A=s.slice(M.reEnd-8,M.reEnd),O=s.slice(M.reEnd);A+=O;var F=R.split("(").length-1,W=O;for(S=0;S=0&&!(o=e[s]);s--);for(s=0;s>> no match, partial?",e,u,t,g),u!==a))}if("string"==typeof d?(c=h===d,this.debug("string match",d,h,c)):(c=h.match(d),this.debug("pattern match",d,h,c)),!c)return!1}if(s===a&&r===l)return!0;if(s===a)return i;if(r===l)return s===a-1&&""===e[s];throw new Error("wtf?")}},9188:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=void 0;const n=i(5163),o=i(294),s=n.__importStar(i(2327));t.createConnection=function(e,t,i){return e.onError((e=>{t(e[0],e[1],e[2])})),e.onClose(i),{listen:()=>e.listen(),sendRequest:(t,...i)=>e.sendRequest(s.string(t)?t:t.method,...i),onRequest:(t,i)=>e.onRequest(s.string(t)?t:t.method,i),sendNotification:async(t,i)=>e.sendNotification(s.string(t)?t:t.method,i),onNotification:(t,i)=>e.onNotification(s.string(t)?t:t.method,i),onProgress:(t,i,n)=>e.onProgress(t,i,n),sendProgress:async(t,i,n)=>e.sendProgress(t,i,n),trace:(t,i,n=!1)=>e.trace(t,i,n),initialize:t=>e.sendRequest(o.InitializeRequest.type,t),shutdown:()=>e.sendRequest(o.ShutdownRequest.type,void 0),exit:async()=>e.sendNotification(o.ExitNotification.type),onLogMessage:t=>e.onNotification(o.LogMessageNotification.type,t),onShowMessage:t=>e.onNotification(o.ShowMessageNotification.type,t),onTelemetry:t=>e.onNotification(o.TelemetryEventNotification.type,t),didChangeConfiguration:async t=>e.sendNotification(o.DidChangeConfigurationNotification.type,t),didChangeWatchedFiles:async t=>e.sendNotification(o.DidChangeWatchedFilesNotification.type,t),didOpenTextDocument:async t=>e.sendNotification(o.DidOpenTextDocumentNotification.type,t),didChangeTextDocument:async t=>e.sendNotification(o.DidChangeTextDocumentNotification.type,t),didCloseTextDocument:async t=>e.sendNotification(o.DidCloseTextDocumentNotification.type,t),didSaveTextDocument:async t=>e.sendNotification(o.DidSaveTextDocumentNotification.type,t),onDiagnostics:t=>e.onNotification(o.PublishDiagnosticsNotification.type,t),dispose:()=>e.dispose(),end:()=>e.end()}}},9472:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleWindow=void 0;const n=i(722);t.ConsoleWindow=class{constructor(){this.channels=new Map}showMessage(e,t,...i){return e===n.MessageType.Error&&console.error(t),e===n.MessageType.Warning&&console.warn(t),e===n.MessageType.Info&&console.info(t),e===n.MessageType.Log&&console.log(t),Promise.resolve(void 0)}createOutputChannel(e){const t=this.channels.get(e);if(t)return t;const i={append(t){console.log(e+": "+t)},appendLine(t){console.log(e+": "+t)},show(){},dispose(){}};return this.channels.set(e,i),i}}},5572:(e,t)=>{"use strict";function i(e){return e}function n(e){return Promise.resolve(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoC2PConverter=t.MonacoP2CConverter=void 0,t.MonacoP2CConverter=class{constructor(e){this.delegate=e,this.asUri=this.delegate.asUri.bind(this.delegate),this.asDocumentSelector=i,this.asPosition=i,this.asRange=i,this.asRanges=n,this.asDiagnostic=i,this.asDiagnostics=n,this.asDiagnosticSeverity=i,this.asDiagnosticTag=i,this.asHover=i,this.asCompletionResult=i,this.asCompletionItem=i,this.asTextEdit=i,this.asTextEdits=i,this.asSignatureHelp=i,this.asSignatureInformation=n,this.asSignatureInformations=n,this.asParameterInformation=i,this.asParameterInformations=n,this.asLocation=i,this.asDeclarationResult=i,this.asDefinitionResult=i,this.asReferences=i,this.asDocumentHighlightKind=i,this.asDocumentHighlight=i,this.asDocumentHighlights=i,this.asSymbolKind=i,this.asSymbolTag=i,this.asSymbolTags=i,this.asSymbolInformation=i,this.asSymbolInformations=i,this.asDocumentSymbol=i,this.asDocumentSymbols=i,this.asCommand=i,this.asCommands=i,this.asCodeAction=i,this.asCodeActionKind=i,this.asCodeActionKinds=i,this.asCodeActionResult=n,this.asCodeLens=i,this.asCodeLenses=i,this.asWorkspaceEdit=i,this.asDocumentLink=i,this.asDocumentLinks=i,this.asColor=i,this.asColorInformation=i,this.asColorInformations=i,this.asColorPresentation=i,this.asColorPresentations=i,this.asFoldingRangeKind=i,this.asFoldingRange=i,this.asFoldingRanges=i,this.asSelectionRange=i,this.asSelectionRanges=i,this.asInlineValue=i,this.asInlineValues=i,this.asInlayHint=n,this.asInlayHints=i,this.asSemanticTokensLegend=i,this.asSemanticTokens=i,this.asSemanticTokensEdit=i,this.asSemanticTokensEdits=i,this.asCallHierarchyItem=i,this.asCallHierarchyItems=i,this.asCallHierarchyIncomingCall=n,this.asCallHierarchyIncomingCalls=i,this.asCallHierarchyOutgoingCall=n,this.asCallHierarchyOutgoingCalls=i,this.asLinkedEditingRanges=i,this.asTypeHierarchyItem=i,this.asTypeHierarchyItems=i,this.asGlobPattern=i}},t.MonacoC2PConverter=class{constructor(e){this.delegate=e,this.asUri=this.delegate.asUri.bind(this.delegate),this.asTextDocumentItem=i,this.asTextDocumentIdentifier=i,this.asVersionedTextDocumentIdentifier=i,this.asOpenTextDocumentParams=this.delegate.asOpenTextDocumentParams.bind(this.delegate),this.asChangeTextDocumentParams=this.delegate.asChangeTextDocumentParams.bind(this.delegate),this.asCloseTextDocumentParams=this.delegate.asCloseTextDocumentParams.bind(this.delegate),this.asSaveTextDocumentParams=this.delegate.asSaveTextDocumentParams.bind(this.delegate),this.asWillSaveTextDocumentParams=e=>({textDocument:this.delegate.asTextDocumentIdentifier(e.document),reason:e.reason}),this.asDidCreateFilesParams=this.delegate.asDidCreateFilesParams.bind(this.delegate),this.asDidRenameFilesParams=this.delegate.asDidRenameFilesParams.bind(this.delegate),this.asDidDeleteFilesParams=this.delegate.asDidDeleteFilesParams.bind(this.delegate),this.asWillCreateFilesParams=this.delegate.asWillCreateFilesParams.bind(this.delegate),this.asWillRenameFilesParams=this.delegate.asWillRenameFilesParams.bind(this.delegate),this.asWillDeleteFilesParams=this.delegate.asWillDeleteFilesParams.bind(this.delegate),this.asTextDocumentPositionParams=this.delegate.asTextDocumentPositionParams.bind(this.delegate),this.asCompletionParams=(e,t,i)=>({textDocument:this.delegate.asTextDocumentIdentifier(e),position:t,context:i}),this.asSignatureHelpParams=this.delegate.asSignatureHelpParams.bind(this.delegate),this.asWorkerPosition=i,this.asPosition=i,this.asPositions=n,this.asRange=i,this.asLocation=i,this.asDiagnosticSeverity=i,this.asDiagnosticTag=i,this.asDiagnostic=i,this.asDiagnostics=n,this.asCompletionItem=i,this.asSymbolKind=i,this.asSymbolTag=i,this.asSymbolTags=i,this.asTextEdit=i,this.asReferenceParams=this.delegate.asReferenceParams.bind(this.delegate),this.asCodeAction=n,this.asCodeActionContext=n,this.asInlineValueContext=i,this.asCommand=i,this.asCodeLens=i,this.asFormattingOptions=i,this.asDocumentSymbolParams=this.delegate.asDocumentSymbolParams.bind(this.delegate),this.asCodeLensParams=this.delegate.asCodeLensParams.bind(this.delegate),this.asDocumentLink=i,this.asDocumentLinkParams=this.delegate.asDocumentLinkParams.bind(this.delegate),this.asCallHierarchyItem=i,this.asTypeHierarchyItem=i,this.asWorkspaceSymbol=i,this.asInlayHint=i}}},3430:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisposableCollection=t.Disposable=void 0;const n=i(722);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return n.Disposable}}),t.DisposableCollection=class{constructor(){this.disposables=[]}dispose(){for(;0!==this.disposables.length;)this.disposables.pop().dispose()}push(e){const t=this.disposables;return t.push(e),{dispose(){const i=t.indexOf(e);-1!==i&&t.splice(i,1)}}}}},7570:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(5163);n.__exportStar(i(3430),t),n.__exportStar(i(722),t),n.__exportStar(i(9188),t),n.__exportStar(i(2777),t),n.__exportStar(i(9869),t),n.__exportStar(i(9472),t),n.__exportStar(i(8525),t),n.__exportStar(i(6040),t),n.__exportStar(i(5748),t),n.__exportStar(i(9412),t)},9869:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoCommands=void 0,t.MonacoCommands=class{constructor(e){this._monaco=e}registerCommand(e,t,i){return this._monaco.editor.registerCommand(e,((e,...n)=>t.call(i,...n)))}}},9412:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolToMonacoConverter=t.MonacoToProtocolConverter=t.ProtocolInlayHint=t.ProtocolCodeAction=t.ProtocolCompletionItem=t.ProtocolCodeLens=t.ProtocolDocumentLink=void 0;const n=i(5163),o=n.__importStar(i(294)),s=n.__importStar(i(2327)),r=i(722);var a,l,c,d,h;!function(e){e.is=function(e){return!!e&&"data"in e}}(a=t.ProtocolDocumentLink||(t.ProtocolDocumentLink={})),function(e){e.is=function(e){return!!e&&"data"in e}}(l=t.ProtocolCodeLens||(t.ProtocolCodeLens={})),function(e){e.is=function(e){return!!e&&"data"in e}}(c=t.ProtocolCompletionItem||(t.ProtocolCompletionItem={})),function(e){e.is=function(e){return!!e&&"data"in e}}(d=t.ProtocolCodeAction||(t.ProtocolCodeAction={})),function(e){e.is=function(e){return!!e&&"data"in e}}(h=t.ProtocolInlayHint||(t.ProtocolInlayHint={})),t.MonacoToProtocolConverter=class{constructor(e){this._monaco=e}asPosition(e,t){return{line:null==e?void 0:e-1,character:null==t?void 0:t-1}}asRange(e){if(void 0!==e)return null===e?null:void 0!==e.insert?this.asRange(e.insert):{start:this.asPosition(e.startLineNumber,e.startColumn),end:this.asPosition(e.endLineNumber,e.endColumn)}}asLocation(e){if(e)return{uri:e.uri.toString(),range:this.asRange(e.range)}}asTextDocumentIdentifier(e){return{uri:e.uri.toString()}}asTextDocumentPositionParams(e,t){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column)}}asCompletionParams(e,t,i){return Object.assign(this.asTextDocumentPositionParams(e,t),{context:this.asCompletionContext(i)})}asCompletionContext(e){return{triggerKind:this.asCompletionTriggerKind(e.triggerKind),triggerCharacter:e.triggerCharacter}}asSignatureHelpContext(e){return{triggerKind:this.asSignatureHelpTriggerKind(e.triggerKind),triggerCharacter:e.triggerCharacter,isRetrigger:e.isRetrigger,activeSignatureHelp:this.asSignatureHelp(e.activeSignatureHelp)}}asSignatureHelp(e){if(void 0!==e)return{signatures:e.signatures.map((e=>this.asSignatureInformation(e))),activeParameter:e.activeParameter,activeSignature:e.activeSignature}}asSignatureInformation(e){return{documentation:this.asMarkupContent(e.documentation),label:e.label,parameters:e.parameters.map((e=>this.asParameterInformation(e))),activeParameter:e.activeParameter}}asParameterInformation(e){return{documentation:this.asMarkupContent(e.documentation),label:e.label}}asMarkupContent(e){if(void 0!==e)return"string"==typeof e?e:{kind:r.MarkupKind.Markdown,value:e.value}}asSignatureHelpTriggerKind(e){switch(e){case this._monaco.languages.SignatureHelpTriggerKind.ContentChange:return r.SignatureHelpTriggerKind.ContentChange;case this._monaco.languages.SignatureHelpTriggerKind.TriggerCharacter:return r.SignatureHelpTriggerKind.TriggerCharacter;default:return r.SignatureHelpTriggerKind.Invoke}}asCompletionTriggerKind(e){switch(e){case this._monaco.languages.CompletionTriggerKind.TriggerCharacter:return r.CompletionTriggerKind.TriggerCharacter;case this._monaco.languages.CompletionTriggerKind.TriggerForIncompleteCompletions:return r.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return r.CompletionTriggerKind.Invoked}}asCompletionItem(e){var t,i;const n={label:e.label},o=c.is(e)?e:void 0;return e.detail&&(n.detail=e.detail),e.documentation&&("string"==typeof e.documentation?n.documentation=e.documentation:n.documentation=this.asDocumentation(null!==(t=null==o?void 0:o.documentationFormat)&&void 0!==t?t:r.MarkupKind.Markdown,e.documentation)),e.filterText&&(n.filterText=e.filterText),this.fillPrimaryInsertText(n,e),s.number(e.kind)&&(n.kind=this.asCompletionItemKind(e.kind,o&&o.originalItemKind)),e.sortText&&(n.sortText=e.sortText),e.additionalTextEdits&&(n.additionalTextEdits=this.asTextEdits(e.additionalTextEdits)),e.command&&(n.command=this.asCommand(e.command)),e.commitCharacters&&(n.commitCharacters=e.commitCharacters.slice()),e.command&&(n.command=this.asCommand(e.command)),!0!==e.preselect&&!1!==e.preselect||(n.preselect=e.preselect),o&&(void 0!==o.data&&(n.data=o.data),!0!==o.deprecated&&!1!==o.deprecated||(n.deprecated=o.deprecated)),e.tags&&(n.tags=null===(i=e.tags)||void 0===i?void 0:i.slice()),n}asCompletionItemKind(e,t){if(void 0!==t)return t;switch(e){case this._monaco.languages.CompletionItemKind.Method:return r.CompletionItemKind.Method;case this._monaco.languages.CompletionItemKind.Function:return r.CompletionItemKind.Function;case this._monaco.languages.CompletionItemKind.Constructor:return r.CompletionItemKind.Constructor;case this._monaco.languages.CompletionItemKind.Field:return r.CompletionItemKind.Field;case this._monaco.languages.CompletionItemKind.Variable:return r.CompletionItemKind.Variable;case this._monaco.languages.CompletionItemKind.Class:return r.CompletionItemKind.Class;case this._monaco.languages.CompletionItemKind.Struct:return r.CompletionItemKind.Struct;case this._monaco.languages.CompletionItemKind.Interface:return r.CompletionItemKind.Interface;case this._monaco.languages.CompletionItemKind.Module:return r.CompletionItemKind.Module;case this._monaco.languages.CompletionItemKind.Property:return r.CompletionItemKind.Property;case this._monaco.languages.CompletionItemKind.Event:return r.CompletionItemKind.Event;case this._monaco.languages.CompletionItemKind.Operator:return r.CompletionItemKind.Operator;case this._monaco.languages.CompletionItemKind.Unit:return r.CompletionItemKind.Unit;case this._monaco.languages.CompletionItemKind.Value:return r.CompletionItemKind.Value;case this._monaco.languages.CompletionItemKind.Constant:return r.CompletionItemKind.Constant;case this._monaco.languages.CompletionItemKind.Enum:return r.CompletionItemKind.Enum;case this._monaco.languages.CompletionItemKind.EnumMember:return r.CompletionItemKind.EnumMember;case this._monaco.languages.CompletionItemKind.Keyword:return r.CompletionItemKind.Keyword;case this._monaco.languages.CompletionItemKind.Text:return r.CompletionItemKind.Text;case this._monaco.languages.CompletionItemKind.Color:return r.CompletionItemKind.Color;case this._monaco.languages.CompletionItemKind.File:return r.CompletionItemKind.File;case this._monaco.languages.CompletionItemKind.Reference:return r.CompletionItemKind.Reference;case this._monaco.languages.CompletionItemKind.Customcolor:return r.CompletionItemKind.Color;case this._monaco.languages.CompletionItemKind.Folder:return r.CompletionItemKind.Folder;case this._monaco.languages.CompletionItemKind.TypeParameter:return r.CompletionItemKind.TypeParameter;case this._monaco.languages.CompletionItemKind.Snippet:return r.CompletionItemKind.Snippet;default:return e+1}}asDocumentation(e,t){switch(e){case r.MarkupKind.PlainText:return{kind:e,value:t};case r.MarkupKind.Markdown:return{kind:e,value:t.value};default:return`Unsupported Markup content received. Kind is: ${e}`}}fillPrimaryInsertText(e,t){let i,n,o=r.InsertTextFormat.PlainText;void 0!==t.insertTextRules&&0==(t.insertTextRules&this._monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet)&&(o=r.InsertTextFormat.Snippet,i=t.insertText),e.insertTextFormat=o,i=t.insertText,t.range&&(n=this.asRange(t.range)),e.insertTextFormat=o,t.fromEdit&&i&&n?e.textEdit={newText:i,range:n}:e.insertText=i,e.insertTextMode=t.insertTextMode}asTextEdit(e){return{range:this.asRange(e.range),newText:e.text||""}}asTextEdits(e){if(e)return e.map((e=>this.asTextEdit(e)))}asReferenceParams(e,t,i){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),context:{includeDeclaration:i.includeDeclaration}}}asDocumentSymbolParams(e){return{textDocument:this.asTextDocumentIdentifier(e)}}asCodeLensParams(e){return{textDocument:this.asTextDocumentIdentifier(e)}}asDiagnosticSeverity(e){switch(e){case this._monaco.MarkerSeverity.Error:return r.DiagnosticSeverity.Error;case this._monaco.MarkerSeverity.Warning:return r.DiagnosticSeverity.Warning;case this._monaco.MarkerSeverity.Info:return r.DiagnosticSeverity.Information;case this._monaco.MarkerSeverity.Hint:return r.DiagnosticSeverity.Hint}}asDiagnostic(e){const t=this.asRange(new this._monaco.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)),i=this.asDiagnosticSeverity(e.severity);return r.Diagnostic.create(t,e.message,i,e.code,e.source)}asDiagnostics(e){return null==e?e:e.map((e=>this.asDiagnostic(e)))}asCodeActionContext(e,t){return null==e?e:r.CodeActionContext.create(t,s.string(e.only)?[e.only]:void 0,void 0)}asCodeActionParams(e,t,i,n){return{textDocument:this.asTextDocumentIdentifier(e),range:this.asRange(t),context:this.asCodeActionContext(i,n)}}asCommand(e){if(e){let t=e.arguments||[];return r.Command.create(e.title,e.id,...t)}}asCodeLens(e){let t=r.CodeLens.create(this.asRange(e.range));return e.command&&(t.command=this.asCommand(e.command)),l.is(e)&&e.data&&(t.data=e.data),t}asFormattingOptions(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}asDocumentFormattingParams(e,t){return{textDocument:this.asTextDocumentIdentifier(e),options:this.asFormattingOptions(t)}}asDocumentRangeFormattingParams(e,t,i){return{textDocument:this.asTextDocumentIdentifier(e),range:this.asRange(t),options:this.asFormattingOptions(i)}}asDocumentOnTypeFormattingParams(e,t,i,n){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),ch:i,options:this.asFormattingOptions(n)}}asRenameParams(e,t,i){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),newName:i}}asDocumentLinkParams(e){return{textDocument:this.asTextDocumentIdentifier(e)}}asDocumentLink(e){let t=r.DocumentLink.create(this.asRange(e.range));return e.url&&(t.target="string"==typeof e.url?e.url:e.url.toString()),a.is(e)&&e.data&&(t.data=e.data),e.tooltip&&(t.tooltip=e.tooltip),t}asCodeAction(e){const t={title:e.title},i=d.is(e)?e:void 0;if(s.number(e.kind)&&(t.kind=e.kind),e.diagnostics&&(t.diagnostics=this.asDiagnostics(e.diagnostics)),e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return e.command&&(t.command=this.asCommand(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),e.disabled&&(t.disabled={reason:e.disabled}),i&&void 0!==i.data&&(t.data=i.data),t}asInlayHintLabelPart(e){return{value:e.label,command:this.asCommand(e.command),location:this.asLocation(e.location),tooltip:this.asMarkupContent(e.tooltip)}}asInlayHintLabel(e){return Array.isArray(e)?e.map((e=>this.asInlayHintLabelPart(e))):e}asInlayHint(e){let t=r.InlayHint.create(this.asPosition(e.position.lineNumber,e.position.column),this.asInlayHintLabel(e.label),e.kind);return h.is(e)&&e.data&&(t.data=e.data),t}},t.ProtocolToMonacoConverter=class{constructor(e){this._monaco=e}asResourceEdits(e,t,i,n){return t.map((t=>({resource:e,edit:this.asTextEdit(t),modelVersionId:n,metadata:r.AnnotatedTextEdit.is(t)?i(t.annotationId):void 0})))}asWorkspaceEditMetadata(e){return{needsConfirmation:!0===e.needsConfirmation,label:e.label,description:e.description}}asWorkspaceEdit(e){if(!e)return;const t=new Map;if(void 0!==e.changeAnnotations)for(const i of Object.keys(e.changeAnnotations)){const n=this.asWorkspaceEditMetadata(e.changeAnnotations[i]);t.set(i,n)}const i=e=>void 0===e?void 0:t.get(e),n=[];if(e.documentChanges)e.documentChanges.forEach((e=>{if(o.CreateFile.is(e))n.push({newUri:this._monaco.Uri.parse(e.uri),options:e.options,metadata:i(e.annotationId)});else if(o.RenameFile.is(e))n.push({oldUri:this._monaco.Uri.parse(e.oldUri),newUri:this._monaco.Uri.parse(e.newUri),options:e.options,metadata:i(e.annotationId)});else if(o.DeleteFile.is(e))n.push({oldUri:this._monaco.Uri.parse(e.uri),options:e.options,metadata:i(e.annotationId)});else if(o.TextDocumentEdit.is(e)){const t=this._monaco.Uri.parse(e.textDocument.uri),o="number"==typeof e.textDocument.version?e.textDocument.version:void 0;n.push(...this.asResourceEdits(t,e.edits,i,o))}else console.error(`Unknown workspace edit change received:\n${JSON.stringify(e,void 0,4)}`)}));else if(e.changes)for(const t of Object.keys(e.changes)){const o=this._monaco.Uri.parse(t);n.push(...this.asResourceEdits(o,e.changes[t],i))}return{edits:n}}asTextEdit(e){if(e)return{range:this.asRange(e.range),text:e.newText}}asTextEdits(e){if(e)return e.map((e=>this.asTextEdit(e)))}asCodeLens(e){if(!e)return;let t={range:this.asRange(e.range)};return e.command&&(t.command=this.asCommand(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}asCodeLensList(e){if(e)return{lenses:e.map((e=>this.asCodeLens(e))),dispose:()=>{}}}asCodeActionList(e){return{actions:e.map((e=>this.asCodeAction(e))),dispose:()=>{}}}asCodeAction(e){return r.Command.is(e)?{command:{id:e.command,title:e.title,arguments:e.arguments},title:e.title}:{title:e.title,command:this.asCommand(e.command),edit:this.asWorkspaceEdit(e.edit),diagnostics:this.asDiagnostics(e.diagnostics),kind:e.kind,disabled:e.disabled?e.disabled.reason:void 0,isPreferred:e.isPreferred,data:e.data}}asCommand(e){if(e)return{id:e.command,title:e.title,arguments:e.arguments}}asDocumentSymbol(e){const t=e.children&&e.children.map((e=>this.asDocumentSymbol(e)));return{name:e.name,detail:e.detail||"",kind:this.asSymbolKind(e.kind),tags:e.tags||[],range:this.asRange(e.range),selectionRange:this.asRange(e.selectionRange),children:t}}asDocumentSymbols(e){return r.DocumentSymbol.is(e[0])?e.map((e=>this.asDocumentSymbol(e))):this.asSymbolInformations(e)}asSymbolInformations(e,t){if(e)return e.map((e=>this.asSymbolInformation(e,t)))}asSymbolInformation(e,t){const i=this.asLocation(t?Object.assign(Object.assign({},e.location),{uri:t.toString()}):e.location);return{name:e.name,detail:"",containerName:e.containerName,kind:this.asSymbolKind(e.kind),tags:e.tags||[],range:i.range,selectionRange:i.range}}asSymbolKind(e){return e<=r.SymbolKind.TypeParameter?e-1:this._monaco.languages.SymbolKind.Property}asDocumentHighlights(e){if(e)return e.map((e=>this.asDocumentHighlight(e)))}asDocumentHighlight(e){return{range:this.asRange(e.range),kind:s.number(e.kind)?this.asDocumentHighlightKind(e.kind):void 0}}asDocumentHighlightKind(e){switch(e){case r.DocumentHighlightKind.Text:return this._monaco.languages.DocumentHighlightKind.Text;case r.DocumentHighlightKind.Read:return this._monaco.languages.DocumentHighlightKind.Read;case r.DocumentHighlightKind.Write:return this._monaco.languages.DocumentHighlightKind.Write}return this._monaco.languages.DocumentHighlightKind.Text}asReferences(e){if(e)return e.map((e=>this.asLocation(e)))}asDefinitionResult(e){if(e){if(s.array(e)){if(0==e.length)return;return r.LocationLink.is(e[0])?e.map((e=>this.asLocationLink(e))):e.map((e=>this.asLocation(e)))}return this.asLocation(e)}}asLocation(e){if(e)return{uri:this._monaco.Uri.parse(e.uri),range:this.asRange(e.range)}}asLocationLink(e){if(!e)return;let t={uri:this._monaco.Uri.parse(e.targetUri),range:this.asRange(e.targetSelectionRange),originSelectionRange:this.asRange(e.originSelectionRange),targetSelectionRange:this.asRange(e.targetSelectionRange)};if(!t.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return t}asSignatureHelpResult(e){if(!e)return;let t={};return s.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,s.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures?t.signatures=this.asSignatureInformations(e.signatures):t.signatures=[],{value:t,dispose:()=>{}}}asSignatureInformations(e){return e.map((e=>this.asSignatureInformation(e)))}asSignatureInformation(e){let t={label:e.label};return e.documentation&&(t.documentation=this.asDocumentation(e.documentation)),e.parameters?t.parameters=this.asParameterInformations(e.parameters):t.parameters=[],e.activeParameter&&(t.activeParameter=e.activeParameter),t}asParameterInformations(e){return e.map((e=>this.asParameterInformation(e)))}asParameterInformation(e){let t={label:e.label};return e.documentation&&(t.documentation=this.asDocumentation(e.documentation)),t}asHover(e){if(e)return{contents:this.asHoverContent(e.contents),range:this.asRange(e.range)}}asHoverContent(e){return Array.isArray(e)?e.map((e=>this.asMarkdownString(e))):[this.asMarkdownString(e)]}asDocumentation(e){return s.string(e)?e:e.kind===r.MarkupKind.PlainText?e.value:this.asMarkdownString(e)}asMarkdownString(e){if(r.MarkupContent.is(e))return{value:e.value};if(s.string(e))return{value:e};const{language:t,value:i}=e;return{value:"```"+t+"\n"+i+"\n```"}}asSeverity(e){return 1===e?this._monaco.MarkerSeverity.Error:2===e?this._monaco.MarkerSeverity.Warning:3===e?this._monaco.MarkerSeverity.Info:this._monaco.MarkerSeverity.Hint}asDiagnostics(e){if(e)return e.map((e=>this.asDiagnostic(e)))}asDiagnostic(e){return{code:"number"==typeof e.code?e.code.toString():e.code,severity:this.asSeverity(e.severity),message:e.message,source:e.source,startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,relatedInformation:this.asRelatedInformations(e.relatedInformation),tags:e.tags}}asRelatedInformations(e){if(e)return e.map((e=>this.asRelatedInformation(e)))}asRelatedInformation(e){return{resource:this._monaco.Uri.parse(e.location.uri),startLineNumber:e.location.range.start.line+1,startColumn:e.location.range.start.character+1,endLineNumber:e.location.range.end.line+1,endColumn:e.location.range.end.character+1,message:e.message}}asCompletionResult(e,t){if(!e)return{incomplete:!1,suggestions:[]};if(Array.isArray(e))return{incomplete:!1,suggestions:e.map((e=>this.asCompletionItem(e,t,i)))};const i=this.getCompletionItemDefaultRange(e);return{incomplete:e.isIncomplete,suggestions:e.items.map((n=>this.asCompletionItem(n,t,i,e.itemDefaults)))}}asCompletionItem(e,t,i,n){var o,r,a;const l={label:this.asCompletionItemLabel(e)};e.detail&&(l.detail=e.detail),e.documentation&&(l.documentation=this.asDocumentation(e.documentation),l.documentationFormat=s.string(e.documentation)?void 0:e.documentation.kind),e.filterText&&(l.filterText=e.filterText);const c=this.asCompletionInsertText(e,i,null==n?void 0:n.insertTextFormat);if(l.insertText=c.insertText,l.range=null!==(o=c.range)&&void 0!==o?o:t,l.fromEdit=c.fromEdit,c.isSnippet&&(l.insertTextRules=this._monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet),s.number(e.kind)){let[t,i]=this.asCompletionItemKind(e.kind);l.kind=t,i&&(l.originalItemKind=i)}e.sortText&&(l.sortText=e.sortText),e.additionalTextEdits&&(l.additionalTextEdits=this.asTextEdits(e.additionalTextEdits)),s.stringArray(e.commitCharacters)&&(l.commitCharacters=e.commitCharacters.slice()),e.command&&(l.command=this.asCommand(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(l.deprecated=e.deprecated),!0!==e.preselect&&!1!==e.preselect||(l.preselect=e.preselect);const d=null!==(r=e.data)&&void 0!==r?r:null==n?void 0:n.data;void 0!==d&&(l.data=d),!0!==e.deprecated&&!1!==e.deprecated||(l.deprecated=e.deprecated);const h=null!==(a=e.insertTextMode)&&void 0!==a?a:null==n?void 0:n.insertTextMode;return h&&(l.insertTextMode=h),e.tags&&(l.tags=e.tags),l}getCompletionItemDefaultRange(e){var t;const i=null===(t=e.itemDefaults)||void 0===t?void 0:t.editRange;return o.Range.is(i)?this.asRange(i):void 0!==i?{insert:this.asRange(i.insert),replace:this.asRange(i.replace)}:void 0}asCompletionItemLabel(e){return o.CompletionItemLabelDetails.is(e.labelDetails)?{label:e.label,detail:e.labelDetails.detail,description:e.labelDetails.description}:e.label}asCompletionItemKind(e){if(r.CompletionItemKind.Text<=e&&e<=r.CompletionItemKind.TypeParameter)switch(e){case r.CompletionItemKind.Text:return[this._monaco.languages.CompletionItemKind.Text,void 0];case r.CompletionItemKind.Method:return[this._monaco.languages.CompletionItemKind.Method,void 0];case r.CompletionItemKind.Function:return[this._monaco.languages.CompletionItemKind.Function,void 0];case r.CompletionItemKind.Constructor:return[this._monaco.languages.CompletionItemKind.Constructor,void 0];case r.CompletionItemKind.Field:return[this._monaco.languages.CompletionItemKind.Field,void 0];case r.CompletionItemKind.Variable:return[this._monaco.languages.CompletionItemKind.Variable,void 0];case r.CompletionItemKind.Class:return[this._monaco.languages.CompletionItemKind.Class,void 0];case r.CompletionItemKind.Interface:return[this._monaco.languages.CompletionItemKind.Interface,void 0];case r.CompletionItemKind.Module:return[this._monaco.languages.CompletionItemKind.Module,void 0];case r.CompletionItemKind.Property:return[this._monaco.languages.CompletionItemKind.Property,void 0];case r.CompletionItemKind.Unit:return[this._monaco.languages.CompletionItemKind.Unit,void 0];case r.CompletionItemKind.Value:return[this._monaco.languages.CompletionItemKind.Value,void 0];case r.CompletionItemKind.Enum:return[this._monaco.languages.CompletionItemKind.Enum,void 0];case r.CompletionItemKind.Keyword:return[this._monaco.languages.CompletionItemKind.Keyword,void 0];case r.CompletionItemKind.Snippet:return[this._monaco.languages.CompletionItemKind.Snippet,void 0];case r.CompletionItemKind.Color:return[this._monaco.languages.CompletionItemKind.Color,void 0];case r.CompletionItemKind.File:return[this._monaco.languages.CompletionItemKind.File,void 0];case r.CompletionItemKind.Reference:return[this._monaco.languages.CompletionItemKind.Reference,void 0];case r.CompletionItemKind.Folder:return[this._monaco.languages.CompletionItemKind.Folder,void 0];case r.CompletionItemKind.EnumMember:return[this._monaco.languages.CompletionItemKind.EnumMember,void 0];case r.CompletionItemKind.Constant:return[this._monaco.languages.CompletionItemKind.Constant,void 0];case r.CompletionItemKind.Struct:return[this._monaco.languages.CompletionItemKind.Struct,void 0];case r.CompletionItemKind.Event:return[this._monaco.languages.CompletionItemKind.Event,void 0];case r.CompletionItemKind.Operator:return[this._monaco.languages.CompletionItemKind.Operator,void 0];case r.CompletionItemKind.TypeParameter:return[this._monaco.languages.CompletionItemKind.TypeParameter,void 0];default:return[e-1,void 0]}return[r.CompletionItemKind.Text,e]}asCompletionInsertText(e,t,i){var n,o;const s=(null!==(n=e.insertTextFormat)&&void 0!==n?n:i)===r.InsertTextFormat.Snippet;if(void 0!==e.textEdit||void 0!==t){const[i,n]=void 0!==e.textEdit?this.getCompletionRangeAndText(e.textEdit):[t,null!==(o=e.textEditText)&&void 0!==o?o:e.label];return{insertText:n,range:i,fromEdit:!0,isSnippet:s}}return e.insertText?{isSnippet:s,insertText:e.insertText,fromEdit:!1,range:t}:{insertText:e.label,range:t,fromEdit:!1,isSnippet:!1}}getCompletionRangeAndText(e){return o.InsertReplaceEdit.is(e)?[{insert:this.asRange(e.insert),replace:this.asRange(e.replace)},e.newText]:[this.asRange(e.range),e.newText]}asDocumentLinks(e){return{links:e.map((e=>this.asDocumentLink(e)))}}asDocumentLink(e){return{range:this.asRange(e.range),url:e.target,data:e.data,tooltip:e.tooltip}}asRange(e){if(void 0===e)return;if(null===e)return null;const t=this.asPosition(e.start),i=this.asPosition(e.end);return t instanceof this._monaco.Position&&i instanceof this._monaco.Position?new this._monaco.Range(t.lineNumber,t.column,i.lineNumber,i.column):{startLineNumber:t&&void 0!==t.lineNumber?t.lineNumber:void 0,startColumn:t&&void 0!==t.column?t.column:void 0,endLineNumber:i&&void 0!==i.lineNumber?i.lineNumber:void 0,endColumn:i&&void 0!==i.column?i.column:void 0}}asPosition(e){if(void 0===e)return;if(null===e)return null;const{line:t,character:i}=e,n=void 0===t?void 0:t+1,o=void 0===i?void 0:i+1;return void 0!==n&&void 0!==o?new this._monaco.Position(n,o):{lineNumber:n,column:o}}asColorInformations(e){return e.map((e=>this.asColorInformation(e)))}asColorInformation(e){return{range:this.asRange(e.range),color:e.color}}asColorPresentations(e){return e.map((e=>this.asColorPresentation(e)))}asColorPresentation(e){return{label:e.label,textEdit:this.asTextEdit(e.textEdit),additionalTextEdits:this.asTextEdits(e.additionalTextEdits)}}asFoldingRanges(e){return e?e.map((e=>this.asFoldingRange(e))):e}asFoldingRange(e){return{start:e.startLine+1,end:e.endLine+1,kind:this.asFoldingRangeKind(e.kind)}}asFoldingRangeKind(e){if(e)switch(e){case r.FoldingRangeKind.Comment:return this._monaco.languages.FoldingRangeKind.Comment;case r.FoldingRangeKind.Imports:return this._monaco.languages.FoldingRangeKind.Imports;case r.FoldingRangeKind.Region:return this._monaco.languages.FoldingRangeKind.Region}}asSemanticTokens(e){return{resultId:e.resultId,data:Uint32Array.from(e.data)}}asInlayHintLabelPart(e){return{label:e.value,command:this.asCommand(e.command),location:this.asLocation(e.location),tooltip:e.tooltip&&this.asMarkdownString(e.tooltip)}}asInlayHintLabel(e){return Array.isArray(e)?e.map((e=>this.asInlayHintLabelPart(e))):e}asInlayHint(e){return{data:e.data,label:this.asInlayHintLabel(e.label),position:this.asPosition(e.position),kind:e.kind,paddingLeft:e.paddingLeft,paddingRight:e.paddingRight,tooltip:e.tooltip&&this.asMarkdownString(e.tooltip)}}asInlayHintList(e){if(e)return{hints:e.map((e=>this.asInlayHint(e))),dispose:()=>{}}}}},7344:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoModelDiagnostics=t.MonacoDiagnosticCollection=void 0;const n=i(3430);t.MonacoDiagnosticCollection=class{constructor(e,t,i){this._monaco=e,this.name=t,this.p2m=i,this.diagnostics=new Map,this.toDispose=new n.DisposableCollection}dispose(){this.toDispose.dispose()}get(e){const t=this.diagnostics.get(e);return t?t.diagnostics:[]}set(e,t){const i=this.diagnostics.get(e);if(i)i.diagnostics=t;else{const i=new o(this._monaco,e,t,this.name,this.p2m);this.diagnostics.set(e,i),this.toDispose.push(n.Disposable.create((()=>{this.diagnostics.delete(e),i.dispose()})))}}};class o{constructor(e,t,i,o,s){this._monaco=e,this.owner=o,this.p2m=s,this._markers=[],this._diagnostics=[],this.toDispose=new n.DisposableCollection,this.uri=this._monaco.Uri.parse(t),this.diagnostics=i,this.toDispose.push(this._monaco.editor.onDidCreateModel((e=>this.doUpdateModelMarkers(e))))}set diagnostics(e){this._diagnostics=e,this._markers=this.p2m.asDiagnostics(e),this.updateModelMarkers()}get diagnostics(){return this._diagnostics}get markers(){return this._markers}dispose(){this._markers=[],this.updateModelMarkers(),this.toDispose.dispose()}updateModelMarkers(){const e=this._monaco.editor.getModel(this.uri);this.doUpdateModelMarkers(e||void 0)}doUpdateModelMarkers(e){e&&this.uri.toString()===e.uri.toString()&&this._monaco.editor.setModelMarkers(e,this.owner,this._markers)}}t.MonacoModelDiagnostics=o},2777:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoLanguageClient=void 0;const n=i(5163),o=i(9343);n.__exportStar(i(9343),t);const s=i(5572),r=i(5122),a=i(7583),l=i(4976),c=i(9259),d=i(7548),h=i(5985),u=i(2318),g=i(7853),p=i(253),m=i(5973),f=i(5824),_=i(8314),v=i(6991),b=i(1108),C=i(2716),w=i(7349),y=i(7567),S=i(3894),x=i(9100),k=i(8357),D=i(6443),L=i(4778),E=i(1572),N=i(4722),I=i(4462),T=i(7801),M=i(4585);class R extends o.BaseLanguageClient{constructor({id:e,name:t,clientOptions:i,connectionProvider:n}){super(e||t.toLowerCase(),t,i),this.connectionProvider=n;const o=this;o._p2c=new s.MonacoP2CConverter(o._p2c),o._c2p=new s.MonacoC2PConverter(o._c2p);const r=this.handleRegistrationRequest.bind(this);this.handleRegistrationRequest=e=>{r(Object.assign(Object.assign({},e),{registrations:e.registrations.filter((e=>null!=this.getFeature(e.method)))}))};const a=this.handleUnregistrationRequest.bind(this);this.handleUnregistrationRequest=e=>{a(Object.assign(Object.assign({},e),{unregisterations:e.unregisterations.filter((e=>null!=this.getFeature(e.method)))}))}}createMessageTransports(e){return this.connectionProvider.get(e)}getLocale(){return navigator.language||"en-US"}registerBuiltinFeatures(){this.registerFeature(new a.DidOpenTextDocumentFeature(this,this._syncedDocuments)),this.registerFeature(new a.DidChangeTextDocumentFeature(this)),this.registerFeature(new a.DidCloseTextDocumentFeature(this,this._syncedDocuments)),this.registerFeature(new l.CompletionItemFeature(this)),this.registerFeature(new c.HoverFeature(this)),this.registerFeature(new d.SignatureHelpFeature(this)),this.registerFeature(new h.DefinitionFeature(this)),this.registerFeature(new u.ReferencesFeature(this)),this.registerFeature(new g.DocumentHighlightFeature(this)),this.registerFeature(new p.DocumentSymbolFeature(this)),this.registerFeature(new m.CodeActionFeature(this)),this.registerFeature(new f.CodeLensFeature(this)),this.registerFeature(new _.DocumentFormattingFeature(this)),this.registerFeature(new _.DocumentRangeFormattingFeature(this)),this.registerFeature(new _.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new v.RenameFeature(this)),this.registerFeature(new b.DocumentLinkFeature(this)),this.registerFeature(new C.ExecuteCommandFeature(this)),this.registerFeature(new w.TypeDefinitionFeature(this)),this.registerFeature(new y.ImplementationFeature(this)),this.registerFeature(new S.ColorProviderFeature(this)),void 0===this.clientOptions.workspaceFolder&&this.registerFeature(new x.WorkspaceFoldersFeature(this)),this.registerFeature(new k.FoldingRangeFeature(this)),this.registerFeature(new D.DeclarationFeature(this)),this.registerFeature(new L.SelectionRangeFeature(this)),this.registerFeature(new E.SemanticTokensFeature(this)),this.registerFeature(new N.LinkedEditingFeature(this)),this.registerFeature(new I.InlayHintsFeature(this)),this.registerFeature(new T.DiagnosticFeature(this))}registerTextDocumentSaveFeatures(){this.registerFeature(new a.WillSaveFeature(this)),this.registerFeature(new a.WillSaveWaitUntilFeature(this)),this.registerFeature(new a.DidSaveTextDocumentFeature(this))}registerConfigurationFeatures(){this.registerFeature(new r.ConfigurationFeature(this)),this.registerFeature(new r.SyncConfigurationFeature(this))}registerProgressFeatures(){this.registerFeature(new M.ProgressFeature(this))}}t.MonacoLanguageClient=R,R.bypassConversion=(e,t)=>null!=t?Promise.resolve(e||void 0):e||void 0},8525:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoLanguages=t.testGlob=t.MonacoModelIdentifier=void 0;const n=i(5163).__importDefault(i(450)),o=i(722),s=i(7344);var r;function a(e,t){return(0,n.default)(e,{extended:!0,globstar:!0}).test(t)}function l(e,t){for(const i in t){const n=t[i];null!=n&&(e[i]=n)}}!function(e){e.fromDocument=function(e,t){return{uri:e.Uri.parse(t.uri),languageId:t.languageId}},e.fromModel=function(e){return{uri:e.uri,languageId:e.getLanguageId()}}}(r=t.MonacoModelIdentifier||(t.MonacoModelIdentifier={})),t.testGlob=a;class c{constructor(e,t){this._monaco=e,this.p2m=t,this._collections=new Map}createDiagnosticCollection(e){let t;if(e)if(this._collections.has(e))do{t=e+c._idPool++}while(this._collections.has(t));else t=e;else e="_generated_diagnostic_collection_name_#"+c._idPool++,t=e;const i=this;return new class extends s.MonacoDiagnosticCollection{constructor(){super(i._monaco,e||"default",i.p2m),i._collections.set(t,this)}dispose(){super.dispose(),i._collections.delete(t)}}}getDiagnostics(e){let t=[];for(let i of this._collections.values()){const n=i.get(e);n&&(t=t.concat(n))}return t}}c._idPool=0;class d{constructor(e,t,i){this._monaco=e,this.p2m=t,this.m2p=i,this.extHostDiagnostics=new c(e,t)}match(e,t){return this.matchModel(e,r.fromDocument(this._monaco,t))}createDiagnosticCollection(e){return this.extHostDiagnostics.createDiagnosticCollection(e)}registerCompletionItemProvider(e,t,...i){const n=this.createCompletionProvider(t,...i);return this._monaco.languages.registerCompletionItemProvider(e,n)}createCompletionProvider(e,...t){return{triggerCharacters:t,provideCompletionItems:async(t,i,n,o)=>{const s=t.getWordUntilPosition(i),r=new this._monaco.Range(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),a=this.m2p.asCompletionParams(t,i,n),l=await e.provideCompletionItems(a,o);return l&&this.p2m.asCompletionResult(l,r)},resolveCompletionItem:e.resolveCompletionItem?async(t,i)=>{const n=this.m2p.asCompletionItem(t),o=await e.resolveCompletionItem(n,i);return o&&l(t,this.p2m.asCompletionItem(o,t.range)),t}:void 0}}registerHoverProvider(e,t){const i=this.createHoverProvider(t);return this._monaco.languages.registerHoverProvider(e,i)}createHoverProvider(e){return{provideHover:async(t,i,n)=>{const o=this.m2p.asTextDocumentPositionParams(t,i),s=await e.provideHover(o,n);return s&&this.p2m.asHover(s)}}}registerSignatureHelpProvider(e,t,...i){const n=this.createSignatureHelpProvider(t,...i);return this._monaco.languages.registerSignatureHelpProvider(e,n)}createSignatureHelpProvider(e,...t){return{signatureHelpTriggerCharacters:[...e.triggerCharacters||t||[]],signatureHelpRetriggerCharacters:e.retriggerCharacters,provideSignatureHelp:async(t,i,n,o)=>{const s=this.m2p.asTextDocumentPositionParams(t,i),r=await e.provideSignatureHelp(s,n,this.m2p.asSignatureHelpContext(o));return r&&this.p2m.asSignatureHelpResult(r)}}}registerDefinitionProvider(e,t){const i=this.createDefinitionProvider(t);return this._monaco.languages.registerDefinitionProvider(e,i)}createDefinitionProvider(e){return{provideDefinition:async(t,i,n)=>{const o=this.m2p.asTextDocumentPositionParams(t,i),s=await e.provideDefinition(o,n);return s&&this.p2m.asDefinitionResult(s)}}}registerReferenceProvider(e,t){const i=this.createReferenceProvider(t);return this._monaco.languages.registerReferenceProvider(e,i)}createReferenceProvider(e){return{provideReferences:async(t,i,n,o)=>{const s=this.m2p.asReferenceParams(t,i,n),r=await e.provideReferences(s,o);return r&&this.p2m.asReferences(r)}}}registerDocumentHighlightProvider(e,t){const i=this.createDocumentHighlightProvider(t);return this._monaco.languages.registerDocumentHighlightProvider(e,i)}createDocumentHighlightProvider(e){return{provideDocumentHighlights:async(t,i,n)=>{const o=this.m2p.asTextDocumentPositionParams(t,i),s=await e.provideDocumentHighlights(o,n);return s&&this.p2m.asDocumentHighlights(s)}}}registerDocumentSymbolProvider(e,t){const i=this.createDocumentSymbolProvider(t);return this._monaco.languages.registerDocumentSymbolProvider(e,i)}createDocumentSymbolProvider(e){return{provideDocumentSymbols:async(t,i)=>{const n=this.m2p.asDocumentSymbolParams(t),o=await e.provideDocumentSymbols(n,i);return o&&this.p2m.asDocumentSymbols(o)}}}registerCodeActionsProvider(e,t){const i=this.createCodeActionProvider(t);return this._monaco.languages.registerCodeActionProvider(e,i)}createCodeActionProvider(e){return{provideCodeActions:async(t,i,n,o)=>{const s=[];for(const e of this.extHostDiagnostics.getDiagnostics(t.uri.toString()))if(i.intersectRanges(this.p2m.asRange(e.range))&&s.push(e)>d._maxCodeActionsPerFile)break;const r=this.m2p.asCodeActionParams(t,i,n,s);let a=await e.provideCodeActions(r,o);return a&&this.p2m.asCodeActionList(a)},resolveCodeAction:e.resolveCodeAction?async(t,i)=>{const n=this.m2p.asCodeAction(t),o=await e.resolveCodeAction(n,i);return o&&l(t,this.p2m.asCodeAction(o)),t}:void 0}}registerCodeLensProvider(e,t){const i=this.createCodeLensProvider(t);return this._monaco.languages.registerCodeLensProvider(e,i)}createCodeLensProvider(e){return{provideCodeLenses:async(t,i)=>{const n=this.m2p.asCodeLensParams(t),o=await e.provideCodeLenses(n,i);return o&&this.p2m.asCodeLensList(o)},resolveCodeLens:e.resolveCodeLens?async(t,i,n)=>{const o=this.m2p.asCodeLens(i),s=await e.resolveCodeLens(o,n);return s&&l(i,this.p2m.asCodeLens(s)),i}:void 0}}registerDocumentFormattingEditProvider(e,t){const i=this.createDocumentFormattingEditProvider(t);return this._monaco.languages.registerDocumentFormattingEditProvider(e,i)}createDocumentFormattingEditProvider(e){return{provideDocumentFormattingEdits:async(t,i,n)=>{const o=this.m2p.asDocumentFormattingParams(t,i),s=await e.provideDocumentFormattingEdits(o,n);return s&&this.p2m.asTextEdits(s)}}}registerDocumentRangeFormattingEditProvider(e,t){const i=this.createDocumentRangeFormattingEditProvider(t);return this._monaco.languages.registerDocumentRangeFormattingEditProvider(e,i)}createDocumentRangeFormattingEditProvider(e){return{provideDocumentRangeFormattingEdits:async(t,i,n,o)=>{const s=this.m2p.asDocumentRangeFormattingParams(t,i,n),r=await e.provideDocumentRangeFormattingEdits(s,o);return r&&this.p2m.asTextEdits(r)}}}registerOnTypeFormattingEditProvider(e,t,i,...n){const o=this.createOnTypeFormattingEditProvider(t,i,...n);return this._monaco.languages.registerOnTypeFormattingEditProvider(e,o)}createOnTypeFormattingEditProvider(e,t,...i){return{autoFormatTriggerCharacters:[t].concat(i),provideOnTypeFormattingEdits:async(t,i,n,o,s)=>{const r=this.m2p.asDocumentOnTypeFormattingParams(t,i,n,o),a=await e.provideOnTypeFormattingEdits(r,s);return a&&this.p2m.asTextEdits(a)}}}registerRenameProvider(e,t){const i=this.createRenameProvider(t);return this._monaco.languages.registerRenameProvider(e,i)}createRenameProvider(e){return{provideRenameEdits:async(t,i,n,o)=>{const s=this.m2p.asRenameParams(t,i,n),r=await e.provideRenameEdits(s,o);return r&&this.p2m.asWorkspaceEdit(r)}}}registerDocumentLinkProvider(e,t){const i=this.createDocumentLinkProvider(t);return this._monaco.languages.registerLinkProvider(e,i)}createDocumentLinkProvider(e){return{provideLinks:async(t,i)=>{const n=this.m2p.asDocumentLinkParams(t),o=await e.provideDocumentLinks(n,i);return o&&this.p2m.asDocumentLinks(o)},resolveLink:async(t,i)=>{if(e.resolveDocumentLink&&(null===t.url||void 0===t.url)){const n=this.m2p.asDocumentLink(t),o=await e.resolveDocumentLink(n,i);o&&l(t,this.p2m.asDocumentLink(o))}return t}}}registerImplementationProvider(e,t){const i=this.createImplementationProvider(t);return this._monaco.languages.registerImplementationProvider(e,i)}createImplementationProvider(e){return{provideImplementation:async(t,i,n)=>{const o=this.m2p.asTextDocumentPositionParams(t,i),s=await e.provideImplementation(o,n);return s&&this.p2m.asDefinitionResult(s)}}}registerTypeDefinitionProvider(e,t){const i=this.createTypeDefinitionProvider(t);return this._monaco.languages.registerTypeDefinitionProvider(e,i)}createTypeDefinitionProvider(e){return{provideTypeDefinition:async(t,i,n)=>{const o=this.m2p.asTextDocumentPositionParams(t,i),s=await e.provideTypeDefinition(o,n);return s&&this.p2m.asDefinitionResult(s)}}}registerColorProvider(e,t){const i=this.createDocumentColorProvider(t);return this._monaco.languages.registerColorProvider(e,i)}createDocumentColorProvider(e){return{provideDocumentColors:async(t,i)=>{const n=this.m2p.asTextDocumentIdentifier(t),o=await e.provideDocumentColors({textDocument:n},i);return o&&this.p2m.asColorInformations(o)},provideColorPresentations:async(t,i,n)=>{const o=this.m2p.asTextDocumentIdentifier(t),s=this.m2p.asRange(i.range),r=await e.provideColorPresentations({textDocument:o,color:i.color,range:s},n);return r&&this.p2m.asColorPresentations(r)}}}registerFoldingRangeProvider(e,t){const i=this.createFoldingRangeProvider(t);return this._monaco.languages.registerFoldingRangeProvider(e,i)}createFoldingRangeProvider(e){return{provideFoldingRanges:async(t,i,n)=>{const o=this.m2p.asTextDocumentIdentifier(t),s=await e.provideFoldingRanges({textDocument:o},n);return s&&this.p2m.asFoldingRanges(s)}}}registerDocumentSemanticTokensProvider(e,t,i){const n=this.createSemanticTokensProvider(t,i);return this._monaco.languages.registerDocumentSemanticTokensProvider(e,n)}createSemanticTokensProvider(e,t){return{getLegend:()=>t,onDidChange:e.onDidChange,provideDocumentSemanticTokens:async(t,i,n)=>{const o=this.m2p.asTextDocumentIdentifier(t),s=await e.provideDocumentSemanticTokens({textDocument:o},n);return s&&this.p2m.asSemanticTokens(s)},releaseDocumentSemanticTokens:e=>{}}}registerDocumentRangeSemanticTokensProvider(e,t,i){const n=this.createRangeSemanticTokensProvider(t,i);return this._monaco.languages.registerDocumentRangeSemanticTokensProvider(e,n)}createRangeSemanticTokensProvider(e,t){return{getLegend:()=>t,provideDocumentRangeSemanticTokens:async(t,i,n)=>{const o=this.m2p.asTextDocumentIdentifier(t),s=await e.provideDocumentRangeSemanticTokens({textDocument:o,range:this.m2p.asRange(i)},n);return s&&this.p2m.asSemanticTokens(s)}}}registerInlayHintsProvider(e,t){const i=this.createInlayHintsProvider(t);return this._monaco.languages.registerInlayHintsProvider(e,i)}createInlayHintsProvider(e){return{onDidChangeInlayHints:e.onDidChangeInlayHints,provideInlayHints:async(t,i,n)=>{const o=this.m2p.asTextDocumentIdentifier(t),s=await e.provideInlayHints({textDocument:o,range:this.m2p.asRange(i)},n);return s&&this.p2m.asInlayHintList(s)},resolveInlayHint:async(t,i)=>{if(e.resolveInlayHint){const n=this.m2p.asInlayHint(t),o=await e.resolveInlayHint(n,i);o&&l(t,this.p2m.asInlayHint(o))}return t}}}matchModel(e,t){return Array.isArray(e)?e.some((e=>this.matchModel(e,t))):o.TextDocumentFilter.is(e)?!(e.language&&e.language!==t.languageId||e.scheme&&e.scheme!==t.uri.scheme||e.pattern&&!a(e.pattern,t.uri.path)):"string"==typeof e&&e===t.languageId}}t.MonacoLanguages=d,d._maxCodeActionsPerFile=1e3},5748:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoServices=void 0;const n=i(9412),o=i(9869),s=i(8525),r=i(6040),a=i(9472),l=i(722),c=i(3430);!function(e){function t(e,t={}){const i=new n.MonacoToProtocolConverter(e),l=new n.ProtocolToMonacoConverter(e);return{commands:new o.MonacoCommands(e),languages:new s.MonacoLanguages(e,l,i),workspace:new r.MonacoWorkspace(e,l,i,t.rootUri),window:new a.ConsoleWindow}}e.create=t,e.install=function(e,i={}){const n=new c.DisposableCollection,o=t(e,i);return n.push(o.workspace),n.push(l.Services.install(o)),n},e.get=function(){return l.Services.get()}}(t.MonacoServices||(t.MonacoServices={}))},6040:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoWorkspace=void 0;const n=i(722),o=i(4881),s=i(3430);t.MonacoWorkspace=class{constructor(e,t,i,o=null){this._monaco=e,this.p2m=t,this.m2p=i,this._rootUri=o,this.disposableCollection=new s.DisposableCollection,this.documents=new Map,this.documentDisposables=new Map,this.onDidOpenTextDocumentEmitter=new n.Emitter,this.onDidCloseTextDocumentEmitter=new n.Emitter,this.onDidChangeTextDocumentEmitter=new n.Emitter;for(const e of this._monaco.editor.getModels())this.addModel(e);this.disposableCollection.push(this._monaco.editor.onDidCreateModel((e=>this.addModel(e)))),this.disposableCollection.push(this._monaco.editor.onWillDisposeModel((e=>this.removeModel(e)))),this.disposableCollection.push(this._monaco.editor.onDidChangeModelLanguage((e=>{this.removeModel(e.model),this.addModel(e.model)})))}dispose(){this.disposableCollection.dispose();for(const e of this._monaco.editor.getModels())this.removeModel(e)}get rootUri(){return this._rootUri}removeModel(e){const t=e.uri.toString(),i=this.documents.get(t);i&&(this.documents.delete(t),this.onDidCloseTextDocumentEmitter.fire(i));const n=this.documentDisposables.get(t);n&&(n.dispose(),this.documentDisposables.delete(t))}addModel(e){const t=e.uri.toString(),i=this.setModel(t,e);this.onDidOpenTextDocumentEmitter.fire(i),this.documentDisposables.set(t,e.onDidChangeContent((i=>this.onDidChangeContent(t,e,i))))}onDidChangeContent(e,t,i){const n=this.setModel(e,t),o=[];for(const e of i.changes){const t=this.m2p.asRange(e.range),i=e.rangeLength,n=e.text;o.push({range:t,rangeLength:i,text:n})}this.onDidChangeTextDocumentEmitter.fire({textDocument:n,contentChanges:o,isRedoing:i.isRedoing,isUndoing:i.isUndoing})}setModel(e,t){const i=o.TextDocument.create(e,t.getLanguageId(),t.getVersionId(),t.getValue());return this.documents.set(e,i),i}get textDocuments(){return Array.from(this.documents.values())}get onDidOpenTextDocument(){return this.onDidOpenTextDocumentEmitter.event}get onDidCloseTextDocument(){return this.onDidCloseTextDocumentEmitter.event}get onDidChangeTextDocument(){return this.onDidChangeTextDocumentEmitter.event}applyEdit(e){const t=this.p2m.asWorkspaceEdit(e),i=t.edits?t.edits.reduce(((e,t)=>{const i=t;return e[i.resource.toString()]=this._monaco.editor.getModel(i.resource),e}),{}):{};if(!Object.keys(i).map((e=>i[e])).every((e=>!!e)))return Promise.resolve(!1);const n=t.edits?t.edits.reduce(((e,t)=>{const i=t,n=i.resource.toString();return n in e||(e[n]=[]),e[n].push({range:this._monaco.Range.lift(i.edit.range),text:i.edit.text}),e}),{}):{};return Object.keys(n).forEach((e=>{i[e].pushEditOperations([],n[e].map((e=>({identifier:{major:1,minor:0},range:e.range,text:e.text,forceMoveMarkers:!0}))),(()=>[]))})),Promise.resolve(!0)}}},722:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationTarget=t.DocumentIdentifier=t.ProgressLocation=t.VsCodeDiagnosticSeverity=t.SignatureHelpTriggerKind=t.Services=t.TextDocument=t.Emitter=t.Event=t.CancellationToken=t.Disposable=void 0;const n=i(5163),o=i(4881);Object.defineProperty(t,"TextDocument",{enumerable:!0,get:function(){return o.TextDocument}});const s=i(5247);var r,a,l,c;Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return s.Disposable}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}}),Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return s.Emitter}}),n.__exportStar(i(9372),t),function(e){const t=window,i=Symbol("Services");e.get=()=>{const e=t[i];if(!e)throw new Error("Language Client services has not been installed");return e},e.install=function(e){return t[i]&&console.warn("Language Client services have been overridden"),t[i]=e,s.Disposable.create((()=>t[i]=void 0))}}(t.Services||(t.Services={})),(c=t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={}))[c.Invoke=1]="Invoke",c[c.TriggerCharacter=2]="TriggerCharacter",c[c.ContentChange=3]="ContentChange",(l=t.VsCodeDiagnosticSeverity||(t.VsCodeDiagnosticSeverity={}))[l.Error=0]="Error",l[l.Warning=1]="Warning",l[l.Information=2]="Information",l[l.Hint=3]="Hint",(a=t.ProgressLocation||(t.ProgressLocation={}))[a.SourceControl=1]="SourceControl",a[a.Window=10]="Window",a[a.Notification=15]="Notification",(t.DocumentIdentifier||(t.DocumentIdentifier={})).is=function(e){return!!e&&"uri"in e&&"languageId"in e},(r=t.ConfigurationTarget||(t.ConfigurationTarget={}))[r.Global=1]="Global",r[r.Workspace=2]="Workspace",r[r.WorkspaceFolder=3]="WorkspaceFolder"},250:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createVSCodeApi=void 0;const n=i(5163),o=i(355),s=i(3430),r=i(722),a=n.__importStar(i(722)),l=i(294);t.createVSCodeApi=function(e){const t=()=>{throw new Error("unsupported")},i=class extends o.URI{static joinPath(e,...i){return t()}};class n{constructor(e){this.value=e,this.contains=t,this.intersects=t}append(e){return new n(this.value?this.value+n.sep+e:e)}}n.sep=".",n.Empty=new n(""),n.QuickFix=new n("quickfix"),n.Refactor=new n("refactor"),n.RefactorExtract=n.Refactor.append("extract"),n.RefactorInline=n.Refactor.append("inline"),n.RefactorRewrite=n.Refactor.append("rewrite"),n.Source=new n("source"),n.SourceOrganizeImports=n.Source.append("organizeImports"),n.SourceFixAll=n.Source.append("fixAll");class c extends Error{constructor(){super("Canceled"),this.name=this.message}}let d;!function(e){e[e.Undo=1]="Undo",e[e.Redo=2]="Redo"}(d||(d={}));const h={fs:new class{isWritableFileSystem(e){return!1}stat(e){throw new Error("Method not implemented.")}readDirectory(e){return Promise.resolve([])}createDirectory(e){return Promise.resolve()}readFile(e){return Promise.resolve(new Uint8Array(0))}writeFile(e,t){return Promise.resolve()}delete(e,t){return Promise.resolve()}rename(e,t,i){return Promise.resolve()}copy(e,t,i){return Promise.resolve()}},workspaceFile:void 0,createFileSystemWatcher(t,i,n,o){const s=e();if("string"!=typeof t)throw new Error("unsupported");if(s.workspace.createFileSystemWatcher){const e=s.workspace.createFileSystemWatcher(t,i,n,o);return Object.assign(e,{ignoreCreateEvents:!!i,ignoreChangeEvents:!!n,ignoreDeleteEvents:!!o})}return{ignoreCreateEvents:!!i,ignoreChangeEvents:!!n,ignoreDeleteEvents:!!o,onDidCreate:r.Event.None,onDidChange:r.Event.None,onDidDelete:r.Event.None,dispose:()=>{}}},applyEdit:async t=>{const i=e();if(r.WorkspaceEdit.is(t))return i.workspace.applyEdit(t);throw new Error("unsupported")},getConfiguration(i,n){const{workspace:o}=e(),s=o.configurations?o.configurations.getConfiguration(i,n?n.toString():void 0):void 0,r={get:(e,t)=>s?s.get(e,t):t,has:e=>!!s&&s.has(e),inspect:t,update:t};return Object.assign(r,{toJSON:()=>s?s.toJSON():void 0})},get onDidChangeConfiguration(){const t=e();return t.workspace.configurations?t.workspace.configurations.onDidChangeConfiguration:r.Event.None},get workspaceFolders(){const t=e();if("workspaceFolders"in t.workspace)return t.workspace.workspaceFolders;const n=t.workspace.rootUri;if(!n)return;const o=i.parse(n);return[{uri:o,index:0,name:o.toString()}]},get onDidChangeWorkspaceFolders(){return e().workspace.onDidChangeWorkspaceFolders||r.Event.None},get textDocuments(){return e().workspace.textDocuments},get onDidOpenTextDocument(){return e().workspace.onDidOpenTextDocument},get onDidCloseTextDocument(){return e().workspace.onDidCloseTextDocument},get onDidChangeTextDocument(){const t=e();return(e,i,n)=>t.workspace.onDidChangeTextDocument((({textDocument:t,contentChanges:n,isRedoing:o,isUndoing:s})=>{e.bind(i)({document:t,contentChanges:n,reason:s?d.Undo:o?d.Redo:void 0})}),void 0,n)},get onWillSaveTextDocument(){const t=e().workspace.onWillSaveTextDocument;return t?(e,i,n)=>t((({textDocument:t,reason:n,waitUntil:o})=>{e.bind(i)({document:t,reason:n,waitUntil:e=>{o&&o(e)}})}),void 0,n):r.Event.None},get onDidSaveTextDocument(){return e().workspace.onDidSaveTextDocument||r.Event.None},get onWillCreateFiles(){return r.Event.None},get onDidCreateFiles(){return r.Event.None},get onWillDeleteFiles(){return r.Event.None},get onDidDeleteFiles(){return r.Event.None},get onWillRenameFiles(){return r.Event.None},get onDidRenameFiles(){return r.Event.None},get onDidGrantWorkspaceTrust(){return r.Event.None},getWorkspaceFolder:t,asRelativePath:t,updateWorkspaceFolders:t,findFiles:t,saveAll:t,openTextDocument:t,registerTextDocumentContentProvider:t,registerTaskProvider:t,registerFileSystemProvider:t,openNotebookDocument:t,registerNotebookSerializer:t,notebookDocuments:[],onDidOpenNotebookDocument:t,onDidCloseNotebookDocument:t,isTrusted:!0,rootPath:void 0,name:void 0,onDidChangeNotebookDocument:t,onDidSaveNotebookDocument:t};class u{constructor(t){this.name=t||"default",this.services=e(),this.collection=this.services.languages.createDiagnosticCollection?this.services.languages.createDiagnosticCollection(t):void 0}entries(){}set(e,t){var i;e instanceof o.URI!==void 0?this.collection&&this.collection.set(e.toString(),null!==(i=t)&&void 0!==i?i:[]):e.forEach((e=>{this.set(e[0],e[1])}))}dispose(){this.collection&&this.collection.dispose()}delete(e){}clear(){}forEach(e,t){}get(e){}has(e){return!1}}const g={match(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));if(!r.DocumentIdentifier.is(i))throw new Error("unexpected document: "+JSON.stringify(i));return e().languages.match(n,i)?1:0},registerCallHierarchyProvider:(e,t)=>({dispose(){}}),createDiagnosticCollection:e=>new u(e),registerCompletionItemProvider(t,i,...n){const o=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(o))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:a}=e();if(!a.registerCompletionItemProvider)return s.Disposable.create((()=>{}));const c=i.resolveCompletionItem;return a.registerCompletionItemProvider(o,{provideCompletionItems({textDocument:e,position:t,context:n},o){var s;return i.provideCompletionItems(e,t,o,{triggerKind:null!==(s=null==n?void 0:n.triggerKind)&&void 0!==s?s:r.CompletionTriggerKind.Invoked,triggerCharacter:null==n?void 0:n.triggerCharacter})},resolveCompletionItem:c?(e,t)=>c(e,t):void 0},...n)},registerCodeActionsProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerCodeActionsProvider?o.registerCodeActionsProvider(n,{provideCodeActions:({textDocument:e,range:t,context:n},o)=>i.provideCodeActions(e,t,n,o),resolveCodeAction:i.resolveCodeAction?(e,t)=>i.resolveCodeAction(e,t):void 0}):s.Disposable.create((()=>{}))},registerCodeLensProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();if(!o.registerCodeLensProvider)return s.Disposable.create((()=>{}));const r=i.resolveCodeLens;return o.registerCodeLensProvider(n,{provideCodeLenses:({textDocument:e},t)=>i.provideCodeLenses(e,t),resolveCodeLens:r?(e,t)=>r(e,t):void 0})},registerDefinitionProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerDefinitionProvider?o.registerDefinitionProvider(n,{provideDefinition:({textDocument:e,position:t},n)=>i.provideDefinition(e,t,n)}):s.Disposable.create((()=>{}))},registerImplementationProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerImplementationProvider?o.registerImplementationProvider(n,{provideImplementation:({textDocument:e,position:t},n)=>i.provideImplementation(e,t,n)}):s.Disposable.create((()=>{}))},registerTypeDefinitionProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerTypeDefinitionProvider?o.registerTypeDefinitionProvider(n,{provideTypeDefinition:({textDocument:e,position:t},n)=>i.provideTypeDefinition(e,t,n)}):s.Disposable.create((()=>{}))},registerDeclarationProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerDeclarationProvider?o.registerDeclarationProvider(n,{provideDeclaration:({textDocument:e,position:t},n)=>i.provideDeclaration(e,t,n)}):s.Disposable.create((()=>{}))},registerHoverProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerHoverProvider?o.registerHoverProvider(n,{provideHover:({textDocument:e,position:t},n)=>i.provideHover(e,t,n)}):s.Disposable.create((()=>{}))},registerDocumentHighlightProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerDocumentHighlightProvider?o.registerDocumentHighlightProvider(n,{provideDocumentHighlights:({textDocument:e,position:t},n)=>i.provideDocumentHighlights(e,t,n)}):s.Disposable.create((()=>{}))},registerDocumentSymbolProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerDocumentSymbolProvider?o.registerDocumentSymbolProvider(n,{provideDocumentSymbols:({textDocument:e},t)=>i.provideDocumentSymbols(e,t)}):s.Disposable.create((()=>{}))},registerWorkspaceSymbolProvider(t){const{languages:i}=e();if(!i.registerWorkspaceSymbolProvider)return s.Disposable.create((()=>{}));const n=t.resolveWorkspaceSymbol;return i.registerWorkspaceSymbolProvider({provideWorkspaceSymbols:({query:e},i)=>t.provideWorkspaceSymbols(e,i),resolveWorkspaceSymbol:n?(e,t)=>n(e,t):void 0})},registerReferenceProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerReferenceProvider?o.registerReferenceProvider(n,{provideReferences:({textDocument:e,position:t,context:n},o)=>i.provideReferences(e,t,n,o)}):s.Disposable.create((()=>{}))},registerRenameProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerRenameProvider?o.registerRenameProvider(n,{provideRenameEdits:({textDocument:e,position:t,newName:n},o)=>i.provideRenameEdits(e,t,n,o)}):s.Disposable.create((()=>{}))},registerDocumentFormattingEditProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerDocumentFormattingEditProvider?o.registerDocumentFormattingEditProvider(n,{provideDocumentFormattingEdits:({textDocument:e,options:t},n)=>i.provideDocumentFormattingEdits(e,t,n)}):s.Disposable.create((()=>{}))},registerDocumentRangeFormattingEditProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerDocumentRangeFormattingEditProvider?o.registerDocumentRangeFormattingEditProvider(n,{provideDocumentRangeFormattingEdits:({textDocument:e,range:t,options:n},o)=>i.provideDocumentRangeFormattingEdits(e,t,n,o)}):s.Disposable.create((()=>{}))},registerOnTypeFormattingEditProvider(t,i,n,...o){const r=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(r))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:a}=e();return a.registerOnTypeFormattingEditProvider?a.registerOnTypeFormattingEditProvider(r,{provideOnTypeFormattingEdits:({textDocument:e,position:t,ch:n,options:o},s)=>i.provideOnTypeFormattingEdits(e,t,n,o,s)},n,...o):s.Disposable.create((()=>{}))},registerSignatureHelpProvider(t,i,n,...o){const r=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(r))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:a}=e();if(!a.registerSignatureHelpProvider)return s.Disposable.create((()=>{}));let c,d;return"string"==typeof n?c=[n,...o]:n&&(c=n.triggerCharacters,d=n.retriggerCharacters),a.registerSignatureHelpProvider(r,{triggerCharacters:c,retriggerCharacters:d,provideSignatureHelp:({textDocument:e,position:t},n,o)=>i.provideSignatureHelp(e,t,n,o)})},registerDocumentLinkProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();if(!o.registerDocumentLinkProvider)return s.Disposable.create((()=>{}));const r=i.resolveDocumentLink;return o.registerDocumentLinkProvider(n,{provideDocumentLinks:({textDocument:e},t)=>i.provideDocumentLinks(e,t),resolveDocumentLink:r?(e,t)=>r(e,t):void 0})},registerColorProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerColorProvider?o.registerColorProvider(n,{provideDocumentColors:({textDocument:e},t)=>i.provideDocumentColors(e,t),provideColorPresentations:({textDocument:e,color:t,range:n},o)=>i.provideColorPresentations(t,{document:e,range:n},o)}):s.Disposable.create((()=>{}))},registerFoldingRangeProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerFoldingRangeProvider?o.registerFoldingRangeProvider(n,{provideFoldingRanges:({textDocument:e},t)=>i.provideFoldingRanges(e,{},t)}):s.Disposable.create((()=>{}))},registerSelectionRangeProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerSelectionRangeProvider?o.registerSelectionRangeProvider(n,{provideSelectionRanges:({textDocument:e,positions:t},n)=>i.provideSelectionRanges(e,t,n)}):s.Disposable.create((()=>{}))},registerEvaluatableExpressionProvider:t,registerDocumentSemanticTokensProvider(t,i,n){const o=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(o))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:r}=e();return r.registerDocumentSemanticTokensProvider?r.registerDocumentSemanticTokensProvider(o,{onDidChange:i.onDidChangeSemanticTokens,provideDocumentSemanticTokens:({textDocument:e},t)=>i.provideDocumentSemanticTokens(e,t),provideDocumentSemanticTokensEdits:i.provideDocumentSemanticTokensEdits&&(({textDocument:e,previousResultId:t},n)=>i.provideDocumentSemanticTokensEdits(e,t,n))},n):s.Disposable.create((()=>{}))},registerDocumentRangeSemanticTokensProvider(t,i,n){const o=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(o))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:r}=e();return r.registerDocumentRangeSemanticTokensProvider?r.registerDocumentRangeSemanticTokensProvider(o,{provideDocumentRangeSemanticTokens:({textDocument:e,range:t},n)=>i.provideDocumentRangeSemanticTokens(e,t,n)},n):s.Disposable.create((()=>{}))},registerInlayHintsProvider(t,i){const n=Array.isArray(t)?t:[t];if(!l.DocumentSelector.is(n))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();if(!o.registerInlayHintsProvider)return s.Disposable.create((()=>{}));const r=i.resolveInlayHint;return o.registerInlayHintsProvider(n,{onDidChangeInlayHints:i.onDidChangeInlayHints,provideInlayHints:({textDocument:e,range:t},n)=>i.provideInlayHints(e,t,n),resolveInlayHint:r?(e,t)=>r(e,t):void 0})},registerInlineValuesProvider:t,getLanguages:t,setTextDocumentLanguage:t,getDiagnostics:t,setLanguageConfiguration:t,onDidChangeDiagnostics:t,registerLinkedEditingRangeProvider:t,createLanguageStatusItem:t,registerTypeHierarchyProvider:t};function p(t,i,...n){if("string"!=typeof i)throw new Error("unexpected message: "+JSON.stringify(i));const o=i;if(void 0!==n&&!Array.isArray(n))throw new Error("unexpected actions: "+JSON.stringify(n));const s=n||[],{window:r}=e();return r?r.showMessage(t,o,...s):Promise.resolve(void 0)}const m={showInformationMessage:p.bind(void 0,r.MessageType.Info),showWarningMessage:p.bind(void 0,r.MessageType.Warning),showErrorMessage:p.bind(void 0,r.MessageType.Error),createOutputChannel(i){const{window:n}=e(),o=n?n.createOutputChannel:void 0,s=o?o.bind(n)(i):void 0;return{name:i,append:s?s.append.bind(s):()=>{},appendLine:s?s.appendLine.bind(s):()=>{},clear:t,show:e=>{if(void 0!==e&&"boolean"!=typeof e)throw new Error("unexpected preserveFocus argument: "+JSON.stringify(e,void 0,4));return s?s.show(e):()=>{}},hide:t,replace:t,dispose:s?s.dispose.bind(s):()=>{}}},withProgress:(t,i)=>{const{window:n}=e();return n&&n.withProgress?n.withProgress(t,i):i({report:()=>{}},(new l.CancellationTokenSource).token)},showTextDocument:async(t,i,n)=>{var o;const{window:s}=e();let r;r="number"==typeof i?{viewColumn:i,preserveFocus:n}:i,s&&s.showTextDocument&&await s.showTextDocument(null!==(o=t.uri)&&void 0!==o?o:t,r)},createTextEditorDecorationType:t,showQuickPick:t,showWorkspaceFolderPick:t,showOpenDialog:t,showSaveDialog:t,showInputBox:t,createWebviewPanel:t,setStatusBarMessage:t,withScmProgress:t,createStatusBarItem:t,createTerminal:t,registerTreeDataProvider:t,createTreeView:t,registerWebviewPanelSerializer:t,get activeTextEditor(){return t()},get visibleTextEditors(){return t()},onDidChangeActiveTextEditor:t,onDidChangeVisibleTextEditors:t,onDidChangeTextEditorSelection:t,onDidChangeTextEditorVisibleRanges:t,onDidChangeTextEditorOptions:t,onDidChangeTextEditorViewColumn:t,get terminals(){return t()},get activeTerminal(){return t()},onDidChangeActiveTerminal:t,onDidOpenTerminal:t,onDidCloseTerminal:t,get state(){return t()},onDidChangeWindowState:t,createQuickPick:t,createInputBox:t,registerUriHandler:t,registerWebviewViewProvider:t,registerCustomEditorProvider:t,registerTerminalLinkProvider:t,get activeColorTheme(){return t()},onDidChangeActiveColorTheme:t,registerFileDecorationProvider:t,registerTerminalProfileProvider:t,onDidChangeTerminalState:t,get tabGroups(){return t()}},f={registerCommand(t,i,n){const{commands:o}=e();return o?o.registerCommand(t,i,n):s.Disposable.create((()=>{}))},registerTextEditorCommand:t,executeCommand:t,getCommands:t};class _{constructor(e){this.callOnDispose=e}static from(...e){let t=e;return new _((function(){if(t){for(const e of t)e&&"function"==typeof e.dispose&&e.dispose();t=void 0}}))}dispose(){this.callOnDispose()}}return{workspace:h,languages:g,window:m,commands:f,env:{appName:"Monaco",appRoot:"",language:navigator.language||"en-US",get uriScheme(){return t()},get clipboard(){return t()},get machineId(){return t()},get sessionId(){return t()},remoteName:void 0,shell:"",uiKind:2,asExternalUri:t,openExternal:async t=>{const{env:i}=e();return!(!i||!i.openExternal)&&i.openExternal(t)},get appHost(){return t()},isNewAppInstall:!1,isTelemetryEnabled:!1,onDidChangeTelemetryEnabled:t},Uri:i,CompletionItem:class{constructor(e,t){this.label=e,this.kind=t}},CodeLens:class{constructor(e,t){this.range=e,this.command=t}get isResolved(){return!!this.command}},DocumentLink:class{constructor(e,t){this.range=e,this.target=t}},CodeActionKind:n,CodeAction:class{constructor(e,t){this.title=e,this.kind=t}},Diagnostic:class{constructor(e,t,i=l.DiagnosticSeverity.Error){this.range=e,this.message=t,this.severity=i}},CallHierarchyItem:class{constructor(e,t,i,n,o,s){this.kind=e,this.name=t,this.detail=i,this.uri=n,this.range=o,this.selectionRange=s}},TypeHierarchyItem:class{constructor(e,t,i,n,o,s){this.kind=e,this.name=t,this.detail=i,this.uri=n,this.range=o,this.selectionRange=s}},SemanticTokens:class{constructor(e,t){this.data=e,this.resultId=t}},Disposable:_,SignatureHelpTriggerKind:r.SignatureHelpTriggerKind,DiagnosticSeverity:a.DiagnosticSeverity,EventEmitter:a.Emitter,CancellationTokenSource:l.CancellationTokenSource,ProgressLocation:a.ProgressLocation,TextDocumentChangeReason:d,SymbolInformation:class{constructor(e,t,i,n,o){this.name=e,this.kind=t,this.containerName=o,"string"==typeof i&&(this.containerName=i)}},InlayHint:class{constructor(e,t,i){this.position=e,this.label=t,this.kind=i}},CancellationError:c}}},6804:(e,t,i)=>{"use strict";const n=i(250),o=i(722);e.exports=(0,n.createVSCodeApi)(o.Services.get)},1023:e=>{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var i,n="",o=0,s=-1,r=0,a=0;a<=e.length;++a){if(a2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",o=0):o=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),s=a,r=0;continue}}else if(2===n.length||1===n.length){n="",o=0,s=a,r=0;continue}t&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+e.slice(s+1,a):n=e.slice(s+1,a),o=a-s-1;s=a,r=0}else 46===i&&-1!==r?++r:r=-1}return n}var n={resolve:function(){for(var e,n="",o=!1,s=arguments.length-1;s>=-1&&!o;s--){var r;s>=0?r=arguments[s]:(void 0===e&&(e=process.cwd()),r=e),t(r),0!==r.length&&(n=r+"/"+n,o=47===r.charCodeAt(0))}return n=i(n,!o),o?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!n)).length||n||(e="."),e.length>0&&o&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,i=0;i0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":n.normalize(e)},relative:function(e,i){if(t(e),t(i),e===i)return"";if((e=n.resolve(e))===(i=n.resolve(i)))return"";for(var o=1;oc){if(47===i.charCodeAt(a+h))return i.slice(a+h+1);if(0===h)return i.slice(a+h)}else r>c&&(47===e.charCodeAt(o+h)?d=h:0===h&&(d=0));break}var u=e.charCodeAt(o+h);if(u!==i.charCodeAt(a+h))break;47===u&&(d=h)}var g="";for(h=o+d+1;h<=s;++h)h!==s&&47!==e.charCodeAt(h)||(0===g.length?g+="..":g+="/..");return g.length>0?g+i.slice(a+d):(a+=d,47===i.charCodeAt(a)&&++a,i.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var i=e.charCodeAt(0),n=47===i,o=-1,s=!0,r=e.length-1;r>=1;--r)if(47===(i=e.charCodeAt(r))){if(!s){o=r;break}}else s=!1;return-1===o?n?"/":".":n&&1===o?"//":e.slice(0,o)},basename:function(e,i){if(void 0!==i&&"string"!=typeof i)throw new TypeError('"ext" argument must be a string');t(e);var n,o=0,s=-1,r=!0;if(void 0!==i&&i.length>0&&i.length<=e.length){if(i.length===e.length&&i===e)return"";var a=i.length-1,l=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!r){o=n+1;break}}else-1===l&&(r=!1,l=n+1),a>=0&&(c===i.charCodeAt(a)?-1==--a&&(s=n):(a=-1,s=l))}return o===s?s=l:-1===s&&(s=e.length),e.slice(o,s)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!r){o=n+1;break}}else-1===s&&(r=!1,s=n+1);return-1===s?"":e.slice(o,s)},extname:function(e){t(e);for(var i=-1,n=0,o=-1,s=!0,r=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===o&&(s=!1,o=a+1),46===l?-1===i?i=a:1!==r&&(r=1):-1!==i&&(r=-1);else if(!s){n=a+1;break}}return-1===i||-1===o||0===r||1===r&&i===o-1&&i===n+1?"":e.slice(i,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var i=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return i?i===t.root?i+n:i+"/"+n:n}(0,e)},parse:function(e){t(e);var i={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return i;var n,o=e.charCodeAt(0),s=47===o;s?(i.root="/",n=1):n=0;for(var r=-1,a=0,l=-1,c=!0,d=e.length-1,h=0;d>=n;--d)if(47!==(o=e.charCodeAt(d)))-1===l&&(c=!1,l=d+1),46===o?-1===r?r=d:1!==h&&(h=1):-1!==r&&(h=-1);else if(!c){a=d+1;break}return-1===r||-1===l||0===h||1===h&&r===l-1&&r===a+1?-1!==l&&(i.base=i.name=0===a&&s?e.slice(1,l):e.slice(a,l)):(0===a&&s?(i.name=e.slice(1,r),i.base=e.slice(1,l)):(i.name=e.slice(a,r),i.base=e.slice(a,l)),i.ext=e.slice(r,l)),a>0?i.dir=e.slice(0,a-1):s&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},6062:e=>{"use strict";var t=[];function i(e){for(var i=-1,n=0;n{"use strict";var t={};e.exports=function(e,i){var n=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},1173:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},7892:(e,t,i)=>{"use strict";e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},4036:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,o&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var s=i.sourceMap;s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},2464:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},5163:(e,t,i)=>{"use strict";i.r(t),i.d(t,{__assign:()=>s,__asyncDelegator:()=>w,__asyncGenerator:()=>C,__asyncValues:()=>y,__await:()=>b,__awaiter:()=>d,__classPrivateFieldGet:()=>L,__classPrivateFieldIn:()=>N,__classPrivateFieldSet:()=>E,__createBinding:()=>u,__decorate:()=>a,__exportStar:()=>g,__extends:()=>o,__generator:()=>h,__importDefault:()=>D,__importStar:()=>k,__makeTemplateObject:()=>S,__metadata:()=>c,__param:()=>l,__read:()=>m,__rest:()=>r,__spread:()=>f,__spreadArray:()=>v,__spreadArrays:()=>_,__values:()=>p});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var s=function(){return s=Object.assign||function(e){for(var t,i=1,n=arguments.length;i=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 l(e,t){return function(i,n){t(i,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function d(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))}function h(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(!((o=(o=r.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){r=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,s=i.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)r.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return r}function f(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(i=o[e](t)).value instanceof b?Promise.resolve(i.value.v).then(l,c):d(s[0][2],i)}catch(e){d(s[0][3],e)}var i}function l(e){a("next",e)}function c(e){a("throw",e)}function d(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function w(e){var t,i;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(i=!i)?{value:b(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function y(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,o,(t=e[i](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var x=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&u(t,e,i);return x(t,e),t}function D(e){return e&&e.__esModule?e:{default:e}}function L(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}function E(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,i):o?o.value=i:t.set(e,i),i}function N(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},1200:(e,t,i)=>{"use strict";e.exports=i(5953)},5953:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,i(3632).default.install();const s=i(5247);o(i(5247),t);class r extends s.AbstractMessageReader{constructor(e){super(),this._onData=new s.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",(e=>this.fireError(e))),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=r;class a extends s.AbstractMessageWriter{constructor(e){super(),this.context=e,this.errorCount=0,e.addEventListener("error",(e=>this.fireError(e)))}write(e){try{return this.context.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.BrowserMessageWriter=a,t.createMessageConnection=function(e,t,i,n){return void 0===i&&(i=s.NullLogger),s.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,s.createMessageConnection)(e,t,i,n)}},3632:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(5706),o=i(8437),s=i(5165),r=i(8652);class a extends r.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return a.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}a.emptyBuffer=new Uint8Array(0);class l{constructor(e){this.socket=e,this._onData=new s.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then((e=>{this._onData.fire(new Uint8Array(e))}),(()=>{(0,n.default)().console.error("Converting blob to array buffer failed.")}))},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),o.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),o.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),o.Disposable.create((()=>this.socket.removeEventListener("end",e)))}onData(e){return this._onData.event(e)}}class c{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),o.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),o.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),o.Disposable.create((()=>this.socket.removeEventListener("end",e)))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const d=new TextEncoder,h=Object.freeze({messageBuffer:Object.freeze({create:e=>new a(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(d.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new l(e),asWritableStream:e=>new c(e)}),console,timer:Object.freeze({setTimeout(e,t,...i){const n=setTimeout(e,t,...i);return{dispose:()=>clearTimeout(n)}},setImmediate(e,...t){const i=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(i)}},setInterval(e,t,...i){const n=setInterval(e,t,...i);return{dispose:()=>clearInterval(n)}}})});function u(){return h}!function(e){e.install=function(){n.default.install(h)}}(u||(u={})),t.default=u},5247:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetTraceNotification=t.TraceFormat=t.Trace=t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=void 0;const n=i(9141);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return n.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return n.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return n.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return n.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return n.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return n.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return n.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return n.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return n.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return n.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return n.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return n.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return n.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return n.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return n.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return n.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return n.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return n.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return n.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return n.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return n.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return n.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return n.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return n.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return n.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return n.ParameterStructures}});const o=i(7040);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return o.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return o.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return o.Touch}});const s=i(8437);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return s.Disposable}});const r=i(5165);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return r.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return r.Emitter}});const a=i(415);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const l=i(451);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return l.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return l.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return l.ReadableStreamMessageReader}});const c=i(1251);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return c.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return c.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return c.WriteableStreamMessageWriter}});const d=i(1908);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return d.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return d.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return d.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return d.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return d.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return d.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return d.Trace}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return d.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return d.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return d.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return d.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return d.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return d.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return d.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return d.CancellationStrategy}});const h=i(5706);t.RAL=h.default},415:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const n=i(5706),o=i(8811),s=i(5165);var r;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:s.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s.Event.None}),e.is=function(t){const i=t;return i&&(i===e.None||i===e.Cancelled||o.boolean(i.isCancellationRequested)&&!!i.onCancellationRequested)}}(r=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const i=(0,n.default)().timer.setTimeout(e.bind(t),0);return{dispose(){i.dispose()}}}));class l{constructor(){this._isCancelled=!1}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?a:(this._emitter||(this._emitter=new s.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=r.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=r.None}}},1908:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const n=i(5706),o=i(8811),s=i(9141),r=i(7040),a=i(5165),l=i(415);var c,d,h,u,g,p,m,f,_,v,b,C,w,y;!function(e){e.type=new s.NotificationType("$/cancelRequest")}(c||(c={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(d=t.ProgressToken||(t.ProgressToken={})),function(e){e.type=new s.NotificationType("$/progress")}(h||(h={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return o.func(e)}}(u||(u={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(g=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){if(!o.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(g=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return o.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(p=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new s.NotificationType("$/setTrace")}(m=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new s.NotificationType("$/logTrace")}(f=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(_=t.ConnectionErrors||(t.ConnectionErrors={}));class S extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,S.prototype)}}t.ConnectionError=S,function(e){e.is=function(e){const t=e;return t&&o.func(t.cancelUndispatched)}}(v=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new l.CancellationTokenSource}),e.is=function(e){const t=e;return t&&o.func(t.createCancellationTokenSource)}}(b=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(c.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&o.func(t.sendCancellation)&&o.func(t.cleanup)}}(C=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:b.Message,sender:C.Message}),e.is=function(e){const t=e;return t&&b.is(t.receiver)&&C.is(t.sender)}}(w=t.CancellationStrategy||(t.CancellationStrategy={})),(t.ConnectionOptions||(t.ConnectionOptions={})).is=function(e){const t=e;return t&&(w.is(t.cancellationStrategy)||v.is(t.connectionStrategy))},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(y||(y={})),t.createMessageConnection=function(e,i,v,b){const C=void 0!==v?v:t.NullLogger;let x=0,k=0,D=0;const L="2.0";let E;const N=new Map;let I;const T=new Map,M=new Map;let R,P,A=new r.LinkedMap,O=new Map,F=new Set,W=new Map,B=g.Off,V=p.Text,H=y.New;const z=new a.Emitter,j=new a.Emitter,q=new a.Emitter,K=new a.Emitter,U=new a.Emitter,$=b&&b.cancellationStrategy?b.cancellationStrategy:w.Message;function Z(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function G(e){}function Y(){return H===y.Listening}function X(){return H===y.Closed}function J(){return H===y.Disposed}function Q(){H!==y.New&&H!==y.Listening||(H=y.Closed,j.fire(void 0))}function ee(){R||0===A.size||(R=(0,n.default)().timer.setImmediate((()=>{R=void 0,function(){if(0===A.size)return;const e=A.shift();try{s.Message.isRequest(e)?function(e){if(J())return;function t(t,n,o){const r={jsonrpc:L,id:e.id};t instanceof s.ResponseError?r.error=t.toJson():r.result=void 0===t?null:t,ne(r,n,o),i.write(r).catch((()=>C.error("Sending response failed.")))}function n(t,n,o){const s={jsonrpc:L,id:e.id,error:t.toJson()};ne(s,n,o),i.write(s).catch((()=>C.error("Sending response failed.")))}!function(e){if(B!==g.Off&&P)if(V===p.Text){let t;B!==g.Verbose&&B!==g.Compact||!e.params||(t=`Params: ${ie(e.params)}\n\n`),P.log(`Received request '${e.method} - (${e.id})'.`,t)}else se("receive-request",e)}(e);const r=N.get(e.method);let a,l;r&&(a=r.type,l=r.handler);const c=Date.now();if(l||E){const r=e.id??String(Date.now()),d=$.receiver.createCancellationTokenSource(r);null!==e.id&&F.has(e.id)&&d.cancel(),null!==e.id&&W.set(r,d);try{let h;if(l)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void n(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,c);h=l(d.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===s.ParameterStructures.byName)return void n(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,c);h=l(...e.params,d.token)}else{if(void 0!==a&&a.parameterStructures===s.ParameterStructures.byPosition)return void n(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,c);h=l(e.params,d.token)}else E&&(h=E(e.method,e.params,d.token));const u=h;h?u.then?u.then((i=>{W.delete(r),t(i,e.method,c)}),(t=>{W.delete(r),t instanceof s.ResponseError?n(t,e.method,c):t&&o.string(t.message)?n(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,c):n(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)})):(W.delete(r),t(h,e.method,c)):(W.delete(r),function(t,n,o){void 0===t&&(t=null);const s={jsonrpc:L,id:e.id,result:t};ne(s,n,o),i.write(s).catch((()=>C.error("Sending response failed.")))}(h,e.method,c))}catch(i){W.delete(r),i instanceof s.ResponseError?t(i,e.method,c):i&&o.string(i.message)?n(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${i.message}`),e.method,c):n(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}}else n(new s.ResponseError(s.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,c)}(e):s.Message.isNotification(e)?function(e){if(J())return;let t,i;if(e.method===c.type.method){const t=e.params.id;return F.delete(t),void oe(e)}{const n=T.get(e.method);n&&(i=n.handler,t=n.type)}if(i||I)try{if(oe(e),i)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==s.ParameterStructures.byName&&C.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),i();else if(Array.isArray(e.params)){const n=e.params;e.method===h.type.method&&2===n.length&&d.is(n[0])?i({token:n[0],value:n[1]}):(void 0!==t&&(t.parameterStructures===s.ParameterStructures.byName&&C.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&C.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${n.length} arguments`)),i(...n))}else void 0!==t&&t.parameterStructures===s.ParameterStructures.byPosition&&C.error(`Notification ${e.method} defines parameters by position but received parameters by name`),i(e.params);else I&&I(e.method,e.params)}catch(t){t.message?C.error(`Notification handler '${e.method}' failed with message: ${t.message}`):C.error(`Notification handler '${e.method}' failed unexpectedly.`)}else q.fire(e)}(e):s.Message.isResponse(e)?function(e){if(!J())if(null===e.id)e.error?C.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):C.error("Received response message without id. No further error information provided.");else{const t=e.id,i=O.get(t);if(function(e,t){if(B!==g.Off&&P)if(V===p.Text){let i;if(B!==g.Verbose&&B!==g.Compact||(e.error&&e.error.data?i=`Error data: ${ie(e.error.data)}\n\n`:e.result?i=`Result: ${ie(e.result)}\n\n`:void 0===e.error&&(i="No result returned.\n\n")),t){const n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";P.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,i)}else P.log(`Received response ${e.id} without active response promise.`,i)}else se("receive-response",e)}(e,i),void 0!==i){O.delete(t);try{if(e.error){const t=e.error;i.reject(new s.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");i.resolve(e.result)}}catch(e){e.message?C.error(`Response handler '${i.method}' failed with message: ${e.message}`):C.error(`Response handler '${i.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void C.error("Received empty message.");C.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(o.string(t.id)||o.number(t.id)){const e=t.id,i=O.get(e);i&&i.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{ee()}}()})))}e.onClose(Q),e.onError((function(e){z.fire([e,void 0,void 0])})),i.onClose(Q),i.onError((function(e){z.fire(e)}));const te=e=>{try{if(s.Message.isNotification(e)&&e.method===c.type.method){const t=e.params.id,n=Z(t),o=A.get(n);if(s.Message.isRequest(o)){const s=b?.connectionStrategy,r=s&&s.cancelUndispatched?s.cancelUndispatched(o,G):void 0;if(r&&(void 0!==r.error||void 0!==r.result))return A.delete(n),W.delete(t),r.id=o.id,ne(r,e.method,Date.now()),void i.write(r).catch((()=>C.error("Sending response for canceled message failed.")))}const r=W.get(t);if(void 0!==r)return r.cancel(),void oe(e);F.add(t)}!function(e,t){var i;s.Message.isRequest(t)?e.set(Z(t.id),t):s.Message.isResponse(t)?e.set(null===(i=t.id)?"res-unknown-"+(++D).toString():"res-"+i.toString(),t):e.set("not-"+(++k).toString(),t)}(A,e)}finally{ee()}};function ie(e){if(null!=e)switch(B){case g.Verbose:return JSON.stringify(e,null,4);case g.Compact:return JSON.stringify(e);default:return}}function ne(e,t,i){if(B!==g.Off&&P)if(V===p.Text){let n;B!==g.Verbose&&B!==g.Compact||(e.error&&e.error.data?n=`Error data: ${ie(e.error.data)}\n\n`:e.result?n=`Result: ${ie(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),P.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-i}ms`,n)}else se("send-response",e)}function oe(e){if(B!==g.Off&&P&&e.method!==f.type.method)if(V===p.Text){let t;B!==g.Verbose&&B!==g.Compact||(t=e.params?`Params: ${ie(e.params)}\n\n`:"No parameters provided.\n\n"),P.log(`Received notification '${e.method}'.`,t)}else se("receive-notification",e)}function se(e,t){if(!P||B===g.Off)return;const i={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};P.log(i)}function re(){if(X())throw new S(_.Closed,"Connection is closed.");if(J())throw new S(_.Disposed,"Connection is disposed.")}function ae(e){return void 0===e?null:e}function le(e){return null===e?void 0:e}function ce(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function de(e,t){switch(e){case s.ParameterStructures.auto:return ce(t)?le(t):[ae(t)];case s.ParameterStructures.byName:if(!ce(t))throw new Error("Received parameters by name but param is not an object literal.");return le(t);case s.ParameterStructures.byPosition:return[ae(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function he(e,t){let i;const n=e.numberOfParams;switch(n){case 0:i=void 0;break;case 1:i=de(e.parameterStructures,t[0]);break;default:i=[];for(let e=0;e{let n,r;if(re(),o.string(e)){n=e;const i=t[0];let o=0,a=s.ParameterStructures.auto;s.ParameterStructures.is(i)&&(o=1,a=i);let l=t.length;const c=l-o;switch(c){case 0:r=void 0;break;case 1:r=de(a,t[o]);break;default:if(a===s.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' notification parameter structure.`);r=t.slice(o,l).map((e=>ae(e)))}}else{const i=t;n=e.method,r=he(e,i)}const a={jsonrpc:L,method:n,params:r};return function(e){if(B!==g.Off&&P)if(V===p.Text){let t;B!==g.Verbose&&B!==g.Compact||(t=e.params?`Params: ${ie(e.params)}\n\n`:"No parameters provided.\n\n"),P.log(`Sending notification '${e.method}'.`,t)}else se("send-notification",e)}(a),i.write(a).catch((()=>C.error("Sending notification failed.")))},onNotification:(e,t)=>{let i;return re(),o.func(e)?I=e:t&&(o.string(e)?(i=e,T.set(e,{type:void 0,handler:t})):(i=e.method,T.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==i?T.delete(i):I=void 0}}},onProgress:(e,t,i)=>{if(M.has(t))throw new Error(`Progress handler for token ${t} already registered`);return M.set(t,i),{dispose:()=>{M.delete(t)}}},sendProgress:(e,t,i)=>ue.sendNotification(h.type,{token:t,value:i}),onUnhandledProgress:K.event,sendRequest:(e,...t)=>{let n,r,a;if(re(),function(){if(!Y())throw new Error("Call listen() first.")}(),o.string(e)){n=e;const i=t[0],o=t[t.length-1];let c=0,d=s.ParameterStructures.auto;s.ParameterStructures.is(i)&&(c=1,d=i);let h=t.length;l.CancellationToken.is(o)&&(h-=1,a=o);const u=h-c;switch(u){case 0:r=void 0;break;case 1:r=de(d,t[c]);break;default:if(d===s.ParameterStructures.byName)throw new Error(`Received ${u} parameters for 'by Name' request parameter structure.`);r=t.slice(c,h).map((e=>ae(e)))}}else{const i=t;n=e.method,r=he(e,i);const o=e.numberOfParams;a=l.CancellationToken.is(i[o])?i[o]:void 0}const c=x++;let d;return a&&(d=a.onCancellationRequested((()=>{const e=$.sender.sendCancellation(ue,c);return void 0===e?(C.log(`Received no promise from cancellation strategy when cancelling id ${c}`),Promise.resolve()):e.catch((()=>{C.log(`Sending cancellation messages for id ${c} failed`)}))}))),new Promise(((e,t)=>{const o={jsonrpc:L,id:c,method:n,params:r};let a={method:n,timerStart:Date.now(),resolve:t=>{e(t),$.sender.cleanup(c),d?.dispose()},reject:e=>{t(e),$.sender.cleanup(c),d?.dispose()}};!function(e){if(B!==g.Off&&P)if(V===p.Text){let t;B!==g.Verbose&&B!==g.Compact||!e.params||(t=`Params: ${ie(e.params)}\n\n`),P.log(`Sending request '${e.method} - (${e.id})'.`,t)}else se("send-request",e)}(o);try{i.write(o).catch((()=>C.error("Sending request failed.")))}catch(e){a.reject(new s.ResponseError(s.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&O.set(c,a)}))},onRequest:(e,t)=>{re();let i=null;return u.is(e)?(i=void 0,E=e):o.string(e)?(i=null,void 0!==t&&(i=e,N.set(e,{handler:t,type:void 0}))):void 0!==t&&(i=e.method,N.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==i&&(void 0!==i?N.delete(i):E=void 0)}}},hasPendingResponse:()=>O.size>0,trace:async(e,t,i)=>{let n=!1,s=p.Text;void 0!==i&&(o.boolean(i)?n=i:(n=i.sendNotification||!1,s=i.traceFormat||p.Text)),B=e,V=s,P=B===g.Off?void 0:t,!n||X()||J()||await ue.sendNotification(m.type,{value:g.toString(e)})},onError:z.event,onClose:j.event,onUnhandledNotification:q.event,onDispose:U.event,end:()=>{i.end()},dispose:()=>{if(J())return;H=y.Disposed,U.fire(void 0);const t=new s.ResponseError(s.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of O.values())e.reject(t);O=new Map,W=new Map,F=new Set,A=new r.LinkedMap,o.func(i.dispose)&&i.dispose(),o.func(e.dispose)&&e.dispose()},listen:()=>{re(),function(){if(Y())throw new S(_.AlreadyListening,"Connection is already listening")}(),H=y.Listening,e.listen(te)},inspect:()=>{(0,n.default)().console.log("inspect")}};return ue.onNotification(f.type,(e=>{if(B===g.Off||!P)return;const t=B===g.Verbose||B===g.Compact;P.log(e.message,t?e.verbose:void 0)})),ue.onNotification(h.type,(e=>{const t=M.get(e.token);t?t(e.value):K.fire(e)})),ue}},8437:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}}},5165:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const n=i(5706);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class o{add(e,t=null,i){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(i)&&i.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let i=!1;for(let n=0,o=this._callbacks.length;n{this._callbacks||(this._callbacks=new o),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const n={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),n.dispose=s._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(i)&&i.push(n),n}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=s,s._noop=function(){}},8811:(e,t)=>{"use strict";function i(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every((e=>i(e)))}},7040:(e,t)=>{"use strict";var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(n=t.Touch||(t.Touch={}));class o{constructor(){this[i]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=n.None){const i=this._map.get(e);if(i)return t!==n.None&&this.touch(i,t),i.value}set(e,t,i=n.None){let o=this._map.get(e);if(o)o.value=t,i!==n.None&&this.touch(o,i);else{switch(o={key:e,value:t,next:void 0,previous:void 0},i){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),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._state;let t=this._head;const i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this._state;let t=this._head;const i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this._state;let t=this._head;const i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return i}[(i=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(t===n.First||t===n.Last)if(t===n.First){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(t===n.Last){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)}}t.LinkedMap=o,t.LRUCache=class extends o{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 ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},8652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(){if(0===this._chunks.length)return;let e=0,t=0,i=0,n=0;e:for(;tthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],i=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,i}const t=this.allocNative(e);let i=0;for(;e>0;){const n=this._chunks[0];if(n.byteLength>e){const o=n.slice(0,e);t.set(o,i),i+=e,this._chunks[0]=n.slice(e),this._totalLength-=e,e-=e}else t.set(n,i),i+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,e-=n.byteLength}return t}}},451:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const n=i(5706),o=i(8811),s=i(5165);var r;(t.MessageReader||(t.MessageReader={})).is=function(e){let t=e;return t&&o.func(t.listen)&&o.func(t.dispose)&&o.func(t.onError)&&o.func(t.onClose)&&o.func(t.onPartialMessage)};class a{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter,this.partialMessageEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=a,function(e){e.fromOptions=function(e){let t,i;const o=new Map;let s;const r=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(i=e.contentDecoder,o.set(i.name,i)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)o.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(s=e.contentTypeDecoder,r.set(s.name,s)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)r.set(t.name,t)}return void 0===s&&(s=(0,n.default)().applicationJson.decoder,r.set(s.name,s)),{charset:t,contentDecoder:i,contentDecoders:o,contentTypeDecoder:s,contentTypeDecoders:r}}}(r||(r={})),t.ReadableStreamMessageReader=class extends a{constructor(e,t){super(),this.readable=e,this.options=r.fromOptions(t),this.buffer=(0,n.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders();if(!e)return;const t=e.get("Content-Length");if(!t)throw new Error("Header must provide a Content-Length property.");const i=parseInt(t);if(isNaN(i))throw new Error("Content-Length value must be a number.");this.nextMessageLength=i}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();let t;this.clearPartialMessageTimer(),this.nextMessageLength=-1,t=void 0!==this.options.contentDecoder?this.options.contentDecoder.decode(e):Promise.resolve(e),t.then((e=>{this.options.contentTypeDecoder.decode(e,this.options).then((e=>{this.callback(e)}),(e=>{this.fireError(e)}))}),(e=>{this.fireError(e)}))}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,n.default)().timer.setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},1251:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const n=i(5706),o=i(8811),s=i(2339),r=i(5165);var a;(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&o.func(t.dispose)&&o.func(t.onClose)&&o.func(t.onError)&&o.func(t.write)};class l{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,i){this.errorEmitter.fire([this.asError(e),t,i])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=l,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,n.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,n.default)().applicationJson.encoder}}}(a||(a={})),t.WriteableStreamMessageWriter=class extends l{constructor(e,t){super(),this.writable=e,this.options=a.fromOptions(t),this.errorCount=0,this.writeSemaphore=new s.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const i=[];return i.push("Content-Length: ",t.byteLength.toString(),"\r\n"),i.push("\r\n"),this.doWrite(e,i,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,i){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(i)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},9141:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const n=i(8811);var o,s;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(o=t.ErrorCodes||(t.ErrorCodes={}));class r extends Error{constructor(e,t,i){super(t),this.code=n.number(e)?e:o.UnknownErrorCode,this.data=i,Object.setPrototypeOf(this,r.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=r;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class l{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=l,t.RequestType0=class extends l{constructor(e){super(e,0)}},t.RequestType=class extends l{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends l{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends l{constructor(e){super(e,2)}},t.RequestType3=class extends l{constructor(e){super(e,3)}},t.RequestType4=class extends l{constructor(e){super(e,4)}},t.RequestType5=class extends l{constructor(e){super(e,5)}},t.RequestType6=class extends l{constructor(e){super(e,6)}},t.RequestType7=class extends l{constructor(e){super(e,7)}},t.RequestType8=class extends l{constructor(e){super(e,8)}},t.RequestType9=class extends l{constructor(e){super(e,9)}},t.NotificationType=class extends l{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends l{constructor(e){super(e,0)}},t.NotificationType1=class extends l{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends l{constructor(e){super(e,2)}},t.NotificationType3=class extends l{constructor(e){super(e,3)}},t.NotificationType4=class extends l{constructor(e){super(e,4)}},t.NotificationType5=class extends l{constructor(e){super(e,5)}},t.NotificationType6=class extends l{constructor(e){super(e,6)}},t.NotificationType7=class extends l{constructor(e){super(e,7)}},t.NotificationType8=class extends l{constructor(e){super(e,8)}},t.NotificationType9=class extends l{constructor(e){super(e,9)}},(s=t.Message||(t.Message={})).isRequest=function(e){const t=e;return t&&n.string(t.method)&&(n.string(t.id)||n.number(t.id))},s.isNotification=function(e){const t=e;return t&&n.string(t.method)&&void 0===e.id},s.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(n.string(t.id)||n.number(t.id)||null===t.id)}},5706:(e,t)=>{"use strict";let i;function n(){if(void 0===i)throw new Error("No runtime abstraction layer installed");return i}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");i=e}}(n||(n={})),t.default=n},2339:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const n=i(5706);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,i)=>{this._waiting.push({thunk:e,resolve:t,reject:i}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,n.default)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},5393:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const n=i(6804),o=i(294),s=i(7482);class r{constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,i){const n=this.client,s=this.middleware,r=(e,t,i)=>{const s=n.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return n.sendRequest(o.CallHierarchyPrepareRequest.type,s,i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyItems(e,i)),(e=>n.handleFailedRequest(o.CallHierarchyPrepareRequest.type,i,e,null)))};return s.prepareCallHierarchy?s.prepareCallHierarchy(e,t,i,r):r(e,t,i)}provideCallHierarchyIncomingCalls(e,t){const i=this.client,n=this.middleware,s=(e,t)=>{const n={item:i.code2ProtocolConverter.asCallHierarchyItem(e)};return i.sendRequest(o.CallHierarchyIncomingCallsRequest.type,n,t).then((e=>t.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyIncomingCalls(e,t)),(e=>i.handleFailedRequest(o.CallHierarchyIncomingCallsRequest.type,t,e,null)))};return n.provideCallHierarchyIncomingCalls?n.provideCallHierarchyIncomingCalls(e,t,s):s(e,t)}provideCallHierarchyOutgoingCalls(e,t){const i=this.client,n=this.middleware,s=(e,t)=>{const n={item:i.code2ProtocolConverter.asCallHierarchyItem(e)};return i.sendRequest(o.CallHierarchyOutgoingCallsRequest.type,n,t).then((e=>t.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyOutgoingCalls(e,t)),(e=>i.handleFailedRequest(o.CallHierarchyOutgoingCallsRequest.type,t,e,null)))};return n.provideCallHierarchyOutgoingCalls?n.provideCallHierarchyOutgoingCalls(e,t,s):s(e,t)}}class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){const t=e;(0,s.ensure)((0,s.ensure)(t,"textDocument"),"callHierarchy").dynamicRegistration=!0}initialize(e,t){const[i,n]=this.getRegistration(t,e.callHierarchyProvider);i&&n&&this.register({id:i,registerOptions:n})}registerLanguageProvider(e){const t=this._client,i=new r(t);return[n.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),i),i]}}t.CallHierarchyFeature=a},9343:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.BaseLanguageClient=t.MessageTransports=t.SuspendMode=t.State=t.CloseAction=t.ErrorAction=t.RevealOutputChannelOn=void 0;const n=i(6804),o=i(294),s=i(895),r=i(1011),a=i(4652),l=i(899),c=i(2667),d=i(5984),h=i(7482),u=i(7801),g=i(2488),p=i(5122),m=i(7583),f=i(4976),_=i(9259),v=i(5985),b=i(7548),C=i(7853),w=i(253),y=i(1854),S=i(2318),x=i(5973),k=i(5824),D=i(8314),L=i(6991),E=i(1108),N=i(2716),I=i(8029),T=i(3894),M=i(5122),R=i(7567),P=i(7349),A=i(9100),O=i(8357),F=i(6443),W=i(4778),B=i(4585),V=i(5393),H=i(1572),z=i(2925),j=i(4722),q=i(5783),K=i(1973),U=i(4462);var $,Z,G,Y,X,J,Q;!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}($=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(Z=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(G=t.CloseAction||(t.CloseAction={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.Running=2]="Running"}(Y=t.State||(t.State={})),(Q=t.SuspendMode||(t.SuspendMode={})).off="off",Q.on="on";class ee{constructor(e,t){this.client=e,this.maxRestartCount=t,this.restarts=[]}error(e,t,i){return i&&i<=3?{action:Z.Continue}:{action:Z.Shutdown}}closed(){return this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount?{action:G.Restart}:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?{action:G.DoNotRestart,message:`The ${this.client.name} server crashed ${this.maxRestartCount+1} times in the last 3 minutes. The server will not be restarted. See the output for more information.`}:(this.restarts.shift(),{action:G.Restart})}}!function(e){e.Initial="initial",e.Starting="starting",e.StartFailed="startFailed",e.Running="running",e.Stopping="stopping",e.Stopped="stopped"}(X||(X={})),(t.MessageTransports||(t.MessageTransports={})).is=function(e){return e&&o.MessageReader.is(e.reader)&&o.MessageWriter.is(e.writer)};class te{constructor(e,t,i){this._traceFormat=o.TraceFormat.Text,this._diagnosticQueue=new Map,this._diagnosticQueueState={state:"idle"},this._features=[],this._dynamicFeatures=new Map,this.workspaceEditLock=new l.Semaphore(1),this._id=e,this._name=t;const n={isTrusted:!1,supportHtml:!1};void 0!==(i=i||{}).markdown&&(n.isTrusted=!0===i.markdown.isTrusted,n.supportHtml=!0===i.markdown.supportHtml),this._clientOptions={documentSelector:i.documentSelector??[],synchronize:i.synchronize??{},diagnosticCollectionName:i.diagnosticCollectionName,outputChannelName:i.outputChannelName??this._name,revealOutputChannelOn:i.revealOutputChannelOn??$.Error,stdioEncoding:i.stdioEncoding??"utf8",initializationOptions:i.initializationOptions,initializationFailedHandler:i.initializationFailedHandler,progressOnInitialization:!!i.progressOnInitialization,errorHandler:i.errorHandler??this.createDefaultErrorHandler(i.connectionOptions?.maxRestartCount),middleware:i.middleware??{},uriConverters:i.uriConverters,workspaceFolder:i.workspaceFolder,connectionOptions:i.connectionOptions,markdown:n,diagnosticPullOptions:i.diagnosticPullOptions??{onChange:!0,onSave:!1},notebookDocumentOptions:i.notebookDocumentOptions??{}},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=X.Initial,this._ignoredRegistrations=new Set,this._notificationHandlers=new Map,this._pendingNotificationHandlers=new Map,this._notificationDisposables=new Map,this._requestHandlers=new Map,this._pendingRequestHandlers=new Map,this._requestDisposables=new Map,this._progressHandlers=new Map,this._pendingProgressHandlers=new Map,this._progressDisposables=new Map,this._connection=void 0,this._initializeResult=void 0,i.outputChannel?(this._outputChannel=i.outputChannel,this._disposeOutputChannel=!1):(this._outputChannel=void 0,this._disposeOutputChannel=!0),this._traceOutputChannel=i.traceOutputChannel,this._diagnostics=void 0,this._fileEvents=[],this._fileEventDelayer=new l.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new o.Emitter,this._stateChangeEmitter=new o.Emitter,this._trace=o.Trace.Off,this._tracer={log:(e,t)=>{a.string(e)?this.logTrace(e,t):this.logObjectTrace(e)}},this._c2p=s.createConverter(i.uriConverters?i.uriConverters.code2Protocol:void 0),this._p2c=r.createConverter(i.uriConverters?i.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}get name(){return this._name}get middleware(){return this._clientOptions.middleware??Object.create(null)}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=n.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}get state(){return this.getPublicState()}get $state(){return this._state}set $state(e){let t=this.getPublicState();this._state=e;let i=this.getPublicState();i!==t&&this._stateChangeEmitter.fire({oldState:t,newState:i})}getPublicState(){switch(this.$state){case X.Starting:return Y.Starting;case X.Running:return Y.Running;default:return Y.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===X.StartFailed||this.$state===X.Stopping||this.$state===X.Stopped)return Promise.reject(new o.ResponseError(o.ErrorCodes.ConnectionInactive,"Client is not running"));try{const i=await this.$start();return this.forceDocumentSync(),i.sendRequest(e,...t)}catch(t){throw this.error(`Sending request ${a.string(e)?e:e.method} failed.`,t),t}}onRequest(e,t){const i="string"==typeof e?e:e.method;this._requestHandlers.set(i,t);const n=this.activeConnection();let o;return void 0!==n?(this._requestDisposables.set(i,n.onRequest(e,t)),o={dispose:()=>{const e=this._requestDisposables.get(i);void 0!==e&&(e.dispose(),this._requestDisposables.delete(i))}}):(this._pendingRequestHandlers.set(i,t),o={dispose:()=>{this._pendingRequestHandlers.delete(i);const e=this._requestDisposables.get(i);void 0!==e&&(e.dispose(),this._requestDisposables.delete(i))}}),{dispose:()=>{this._requestHandlers.delete(i),o.dispose()}}}async sendNotification(e,t){if(this.$state===X.StartFailed||this.$state===X.Stopping||this.$state===X.Stopped)return Promise.reject(new o.ResponseError(o.ErrorCodes.ConnectionInactive,"Client is not running"));try{const i=await this.$start();return this.forceDocumentSync(),i.sendNotification(e,t)}catch(t){throw this.error(`Sending notification ${a.string(e)?e:e.method} failed.`,t),t}}onNotification(e,t){const i="string"==typeof e?e:e.method;this._notificationHandlers.set(i,t);const n=this.activeConnection();let o;return void 0!==n?(this._notificationDisposables.set(i,n.onNotification(e,t)),o={dispose:()=>{const e=this._notificationDisposables.get(i);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(i))}}):(this._pendingNotificationHandlers.set(i,t),o={dispose:()=>{this._pendingNotificationHandlers.delete(i);const e=this._notificationDisposables.get(i);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(i))}}),{dispose:()=>{this._notificationHandlers.delete(i),o.dispose()}}}async sendProgress(e,t,i){try{return(await this.$start()).sendProgress(e,t,i)}catch(e){throw this.error(`Sending progress for token ${t} failed.`,e),e}}onProgress(e,t,i){this._progressHandlers.set(t,{type:e,handler:i});const n=this.activeConnection();let s;const r=this._clientOptions.middleware?.handleWorkDoneProgress,a=o.WorkDoneProgress.is(e)&&void 0!==r?e=>{r(t,e,(()=>i(e)))}:i;return void 0!==n?(this._progressDisposables.set(t,n.onProgress(e,t,a)),s={dispose:()=>{const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}):(this._pendingProgressHandlers.set(t,{type:e,handler:i}),s={dispose:()=>{this._pendingProgressHandlers.delete(t);const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}),{dispose:()=>{this._progressHandlers.delete(t),s.dispose()}}}createDefaultErrorHandler(e){if(void 0!==e&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new ee(this,e??4)}async setTrace(e){this._trace=e;const t=this.activeConnection();void 0!==t&&await t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof o.ResponseError){const t=e;return` Message: ${t.message}\n Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?a.string(e.stack)?e.stack:e.message:a.string(e)?e:e.toString()}info(e,t,i=!0){this.outputChannel.appendLine(`[Info - ${(new Date).toLocaleTimeString()}] ${e}`),null!=t&&this.outputChannel.appendLine(this.data2String(t)),i&&this._clientOptions.revealOutputChannelOn<=$.Info&&this.showNotificationMessage(o.MessageType.Info,e)}warn(e,t,i=!0){this.outputChannel.appendLine(`[Warn - ${(new Date).toLocaleTimeString()}] ${e}`),null!=t&&this.outputChannel.appendLine(this.data2String(t)),i&&this._clientOptions.revealOutputChannelOn<=$.Warn&&this.showNotificationMessage(o.MessageType.Warning,e)}error(e,t,i=!0){this.outputChannel.appendLine(`[Error - ${(new Date).toLocaleTimeString()}] ${e}`),null!=t&&this.outputChannel.appendLine(this.data2String(t)),("force"===i||i&&this._clientOptions.revealOutputChannelOn<=$.Error)&&this.showNotificationMessage(o.MessageType.Error,e)}showNotificationMessage(e,t){t=t??"A request has failed. See the output for more information.",(e===o.MessageType.Error?n.window.showErrorMessage:e===o.MessageType.Warning?n.window.showWarningMessage:n.window.showInformationMessage)(t,"Go to output").then((e=>{void 0!==e&&this.outputChannel.show(!0)}))}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP - ${(new Date).toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(`${JSON.stringify(e)}`)}needsStart(){return this.$state===X.Initial||this.$state===X.Stopping||this.$state===X.Stopped}needsStop(){return this.$state===X.Starting||this.$state===X.Running}activeConnection(){return this.$state===X.Running&&void 0!==this._connection?this._connection:void 0}isRunning(){return this.$state===X.Running}async start(){if(void 0!==this._onStart)return this._onStart;const[e,t,i]=this.createOnStartPromise();this._onStart=e,void 0!==this._onStop&&(await this._onStop,this._onStop=void 0),void 0===this._diagnostics&&(this._diagnostics=this._clientOptions.diagnosticCollectionName?n.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):n.languages.createDiagnosticCollection());for(const[e,t]of this._notificationHandlers)this._pendingNotificationHandlers.has(e)||this._pendingNotificationHandlers.set(e,t);for(const[e,t]of this._requestHandlers)this._pendingRequestHandlers.has(e)||this._pendingRequestHandlers.set(e,t);for(const[e,t]of this._progressHandlers)this._pendingProgressHandlers.has(e)||this._pendingProgressHandlers.set(e,t);this.$state=X.Starting;try{const e=await this.createConnection();e.onNotification(o.LogMessageNotification.type,(e=>{switch(e.type){case o.MessageType.Error:this.error(e.message,void 0,!1);break;case o.MessageType.Warning:this.warn(e.message,void 0,!1);break;case o.MessageType.Info:this.info(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}})),e.onNotification(o.ShowMessageNotification.type,(e=>{switch(e.type){case o.MessageType.Error:n.window.showErrorMessage(e.message);break;case o.MessageType.Warning:n.window.showWarningMessage(e.message);break;case o.MessageType.Info:default:n.window.showInformationMessage(e.message)}})),e.onRequest(o.ShowMessageRequest.type,(e=>{let t;switch(e.type){case o.MessageType.Error:t=n.window.showErrorMessage;break;case o.MessageType.Warning:t=n.window.showWarningMessage;break;case o.MessageType.Info:default:t=n.window.showInformationMessage}let i=e.actions||[];return t(e.message,...i)})),e.onNotification(o.TelemetryEventNotification.type,(e=>{this._telemetryEmitter.fire(e)})),e.onRequest(o.ShowDocumentRequest.type,(async e=>{const t=async e=>{const t=this.protocol2CodeConverter.asUri(e.uri);try{if(!0===e.external)return{success:await n.env.openExternal(t)};{const i={};return void 0!==e.selection&&(i.selection=this.protocol2CodeConverter.asRange(e.selection)),void 0===e.takeFocus||!1===e.takeFocus?i.preserveFocus=!0:!0===e.takeFocus&&(i.preserveFocus=!1),await n.window.showTextDocument(t,i),{success:!0}}}catch(e){return{success:!0}}},i=this._clientOptions.middleware.window?.showDocument;return void 0!==i?i(e,t):t(e)})),e.listen(),await this.initialize(e),t()}catch(e){this.$state=X.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,e,"force"),i(e)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise(((i,n)=>{e=i,t=n})),e,t]}async initialize(e){this.refreshTrace(e,!1);const t=this._clientOptions.initializationOptions,[i,s]=void 0!==this._clientOptions.workspaceFolder?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],r={processId:null,clientInfo:{name:n.env.appName,version:n.version},locale:this.getLocale(),rootPath:i||null,rootUri:i?this._c2p.asUri(n.Uri.file(i)):null,capabilities:this.computeClientCapabilities(),initializationOptions:a.func(t)?t():t,trace:o.Trace.toString(this._trace),workspaceFolders:s};if(this.fillInitializeParams(r),!this._clientOptions.progressOnInitialization)return this.doInitialize(e,r);{const t=c.generateUuid(),i=new d.ProgressPart(e,t);r.workDoneToken=t;try{const t=await this.doInitialize(e,r);return i.done(),t}catch(e){throw i.cancel(),e}}}async doInitialize(e,t){try{const i=await e.initialize(t);if(void 0!==i.capabilities.positionEncoding&&i.capabilities.positionEncoding!==o.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${i.capabilities.positionEncoding}) received from server ${this.name}`);let n;this._initializeResult=i,this.$state=X.Running,a.number(i.capabilities.textDocumentSync)?n=i.capabilities.textDocumentSync===o.TextDocumentSyncKind.None?{openClose:!1,change:o.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:i.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==i.capabilities.textDocumentSync&&null!==i.capabilities.textDocumentSync&&(n=i.capabilities.textDocumentSync),this._capabilities=Object.assign({},i.capabilities,{resolvedTextDocumentSync:n}),e.onNotification(o.PublishDiagnosticsNotification.type,(e=>this.handleDiagnostics(e))),e.onRequest(o.RegistrationRequest.type,(e=>this.handleRegistrationRequest(e))),e.onRequest("client/registerFeature",(e=>this.handleRegistrationRequest(e))),e.onRequest(o.UnregistrationRequest.type,(e=>this.handleUnregistrationRequest(e))),e.onRequest("client/unregisterFeature",(e=>this.handleUnregistrationRequest(e))),e.onRequest(o.ApplyWorkspaceEditRequest.type,(e=>this.handleApplyWorkspaceEdit(e)));for(const[t,i]of this._pendingNotificationHandlers)this._notificationDisposables.set(t,e.onNotification(t,i));this._pendingNotificationHandlers.clear();for(const[t,i]of this._pendingRequestHandlers)this._requestDisposables.set(t,e.onRequest(t,i));this._pendingRequestHandlers.clear();for(const[t,i]of this._pendingProgressHandlers)this._progressDisposables.set(t,e.onProgress(i.type,t,i.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(o.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),i}catch(t){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):this.stop():t instanceof o.ResponseError&&t.data&&t.data.retry?n.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then((t=>{t&&"retry"===t.id?this.initialize(e):this.stop()})):(t&&t.message&&n.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop()),t}}_clientGetRootPath(){let e=n.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(e=2e3){return this.shutdown("stop",e)}suspend(){return this.shutdown("suspend",5e3)}async shutdown(e,t){if(this.$state===X.Stopped||this.$state===X.Initial)return;if(this.$state===X.Stopping&&this._onStop)return this._onStop;const i=await this.$start();this._initializeResult=void 0,this.$state=X.Stopping,this.cleanUp(e);const n=new Promise((e=>{(0,o.RAL)().timer.setTimeout(e,t)})),s=(async e=>(await e.shutdown(),await e.exit(),e))(i);return this._onStop=Promise.race([n,s]).then((e=>{if(void 0===e)throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out");e.end(),e.dispose()}),(e=>{throw this.error("Stopping server failed",e,!1),e})).finally((()=>{this.$state=X.Stopped,"stop"===e&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()}))}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel(),this._syncedDocuments&&this._syncedDocuments.clear();for(const e of Array.from(this._features.entries()).map((e=>e[1])).reverse())e.dispose();"stop"===e&&void 0!==this._diagnostics&&(this._diagnostics.dispose(),this._diagnostics=void 0),void 0!==this._idleInterval&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){void 0!==this._outputChannel&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){const t=this;async function i(e){return t._fileEvents.push(e),t._fileEventDelayer.trigger((async()=>{const e=await t.$start();t.forceDocumentSync();const i=e.sendNotification(o.DidChangeWatchedFilesNotification.type,{changes:t._fileEvents});return t._fileEvents=[],i}))}const n=this.clientOptions.middleware?.workspace;(n?.didChangeWatchedFile?n.didChangeWatchedFile(e,i):i(e)).catch((e=>{t.error("Notify file events failed.",e)}))}forceDocumentSync(){void 0===this._didChangeTextDocumentFeature&&(this._didChangeTextDocumentFeature=this._dynamicFeatures.get(o.DidChangeTextDocumentNotification.type.method)),this._didChangeTextDocumentFeature.forceDelivery()}handleDiagnostics(e){if(!this._diagnostics)return;const t=e.uri;"busy"===this._diagnosticQueueState.state&&this._diagnosticQueueState.document===t&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,o.RAL)().timer.setImmediate((()=>{this.workDiagnosticQueue()}))}workDiagnosticQueue(){if("busy"===this._diagnosticQueueState.state)return;const e=this._diagnosticQueue.entries().next();if(!0===e.done)return;const[t,i]=e.value;this._diagnosticQueue.delete(t);const o=new n.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:o},this._p2c.asDiagnostics(i,o.token).then((e=>{if(!o.token.isCancellationRequested){const i=this._p2c.asUri(t),n=this.clientOptions.middleware;n.handleDiagnostics?n.handleDiagnostics(i,e,((e,t)=>this.setDiagnostics(e,t))):this.setDiagnostics(i,e)}})).finally((()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()}))}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}async $start(){if(this.$state===X.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();const e=this.activeConnection();if(void 0===e)throw new Error("Starting server failed");return e}async createConnection(){const e=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=function(e,t,i,n,s){let r=-1;const l=new ie,c=(0,o.createProtocolConnection)(e,t,l,s);return c.onError((e=>{i(e[0],e[1],e[2])})),c.onClose(n),{get lastUsed(){return r},resetLastUsed:()=>{r=-1},listen:()=>c.listen(),sendRequest:(e,...t)=>(r=Date.now(),c.sendRequest(e,...t)),onRequest:(e,t)=>c.onRequest(e,t),hasPendingResponse:()=>c.hasPendingResponse(),sendNotification:(e,t)=>(r=Date.now(),c.sendNotification(e,t)),onNotification:(e,t)=>c.onNotification(e,t),onProgress:c.onProgress,sendProgress:c.sendProgress,trace:(e,t,i)=>{const n={sendNotification:!1,traceFormat:o.TraceFormat.Text};return void 0===i?c.trace(e,t,n):(a.boolean(i),c.trace(e,t,i))},initialize:e=>(r=Date.now(),c.sendRequest(o.InitializeRequest.type,e)),shutdown:()=>(r=Date.now(),c.sendRequest(o.ShutdownRequest.type,void 0)),exit:()=>(r=Date.now(),c.sendNotification(o.ExitNotification.type)),end:()=>c.end(),dispose:()=>c.dispose()}}(e.reader,e.writer,((e,t,i)=>{this.handleConnectionError(e,t,i)}),(()=>{this.handleConnectionClosed()}),this._clientOptions.connectionOptions),this._connection}handleConnectionClosed(){if(this.$state===X.Stopped)return;try{void 0!==this._connection&&this._connection.dispose()}catch(e){}let e={action:G.DoNotRestart};if(this.$state!==X.Stopping)try{e=this._clientOptions.errorHandler.closed()}catch(e){}this._connection=void 0,e.action===G.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,"force"),this.cleanUp("stop"),this.$state===X.Starting?this.$state=X.StartFailed:this.$state=X.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===G.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart."),this.cleanUp("restart"),this.$state=X.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch((e=>this.error("Restarting server failed",e,"force"))))}handleConnectionError(e,t,i){const n=this._clientOptions.errorHandler.error(e,t,i);n.action===Z.Shutdown&&(this.error(n.message??`Client ${this._name}: connection to server is erroring. Shutting down server.`,void 0,"force"),this.stop().catch((e=>{this.error("Stopping server failed",e,!1)})))}hookConfigurationChanged(e){n.workspace.onDidChangeConfiguration((()=>{this.refreshTrace(e,!0)}))}refreshTrace(e,t=!1){const i=n.workspace.getConfiguration(this._id);let s=o.Trace.Off,r=o.TraceFormat.Text;if(i){const e=i.get("trace.server","off");"string"==typeof e?s=o.Trace.fromString(e):(s=o.Trace.fromString(i.get("trace.server.verbosity","off")),r=o.TraceFormat.fromString(i.get("trace.server.format","text")))}this._trace=s,this._traceFormat=r,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch((e=>{this.error("Updating trace failed with error",e,!1)}))}hookFileEvents(e){let t,i=this._clientOptions.synchronize.fileEvents;i&&(t=a.array(i)?i:[i],t&&this._dynamicFeatures.get(o.DidChangeWatchedFilesNotification.type.method).registerRaw(c.generateUuid(),t))}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),h.DynamicFeature.is(e)){const t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){const t=this.getFeature(o.NotebookDocumentSyncRegistrationType.method);return void 0!==t&&t instanceof g.NotebookDocumentSyncFeature&&t.handles(e)}registerBuiltinFeatures(){this.registerFeature(new p.ConfigurationFeature(this)),this.registerFeature(new m.DidOpenTextDocumentFeature(this,this._syncedDocuments)),this.registerFeature(new m.DidChangeTextDocumentFeature(this)),this.registerFeature(new m.WillSaveFeature(this)),this.registerFeature(new m.WillSaveWaitUntilFeature(this)),this.registerFeature(new m.DidSaveTextDocumentFeature(this)),this.registerFeature(new m.DidCloseTextDocumentFeature(this,this._syncedDocuments)),this.registerFeature(new I.FileSystemWatcherFeature(this,(e=>this.notifyFileEvent(e)))),this.registerFeature(new f.CompletionItemFeature(this)),this.registerFeature(new _.HoverFeature(this)),this.registerFeature(new b.SignatureHelpFeature(this)),this.registerFeature(new v.DefinitionFeature(this)),this.registerFeature(new S.ReferencesFeature(this)),this.registerFeature(new C.DocumentHighlightFeature(this)),this.registerFeature(new w.DocumentSymbolFeature(this)),this.registerFeature(new y.WorkspaceSymbolFeature(this)),this.registerFeature(new x.CodeActionFeature(this)),this.registerFeature(new k.CodeLensFeature(this)),this.registerFeature(new D.DocumentFormattingFeature(this)),this.registerFeature(new D.DocumentRangeFormattingFeature(this)),this.registerFeature(new D.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new L.RenameFeature(this)),this.registerFeature(new E.DocumentLinkFeature(this)),this.registerFeature(new N.ExecuteCommandFeature(this)),this.registerFeature(new p.SyncConfigurationFeature(this)),this.registerFeature(new M.ConfigurationFeature(this)),this.registerFeature(new P.TypeDefinitionFeature(this)),this.registerFeature(new R.ImplementationFeature(this)),this.registerFeature(new T.ColorProviderFeature(this)),void 0===this.clientOptions.workspaceFolder&&this.registerFeature(new A.WorkspaceFoldersFeature(this)),this.registerFeature(new O.FoldingRangeFeature(this)),this.registerFeature(new F.DeclarationFeature(this)),this.registerFeature(new W.SelectionRangeFeature(this)),this.registerFeature(new B.ProgressFeature(this)),this.registerFeature(new V.CallHierarchyFeature(this)),this.registerFeature(new H.SemanticTokensFeature(this)),this.registerFeature(new j.LinkedEditingFeature(this)),this.registerFeature(new z.DidCreateFilesFeature(this)),this.registerFeature(new z.DidRenameFilesFeature(this)),this.registerFeature(new z.DidDeleteFilesFeature(this)),this.registerFeature(new z.WillCreateFilesFeature(this)),this.registerFeature(new z.WillRenameFilesFeature(this)),this.registerFeature(new z.WillDeleteFilesFeature(this)),this.registerFeature(new q.TypeHierarchyFeature(this)),this.registerFeature(new K.InlineValueFeature(this)),this.registerFeature(new U.InlayHintsFeature(this)),this.registerFeature(new u.DiagnosticFeature(this)),this.registerFeature(new g.NotebookDocumentSyncFeature(this))}registerProposedFeatures(){this.registerFeatures(J.createAll(this))}fillInitializeParams(e){for(let t of this._features)a.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){const e={};(0,h.ensure)(e,"workspace").applyEdit=!0;const t=(0,h.ensure)((0,h.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[o.ResourceOperationKind.Create,o.ResourceOperationKind.Rename,o.ResourceOperationKind.Delete],t.failureHandling=o.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0};const i=(0,h.ensure)((0,h.ensure)(e,"textDocument"),"publishDiagnostics");i.relatedInformation=!0,i.versionSupport=!1,i.tagSupport={valueSet:[o.DiagnosticTag.Unnecessary,o.DiagnosticTag.Deprecated]},i.codeDescriptionSupport=!0,i.dataSupport=!0;const n=(0,h.ensure)(e,"window");(0,h.ensure)(n,"showMessage").messageActionItem={additionalPropertiesSupport:!0},(0,h.ensure)(n,"showDocument").support=!0;const s=(0,h.ensure)(e,"general");s.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(te.RequestsToCancelOnContentModified)},s.regularExpressions={engine:"ECMAScript",version:"ES2020"},s.markdown={parser:"marked",version:"1.1.0"},s.positionEncodings=["utf-16"],this._clientOptions.markdown.supportHtml&&(s.markdown.allowedTags=["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"]);for(let t of this._features)t.fillClientCapabilities(e);return e}initializeFeatures(e){const t=this._clientOptions.documentSelector;for(const e of this._features)a.func(e.preInitialize)&&e.preInitialize(this._capabilities,t);for(const e of this._features)e.initialize(this._capabilities,t)}async handleRegistrationRequest(e){if(this.isRunning())for(const t of e.registrations){const e=this._dynamicFeatures.get(t.method);if(void 0===e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Registration failed.`));const i=t.registerOptions??{};i.documentSelector=i.documentSelector??this._clientOptions.documentSelector;const n={id:t.id,registerOptions:i};try{e.register(n)}catch(e){return Promise.reject(e)}}else for(const t of e.registrations)this._ignoredRegistrations.add(t.id)}async handleUnregistrationRequest(e){for(let t of e.unregisterations){if(this._ignoredRegistrations.has(t.id))continue;const e=this._dynamicFeatures.get(t.method);if(!e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));e.unregister(t.id)}}async handleApplyWorkspaceEdit(e){const t=e.edit,i=await this.workspaceEditLock.lock((()=>this._p2c.asWorkspaceEdit(t))),s=new Map;n.workspace.textDocuments.forEach((e=>s.set(e.uri.toString(),e)));let r=!1;if(t.documentChanges)for(const e of t.documentChanges)if(o.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){const t=s.get(e.textDocument.uri);if(t&&t.version!==e.textDocument.version){r=!0;break}}return r?Promise.resolve({applied:!1}):a.asPromise(n.workspace.applyEdit(i).then((e=>({applied:e}))))}handleFailedRequest(e,t,i,s,r=!0){if(i instanceof o.ResponseError){if(i.code===o.ErrorCodes.PendingResponseRejected||i.code===o.ErrorCodes.ConnectionInactive)return s;if(i.code===o.LSPErrorCodes.RequestCancelled||i.code===o.LSPErrorCodes.ServerCancelled){if(void 0!==t&&t.isCancellationRequested)return s;throw void 0!==i.data?new h.LSPCancellationError(i.data):new n.CancellationError}if(i.code===o.LSPErrorCodes.ContentModified){if(te.RequestsToCancelOnContentModified.has(e.method))throw new n.CancellationError;return s}}throw this.error(`Request ${e.method} failed.`,i,r),i}}t.BaseLanguageClient=te,te.RequestsToCancelOnContentModified=new Set([o.SemanticTokensRequest.method,o.SemanticTokensRangeRequest.method,o.SemanticTokensDeltaRequest.method]);class ie{error(e){(0,o.RAL)().console.error(e)}warn(e){(0,o.RAL)().console.warn(e)}info(e){(0,o.RAL)().console.info(e)}log(e){(0,o.RAL)().console.log(e)}}!function(e){e.createAll=function(e){return[]}}(J=t.ProposedFeatures||(t.ProposedFeatures={}))},5973:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionFeature=void 0;const n=i(6804),o=i(294),s=i(2667),r=i(7482);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.CodeActionRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[o.CodeActionKind.Empty,o.CodeActionKind.QuickFix,o.CodeActionKind.Refactor,o.CodeActionKind.RefactorExtract,o.CodeActionKind.RefactorInline,o.CodeActionKind.RefactorRewrite,o.CodeActionKind.Source,o.CodeActionKind.SourceOrganizeImports]}},t.honorsChangeAnnotations=!1}initialize(e,t){const i=this.getRegistrationOptions(t,e.codeActionProvider);i&&this.register({id:s.generateUuid(),registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,i={provideCodeActions:(e,t,i,n)=>{const s=this._client,r=async(e,t,i,n)=>{const r={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),range:s.code2ProtocolConverter.asRange(t),context:await s.code2ProtocolConverter.asCodeActionContext(i,n)};return s.sendRequest(o.CodeActionRequest.type,r,n).then((e=>n.isCancellationRequested||null==e?null:s.protocol2CodeConverter.asCodeActionResult(e,n)),(e=>s.handleFailedRequest(o.CodeActionRequest.type,n,e,null)))},a=s.middleware;return a.provideCodeActions?a.provideCodeActions(e,t,i,n,r):r(e,t,i,n)},resolveCodeAction:e.resolveProvider?(e,t)=>{const i=this._client,n=this._client.middleware,s=async(e,t)=>i.sendRequest(o.CodeActionResolveRequest.type,await i.code2ProtocolConverter.asCodeAction(e,t),t).then((n=>t.isCancellationRequested?e:i.protocol2CodeConverter.asCodeAction(n,t)),(n=>i.handleFailedRequest(o.CodeActionResolveRequest.type,t,n,e)));return n.resolveCodeAction?n.resolveCodeAction(e,t,s):s(e,t)}:void 0};return[n.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i,e.codeActionKinds?{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0),i]}}t.CodeActionFeature=a},895:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const n=i(6804),o=i(294),s=i(4652),r=i(899),a=i(9147),l=i(2817),c=i(8501),d=i(5958),h=i(8171),u=i(777),g=i(9585),p=i(6363),m=i(570);var f;!function(e){e.is=function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}}(f||(f={})),t.createConverter=function(e){const t=e||(e=>e.toString());function i(e){return t(e)}function _(e){return{uri:t(e.uri)}}function v(e){return{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}function b(e){switch(e){case n.TextDocumentSaveReason.Manual:return o.TextDocumentSaveReason.Manual;case n.TextDocumentSaveReason.AfterDelay:return o.TextDocumentSaveReason.AfterDelay;case n.TextDocumentSaveReason.FocusOut:return o.TextDocumentSaveReason.FocusOut}return o.TextDocumentSaveReason.Manual}function C(e){switch(e){case n.CompletionTriggerKind.TriggerCharacter:return o.CompletionTriggerKind.TriggerCharacter;case n.CompletionTriggerKind.TriggerForIncompleteCompletions:return o.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return o.CompletionTriggerKind.Invoked}}function w(e){switch(e){case n.SignatureHelpTriggerKind.Invoke:return o.SignatureHelpTriggerKind.Invoked;case n.SignatureHelpTriggerKind.TriggerCharacter:return o.SignatureHelpTriggerKind.TriggerCharacter;case n.SignatureHelpTriggerKind.ContentChange:return o.SignatureHelpTriggerKind.ContentChange}}function y(e){return{label:e.label}}function S(e){return{label:e.label,parameters:(t=e.parameters,t.map(y))};var t}function x(e){return{line:e.line,character:e.character}}function k(e){return null==e?e:{line:e.line>o.uinteger.MAX_VALUE?o.uinteger.MAX_VALUE:e.line,character:e.character>o.uinteger.MAX_VALUE?o.uinteger.MAX_VALUE:e.character}}function D(e){return null==e?e:{start:k(e.start),end:k(e.end)}}function L(e){return null==e?e:o.Location.create(i(e.uri),D(e.range))}function E(e){switch(e){case n.DiagnosticSeverity.Error:return o.DiagnosticSeverity.Error;case n.DiagnosticSeverity.Warning:return o.DiagnosticSeverity.Warning;case n.DiagnosticSeverity.Information:return o.DiagnosticSeverity.Information;case n.DiagnosticSeverity.Hint:return o.DiagnosticSeverity.Hint}}function N(e){switch(e){case n.DiagnosticTag.Unnecessary:return o.DiagnosticTag.Unnecessary;case n.DiagnosticTag.Deprecated:return o.DiagnosticTag.Deprecated;default:return}}function I(e){return{message:e.message,location:L(e.location)}}function T(e){const t=o.Diagnostic.create(D(e.range),e.message),n=e instanceof h.ProtocolDiagnostic?e:void 0;void 0!==n&&void 0!==n.data&&(t.data=n.data);const r=function(e){if(null!=e)return s.number(e)||s.string(e)?e:{value:e.value,target:i(e.target)}}(e.code);return h.DiagnosticCode.is(r)?void 0!==n&&n.hasDiagnosticCode?t.code=r:(t.code=r.value,t.codeDescription={href:r.target}):t.code=r,s.number(e.severity)&&(t.severity=E(e.severity)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let i of e){let e=N(i);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(I)),e.source&&(t.source=e.source),t}function M(e,t){return null==e?e:r.map(e,T,t)}function R(e){if(e===n.CompletionItemTag.Deprecated)return o.CompletionItemTag.Deprecated}function P(e){return{range:D(e.range),newText:e.newText}}function A(e){return null==e?e:e.map(P)}function O(e){return e<=n.SymbolKind.TypeParameter?e+1:o.SymbolKind.Property}function F(e){return e}function W(e){return e.map(F)}function B(e){let t=o.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}function V(e){const t=o.InlayHintLabelPart.create(e.value);return void 0!==e.location&&(t.location=L(e.location)),void 0!==e.command&&(t.command=B(e.command)),void 0!==e.tooltip&&(t.tooltip=H(e.tooltip)),t}function H(e){return"string"==typeof e?e:{kind:o.MarkupKind.Markdown,value:e.value}}return{asUri:i,asTextDocumentIdentifier:_,asTextDocumentItem:v,asVersionedTextDocumentIdentifier:function(e){return{uri:t(e.uri),version:e.version}},asOpenTextDocumentParams:function(e){return{textDocument:v(e)}},asChangeTextDocumentParams:function(e){if(function(e){let t=e;return!!t.uri&&!!t.version}(e))return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){let t=e;return!!t.document&&!!t.contentChanges}(e)){let i=e.document;return{textDocument:{uri:t(i.uri),version:i.version},contentChanges:e.contentChanges.map((e=>{let t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}}))}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:_(e)}},asSaveTextDocumentParams:function(e,t=!1){let i={textDocument:_(e)};return t&&(i.text=e.getText()),i},asWillSaveTextDocumentParams:function(e){return{textDocument:_(e.document),reason:b(e.reason)}},asDidCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asDidRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asDidDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asWillDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asTextDocumentPositionParams:function(e,t){return{textDocument:_(e),position:x(t)}},asCompletionParams:function(e,t,i){return{textDocument:_(e),position:x(t),context:{triggerKind:C(i.triggerKind),triggerCharacter:i.triggerCharacter}}},asSignatureHelpParams:function(e,t,i){return{textDocument:_(e),position:x(t),context:{isRetrigger:i.isRetrigger,triggerCharacter:i.triggerCharacter,triggerKind:w(i.triggerKind),activeSignatureHelp:(n=i.activeSignatureHelp,void 0===n?n:{signatures:(o=n.signatures,o.map(S)),activeSignature:n.activeSignature,activeParameter:n.activeParameter})}};var n,o},asWorkerPosition:x,asRange:D,asPosition:k,asPositions:function(e,t){return r.map(e,k,t)},asLocation:L,asDiagnosticSeverity:E,asDiagnosticTag:N,asDiagnostic:T,asDiagnostics:M,asCompletionItem:function(e,t=!1){let i,r;s.string(e.label)?i=e.label:(i=e.label.label,!t||void 0===e.label.detail&&void 0===e.label.description||(r={detail:e.label.detail,description:e.label.description}));let l={label:i};void 0!==r&&(l.labelDetails=r);let c=e instanceof a.default?e:void 0;var d,h;e.detail&&(l.detail=e.detail),e.documentation&&(c&&"$string"!==c.documentationFormat?l.documentation=function(e,t){switch(e){case"$string":return t;case o.MarkupKind.PlainText:return{kind:e,value:t};case o.MarkupKind.Markdown:return{kind:e,value:t.value};default:return`Unsupported Markup content received. Kind is: ${e}`}}(c.documentationFormat,e.documentation):l.documentation=e.documentation),e.filterText&&(l.filterText=e.filterText),function(e,t){let i,s,r=o.InsertTextFormat.PlainText;t.textEdit?(i=t.textEdit.newText,s=t.textEdit.range):t.insertText instanceof n.SnippetString?(r=o.InsertTextFormat.Snippet,i=t.insertText.value):i=t.insertText,t.range&&(s=t.range),e.insertTextFormat=r,t.fromEdit&&void 0!==i&&void 0!==s?e.textEdit=function(e,t){return f.is(t)?o.InsertReplaceEdit.create(e,D(t.inserting),D(t.replacing)):{newText:e,range:D(t)}}(i,s):e.insertText=i}(l,e),s.number(e.kind)&&(l.kind=(d=e.kind,void 0!==(h=c&&c.originalItemKind)?h:d+1)),e.sortText&&(l.sortText=e.sortText),e.additionalTextEdits&&(l.additionalTextEdits=A(e.additionalTextEdits)),e.commitCharacters&&(l.commitCharacters=e.commitCharacters.slice()),e.command&&(l.command=B(e.command)),!0!==e.preselect&&!1!==e.preselect||(l.preselect=e.preselect);const u=function(e){if(void 0===e)return e;const t=[];for(let i of e){const e=R(i);void 0!==e&&t.push(e)}return t}(e.tags);if(c){if(void 0!==c.data&&(l.data=c.data),!0===c.deprecated||!1===c.deprecated){if(!0===c.deprecated&&void 0!==u&&u.length>0){const e=u.indexOf(n.CompletionItemTag.Deprecated);-1!==e&&u.splice(e,1)}l.deprecated=c.deprecated}void 0!==c.insertTextMode&&(l.insertTextMode=c.insertTextMode)}return void 0!==u&&u.length>0&&(l.tags=u),void 0===l.insertTextMode&&!0===e.keepWhitespace&&(l.insertTextMode=o.InsertTextMode.adjustIndentation),l},asTextEdit:P,asSymbolKind:O,asSymbolTag:F,asSymbolTags:W,asReferenceParams:function(e,t,i){return{textDocument:_(e),position:x(t),context:{includeDeclaration:i.includeDeclaration}}},asCodeAction:async function(e,t){let i=o.CodeAction.create(e.title);if(e instanceof d.default&&void 0!==e.data&&(i.data=e.data),void 0!==e.kind&&(i.kind=function(e){if(null!=e)return e.value}(e.kind)),void 0!==e.diagnostics&&(i.diagnostics=await M(e.diagnostics,t)),void 0!==e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return void 0!==e.command&&(i.command=B(e.command)),void 0!==e.isPreferred&&(i.isPreferred=e.isPreferred),void 0!==e.disabled&&(i.disabled={reason:e.disabled.reason}),i},asCodeActionContext:async function(e,t){if(null==e)return e;let i;return e.only&&s.string(e.only.value)&&(i=[e.only.value]),o.CodeActionContext.create(await M(e.diagnostics,t),i,function(e){switch(e){case n.CodeActionTriggerKind.Invoke:return o.CodeActionTriggerKind.Invoked;case n.CodeActionTriggerKind.Automatic:return o.CodeActionTriggerKind.Automatic;default:return}}(e.triggerKind))},asInlineValueContext:function(e){return null==e?e:o.InlineValueContext.create(e.frameId,D(e.stoppedLocation))},asCommand:B,asCodeLens:function(e){let t=o.CodeLens.create(D(e.range));return e.command&&(t.command=B(e.command)),e instanceof l.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e,t){const i={tabSize:e.tabSize,insertSpaces:e.insertSpaces};return t.trimTrailingWhitespace&&(i.trimTrailingWhitespace=!0),t.trimFinalNewlines&&(i.trimFinalNewlines=!0),t.insertFinalNewline&&(i.insertFinalNewline=!0),i},asDocumentSymbolParams:function(e){return{textDocument:_(e)}},asCodeLensParams:function(e){return{textDocument:_(e)}},asDocumentLink:function(e){let t=o.DocumentLink.create(D(e.range));e.target&&(t.target=i(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);let n=e instanceof c.default?e:void 0;return n&&n.data&&(t.data=n.data),t},asDocumentLinkParams:function(e){return{textDocument:_(e)}},asCallHierarchyItem:function(e){const t={name:e.name,kind:O(e.kind),uri:i(e.uri),range:D(e.range),selectionRange:D(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=W(e.tags)),e instanceof u.default&&void 0!==e.data&&(t.data=e.data),t},asTypeHierarchyItem:function(e){const t={name:e.name,kind:O(e.kind),uri:i(e.uri),range:D(e.range),selectionRange:D(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=W(e.tags)),e instanceof g.default&&void 0!==e.data&&(t.data=e.data),t},asInlayHint:function(e){const t="string"==typeof e.label?e.label:e.label.map(V),i=o.InlayHint.create(k(e.position),t);return void 0!==e.kind&&(i.kind=e.kind),void 0!==e.textEdits&&(i.textEdits=A(e.textEdits)),void 0!==e.tooltip&&(i.tooltip=H(e.tooltip)),void 0!==e.paddingLeft&&(i.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(i.paddingRight=e.paddingRight),e instanceof m.default&&void 0!==e.data&&(i.data=e.data),i},asWorkspaceSymbol:function(e){const i=e instanceof p.default?{name:e.name,kind:O(e.kind),location:e.hasRange?L(e.location):{uri:t(e.location.uri)},data:e.data}:{name:e.name,kind:O(e.kind),location:L(e.location)};return void 0!==e.tags&&(i.tags=W(e.tags)),""!==e.containerName&&(i.containerName=e.containerName),i}}}},5824:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeLensFeature=void 0;const n=i(6804),o=i(294),s=i(2667),r=i(7482);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.CodeLensRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"codeLens").dynamicRegistration=!0,(0,r.ensure)((0,r.ensure)(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.CodeLensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeCodeLensEmitter.fire()}));const i=this.getRegistrationOptions(t,e.codeLensProvider);i&&this.register({id:s.generateUuid(),registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,i=new n.EventEmitter,s={onDidChangeCodeLenses:i.event,provideCodeLenses:(e,t)=>{const i=this._client,n=(e,t)=>i.sendRequest(o.CodeLensRequest.type,i.code2ProtocolConverter.asCodeLensParams(e),t).then((e=>t.isCancellationRequested?null:i.protocol2CodeConverter.asCodeLenses(e,t)),(e=>i.handleFailedRequest(o.CodeLensRequest.type,t,e,null))),s=i.middleware;return s.provideCodeLenses?s.provideCodeLenses(e,t,n):n(e,t)},resolveCodeLens:e.resolveProvider?(e,t)=>{const i=this._client,n=(e,t)=>i.sendRequest(o.CodeLensResolveRequest.type,i.code2ProtocolConverter.asCodeLens(e),t).then((n=>t.isCancellationRequested?e:i.protocol2CodeConverter.asCodeLens(n)),(n=>i.handleFailedRequest(o.CodeLensResolveRequest.type,t,n,e))),s=i.middleware;return s.resolveCodeLens?s.resolveCodeLens(e,t,n):n(e,t)}:void 0};return[n.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),s),{provider:s,onDidChangeCodeLensEmitter:i}]}}t.CodeLensFeature=a},3894:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorProviderFeature=void 0;const n=i(6804),o=i(294),s=i(7482);class r extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentColorRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[i,n]=this.getRegistration(t,e.colorProvider);i&&n&&this.register({id:i,registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,i={provideColorPresentations:(e,t,i)=>{const n=this._client,s=(e,t,i)=>{const s={color:e,textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:n.code2ProtocolConverter.asRange(t.range)};return n.sendRequest(o.ColorPresentationRequest.type,s,i).then((e=>i.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(e,i)),(e=>n.handleFailedRequest(o.ColorPresentationRequest.type,i,e,null)))},r=n.middleware;return r.provideColorPresentations?r.provideColorPresentations(e,t,i,s):s(e,t,i)},provideDocumentColors:(e,t)=>{const i=this._client,n=(e,t)=>{const n={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e)};return i.sendRequest(o.DocumentColorRequest.type,n,t).then((e=>t.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(e,t)),(e=>i.handleFailedRequest(o.DocumentColorRequest.type,t,e,null)))},s=i.middleware;return s.provideDocumentColors?s.provideDocumentColors(e,t,n):n(e,t)}};return[n.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),i]}}t.ColorProviderFeature=r},4976:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionItemFeature=void 0;const n=i(6804),o=i(294),s=i(7482),r=i(2667),a=[o.CompletionItemKind.Text,o.CompletionItemKind.Method,o.CompletionItemKind.Function,o.CompletionItemKind.Constructor,o.CompletionItemKind.Field,o.CompletionItemKind.Variable,o.CompletionItemKind.Class,o.CompletionItemKind.Interface,o.CompletionItemKind.Module,o.CompletionItemKind.Property,o.CompletionItemKind.Unit,o.CompletionItemKind.Value,o.CompletionItemKind.Enum,o.CompletionItemKind.Keyword,o.CompletionItemKind.Snippet,o.CompletionItemKind.Color,o.CompletionItemKind.File,o.CompletionItemKind.Reference,o.CompletionItemKind.Folder,o.CompletionItemKind.EnumMember,o.CompletionItemKind.Constant,o.CompletionItemKind.Struct,o.CompletionItemKind.Event,o.CompletionItemKind.Operator,o.CompletionItemKind.TypeParameter];class l extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.CompletionRequest.type),this.labelDetailsSupport=new Map}fillClientCapabilities(e){let t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[o.MarkupKind.Markdown,o.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[o.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[o.InsertTextMode.asIs,o.InsertTextMode.adjustIndentation]},labelDetailsSupport:!0},t.insertTextMode=o.InsertTextMode.adjustIndentation,t.completionItemKind={valueSet:a},t.completionList={itemDefaults:["commitCharacters","editRange","insertTextFormat","insertTextMode"]}}initialize(e,t){const i=this.getRegistrationOptions(t,e.completionProvider);i&&this.register({id:r.generateUuid(),registerOptions:i})}registerLanguageProvider(e,t){this.labelDetailsSupport.set(t,!!e.completionItem?.labelDetailsSupport);const i=e.triggerCharacters??[],s=e.allCommitCharacters,r=e.documentSelector,a={provideCompletionItems:(e,t,i,n)=>{const r=this._client,a=this._client.middleware,l=(e,t,i,n)=>r.sendRequest(o.CompletionRequest.type,r.code2ProtocolConverter.asCompletionParams(e,t,i),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asCompletionResult(e,s,n)),(e=>r.handleFailedRequest(o.CompletionRequest.type,n,e,null)));return a.provideCompletionItem?a.provideCompletionItem(e,t,n,i,l):l(e,t,n,i)},resolveCompletionItem:e.resolveProvider?(e,i)=>{const n=this._client,s=this._client.middleware,r=(e,i)=>n.sendRequest(o.CompletionResolveRequest.type,n.code2ProtocolConverter.asCompletionItem(e,!!this.labelDetailsSupport.get(t)),i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asCompletionItem(e)),(t=>n.handleFailedRequest(o.CompletionResolveRequest.type,i,t,e)));return s.resolveCompletionItem?s.resolveCompletionItem(e,i,r):r(e,i)}:void 0};return[n.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(r),a,...i),a]}}t.CompletionItemFeature=l},5122:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncConfigurationFeature=t.toJSONObject=t.ConfigurationFeature=void 0;const n=i(6804),o=i(294),s=i(4652),r=i(2667),a=i(7482);function l(e){if(e){if(Array.isArray(e))return e.map(l);if("object"==typeof e){const t=Object.create(null);for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=l(e[i]));return t}}return e}t.ConfigurationFeature=class{constructor(e){this._client=e}getState(){return{kind:"static"}}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(o.ConfigurationRequest.type,((t,i)=>{let n=e=>{let t=[];for(let i of e.items){let e=void 0!==i.scopeUri&&null!==i.scopeUri?this._client.protocol2CodeConverter.asUri(i.scopeUri):void 0;t.push(this.getConfiguration(e,null!==i.section?i.section:void 0))}return t},o=e.middleware.workspace;return o&&o.configuration?o.configuration(t,i,n):n(t)}))}getConfiguration(e,t){let i=null;if(t){let o=t.lastIndexOf(".");if(-1===o)i=l(n.workspace.getConfiguration(void 0,e).get(t));else{let s=n.workspace.getConfiguration(t.substr(0,o),e);s&&(i=l(s.get(t.substr(o+1))))}}else{let t=n.workspace.getConfiguration(void 0,e);i={};for(let e of Object.keys(t))t.has(e)&&(i[e]=l(t.get(e)))}return void 0===i&&(i=null),i}dispose(){}},t.toJSONObject=l,t.SyncConfigurationFeature=class{constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return o.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){let e=this._client.clientOptions.synchronize?.configurationSection;void 0!==e&&this.register({id:r.generateUuid(),registerOptions:{section:e}})}register(e){let t=n.workspace.onDidChangeConfiguration((t=>{this.onDidChangeConfiguration(e.registerOptions.section,t)}));this._listeners.set(e.id,t),void 0!==e.registerOptions.section&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}dispose(){for(const e of this._listeners.values())e.dispose();this._listeners.clear()}onDidChangeConfiguration(e,t){let i;if(i=s.string(e)?[e]:e,void 0!==i&&void 0!==t&&!i.some((e=>t.affectsConfiguration(e))))return;const n=async e=>void 0===e?this._client.sendNotification(o.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(o.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)});let r=this._client.middleware.workspace?.didChangeConfiguration;(r?r(i,n):n(i)).catch((e=>{this._client.error(`Sending notification ${o.DidChangeConfigurationNotification.type.method} failed`,e)}))}extractSettingsInformation(e){function t(e,t){let i=e;for(let e=0;e=0?n.workspace.getConfiguration(r.substr(0,a),i).get(r.substr(a+1)):n.workspace.getConfiguration(void 0,i).get(r),c){let i=e[s].split(".");t(o,i)[i[i.length-1]]=l(c)}}return o}}},6443:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationFeature=void 0;const n=i(6804),o=i(294),s=i(7482);class r extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.DeclarationRequest.type)}fillClientCapabilities(e){const t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[i,n]=this.getRegistration(t,e.declarationProvider);i&&n&&this.register({id:i,registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,i={provideDeclaration:(e,t,i)=>{const n=this._client,s=(e,t,i)=>n.sendRequest(o.DeclarationRequest.type,n.code2ProtocolConverter.asTextDocumentPositionParams(e,t),i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asDeclarationResult(e,i)),(e=>n.handleFailedRequest(o.DeclarationRequest.type,i,e,null))),r=n.middleware;return r.provideDeclaration?r.provideDeclaration(e,t,i,s):s(e,t,i)}};return[this.registerProvider(t,i),i]}registerProvider(e,t){return n.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DeclarationFeature=r},5985:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefinitionFeature=void 0;const n=i(6804),o=i(294),s=i(7482),r=i(2667);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.DefinitionRequest.type)}fillClientCapabilities(e){let t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const i=this.getRegistrationOptions(t,e.definitionProvider);i&&this.register({id:r.generateUuid(),registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,i={provideDefinition:(e,t,i)=>{const n=this._client,s=(e,t,i)=>n.sendRequest(o.DefinitionRequest.type,n.code2ProtocolConverter.asTextDocumentPositionParams(e,t),i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asDefinitionResult(e,i)),(e=>n.handleFailedRequest(o.DefinitionRequest.type,i,e,null))),r=n.middleware;return r.provideDefinition?r.provideDefinition(e,t,i,s):s(e,t,i)}};return[this.registerProvider(t,i),i]}registerProvider(e,t){return n.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DefinitionFeature=a},7801:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=t.DiagnosticPullMode=t.vsdiag=void 0;const n=i(7339),o=i(6804),s=i(294),r=i(2667),a=i(7482);function l(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c,d,h,u;!function(e){let t;!function(e){e.full="full",e.unChanged="unChanged"}(t=e.DocumentDiagnosticReportKind||(e.DocumentDiagnosticReportKind={}))}(c=t.vsdiag||(t.vsdiag={})),function(e){e.onType="onType",e.onSave="onSave"}(d=t.DiagnosticPullMode||(t.DiagnosticPullMode={})),function(e){e.active="open",e.reschedule="reschedule",e.outDated="drop"}(h||(h={}));class g{constructor(){this.open=new Set;const e=()=>{this.open.clear();for(const e of o.window.tabGroups.all)for(const t of e.tabs){const e=t.input;e instanceof o.TabInputText?this.open.add(e.uri.toString()):e instanceof o.TabInputTextDiff&&this.open.add(e.modified.toString())}};e(),void 0!==o.window.tabGroups.onDidChangeTabGroups?this.disposable=o.window.tabGroups.onDidChangeTabGroups(e):this.disposable={dispose:()=>{}}}dispose(){this.disposable.dispose()}isActive(e){return e instanceof o.Uri?o.window.activeTextEditor?.document.uri===e:o.window.activeTextEditor?.document===e}isVisible(e){const t=e instanceof o.Uri?e:e.uri;return this.open.has(t.toString())}getTabResources(){const e=[];for(const t of o.window.tabGroups.all)for(const i of t.tabs){const t=i.input;t instanceof o.TabInputText?e.push(t.uri):t instanceof o.TabInputTextDiff&&e.push(t.modified)}return e}}!function(e){e[e.document=1]="document",e[e.workspace=2]="workspace"}(u||(u={}));class p{constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,i){const n=e===u.document?this.documentPullStates:this.workspacePullStates,[s,r,a]=t instanceof o.Uri?[t.toString(),t,i]:[t.uri.toString(),t.uri,t.version];let l=n.get(s);return void 0===l&&(l={document:r,pulledVersion:a,resultId:void 0},n.set(s,l)),l}update(e,t,i,n){const s=e===u.document?this.documentPullStates:this.workspacePullStates,[r,a,l,c]=t instanceof o.Uri?[t.toString(),t,i,n]:[t.uri.toString(),t.uri,t.version,i];let d=s.get(r);void 0===d?(d={document:a,pulledVersion:l,resultId:c},s.set(r,d)):(d.pulledVersion=l,d.resultId=c)}unTrack(e,t){const i=t instanceof o.Uri?t.toString():t.uri.toString();(e===u.document?this.documentPullStates:this.workspacePullStates).delete(i)}tracks(e,t){const i=t instanceof o.Uri?t.toString():t.uri.toString();return(e===u.document?this.documentPullStates:this.workspacePullStates).has(i)}getResultId(e,t){const i=t instanceof o.Uri?t.toString():t.uri.toString();return(e===u.document?this.documentPullStates:this.workspacePullStates).get(i)?.resultId}getAllResultIds(){const e=[];for(let[t,i]of this.workspacePullStates)this.documentPullStates.has(t)&&(i=this.documentPullStates.get(t)),void 0!==i.resultId&&e.push({uri:t,value:i.resultId});return e}}class m{constructor(e,t,i){this.client=e,this.tabs=t,this.options=i,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new o.EventEmitter,this.provider=this.createProvider(),this.diagnostics=o.languages.createDiagnosticCollection(i.identifier),this.openRequests=new Map,this.documentStates=new p,this.workspaceErrorCounter=0}knows(e,t){return this.documentStates.tracks(e,t)}pull(e,t){if(this.isDisposed)return;const i=e instanceof o.Uri?e:e.uri;this.pullAsync(e).then((()=>{t&&t()}),(e=>{this.client.error(`Document pull failed for text document ${i.toString()}`,e,!1)}))}async pullAsync(e,t){if(this.isDisposed)return;const i=e instanceof o.Uri,n=i?e:e.uri,r=n.toString();t=i?t:e.version;const l=this.openRequests.get(r),d=i?this.documentStates.track(u.document,e,t):this.documentStates.track(u.document,e);if(void 0===l){const i=new o.CancellationTokenSource;let l,g;this.openRequests.set(r,{state:h.active,document:e,version:t,tokenSource:i});try{l=await this.provider.provideDiagnostics(e,d.resultId,i.token)??{kind:c.DocumentDiagnosticReportKind.full,items:[]}}catch(t){if(t instanceof a.LSPCancellationError&&s.DiagnosticServerCancellationData.is(t.data)&&!1===t.data.retriggerRequest&&(g={state:h.outDated,document:e}),!(void 0===g&&t instanceof o.CancellationError))throw t;g={state:h.reschedule,document:e}}if(g=g??this.openRequests.get(r),void 0===g)return this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${r}`),void this.diagnostics.delete(n);if(this.openRequests.delete(r),!this.tabs.isVisible(e))return void this.documentStates.unTrack(u.document,e);if(g.state===h.outDated)return;void 0!==l&&(l.kind===c.DocumentDiagnosticReportKind.full&&this.diagnostics.set(n,l.items),d.pulledVersion=t,d.resultId=l.resultId),g.state===h.reschedule&&this.pull(e)}else l.state===h.active?(l.tokenSource.cancel(),this.openRequests.set(r,{state:h.reschedule,document:l.document})):l.state===h.outDated&&this.openRequests.set(r,{state:h.reschedule,document:l.document})}cleanupPull(e){const t=e instanceof o.Uri?e:e.uri,i=t.toString(),n=this.openRequests.get(i);this.options.workspaceDiagnostics||this.options.interFileDependencies?void 0!==n?this.openRequests.set(i,{state:h.reschedule,document:e}):this.pull(e):(void 0!==n&&(n.state===h.active&&n.tokenSource.cancel(),this.openRequests.set(i,{state:h.outDated,document:e})),this.diagnostics.delete(t))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then((()=>{this.workspaceTimeout=(0,s.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3)}),(e=>{e instanceof a.LSPCancellationError||s.DiagnosticServerCancellationData.is(e.data)||(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,s.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3))}))}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;void 0!==this.workspaceCancellation&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new o.CancellationTokenSource;const e=this.documentStates.getAllResultIds().map((e=>({uri:this.client.protocol2CodeConverter.asUri(e.uri),value:e.value})));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,(e=>{if(e&&!this.isDisposed)for(const t of e.items)t.kind===c.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(u.document,t.uri)||this.diagnostics.set(t.uri,t.items)),this.documentStates.update(u.workspace,t.uri,t.version??void 0,t.resultId)}))}createProvider(){const e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(e,t,i)=>{const n=(e,t,i)=>{const n={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(e instanceof o.Uri?e:e.uri)},previousResultId:t};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(s.DocumentDiagnosticRequest.type,n,i).then((async e=>null==e||this.isDisposed||i.isCancellationRequested?{kind:c.DocumentDiagnosticReportKind.full,items:[]}:e.kind===s.DocumentDiagnosticReportKind.Full?{kind:c.DocumentDiagnosticReportKind.full,resultId:e.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,i)}:{kind:c.DocumentDiagnosticReportKind.unChanged,resultId:e.resultId}),(e=>this.client.handleFailedRequest(s.DocumentDiagnosticRequest.type,i,e,{kind:c.DocumentDiagnosticReportKind.full,items:[]}))):{kind:c.DocumentDiagnosticReportKind.full,items:[]}},r=this.client.middleware;return r.provideDiagnostics?r.provideDiagnostics(e,t,i,n):n(e,t,i)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(e,t,i)=>{const n=async e=>e.kind===s.DocumentDiagnosticReportKind.Full?{kind:c.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,t)}:{kind:c.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version},o=e=>{const t=[];for(const i of e)t.push({uri:this.client.code2ProtocolConverter.asUri(i.uri),value:i.value});return t},a=(e,t)=>{const a=(0,r.generateUuid)(),l=this.client.onProgress(s.WorkspaceDiagnosticRequest.partialResult,a,(async e=>{if(null==e)return void i(null);const t={items:[]};for(const i of e.items)try{t.items.push(await n(i))}catch(e){this.client.error("Converting workspace diagnostics failed.",e)}i(t)})),c={identifier:this.options.identifier,previousResultIds:o(e),partialResultToken:a};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(s.WorkspaceDiagnosticRequest.type,c,t).then((async e=>{if(t.isCancellationRequested)return{items:[]};const o={items:[]};for(const t of e.items)o.items.push(await n(t));return l.dispose(),i(o),{items:[]}}),(e=>(l.dispose(),this.client.handleFailedRequest(s.DocumentDiagnosticRequest.type,t,e,{items:[]})))):{items:[]}},l=this.client.middleware;return l.provideWorkspaceDiagnostics?l.provideWorkspaceDiagnostics(e,t,i,a):a(e,t)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(const[e,t]of this.openRequests)t.state===h.active&&t.tokenSource.cancel(),this.openRequests.set(e,{state:h.outDated,document:t.document})}}class f{constructor(e){this.diagnosticRequestor=e,this.documents=new s.LinkedMap,this.isDisposed=!1}add(e){if(!0===this.isDisposed)return;const t=e instanceof o.Uri?e.toString():e.uri.toString();this.documents.has(t)||(this.documents.set(t,e,s.Touch.Last),this.trigger())}remove(e){const t=e instanceof o.Uri?e.toString():e.uri.toString();this.documents.has(t)&&(this.documents.delete(t),this.diagnosticRequestor.pull(e)),0===this.documents.size?this.stop():e===this.endDocument&&(this.endDocument=this.documents.last)}trigger(){!0!==this.isDisposed&&(void 0===this.intervalHandle?(this.endDocument=this.documents.last,this.intervalHandle=(0,s.RAL)().timer.setInterval((()=>{const e=this.documents.first;if(void 0!==e){const t=e instanceof o.Uri?e.toString():e.uri.toString();this.diagnosticRequestor.pull(e),this.documents.set(t,e,s.Touch.Last),e===this.endDocument&&this.stop()}}),200)):this.endDocument=this.documents.last)}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear()}stop(){this.intervalHandle?.dispose(),this.intervalHandle=void 0,this.endDocument=void 0}}class _{constructor(e,t,i){const r=e.clientOptions.diagnosticPullOptions??{onChange:!0,onSave:!1},a=e.protocol2CodeConverter.asDocumentSelector(i.documentSelector),l=[],c=e=>e instanceof o.Uri?(e=>{const t=i.documentSelector;if(void 0!==r.match)return r.match(t,e);for(const i of t)if(s.TextDocumentFilter.is(i)){if("string"==typeof i)return!1;if(void 0!==i.language&&"*"!==i.language)return!1;if(void 0!==i.scheme&&"*"!==i.scheme&&i.scheme!==e.scheme)return!1;if(void 0!==i.pattern){const t=new n.Minimatch(i.pattern,{noext:!0});if(!t.makeRe())return!1;if(!t.match(e.fsPath))return!1}}return!0})(e):o.languages.match(a,e)>0&&t.isVisible(e),h=e=>e instanceof o.Uri?this.activeTextDocument?.uri.toString()===e.toString():this.activeTextDocument===e;this.diagnosticRequestor=new m(e,t,i),this.backgroundScheduler=new f(this.diagnosticRequestor);const g=e=>{c(e)&&i.interFileDependencies&&!h(e)&&this.backgroundScheduler.add(e)};this.activeTextDocument=o.window.activeTextEditor?.document,o.window.onDidChangeActiveTextEditor((e=>{const t=this.activeTextDocument;this.activeTextDocument=e?.document,void 0!==t&&g(t),void 0!==this.activeTextDocument&&this.backgroundScheduler.remove(this.activeTextDocument)}));const p=e.getFeature(s.DidOpenTextDocumentNotification.method);l.push(p.onNotificationSent((e=>{const t=e.original;c(t)&&this.diagnosticRequestor.pull(t,(()=>{g(t)}))})));const _=new Set;for(const e of o.workspace.textDocuments)c(e)&&(this.diagnosticRequestor.pull(e,(()=>{g(e)})),_.add(e.uri.toString()));if(!0===r.onTabs)for(const e of t.getTabResources())!_.has(e.toString())&&c(e)&&this.diagnosticRequestor.pull(e,(()=>{g(e)}));if(!0===r.onChange){const t=e.getFeature(s.DidChangeTextDocumentNotification.method);l.push(t.onNotificationSent((async e=>{const t=e.original.document;(void 0===r.filter||!r.filter(t,d.onType))&&this.diagnosticRequestor.knows(u.document,t)&&e.original.contentChanges.length>0&&this.diagnosticRequestor.pull(t,(()=>{this.backgroundScheduler.trigger()}))})))}if(!0===r.onSave){const t=e.getFeature(s.DidSaveTextDocumentNotification.method);l.push(t.onNotificationSent((e=>{const t=e.original;void 0!==r.filter&&r.filter(t,d.onSave)||!this.diagnosticRequestor.knows(u.document,t)||this.diagnosticRequestor.pull(e.original,(()=>{this.backgroundScheduler.trigger()}))})))}const v=e.getFeature(s.DidCloseTextDocumentNotification.method);l.push(v.onNotificationSent((e=>{const t=e.original;this.diagnosticRequestor.cleanupPull(t),this.backgroundScheduler.remove(t)}))),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event((()=>{for(const e of o.workspace.textDocuments)c(e)&&this.diagnosticRequestor.pull(e)})),!0===i.workspaceDiagnostics&&"da348dc5-c30a-4515-9d98-31ff3be38d14"!==i.identifier&&this.diagnosticRequestor.pullWorkspace(),this.disposable=o.Disposable.from(...l,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}}class v extends a.TextDocumentLanguageFeature{constructor(e){super(e,s.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){let t=l(l(e,"textDocument"),"diagnostic");t.dynamicRegistration=!0,t.relatedDocumentSupport=!1,l(l(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,t){this._client.onRequest(s.DiagnosticRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}));let[i,n]=this.getRegistration(t,e.diagnosticProvider);i&&n&&this.register({id:i,registerOptions:n})}dispose(){void 0!==this.tabs&&(this.tabs.dispose(),this.tabs=void 0),super.dispose()}registerLanguageProvider(e){void 0===this.tabs&&(this.tabs=new g);const t=new _(this._client,this.tabs,e);return[t.disposable,t]}}t.DiagnosticFeature=v},7853:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentHighlightFeature=void 0;const n=i(6804),o=i(294),s=i(7482),r=i(2667);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentHighlightRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){const i=this.getRegistrationOptions(t,e.documentHighlightProvider);i&&this.register({id:r.generateUuid(),registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,i={provideDocumentHighlights:(e,t,i)=>{const n=this._client,s=(e,t,i)=>n.sendRequest(o.DocumentHighlightRequest.type,n.code2ProtocolConverter.asTextDocumentPositionParams(e,t),i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asDocumentHighlights(e,i)),(e=>n.handleFailedRequest(o.DocumentHighlightRequest.type,i,e,null))),r=n.middleware;return r.provideDocumentHighlights?r.provideDocumentHighlights(e,t,i,s):s(e,t,i)}};return[n.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),i]}}t.DocumentHighlightFeature=a},1108:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkFeature=void 0;const n=i(6804),o=i(294),s=i(7482),r=i(2667);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){const i=this.getRegistrationOptions(t,e.documentLinkProvider);i&&this.register({id:r.generateUuid(),registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,i={provideDocumentLinks:(e,t)=>{const i=this._client,n=(e,t)=>i.sendRequest(o.DocumentLinkRequest.type,i.code2ProtocolConverter.asDocumentLinkParams(e),t).then((e=>t.isCancellationRequested?null:i.protocol2CodeConverter.asDocumentLinks(e,t)),(e=>i.handleFailedRequest(o.DocumentLinkRequest.type,t,e,null))),s=i.middleware;return s.provideDocumentLinks?s.provideDocumentLinks(e,t,n):n(e,t)},resolveDocumentLink:e.resolveProvider?(e,t)=>{const i=this._client;let n=(e,t)=>i.sendRequest(o.DocumentLinkResolveRequest.type,i.code2ProtocolConverter.asDocumentLink(e),t).then((n=>t.isCancellationRequested?e:i.protocol2CodeConverter.asDocumentLink(n)),(n=>i.handleFailedRequest(o.DocumentLinkResolveRequest.type,t,n,e)));const s=i.middleware;return s.resolveDocumentLink?s.resolveDocumentLink(e,t,n):n(e,t)}:void 0};return[n.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),i]}}t.DocumentLinkFeature=a},253:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentSymbolFeature=t.SupportedSymbolTags=t.SupportedSymbolKinds=void 0;const n=i(6804),o=i(294),s=i(7482),r=i(2667);t.SupportedSymbolKinds=[o.SymbolKind.File,o.SymbolKind.Module,o.SymbolKind.Namespace,o.SymbolKind.Package,o.SymbolKind.Class,o.SymbolKind.Method,o.SymbolKind.Property,o.SymbolKind.Field,o.SymbolKind.Constructor,o.SymbolKind.Enum,o.SymbolKind.Interface,o.SymbolKind.Function,o.SymbolKind.Variable,o.SymbolKind.Constant,o.SymbolKind.String,o.SymbolKind.Number,o.SymbolKind.Boolean,o.SymbolKind.Array,o.SymbolKind.Object,o.SymbolKind.Key,o.SymbolKind.Null,o.SymbolKind.EnumMember,o.SymbolKind.Struct,o.SymbolKind.Event,o.SymbolKind.Operator,o.SymbolKind.TypeParameter],t.SupportedSymbolTags=[o.SymbolTag.Deprecated];class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentSymbolRequest.type)}fillClientCapabilities(e){let i=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"documentSymbol");i.dynamicRegistration=!0,i.symbolKind={valueSet:t.SupportedSymbolKinds},i.hierarchicalDocumentSymbolSupport=!0,i.tagSupport={valueSet:t.SupportedSymbolTags},i.labelSupport=!0}initialize(e,t){const i=this.getRegistrationOptions(t,e.documentSymbolProvider);i&&this.register({id:r.generateUuid(),registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,i={provideDocumentSymbols:(e,t)=>{const i=this._client,n=(e,t)=>i.sendRequest(o.DocumentSymbolRequest.type,i.code2ProtocolConverter.asDocumentSymbolParams(e),t).then((async e=>{if(t.isCancellationRequested||null==e)return null;if(0===e.length)return[];{const n=e[0];return o.DocumentSymbol.is(n)?await i.protocol2CodeConverter.asDocumentSymbols(e,t):await i.protocol2CodeConverter.asSymbolInformations(e,t)}}),(e=>i.handleFailedRequest(o.DocumentSymbolRequest.type,t,e,null))),s=i.middleware;return s.provideDocumentSymbols?s.provideDocumentSymbols(e,t,n):n(e,t)}},s=void 0!==e.label?{label:e.label}:void 0;return[n.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i,s),i]}}t.DocumentSymbolFeature=a},2716:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteCommandFeature=void 0;const n=i(6804),o=i(294),s=i(2667),r=i(7482);t.ExecuteCommandFeature=class{constructor(e){this._client=e,this._commands=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._commands.size>0}}get registrationType(){return o.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:s.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){const t=this._client,i=t.middleware,s=(e,i)=>{let n={command:e,arguments:i};return t.sendRequest(o.ExecuteCommandRequest.type,n).then(void 0,(e=>t.handleFailedRequest(o.ExecuteCommandRequest.type,void 0,e,void 0)))};if(e.registerOptions.commands){const t=[];for(const o of e.registerOptions.commands)t.push(n.commands.registerCommand(o,((...e)=>i.executeCommand?i.executeCommand(o,e,s):s(o,e))));this._commands.set(e.id,t)}}unregister(e){let t=this._commands.get(e);t&&t.forEach((e=>e.dispose()))}dispose(){this._commands.forEach((e=>{e.forEach((e=>e.dispose()))})),this._commands.clear()}}},7482:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFeature=t.TextDocumentLanguageFeature=t.TextDocumentEventFeature=t.DynamicDocumentFeature=t.DynamicFeature=t.StaticFeature=t.ensure=t.LSPCancellationError=void 0;const n=i(6804),o=i(294),s=i(4652),r=i(2667);class a extends n.CancellationError{constructor(e){super(),this.data=e}}t.LSPCancellationError=a,t.ensure=function(e,t){return void 0===e[t]&&(e[t]={}),e[t]},(t.StaticFeature||(t.StaticFeature={})).is=function(e){const t=e;return null!=t&&s.func(t.fillClientCapabilities)&&s.func(t.initialize)&&s.func(t.getState)&&s.func(t.dispose)&&(void 0===t.fillInitializeParams||s.func(t.fillInitializeParams))},(t.DynamicFeature||(t.DynamicFeature={})).is=function(e){const t=e;return null!=t&&s.func(t.fillClientCapabilities)&&s.func(t.initialize)&&s.func(t.getState)&&s.func(t.dispose)&&(void 0===t.fillInitializeParams||s.func(t.fillInitializeParams))&&s.func(t.register)&&s.func(t.unregister)&&void 0!==t.registrationType};class l{constructor(e){this._client=e}getState(){const e=this.getDocumentSelectors();let t=0;for(const i of e){t++;for(const e of n.workspace.textDocuments)if(n.languages.match(i,e)>0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}const i=t>0;return{kind:"document",id:this.registrationType.method,registrations:i,matches:!1}}}t.DynamicDocumentFeature=l,t.TextDocumentEventFeature=class extends l{constructor(e,t,i,o,s,r,a){super(e),this._event=t,this._type=i,this._middleware=o,this._createParams=s,this._textDocument=r,this._selectorFilter=a,this._selectors=new Map,this._onNotificationSent=new n.EventEmitter}static textDocumentFilter(e,t){for(const i of e)if(n.languages.match(i,t)>0)return!0;return!1}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event((e=>{this.callback(e).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed.`,e)}))}))),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){const t=async e=>{const t=this._createParams(e);await this._client.sendNotification(this._type,t).catch(),this.notificationSent(e,this._type,t)};if(this.matches(e)){const i=this._middleware();return i?i(e,(e=>t(e))):t(e)}}matches(e){return!this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))&&(!this._selectorFilter||this._selectorFilter(this._selectors.values(),e))}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,i){this._onNotificationSent.fire({original:e,type:t,params:i})}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._onNotificationSent.dispose(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(const t of this._selectors.values())if(n.languages.match(t,e)>0)return{send:e=>this.callback(e)}}},t.TextDocumentLanguageFeature=class extends l{constructor(e,t){super(e),this._registrationType=t,this._registrations=new Map}*getDocumentSelectors(){for(const e of this._registrations.values()){const t=e.data.registerOptions.documentSelector;null!==t&&(yield this._client.protocol2CodeConverter.asDocumentSelector(t))}}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}dispose(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getRegistration(e,t){if(!t)return[void 0,void 0];if(o.TextDocumentRegistrationOptions.is(t)){const i=o.StaticRegistrationOptions.hasId(t)?t.id:r.generateUuid(),n=t.documentSelector||e;if(n)return[i,Object.assign({},t,{documentSelector:n})]}else if(s.boolean(t)&&!0===t||o.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let i=s.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[r.generateUuid(),i]}return[void 0,void 0]}getRegistrationOptions(e,t){if(e&&t)return s.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(const t of this._registrations.values()){let i=t.data.registerOptions.documentSelector;if(null!==i&&n.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(i),e)>0)return t.provider}}getAllProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}},t.WorkspaceFeature=class{constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}getState(){const e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){const t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}dispose(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}}},2925:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesFeature=t.WillRenameFilesFeature=t.WillCreateFilesFeature=t.DidDeleteFilesFeature=t.DidRenameFilesFeature=t.DidCreateFilesFeature=void 0;const n=i(6804),o=i(7339),s=i(294),r=i(2667);function a(e,t){return void 0===e[t]&&(e[t]={}),e[t]}function l(e,t,i){e[t]=i}class c{constructor(e,t,i,n,o){this._client=e,this._event=t,this._registrationType=i,this._clientCapability=n,this._serverCapability=o,this._filters=new Map}getState(){return{kind:"workspace",id:this._registrationType.method,registrations:this._filters.size>0}}filterSize(){return this._filters.size}get registrationType(){return this._registrationType}fillClientCapabilities(e){const t=a(a(e,"workspace"),"fileOperations");l(t,"dynamicRegistration",!0),l(t,this._clientCapability,!0)}initialize(e){const t=e.workspace?.fileOperations,i=void 0!==t?t[this._serverCapability]:void 0;if(void 0!==i?.filters)try{this.register({id:r.generateUuid(),registerOptions:{filters:i.filters}})}catch(e){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${e}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));const t=e.registerOptions.filters.map((e=>{const t=new o.Minimatch(e.pattern.glob,c.asMinimatchOptions(e.pattern.options));if(!t.makeRe())throw new Error(`Invalid pattern ${e.pattern.glob}!`);return{scheme:e.scheme,matcher:t,kind:e.pattern.matches}}));this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),0===this._filters.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getFileType(e){return c.getFileType(e)}async filter(e,t){const i=await Promise.all(e.files.map((async e=>{const i=t(e),o=i.fsPath.replace(/\\/g,"/");for(const e of this._filters.values())for(const t of e)if(void 0===t.scheme||t.scheme===i.scheme)if(t.matcher.match(o)){if(void 0===t.kind)return!0;const e=await this.getFileType(i);if(void 0===e)return this._client.error(`Failed to determine file type for ${i.toString()}.`),!0;if(e===n.FileType.File&&t.kind===s.FileOperationPatternKind.file||e===n.FileType.Directory&&t.kind===s.FileOperationPatternKind.folder)return!0}else if(t.kind===s.FileOperationPatternKind.folder&&await c.getFileType(i)===n.FileType.Directory&&t.matcher.match(`${o}/`))return!0;return!1}))),o=e.files.filter(((e,t)=>i[t]));return{...e,files:o}}static async getFileType(e){try{return(await n.workspace.fs.stat(e)).type}catch(e){return}}static asMinimatchOptions(e){if(void 0!==e)return!0===e.ignoreCase?{nocase:!0}:void 0}}class d extends c{constructor(e,t,i,n,o,s,r){super(e,t,i,n,o),this._notificationType=i,this._accessUri=s,this._createParams=r}async send(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=async e=>this._client.sendNotification(this._notificationType,this._createParams(e));return this.doSend(t,e)}}}class h extends d{constructor(){super(...arguments),this._fsPathFileTypes=new Map}async getFileType(e){const t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);const i=await c.getFileType(e);return i&&this._fsPathFileTypes.set(t,i),i}async cacheFileTypes(e,t){await this.filter(e,t)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),0===this.filterSize()&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}dispose(){super.dispose(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}}t.DidCreateFilesFeature=class extends d{constructor(e){super(e,n.workspace.onDidCreateFiles,s.DidCreateFilesNotification.type,"didCreate","didCreate",(e=>e),e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){const i=this._client.middleware.workspace;return i?.didCreateFiles?i.didCreateFiles(e,t):t(e)}},t.DidRenameFilesFeature=class extends h{constructor(e){super(e,n.workspace.onDidRenameFiles,s.DidRenameFilesNotification.type,"didRename","didRename",(e=>e.oldUri),e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=n.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,(e=>e.oldUri)))}doSend(e,t){this.clearFileTypeCache();const i=this._client.middleware.workspace;return i?.didRenameFiles?i.didRenameFiles(e,t):t(e)}},t.DidDeleteFilesFeature=class extends h{constructor(e){super(e,n.workspace.onDidDeleteFiles,s.DidDeleteFilesNotification.type,"didDelete","didDelete",(e=>e),e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=n.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,(e=>e)))}doSend(e,t){this.clearFileTypeCache();const i=this._client.middleware.workspace;return i?.didDeleteFiles?i.didDeleteFiles(e,t):t(e)}};class u extends c{constructor(e,t,i,n,o,s,r){super(e,t,i,n,o),this._requestType=i,this._accessUri=s,this._createParams=r}async send(e){const t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=e=>this._client.sendRequest(this._requestType,this._createParams(e),e.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,e)}}}t.WillCreateFilesFeature=class extends u{constructor(e){super(e,n.workspace.onWillCreateFiles,s.WillCreateFilesRequest.type,"willCreate","willCreate",(e=>e),e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){const i=this._client.middleware.workspace;return i?.willCreateFiles?i.willCreateFiles(e,t):t(e)}},t.WillRenameFilesFeature=class extends u{constructor(e){super(e,n.workspace.onWillRenameFiles,s.WillRenameFilesRequest.type,"willRename","willRename",(e=>e.oldUri),e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){const i=this._client.middleware.workspace;return i?.willRenameFiles?i.willRenameFiles(e,t):t(e)}},t.WillDeleteFilesFeature=class extends u{constructor(e){super(e,n.workspace.onWillDeleteFiles,s.WillDeleteFilesRequest.type,"willDelete","willDelete",(e=>e),e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){const i=this._client.middleware.workspace;return i?.willDeleteFiles?i.willDeleteFiles(e,t):t(e)}}},8029:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcherFeature=void 0;const n=i(6804),o=i(294),s=i(7482);t.FileSystemWatcherFeature=class{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._watchers.size>0}}get registrationType(){return o.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,s.ensure)((0,s.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;const t=[];for(const i of e.registerOptions.watchers){const e=this._client.protocol2CodeConverter.asGlobPattern(i.globPattern);if(void 0===e)continue;let s=!0,r=!0,a=!0;void 0!==i.kind&&null!==i.kind&&(s=0!=(i.kind&o.WatchKind.Create),r=0!=(i.kind&o.WatchKind.Change),a=0!=(i.kind&o.WatchKind.Delete));const l=n.workspace.createFileSystemWatcher(e,!s,!r,!a);this.hookListeners(l,s,r,a,t),t.push(l)}this._watchers.set(e.id,t)}registerRaw(e,t){let i=[];for(let e of t)this.hookListeners(e,!0,!0,!0,i);this._watchers.set(e,i)}hookListeners(e,t,i,n,s){t&&e.onDidCreate((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Created})),null,s),i&&e.onDidChange((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Changed})),null,s),n&&e.onDidDelete((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Deleted})),null,s)}unregister(e){let t=this._watchers.get(e);if(t)for(let e of t)e.dispose()}dispose(){this._watchers.forEach((e=>{for(let t of e)t.dispose()})),this._watchers.clear()}}},8357:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const n=i(6804),o=i(294),s=i(7482);class r extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[o.FoldingRangeKind.Comment,o.FoldingRangeKind.Imports,o.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1}}initialize(e,t){let[i,n]=this.getRegistration(t,e.foldingRangeProvider);i&&n&&this.register({id:i,registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,i={provideFoldingRanges:(e,t,i)=>{const n=this._client,s=(e,t,i)=>{const s={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(o.FoldingRangeRequest.type,s,i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asFoldingRanges(e,i)),(e=>n.handleFailedRequest(o.FoldingRangeRequest.type,i,e,null)))},r=n.middleware;return r.provideFoldingRanges?r.provideFoldingRanges(e,t,i,s):s(e,0,i)}};return[n.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),i]}}t.FoldingRangeFeature=r},8314:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentOnTypeFormattingFeature=t.DocumentRangeFormattingFeature=t.DocumentFormattingFeature=void 0;const n=i(6804),o=i(294),s=i(2667),r=i(7482);var a;!function(e){e.fromConfiguration=function(e){const t=n.workspace.getConfiguration("files",e);return{trimTrailingWhitespace:t.get("trimTrailingWhitespace"),trimFinalNewlines:t.get("trimFinalNewlines"),insertFinalNewline:t.get("insertFinalNewline")}}}(a||(a={}));class l extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentFormattingRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){const i=this.getRegistrationOptions(t,e.documentFormattingProvider);i&&this.register({id:s.generateUuid(),registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,i={provideDocumentFormattingEdits:(e,t,i)=>{const n=this._client,s=(e,t,i)=>{const s={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e),options:n.code2ProtocolConverter.asFormattingOptions(t,a.fromConfiguration(e))};return n.sendRequest(o.DocumentFormattingRequest.type,s,i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asTextEdits(e,i)),(e=>n.handleFailedRequest(o.DocumentFormattingRequest.type,i,e,null)))},r=n.middleware;return r.provideDocumentFormattingEdits?r.provideDocumentFormattingEdits(e,t,i,s):s(e,t,i)}};return[n.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),i]}}t.DocumentFormattingFeature=l;class c extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0}initialize(e,t){const i=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);i&&this.register({id:s.generateUuid(),registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,i={provideDocumentRangeFormattingEdits:(e,t,i,n)=>{const s=this._client,r=(e,t,i,n)=>{const r={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),range:s.code2ProtocolConverter.asRange(t),options:s.code2ProtocolConverter.asFormattingOptions(i,a.fromConfiguration(e))};return s.sendRequest(o.DocumentRangeFormattingRequest.type,r,n).then((e=>n.isCancellationRequested?null:s.protocol2CodeConverter.asTextEdits(e,n)),(e=>s.handleFailedRequest(o.DocumentRangeFormattingRequest.type,n,e,null)))},l=s.middleware;return l.provideDocumentRangeFormattingEdits?l.provideDocumentRangeFormattingEdits(e,t,i,n,r):r(e,t,i,n)}};return[n.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),i]}}t.DocumentRangeFormattingFeature=c;class d extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){const i=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);i&&this.register({id:s.generateUuid(),registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,i={provideOnTypeFormattingEdits:(e,t,i,n,s)=>{const r=this._client,l=(e,t,i,n,s)=>{let l={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),position:r.code2ProtocolConverter.asPosition(t),ch:i,options:r.code2ProtocolConverter.asFormattingOptions(n,a.fromConfiguration(e))};return r.sendRequest(o.DocumentOnTypeFormattingRequest.type,l,s).then((e=>s.isCancellationRequested?null:r.protocol2CodeConverter.asTextEdits(e,s)),(e=>r.handleFailedRequest(o.DocumentOnTypeFormattingRequest.type,s,e,null)))},c=r.middleware;return c.provideOnTypeFormattingEdits?c.provideOnTypeFormattingEdits(e,t,i,n,s,l):l(e,t,i,n,s)}},s=e.moreTriggerCharacter||[];return[n.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i,e.firstTriggerCharacter,...s),i]}}t.DocumentOnTypeFormattingFeature=d},9259:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HoverFeature=void 0;const n=i(6804),o=i(294),s=i(7482),r=i(2667);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.HoverRequest.type)}fillClientCapabilities(e){const t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[o.MarkupKind.Markdown,o.MarkupKind.PlainText]}initialize(e,t){const i=this.getRegistrationOptions(t,e.hoverProvider);i&&this.register({id:r.generateUuid(),registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,i={provideHover:(e,t,i)=>{const n=this._client,s=(e,t,i)=>n.sendRequest(o.HoverRequest.type,n.code2ProtocolConverter.asTextDocumentPositionParams(e,t),i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asHover(e)),(e=>n.handleFailedRequest(o.HoverRequest.type,i,e,null))),r=n.middleware;return r.provideHover?r.provideHover(e,t,i,s):s(e,t,i)}};return[this.registerProvider(t,i),i]}registerProvider(e,t){return n.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.HoverFeature=a},7567:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationFeature=void 0;const n=i(6804),o=i(294),s=i(7482);class r extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.ImplementationRequest.type)}fillClientCapabilities(e){let t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[i,n]=this.getRegistration(t,e.implementationProvider);i&&n&&this.register({id:i,registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,i={provideImplementation:(e,t,i)=>{const n=this._client,s=(e,t,i)=>n.sendRequest(o.ImplementationRequest.type,n.code2ProtocolConverter.asTextDocumentPositionParams(e,t),i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asDefinitionResult(e,i)),(e=>n.handleFailedRequest(o.ImplementationRequest.type,i,e,null))),r=n.middleware;return r.provideImplementation?r.provideImplementation(e,t,i,s):s(e,t,i)}};return[this.registerProvider(t,i),i]}registerProvider(e,t){return n.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ImplementationFeature=r},4462:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintsFeature=void 0;const n=i(6804),o=i(294),s=i(7482);class r extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.InlayHintRequest.type)}fillClientCapabilities(e){const t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"inlayHint");t.dynamicRegistration=!0,t.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,s.ensure)((0,s.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.InlayHintRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlayHints.fire()}));const[i,n]=this.getRegistration(t,e.inlayHintProvider);i&&n&&this.register({id:i,registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,i=new n.EventEmitter,s={onDidChangeInlayHints:i.event,provideInlayHints:(e,t,i)=>{const n=this._client,s=async(e,t,i)=>{const s={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e),range:n.code2ProtocolConverter.asRange(t)};try{const e=await n.sendRequest(o.InlayHintRequest.type,s,i);return i.isCancellationRequested?null:n.protocol2CodeConverter.asInlayHints(e,i)}catch(e){return n.handleFailedRequest(o.InlayHintRequest.type,i,e,null)}},r=n.middleware;return r.provideInlayHints?r.provideInlayHints(e,t,i,s):s(e,t,i)}};return s.resolveInlayHint=!0===e.resolveProvider?(e,t)=>{const i=this._client,n=async(e,t)=>{try{const n=await i.sendRequest(o.InlayHintResolveRequest.type,i.code2ProtocolConverter.asInlayHint(e),t);if(t.isCancellationRequested)return null;const s=i.protocol2CodeConverter.asInlayHint(n,t);return t.isCancellationRequested?null:s}catch(e){return i.handleFailedRequest(o.InlayHintResolveRequest.type,t,e,null)}},s=i.middleware;return s.resolveInlayHint?s.resolveInlayHint(e,t,n):n(e,t)}:void 0,[this.registerProvider(t,s),{provider:s,onDidChangeInlayHints:i}]}registerProvider(e,t){return n.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlayHintsFeature=r},1973:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const n=i(6804),o=i(294),s=i(7482);class r extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.InlineValueRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,s.ensure)((0,s.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.InlineValueRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlineValues.fire()}));const[i,n]=this.getRegistration(t,e.inlineValueProvider);i&&n&&this.register({id:i,registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,i=new n.EventEmitter,s={onDidChangeInlineValues:i.event,provideInlineValues:(e,t,i,n)=>{const s=this._client,r=(e,t,i,n)=>{const r={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),range:s.code2ProtocolConverter.asRange(t),context:s.code2ProtocolConverter.asInlineValueContext(i)};return s.sendRequest(o.InlineValueRequest.type,r,n).then((e=>n.isCancellationRequested?null:s.protocol2CodeConverter.asInlineValues(e,n)),(e=>s.handleFailedRequest(o.InlineValueRequest.type,n,e,null)))},a=s.middleware;return a.provideInlineValues?a.provideInlineValues(e,t,i,n,r):r(e,t,i,n)}};return[this.registerProvider(t,s),{provider:s,onDidChangeInlineValues:i}]}registerProvider(e,t){return n.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlineValueFeature=r},4722:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingFeature=void 0;const n=i(6804),o=i(294),s=i(7482);class r extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"linkedEditingRange").dynamicRegistration=!0}initialize(e,t){let[i,n]=this.getRegistration(t,e.linkedEditingRangeProvider);i&&n&&this.register({id:i,registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,i={provideLinkedEditingRanges:(e,t,i)=>{const n=this._client,s=(e,t,i)=>n.sendRequest(o.LinkedEditingRangeRequest.type,n.code2ProtocolConverter.asTextDocumentPositionParams(e,t),i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asLinkedEditingRanges(e,i)),(e=>n.handleFailedRequest(o.LinkedEditingRangeRequest.type,i,e,null))),r=n.middleware;return r.provideLinkedEditingRange?r.provideLinkedEditingRange(e,t,i,s):s(e,t,i)}};return[this.registerProvider(t,i),i]}registerProvider(e,t){return n.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.LinkedEditingFeature=r},2488:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocumentSyncFeature=void 0;const n=i(6804),o=i(7339),s=i(294),r=i(2667),a=i(4652);function l(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c,d,h,u,g;!function(e){let t;!function(t){function i(e,t){return e.map((e=>r(e,t)))}function o(e){return l(new Set,e)}function r(e,t){const i=s.NotebookCell.create(function(e){switch(e){case n.NotebookCellKind.Markup:return s.NotebookCellKind.Markup;case n.NotebookCellKind.Code:return s.NotebookCellKind.Code}}(e.kind),t.asUri(e.document.uri));return Object.keys(e.metadata).length>0&&(i.metadata=o(e.metadata)),void 0!==e.executionSummary&&a.number(e.executionSummary.executionOrder)&&a.boolean(e.executionSummary.success)&&(i.executionSummary={executionOrder:e.executionSummary.executionOrder,success:e.executionSummary.success}),i}function l(e,t){if(e.has(t))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(t)){const i=[];for(const n of t)if(null!==n&&"object"==typeof n||Array.isArray(n))i.push(l(e,n));else{if(n instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");i.push(n)}return i}{const i=Object.keys(t),n=Object.create(null);for(const o of i){const i=t[o];if(null!==i&&"object"==typeof i||Array.isArray(i))n[o]=l(e,i);else{if(i instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");n[o]=i}}return n}}t.asVersionedNotebookDocumentIdentifier=function(e,t){return{version:e.version,uri:t.asUri(e.uri)}},t.asNotebookDocument=function(e,t,n){const r=s.NotebookDocument.create(n.asUri(e.uri),e.notebookType,e.version,i(t,n));return Object.keys(e.metadata).length>0&&(r.metadata=o(e.metadata)),r},t.asNotebookCells=i,t.asMetadata=o,t.asNotebookCell=r,t.asTextContentChange=function(e,t){const i=t.asChangeTextDocumentParams(e);return{document:i.textDocument,changes:i.contentChanges}},t.asNotebookDocumentChangeEvent=function(t,i){const n=Object.create(null);if(t.metadata&&(n.metadata=e.c2p.asMetadata(t.metadata)),void 0!==t.cells){const o=Object.create(null),s=t.cells;s.structure&&(o.structure={array:{start:s.structure.array.start,deleteCount:s.structure.array.deleteCount,cells:void 0!==s.structure.array.cells?s.structure.array.cells.map((t=>e.c2p.asNotebookCell(t,i))):void 0},didOpen:void 0!==s.structure.didOpen?s.structure.didOpen.map((e=>i.asOpenTextDocumentParams(e.document).textDocument)):void 0,didClose:void 0!==s.structure.didClose?s.structure.didClose.map((e=>i.asCloseTextDocumentParams(e.document).textDocument)):void 0}),void 0!==s.data&&(o.data=s.data.map((t=>e.c2p.asNotebookCell(t,i)))),void 0!==s.textContent&&(o.textContent=s.textContent.map((t=>e.c2p.asTextContentChange(t,i)))),Object.keys(o).length>0&&(n.cells=o)}return n}}(t=e.c2p||(e.c2p={}))}(c||(c={})),function(e){function t(e,t,n=!0){return!(e.kind!==t.kind||e.document.uri.toString()!==t.document.uri.toString()||e.document.languageId!==t.document.languageId||!function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.executionOrder===t.executionOrder&&e.success===t.success&&function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.startTime===t.startTime&&e.endTime===t.endTime)}(e.timing,t.timing))}(e.executionSummary,t.executionSummary))&&(!n||n&&i(e.metadata,t.metadata))}function i(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;const o=Array.isArray(e),s=Array.isArray(t);if(o!==s)return!1;if(o&&s){if(e.length!==t.length)return!1;for(let n=0;n=0&&l>=0&&t(e[a],i[l],n);)a--,l--;const c=a+1-r,d=r===l+1?void 0:i.slice(r,l+1);return void 0!==d?{start:r,deleteCount:c,cells:d}:{start:r,deleteCount:c}}return re.document.uri.toString())))}}}(g||(g={}));class p{constructor(e,t){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(u.asDocumentSelector(t)),n.workspace.onDidOpenNotebookDocument((e=>{this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e)}),void 0,this.disposables);for(const e of n.workspace.notebookDocuments)this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e);n.workspace.onDidChangeNotebookDocument((e=>this.didChangeNotebookDocument(e)),void 0,this.disposables),!0===this.options.save&&n.workspace.onDidSaveNotebookDocument((e=>this.didSave(e)),void 0,this.disposables),n.workspace.onDidCloseNotebookDocument((e=>{this.didClose(e),this.notebookDidOpen.delete(e.uri.toString())}),void 0,this.disposables)}getState(){for(const e of n.workspace.notebookDocuments)if(void 0!==this.getMatchingCells(e))return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){return n.languages.match(this.selector,e)>0}didOpenNotebookCellTextDocument(e,t){if(0===n.languages.match(this.selector,t.document))return;if(!this.notebookDidOpen.has(e.uri.toString()))return;const i=this.notebookSyncInfo.get(e.uri.toString()),o=this.cellMatches(e,t);if(void 0!==i){const n=i.uris.has(t.document.uri.toString());if(o&&n||!o&&!n)return;if(o){const t=this.getMatchingCells(e);if(void 0!==t){const n=this.asNotebookDocumentChangeEvent(e,void 0,i,t);void 0!==n&&this.doSendChange(n,t).catch((()=>{}))}}}else o&&this.doSendOpen(e,[t]).catch((()=>{}))}didChangeNotebookCellTextDocument(e,t){0!==n.languages.match(this.selector,t.document)&&this.doSendChange({notebook:e,cells:{textContent:[t]}},void 0).catch((()=>{}))}didCloseNotebookCellTextDocument(e,t){const i=this.notebookSyncInfo.get(e.uri.toString());if(void 0===i)return;const n=t.document.uri,o=i.cells.findIndex((e=>e.document.uri.toString()===n.toString()));if(-1!==o)if(0===o&&1===i.cells.length)this.doSendClose(e,i.cells).catch((()=>{}));else{const t=i.cells.slice(),n=t.splice(o,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:o,deleteCount:1},didClose:n}}},t).catch((()=>{}))}}dispose(){for(const e of this.disposables)e.dispose()}didOpen(e,t=this.getMatchingCells(e),i=this.notebookSyncInfo.get(e.uri.toString())){if(void 0!==i)if(void 0!==t){const n=this.asNotebookDocumentChangeEvent(e,void 0,i,t);void 0!==n&&this.doSendChange(n,t).catch((()=>{}))}else this.doSendClose(e,[]).catch((()=>{}));else{if(void 0===t)return;this.doSendOpen(e,t).catch((()=>{}))}}didChangeNotebookDocument(e){const t=e.notebook,i=this.notebookSyncInfo.get(t.uri.toString());if(void 0===i){if(0===e.contentChanges.length)return;const n=this.getMatchingCells(t);if(void 0===n)return;this.didOpen(t,n,i)}else{const n=this.getMatchingCells(t);if(void 0===n)return void this.didClose(t,i);const o=this.asNotebookDocumentChangeEvent(e.notebook,e,i,n);void 0!==o&&this.doSendChange(o,n).catch((()=>{}))}}didSave(e){void 0!==this.notebookSyncInfo.get(e.uri.toString())&&this.doSendSave(e).catch((()=>{}))}didClose(e,t=this.notebookSyncInfo.get(e.uri.toString())){if(void 0===t)return;const i=e.getCells().filter((e=>t.uris.has(e.document.uri.toString())));this.doSendClose(e,i).catch((()=>{}))}async sendDidOpenNotebookDocument(e){const t=this.getMatchingCells(e);if(void 0!==t)return this.doSendOpen(e,t)}async doSendOpen(e,t){const i=async(e,t)=>{const i=c.c2p.asNotebookDocument(e,t,this.client.code2ProtocolConverter),n=t.map((e=>this.client.code2ProtocolConverter.asTextDocumentItem(e.document)));try{await this.client.sendNotification(s.DidOpenNotebookDocumentNotification.type,{notebookDocument:i,cellTextDocuments:n})}catch(e){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",e),e}},n=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),g.create(t)),void 0!==n?.didOpen?n.didOpen(e,t,i):i(e,t)}async sendDidChangeNotebookDocument(e){return this.doSendChange(e,void 0)}async doSendChange(e,t=this.getMatchingCells(e.notebook)){const i=async e=>{try{await this.client.sendNotification(s.DidChangeNotebookDocumentNotification.type,{notebookDocument:c.c2p.asVersionedNotebookDocumentIdentifier(e.notebook,this.client.code2ProtocolConverter),change:c.c2p.asNotebookDocumentChangeEvent(e,this.client.code2ProtocolConverter)})}catch(e){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",e),e}},n=this.client.middleware?.notebooks;return void 0!==e.cells?.structure&&this.notebookSyncInfo.set(e.notebook.uri.toString(),g.create(t??[])),void 0!==n?.didChange?n?.didChange(e,i):i(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){const t=async e=>{try{await this.client.sendNotification(s.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)}})}catch(e){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return void 0!==i?.didSave?i.didSave(e,t):t(e)}async sendDidCloseNotebookDocument(e){return this.doSendClose(e,this.getMatchingCells(e)??[])}async doSendClose(e,t){const i=async(e,t)=>{try{await this.client.sendNotification(s.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)},cellTextDocuments:t.map((e=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(e.document)))})}catch(e){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",e),e}},n=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),void 0!==n?.didClose?n.didClose(e,t,i):i(e,t)}asNotebookDocumentChangeEvent(e,t,i,n){if(void 0!==t&&t.notebook!==e)throw new Error("Notebook must be identical");const o={notebook:e};let s;if(void 0!==t?.metadata&&(o.metadata=c.c2p.asMetadata(t.metadata)),void 0!==t?.cellChanges&&t.cellChanges.length>0){const e=[];s=new Set(n.map((e=>e.document.uri.toString())));for(const i of t.cellChanges)!s.has(i.cell.document.uri.toString())||void 0===i.executionSummary&&void 0===i.metadata||e.push(i.cell);e.length>0&&(o.cells=o.cells??{},o.cells.data=e)}if((void 0!==t?.contentChanges&&t.contentChanges.length>0||void 0===t)&&void 0!==i&&void 0!==n){const e=i.cells,t=n,s=d.computeDiff(e,t,!1);let r,a;if(void 0!==s){r=void 0===s.cells?new Map:new Map(s.cells.map((e=>[e.document.uri.toString(),e]))),a=0===s.deleteCount?new Map:new Map(e.slice(s.start,s.start+s.deleteCount).map((e=>[e.document.uri.toString(),e])));for(const e of Array.from(a.keys()))r.has(e)&&(a.delete(e),r.delete(e));o.cells=o.cells??{};const t=[],i=[];if(r.size>0||a.size>0){for(const e of r.values())t.push(e);for(const e of a.values())i.push(e)}o.cells.structure={array:s,didOpen:t,didClose:i}}}return Object.keys(o).length>1?o:void 0}getMatchingCells(e,t=e.getCells()){if(void 0!==this.options.notebookSelector)for(const i of this.options.notebookSelector){if(void 0===i.notebook){if(void 0===i.cells)return;const n=this.filterCells(e,t,i.cells);return 0===n.length?void 0:n}if(h.matchNotebook(i.notebook,e))return void 0===i.cells?t:this.filterCells(e,t,i.cells)}}cellMatches(e,t){const i=this.getMatchingCells(e,[t]);return void 0!==i&&i[0]===t}filterCells(e,t,i){const n=t.filter((e=>{const t=e.document.languageId;return i.some((e=>"*"===e.language||t===e.language))}));return"function"==typeof this.client.clientOptions.notebookDocumentOptions?.filterCells?this.client.clientOptions.notebookDocumentOptions.filterCells(e,t):n}}class m{constructor(e){this.client=e,this.registrations=new Map,this.registrationType=s.NotebookDocumentSyncRegistrationType.type,n.workspace.onDidOpenTextDocument((e=>{if(e.uri.scheme!==m.CellScheme)return;const[t,i]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==i)for(const e of this.registrations.values())e instanceof p&&e.didOpenNotebookCellTextDocument(t,i)})),n.workspace.onDidChangeTextDocument((e=>{if(0===e.contentChanges.length)return;const t=e.document;if(t.uri.scheme!==m.CellScheme)return;const[i]=this.findNotebookDocumentAndCell(t);if(void 0!==i)for(const t of this.registrations.values())t instanceof p&&t.didChangeNotebookCellTextDocument(i,e)})),n.workspace.onDidCloseTextDocument((e=>{if(e.uri.scheme!==m.CellScheme)return;const[t,i]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==i)for(const e of this.registrations.values())e instanceof p&&e.didCloseNotebookCellTextDocument(t,i)}))}getState(){if(0===this.registrations.size)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(const e of this.registrations.values()){const t=e.getState();if("document"===t.kind&&!0===t.registrations&&!0===t.matches)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}fillClientCapabilities(e){const t=l(l(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){const t=e.notebookDocumentSync;void 0!==t&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(u.asDocumentSelector(t)))}initialize(e){const t=e.notebookDocumentSync;if(void 0===t)return;const i=t.id??r.generateUuid();this.register({id:i,registerOptions:t})}register(e){const t=new p(this.client,e.registerOptions);this.registrations.set(e.id,t)}unregister(e){const t=this.registrations.get(e);t&&t.dispose()}dispose(){for(const e of this.registrations.values())e.dispose();this.registrations.clear()}handles(e){if(e.uri.scheme!==m.CellScheme)return!1;if(void 0!==this.dedicatedChannel&&n.languages.match(this.dedicatedChannel,e)>0)return!0;for(const t of this.registrations.values())if(t.handles(e))return!0;return!1}getProvider(e){for(const t of this.registrations.values())if(t.handles(e.document))return t}findNotebookDocumentAndCell(e){const t=e.uri.toString();for(const e of n.workspace.notebookDocuments)for(const i of e.getCells())if(i.document.uri.toString()===t)return[e,i];return[void 0,void 0]}}t.NotebookDocumentSyncFeature=m,m.CellScheme="vscode-notebook-cell"},4585:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressFeature=void 0;const n=i(294),o=i(5984);t.ProgressFeature=class{constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:n.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){var t,i;(t=e,i="window",void 0===t[i]&&(t[i]=Object.create(null)),t[i]).workDoneProgress=!0}initialize(){const e=this._client,t=e=>{this.activeParts.delete(e)};e.onRequest(n.WorkDoneProgressCreateRequest.type,(e=>{this.activeParts.add(new o.ProgressPart(this._client,e.token,t))}))}dispose(){for(const e of this.activeParts)e.done();this.activeParts.clear()}}},5984:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressPart=void 0;const n=i(6804),o=i(294),s=i(4652);t.ProgressPart=class{constructor(e,t,i){this._client=e,this._token=t,this._reported=0,this._infinite=!1,this._lspProgressDisposable=this._client.onProgress(o.WorkDoneProgress.type,this._token,(e=>{switch(e.kind){case"begin":this.begin(e);break;case"report":this.report(e);break;case"end":this.done(),i&&i(this)}}))}begin(e){this._infinite=void 0===e.percentage,void 0!==this._lspProgressDisposable&&n.window.withProgress({location:n.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},(async(t,i)=>{if(void 0!==this._lspProgressDisposable)return this._progress=t,this._cancellationToken=i,this._tokenDisposable=this._cancellationToken.onCancellationRequested((()=>{this._client.sendNotification(o.WorkDoneProgressCancelNotification.type,{token:this._token})})),this.report(e),new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}))}report(e){if(this._infinite&&s.string(e.message))void 0!==this._progress&&this._progress.report({message:e.message});else if(s.number(e.percentage)){const t=Math.max(0,Math.min(e.percentage,100)),i=Math.max(0,t-this._reported);this._reported+=i,void 0!==this._progress&&this._progress.report({message:e.message,increment:i})}}cancel(){this.cleanup(),void 0!==this._reject&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),void 0!==this._resolve&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){void 0!==this._lspProgressDisposable&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),void 0!==this._tokenDisposable&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}}},777:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(6804);class o extends n.CallHierarchyItem{constructor(e,t,i,n,o,s,r){super(e,t,i,n,o,s),void 0!==r&&(this.data=r)}}t.default=o},5958:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(6804);class o extends n.CodeAction{constructor(e,t){super(e),this.data=t}}t.default=o},2817:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(6804);class o extends n.CodeLens{constructor(e){super(e)}}t.default=o},9147:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(6804);class o extends n.CompletionItem{constructor(e){super(e)}}t.default=o},1011:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const n=i(6804),o=i(294),s=i(4652),r=i(899),a=i(9147),l=i(2817),c=i(8501),d=i(5958),h=i(8171),u=i(777),g=i(9585),p=i(6363),m=i(570),f=i(294);var _;!function(e){e.is=function(e){let t=e;return t&&s.string(t.language)&&s.string(t.value)}}(_||(_={})),t.createConverter=function(e,t,i){const v=e||(e=>n.Uri.parse(e));function b(e){return v(e)}function C(e){let t=new h.ProtocolDiagnostic(S(e.range),e.message,k(e.severity),e.data);if(void 0!==e.code)if("string"==typeof e.code||"number"==typeof e.code)o.CodeDescription.is(e.codeDescription)?t.code={value:e.code,target:b(e.codeDescription.href)}:t.code=e.code;else if(h.DiagnosticCode.is(e.code)){t.hasDiagnosticCode=!0;const i=e.code;t.code={value:i.value,target:b(i.target)}}return e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=function(e){const t=new Array(e.length);for(let i=0;i0?t:void 0}(e.tags)),t}function w(e){switch(e){case o.DiagnosticTag.Unnecessary:return n.DiagnosticTag.Unnecessary;case o.DiagnosticTag.Deprecated:return n.DiagnosticTag.Deprecated;default:return}}function y(e){return e?new n.Position(e.line,e.character):void 0}function S(e){return e?new n.Range(e.start.line,e.start.character,e.end.line,e.end.character):void 0}async function x(e,t){return r.map(e,(e=>new n.Range(e.start.line,e.start.character,e.end.line,e.end.character)),t)}function k(e){if(null==e)return n.DiagnosticSeverity.Error;switch(e){case o.DiagnosticSeverity.Error:return n.DiagnosticSeverity.Error;case o.DiagnosticSeverity.Warning:return n.DiagnosticSeverity.Warning;case o.DiagnosticSeverity.Information:return n.DiagnosticSeverity.Information;case o.DiagnosticSeverity.Hint:return n.DiagnosticSeverity.Hint}return n.DiagnosticSeverity.Error}function D(e){if(s.string(e))return e;switch(e.kind){case o.MarkupKind.Markdown:return L(e.value);case o.MarkupKind.PlainText:return e.value;default:return`Unsupported Markup content received. Kind is: ${e.kind}`}}function L(e){let s;if(void 0===e||"string"==typeof e)s=new n.MarkdownString(e);else switch(e.kind){case o.MarkupKind.Markdown:s=new n.MarkdownString(e.value);break;case o.MarkupKind.PlainText:s=new n.MarkdownString,s.appendText(e.value);break;default:s=new n.MarkdownString,s.appendText(`Unsupported Markup content received. Kind is: ${e.kind}`)}return s.isTrusted=t,s.supportHtml=i,s}function E(e){if(e===o.CompletionItemTag.Deprecated)return n.CompletionItemTag.Deprecated}function N(e,t,i,r,l,c){const d=function(e){if(null==e)return[];const t=[];for(const i of e){const e=E(i);void 0!==e&&t.push(e)}return t}(e.tags),h=function(e){return o.CompletionItemLabelDetails.is(e.labelDetails)?{label:e.label,detail:e.labelDetails.detail,description:e.labelDetails.description}:e.label}(e),u=new a.default(h);e.detail&&(u.detail=e.detail),e.documentation&&(u.documentation=D(e.documentation),u.documentationFormat=s.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(u.filterText=e.filterText);const g=function(e,t,i){const s=e.insertTextFormat??i;if(void 0!==e.textEdit||void 0!==t){const[i,a]=void 0!==e.textEdit?(r=e.textEdit,o.InsertReplaceEdit.is(r)?[{inserting:S(r.insert),replacing:S(r.replace)},r.newText]:[S(r.range),r.newText]):[t,e.textEditText??e.label];return s===o.InsertTextFormat.Snippet?{text:new n.SnippetString(a),range:i,fromEdit:!0}:{text:a,range:i,fromEdit:!0}}return e.insertText?s===o.InsertTextFormat.Snippet?{text:new n.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0;var r}(e,i,l);if(g&&(u.insertText=g.text,u.range=g.range,u.fromEdit=g.fromEdit),s.number(e.kind)){let[t,i]=(p=e.kind,o.CompletionItemKind.Text<=p&&p<=o.CompletionItemKind.TypeParameter?[p-1,void 0]:[n.CompletionItemKind.Text,p]);u.kind=t,i&&(u.originalItemKind=i)}var p;e.sortText&&(u.sortText=e.sortText),e.additionalTextEdits&&(u.additionalTextEdits=M(e.additionalTextEdits));const m=void 0!==e.commitCharacters?s.stringArray(e.commitCharacters)?e.commitCharacters:void 0:t;m&&(u.commitCharacters=m.slice()),e.command&&(u.command=Z(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(u.deprecated=e.deprecated,!0===e.deprecated&&d.push(n.CompletionItemTag.Deprecated)),!0!==e.preselect&&!1!==e.preselect||(u.preselect=e.preselect);const f=e.data??c;void 0!==f&&(u.data=f),d.length>0&&(u.tags=d);const _=e.insertTextMode??r;return void 0!==_&&(u.insertTextMode=_,_===o.InsertTextMode.asIs&&(u.keepWhitespace=!0)),u}function I(e){if(e)return new n.TextEdit(S(e.range),e.newText)}async function T(e,t){if(e)return r.map(e,I,t)}function M(e){if(!e)return;const t=new Array(e.length);for(let i=0;i0){let i=[];for(let t of e.children)i.push(U(t));t.children=i}return t}function $(e,t){e.tags=q(t.tags),t.deprecated&&(e.tags?e.tags.includes(n.SymbolTag.Deprecated)||(e.tags=e.tags.concat(n.SymbolTag.Deprecated)):e.tags=[n.SymbolTag.Deprecated])}function Z(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const G=new Map;function Y(e){if(null==e)return;let t=G.get(e);if(t)return t;let i=e.split(".");t=n.CodeActionKind.Empty;for(let e of i)t=t.append(e);return t}async function X(e,t){if(null==e)return;let i=new d.default(e.title,e.data);return void 0!==e.kind&&(i.kind=Y(e.kind)),void 0!==e.diagnostics&&(i.diagnostics=function(e){const t=new Array(e.length);for(let i=0;i{const t=function(e){if(void 0!==e)return{label:e.label,needsConfirmation:!!e.needsConfirmation,description:e.description}}(n[e]);i.set(e,t)}),t)}const s=e=>void 0===e?void 0:i.get(e),a=new n.WorkspaceEdit;if(e.documentChanges){const i=e.documentChanges;await r.forEach(i,(e=>{if(o.CreateFile.is(e))a.createFile(v(e.uri),e.options,s(e.annotationId));else if(o.RenameFile.is(e))a.renameFile(v(e.oldUri),v(e.newUri),e.options,s(e.annotationId));else if(o.DeleteFile.is(e))a.deleteFile(v(e.uri),e.options,s(e.annotationId));else{if(!o.TextDocumentEdit.is(e))throw new Error(`Unknown workspace edit change received:\n${JSON.stringify(e,void 0,4)}`);{const t=v(e.textDocument.uri);for(const i of e.edits)o.AnnotatedTextEdit.is(i)?a.replace(t,S(i.range),i.newText,s(i.annotationId)):a.replace(t,S(i.range),i.newText)}}}),t)}else if(e.changes){const i=e.changes;await r.forEach(Object.keys(i),(e=>{a.set(v(e),M(i[e]))}),t)}return a}function ee(e){let t=S(e.range),i=e.target?b(e.target):void 0,n=new c.default(t,i);return void 0!==e.tooltip&&(n.tooltip=e.tooltip),void 0!==e.data&&null!==e.data&&(n.data=e.data),n}function te(e){return new n.Color(e.red,e.green,e.blue,e.alpha)}function ie(e){return new n.ColorInformation(S(e.range),te(e.color))}function ne(e){let t=new n.ColorPresentation(e.label);return t.additionalTextEdits=M(e.additionalTextEdits),e.textEdit&&(t.textEdit=I(e.textEdit)),t}function oe(e){if(e)switch(e){case o.FoldingRangeKind.Comment:return n.FoldingRangeKind.Comment;case o.FoldingRangeKind.Imports:return n.FoldingRangeKind.Imports;case o.FoldingRangeKind.Region:return n.FoldingRangeKind.Region}}function se(e){return new n.FoldingRange(e.startLine,e.endLine,oe(e.kind))}function re(e){return new n.SelectionRange(S(e.range),e.parent?re(e.parent):void 0)}function ae(e){return o.InlineValueText.is(e)?new n.InlineValueText(S(e.range),e.text):o.InlineValueVariableLookup.is(e)?new n.InlineValueVariableLookup(S(e.range),e.variableName,e.caseSensitiveLookup):new n.InlineValueEvaluatableExpression(S(e.range),e.expression)}async function le(e,t){const i="string"==typeof e.label?e.label:await r.map(e.label,ce,t),n=new m.default(y(e.position),i);return void 0!==e.kind&&(n.kind=e.kind),void 0!==e.textEdits&&(n.textEdits=await T(e.textEdits,t)),void 0!==e.tooltip&&(n.tooltip=de(e.tooltip)),void 0!==e.paddingLeft&&(n.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(n.paddingRight=e.paddingRight),void 0!==e.data&&(n.data=e.data),n}function ce(e){const t=new n.InlayHintLabelPart(e.value);return void 0!==e.location&&(t.location=F(e.location)),void 0!==e.tooltip&&(t.tooltip=de(e.tooltip)),void 0!==e.command&&(t.command=Z(e.command)),t}function de(e){return"string"==typeof e?e:L(e)}function he(e){if(null===e)return;const t=new u.default(z(e.kind),e.name,e.detail||"",b(e.uri),S(e.range),S(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=q(e.tags)),t}async function ue(e,t){return new n.CallHierarchyIncomingCall(he(e.from),await x(e.fromRanges,t))}async function ge(e,t){return new n.CallHierarchyOutgoingCall(he(e.to),await x(e.fromRanges,t))}function pe(e){return new n.SemanticTokensEdit(e.start,e.deleteCount,void 0!==e.data?new Uint32Array(e.data):void 0)}function me(e){if(null===e)return;let t=new g.default(z(e.kind),e.name,e.detail||"",b(e.uri),S(e.range),S(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=q(e.tags)),t}return G.set(o.CodeActionKind.Empty,n.CodeActionKind.Empty),G.set(o.CodeActionKind.QuickFix,n.CodeActionKind.QuickFix),G.set(o.CodeActionKind.Refactor,n.CodeActionKind.Refactor),G.set(o.CodeActionKind.RefactorExtract,n.CodeActionKind.RefactorExtract),G.set(o.CodeActionKind.RefactorInline,n.CodeActionKind.RefactorInline),G.set(o.CodeActionKind.RefactorRewrite,n.CodeActionKind.RefactorRewrite),G.set(o.CodeActionKind.Source,n.CodeActionKind.Source),G.set(o.CodeActionKind.SourceOrganizeImports,n.CodeActionKind.SourceOrganizeImports),{asUri:b,asDocumentSelector:function(e){const t=[];for(const i of e)if("string"==typeof i)t.push(i);else if(f.NotebookCellTextDocumentFilter.is(i))if("string"==typeof i.notebook)t.push({notebookType:i.notebook,language:i.language});else{const e=i.notebook.notebookType??"*";t.push({notebookType:e,scheme:i.notebook.scheme,pattern:i.notebook.pattern,language:i.language})}else f.TextDocumentFilter.is(i)&&t.push({language:i.language,scheme:i.scheme,pattern:i.pattern});return t},asDiagnostics:async function(e,t){return r.map(e,C,t)},asDiagnostic:C,asRange:S,asRanges:x,asPosition:y,asDiagnosticSeverity:k,asDiagnosticTag:w,asHover:function(e){if(e)return new n.Hover(function(e){if(s.string(e))return L(e);if(_.is(e))return L().appendCodeblock(e.value,e.language);if(Array.isArray(e)){let t=[];for(let i of e){let e=L();_.is(i)?e.appendCodeblock(i.value,i.language):e.appendMarkdown(i),t.push(e)}return t}return L(e)}(e.contents),S(e.range))},asCompletionResult:async function(e,t,i){if(!e)return;if(Array.isArray(e))return r.map(e,(e=>N(e,t)),i);const s=e,{defaultRange:a,commitCharacters:l}=function(e,t){const i=e.itemDefaults?.editRange,n=e.itemDefaults?.commitCharacters??t;return o.Range.is(i)?{defaultRange:S(i),commitCharacters:n}:void 0!==i?{defaultRange:{inserting:S(i.insert),replacing:S(i.replace)},commitCharacters:n}:{defaultRange:void 0,commitCharacters:n}}(s,t),c=await r.map(s.items,(e=>N(e,l,a,s.itemDefaults?.insertTextMode,s.itemDefaults?.insertTextFormat,s.itemDefaults?.data)),i);return new n.CompletionList(c,s.isIncomplete)},asCompletionItem:N,asTextEdit:I,asTextEdits:T,asSignatureHelp:async function(e,t){if(!e)return;let i=new n.SignatureHelp;return s.number(e.activeSignature)?i.activeSignature=e.activeSignature:i.activeSignature=0,s.number(e.activeParameter)?i.activeParameter=e.activeParameter:i.activeParameter=0,e.signatures&&(i.signatures=await R(e.signatures,t)),i},asSignatureInformations:R,asSignatureInformation:P,asParameterInformations:A,asParameterInformation:O,asDeclarationResult:async function(e,t){if(e)return B(e,t)},asDefinitionResult:async function(e,t){if(e)return B(e,t)},asLocation:F,asReferences:async function(e,t){if(e)return r.map(e,F,t)},asDocumentHighlights:async function(e,t){if(e)return r.map(e,V,t)},asDocumentHighlight:V,asDocumentHighlightKind:H,asSymbolKind:z,asSymbolTag:j,asSymbolTags:q,asSymbolInformations:async function(e,t){if(e)return r.map(e,K,t)},asSymbolInformation:K,asDocumentSymbols:async function(e,t){if(null!=e)return r.map(e,U,t)},asDocumentSymbol:U,asCommand:Z,asCommands:async function(e,t){if(e)return r.map(e,Z,t)},asCodeAction:X,asCodeActionKind:Y,asCodeActionKinds:function(e){if(null!=e)return e.map((e=>Y(e)))},asCodeActionResult:function(e,t){return r.mapAsync(e,(async e=>o.Command.is(e)?Z(e):X(e,t)),t)},asCodeLens:J,asCodeLenses:async function(e,t){if(e)return r.map(e,J,t)},asWorkspaceEdit:Q,asDocumentLink:ee,asDocumentLinks:async function(e,t){if(e)return r.map(e,ee,t)},asFoldingRangeKind:oe,asFoldingRange:se,asFoldingRanges:async function(e,t){if(e)return r.map(e,se,t)},asColor:te,asColorInformation:ie,asColorInformations:async function(e,t){if(e)return r.map(e,ie,t)},asColorPresentation:ne,asColorPresentations:async function(e,t){if(e)return r.map(e,ne,t)},asSelectionRange:re,asSelectionRanges:async function(e,t){return Array.isArray(e)?r.map(e,re,t):[]},asInlineValue:ae,asInlineValues:async function(e,t){return Array.isArray(e)?r.map(e,ae,t):[]},asInlayHint:le,asInlayHints:async function(e,t){if(Array.isArray(e))return r.mapAsync(e,le,t)},asSemanticTokensLegend:function(e){return e},asSemanticTokens:async function(e,t){if(null!=e)return new n.SemanticTokens(new Uint32Array(e.data),e.resultId)},asSemanticTokensEdit:pe,asSemanticTokensEdits:async function(e,t){if(null!=e)return new n.SemanticTokensEdits(e.edits.map(pe),e.resultId)},asCallHierarchyItem:he,asCallHierarchyItems:async function(e,t){if(null!==e)return r.map(e,he,t)},asCallHierarchyIncomingCall:ue,asCallHierarchyIncomingCalls:async function(e,t){if(null!==e)return r.mapAsync(e,ue,t)},asCallHierarchyOutgoingCall:ge,asCallHierarchyOutgoingCalls:async function(e,t){if(null!==e)return r.mapAsync(e,ge,t)},asLinkedEditingRanges:async function(e,t){if(null!=e)return new n.LinkedEditingRanges(await x(e.ranges,t),function(e){if(null!=e)return new RegExp(e)}(e.wordPattern))},asTypeHierarchyItem:me,asTypeHierarchyItems:async function(e,t){if(null!==e)return r.map(e,me,t)},asGlobPattern:function(e){if(s.string(e))return e;if(o.RelativePattern.is(e)){if(o.URI.is(e.baseUri))return new n.RelativePattern(b(e.baseUri),e.pattern);if(o.WorkspaceFolder.is(e.baseUri)){const t=n.workspace.getWorkspaceFolder(b(e.baseUri.uri));return void 0!==t?new n.RelativePattern(t,e.pattern):void 0}}}}}},8171:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolDiagnostic=t.DiagnosticCode=void 0;const n=i(6804),o=i(4652);(t.DiagnosticCode||(t.DiagnosticCode={})).is=function(e){const t=e;return null!=t&&(o.number(t.value)||o.string(t.value))&&o.string(t.target)};class s extends n.Diagnostic{constructor(e,t,i,n){super(e,t,i),this.data=n,this.hasDiagnosticCode=!1}}t.ProtocolDiagnostic=s},8501:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(6804);class o extends n.DocumentLink{constructor(e,t){super(e,t)}}t.default=o},570:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(6804);class o extends n.InlayHint{constructor(e,t,i){super(e,t,i)}}t.default=o},9585:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(6804);class o extends n.TypeHierarchyItem{constructor(e,t,i,n,o,s,r){super(e,t,i,n,o,s),void 0!==r&&(this.data=r)}}t.default=o},6363:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(6804);class o extends n.SymbolInformation{constructor(e,t,i,o,s){const r=!(o instanceof n.Uri);super(e,t,i,r?o:new n.Location(o,new n.Range(0,0,0,0))),this.hasRange=r,void 0!==s&&(this.data=s)}}t.default=o},2318:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReferencesFeature=void 0;const n=i(6804),o=i(294),s=i(7482),r=i(2667);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.ReferencesRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){const i=this.getRegistrationOptions(t,e.referencesProvider);i&&this.register({id:r.generateUuid(),registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,i={provideReferences:(e,t,i,n)=>{const s=this._client,r=(e,t,i,n)=>s.sendRequest(o.ReferencesRequest.type,s.code2ProtocolConverter.asReferenceParams(e,t,i),n).then((e=>n.isCancellationRequested?null:s.protocol2CodeConverter.asReferences(e,n)),(e=>s.handleFailedRequest(o.ReferencesRequest.type,n,e,null))),a=s.middleware;return a.provideReferences?a.provideReferences(e,t,i,n,r):r(e,t,i,n)}};return[this.registerProvider(t,i),i]}registerProvider(e,t){return n.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ReferencesFeature=a},6991:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenameFeature=void 0;const n=i(6804),o=i(294),s=i(2667),r=i(4652),a=i(7482);class l extends a.TextDocumentLanguageFeature{constructor(e){super(e,o.RenameRequest.type)}fillClientCapabilities(e){let t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=o.PrepareSupportDefaultBehavior.Identifier,t.honorsChangeAnnotations=!0}initialize(e,t){const i=this.getRegistrationOptions(t,e.renameProvider);i&&(r.boolean(e.renameProvider)&&(i.prepareProvider=!1),this.register({id:s.generateUuid(),registerOptions:i}))}registerLanguageProvider(e){const t=e.documentSelector,i={provideRenameEdits:(e,t,i,n)=>{const s=this._client,r=(e,t,i,n)=>{let r={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),position:s.code2ProtocolConverter.asPosition(t),newName:i};return s.sendRequest(o.RenameRequest.type,r,n).then((e=>n.isCancellationRequested?null:s.protocol2CodeConverter.asWorkspaceEdit(e,n)),(e=>s.handleFailedRequest(o.RenameRequest.type,n,e,null,!1)))},a=s.middleware;return a.provideRenameEdits?a.provideRenameEdits(e,t,i,n,r):r(e,t,i,n)},prepareRename:e.prepareProvider?(e,t,i)=>{const n=this._client,s=(e,t,i)=>{let s={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e),position:n.code2ProtocolConverter.asPosition(t)};return n.sendRequest(o.PrepareRenameRequest.type,s,i).then((e=>i.isCancellationRequested?null:o.Range.is(e)?n.protocol2CodeConverter.asRange(e):this.isDefaultBehavior(e)?!0===e.defaultBehavior?null:Promise.reject(new Error("The element can't be renamed.")):e&&o.Range.is(e.range)?{range:n.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:Promise.reject(new Error("The element can't be renamed."))),(e=>{throw"string"==typeof e.message?new Error(e.message):new Error("The element can't be renamed.")}))},r=n.middleware;return r.prepareRename?r.prepareRename(e,t,i,s):s(e,t,i)}:void 0};return[this.registerProvider(t,i),i]}registerProvider(e,t){return n.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){const t=e;return t&&r.boolean(t.defaultBehavior)}}t.RenameFeature=l},4778:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeFeature=void 0;const n=i(6804),o=i(294),s=i(7482);class r extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.SelectionRangeRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"selectionRange").dynamicRegistration=!0}initialize(e,t){const[i,n]=this.getRegistration(t,e.selectionRangeProvider);i&&n&&this.register({id:i,registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,i={provideSelectionRanges:(e,t,i)=>{const n=this._client,s=async(e,t,i)=>{const s={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e),positions:await n.code2ProtocolConverter.asPositions(t,i)};return n.sendRequest(o.SelectionRangeRequest.type,s,i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asSelectionRanges(e,i)),(e=>n.handleFailedRequest(o.SelectionRangeRequest.type,i,e,null)))},r=n.middleware;return r.provideSelectionRanges?r.provideSelectionRanges(e,t,i,s):s(e,t,i)}};return[this.registerProvider(t,i),i]}registerProvider(e,t){return n.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.SelectionRangeFeature=r},1572:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensFeature=void 0;const n=i(6804),o=i(294),s=i(7482),r=i(4652);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){const t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[o.SemanticTokenTypes.namespace,o.SemanticTokenTypes.type,o.SemanticTokenTypes.class,o.SemanticTokenTypes.enum,o.SemanticTokenTypes.interface,o.SemanticTokenTypes.struct,o.SemanticTokenTypes.typeParameter,o.SemanticTokenTypes.parameter,o.SemanticTokenTypes.variable,o.SemanticTokenTypes.property,o.SemanticTokenTypes.enumMember,o.SemanticTokenTypes.event,o.SemanticTokenTypes.function,o.SemanticTokenTypes.method,o.SemanticTokenTypes.macro,o.SemanticTokenTypes.keyword,o.SemanticTokenTypes.modifier,o.SemanticTokenTypes.comment,o.SemanticTokenTypes.string,o.SemanticTokenTypes.number,o.SemanticTokenTypes.regexp,o.SemanticTokenTypes.operator,o.SemanticTokenTypes.decorator],t.tokenModifiers=[o.SemanticTokenModifiers.declaration,o.SemanticTokenModifiers.definition,o.SemanticTokenModifiers.readonly,o.SemanticTokenModifiers.static,o.SemanticTokenModifiers.deprecated,o.SemanticTokenModifiers.abstract,o.SemanticTokenModifiers.async,o.SemanticTokenModifiers.modification,o.SemanticTokenModifiers.documentation,o.SemanticTokenModifiers.defaultLibrary],t.formats=[o.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,t.serverCancelSupport=!0,t.augmentsSyntaxTokens=!0,(0,s.ensure)((0,s.ensure)(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.SemanticTokensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeSemanticTokensEmitter.fire()}));const[i,n]=this.getRegistration(t,e.semanticTokensProvider);i&&n&&this.register({id:i,registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,i=r.boolean(e.full)?e.full:void 0!==e.full,s=void 0!==e.full&&"boolean"!=typeof e.full&&!0===e.full.delta,a=new n.EventEmitter,l=i?{onDidChangeSemanticTokens:a.event,provideDocumentSemanticTokens:(e,t)=>{const i=this._client,n=i.middleware,s=(e,t)=>{const n={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e)};return i.sendRequest(o.SemanticTokensRequest.type,n,t).then((e=>t.isCancellationRequested?null:i.protocol2CodeConverter.asSemanticTokens(e,t)),(e=>i.handleFailedRequest(o.SemanticTokensRequest.type,t,e,null)))};return n.provideDocumentSemanticTokens?n.provideDocumentSemanticTokens(e,t,s):s(e,t)},provideDocumentSemanticTokensEdits:s?(e,t,i)=>{const n=this._client,s=n.middleware,r=(e,t,i)=>{const s={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e),previousResultId:t};return n.sendRequest(o.SemanticTokensDeltaRequest.type,s,i).then((async e=>i.isCancellationRequested?null:o.SemanticTokens.is(e)?await n.protocol2CodeConverter.asSemanticTokens(e,i):await n.protocol2CodeConverter.asSemanticTokensEdits(e,i)),(e=>n.handleFailedRequest(o.SemanticTokensDeltaRequest.type,i,e,null)))};return s.provideDocumentSemanticTokensEdits?s.provideDocumentSemanticTokensEdits(e,t,i,r):r(e,t,i)}:void 0}:void 0,c=!0===e.range?{provideDocumentRangeSemanticTokens:(e,t,i)=>{const n=this._client,s=n.middleware,r=(e,t,i)=>{const s={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e),range:n.code2ProtocolConverter.asRange(t)};return n.sendRequest(o.SemanticTokensRangeRequest.type,s,i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asSemanticTokens(e,i)),(e=>n.handleFailedRequest(o.SemanticTokensRangeRequest.type,i,e,null)))};return s.provideDocumentRangeSemanticTokens?s.provideDocumentRangeSemanticTokens(e,t,i,r):r(e,t,i)}}:void 0,d=[],h=this._client,u=h.protocol2CodeConverter.asSemanticTokensLegend(e.legend),g=h.protocol2CodeConverter.asDocumentSelector(t);return void 0!==l&&d.push(n.languages.registerDocumentSemanticTokensProvider(g,l,u)),void 0!==c&&d.push(n.languages.registerDocumentRangeSemanticTokensProvider(g,c,u)),[new n.Disposable((()=>d.forEach((e=>e.dispose())))),{range:c,full:l,onDidChangeSemanticTokensEmitter:a}]}}t.SemanticTokensFeature=a},7548:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureHelpFeature=void 0;const n=i(6804),o=i(294),s=i(7482),r=i(2667);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[o.MarkupKind.Markdown,o.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.signatureInformation.activeParameterSupport=!0,t.contextSupport=!0}initialize(e,t){const i=this.getRegistrationOptions(t,e.signatureHelpProvider);i&&this.register({id:r.generateUuid(),registerOptions:i})}registerLanguageProvider(e){const t={provideSignatureHelp:(e,t,i,n)=>{const s=this._client,r=(e,t,i,n)=>s.sendRequest(o.SignatureHelpRequest.type,s.code2ProtocolConverter.asSignatureHelpParams(e,t,i),n).then((e=>n.isCancellationRequested?null:s.protocol2CodeConverter.asSignatureHelp(e,n)),(e=>s.handleFailedRequest(o.SignatureHelpRequest.type,n,e,null))),a=s.middleware;return a.provideSignatureHelp?a.provideSignatureHelp(e,t,n,i,r):r(e,t,n,i)}};return[this.registerProvider(e,t),t]}registerProvider(e,t){const i=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(void 0===e.retriggerCharacters){const o=e.triggerCharacters||[];return n.languages.registerSignatureHelpProvider(i,t,...o)}{const o={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return n.languages.registerSignatureHelpProvider(i,t,o)}}}t.SignatureHelpFeature=a},7583:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidSaveTextDocumentFeature=t.WillSaveWaitUntilFeature=t.WillSaveFeature=t.DidChangeTextDocumentFeature=t.DidCloseTextDocumentFeature=t.DidOpenTextDocumentFeature=void 0;const n=i(6804),o=i(294),s=i(7482),r=i(899),a=i(2667);class l extends s.TextDocumentEventFeature{constructor(e,t){super(e,n.workspace.onDidOpenTextDocument,o.DidOpenTextDocumentNotification.type,(()=>e.middleware.didOpen),(t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t)),(e=>e),s.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){const i=e.resolvedTextDocumentSync;t&&i&&i.openClose&&this.register({id:a.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return o.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;const t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);n.workspace.textDocuments.forEach((e=>{const i=e.uri.toString();if(!this._syncedDocuments.has(i)&&n.languages.match(t,e)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e)){const t=this._client.middleware,n=e=>this._client.sendNotification(this._type,this._createParams(e));(t.didOpen?t.didOpen(e,n):n(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)})),this._syncedDocuments.set(i,e)}}))}notificationSent(e,t,i){super.notificationSent(e,t,i),this._syncedDocuments.set(e.uri.toString(),e)}}t.DidOpenTextDocumentFeature=l;class c extends s.TextDocumentEventFeature{constructor(e,t){super(e,n.workspace.onDidCloseTextDocument,o.DidCloseTextDocumentNotification.type,(()=>e.middleware.didClose),(t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t)),(e=>e),s.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t}get registrationType(){return o.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&i.openClose&&this.register({id:a.generateUuid(),registerOptions:{documentSelector:t}})}notificationSent(e,t,i){super.notificationSent(e,t,i),this._syncedDocuments.delete(e.uri.toString())}unregister(e){const t=this._selectors.get(e);super.unregister(e);const i=this._selectors.values();this._syncedDocuments.forEach((e=>{if(n.languages.match(t,e)>0&&!this._selectorFilter(i,e)&&!this._client.hasDedicatedTextSynchronizationFeature(e)){let t=this._client.middleware,i=e=>this._client.sendNotification(this._type,this._createParams(e));this._syncedDocuments.delete(e.uri.toString()),(t.didClose?t.didClose(e,i):i(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)}))}}))}}t.DidCloseTextDocumentFeature=c;class d extends s.DynamicDocumentFeature{constructor(e){super(e),this._forcingDelivery=!1,this._changeData=new Map,this._onNotificationSent=new n.EventEmitter}get registrationType(){return o.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&void 0!==i.change&&i.change!==o.TextDocumentSyncKind.None&&this.register({id:a.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:i.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=n.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{syncKind:e.registerOptions.syncKind,documentSelector:this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)}))}*getDocumentSelectors(){for(const e of this._changeData.values())yield e.documentSelector}async callback(e){if(0===e.contentChanges.length)return;const t=[];for(const i of this._changeData.values())if(n.languages.match(i.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){const n=this._client.middleware;if(i.syncKind===o.TextDocumentSyncKind.Incremental){const i=async e=>{const t=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e);await this._client.sendNotification(o.DidChangeTextDocumentNotification.type,t),this.notificationSent(e,o.DidChangeTextDocumentNotification.type,t)};t.push(n.didChange?n.didChange(e,(e=>i(e))):i(e))}else if(i.syncKind===o.TextDocumentSyncKind.Full){const i=async e=>{const t=async e=>{const t=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document);await this._client.sendNotification(o.DidChangeTextDocumentNotification.type,t),this.notificationSent(e,o.DidChangeTextDocumentNotification.type,t)};return this._changeDelayer?(this._changeDelayer.uri!==e.document.uri.toString()&&(this.forceDelivery(),this._changeDelayer.uri=e.document.uri.toString()),this._changeDelayer.delayer.trigger((()=>t(e)))):(this._changeDelayer={uri:e.document.uri.toString(),delayer:new r.Delayer(200)},this._changeDelayer.delayer.trigger((()=>t(e)),-1))};t.push(n.didChange?n.didChange(e,(e=>i(e))):i(e))}}return Promise.all(t).then(void 0,(e=>{throw this._client.error(`Sending document notification ${o.DidChangeTextDocumentNotification.type.method} failed`,e),e}))}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,i){this._onNotificationSent.fire({original:e,type:t,params:i})}unregister(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){void 0!==this._changeDelayer&&this._changeDelayer.delayer.cancel(),this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}forceDelivery(){if(!this._forcingDelivery&&this._changeDelayer)try{this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}}getProvider(e){for(const t of this._changeData.values())if(n.languages.match(t.documentSelector,e)>0)return{send:e=>this.callback(e)}}}t.DidChangeTextDocumentFeature=d;class h extends s.TextDocumentEventFeature{constructor(e){super(e,n.workspace.onWillSaveTextDocument,o.WillSaveTextDocumentNotification.type,(()=>e.middleware.willSave),(t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t)),(e=>e.document),((e,t)=>s.TextDocumentEventFeature.textDocumentFilter(e,t.document)))}get registrationType(){return o.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&i.willSave&&this.register({id:a.generateUuid(),registerOptions:{documentSelector:t}})}}t.WillSaveFeature=h;class u extends s.DynamicDocumentFeature{constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return o.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&i.willSaveWaitUntil&&this.register({id:a.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=n.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(s.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let t=this._client.middleware,i=e=>this._client.sendRequest(o.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((async e=>{let t=await this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t}));e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,i):i(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}t.WillSaveWaitUntilFeature=u;class g extends s.TextDocumentEventFeature{constructor(e){super(e,n.workspace.onDidSaveTextDocument,o.DidSaveTextDocumentNotification.type,(()=>e.middleware.didSave),(t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText)),(e=>e),s.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return o.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){const i=e.resolvedTextDocumentSync;if(t&&i&&i.save){const e="boolean"==typeof i.save?{includeText:!1}:{includeText:!!i.save.includeText};this.register({id:a.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}}t.DidSaveTextDocumentFeature=g},7349:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionFeature=void 0;const n=i(6804),o=i(294),s=i(7482);class r extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[i,n]=this.getRegistration(t,e.typeDefinitionProvider);i&&n&&this.register({id:i,registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,i={provideTypeDefinition:(e,t,i)=>{const n=this._client,s=(e,t,i)=>n.sendRequest(o.TypeDefinitionRequest.type,n.code2ProtocolConverter.asTextDocumentPositionParams(e,t),i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asDefinitionResult(e,i)),(e=>n.handleFailedRequest(o.TypeDefinitionRequest.type,i,e,null))),r=n.middleware;return r.provideTypeDefinition?r.provideTypeDefinition(e,t,i,s):s(e,t,i)}};return[this.registerProvider(t,i),i]}registerProvider(e,t){return n.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.TypeDefinitionFeature=r},5783:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const n=i(6804),o=i(294),s=i(7482);class r{constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,i){const n=this.client,s=this.middleware,r=(e,t,i)=>{const s=n.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return n.sendRequest(o.TypeHierarchyPrepareRequest.type,s,i).then((e=>i.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,i)),(e=>n.handleFailedRequest(o.TypeHierarchyPrepareRequest.type,i,e,null)))};return s.prepareTypeHierarchy?s.prepareTypeHierarchy(e,t,i,r):r(e,t,i)}provideTypeHierarchySupertypes(e,t){const i=this.client,n=this.middleware,s=(e,t)=>{const n={item:i.code2ProtocolConverter.asTypeHierarchyItem(e)};return i.sendRequest(o.TypeHierarchySupertypesRequest.type,n,t).then((e=>t.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>i.handleFailedRequest(o.TypeHierarchySupertypesRequest.type,t,e,null)))};return n.provideTypeHierarchySupertypes?n.provideTypeHierarchySupertypes(e,t,s):s(e,t)}provideTypeHierarchySubtypes(e,t){const i=this.client,n=this.middleware,s=(e,t)=>{const n={item:i.code2ProtocolConverter.asTypeHierarchyItem(e)};return i.sendRequest(o.TypeHierarchySubtypesRequest.type,n,t).then((e=>t.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>i.handleFailedRequest(o.TypeHierarchySubtypesRequest.type,t,e,null)))};return n.provideTypeHierarchySubtypes?n.provideTypeHierarchySubtypes(e,t,s):s(e,t)}}class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"typeHierarchy").dynamicRegistration=!0}initialize(e,t){const[i,n]=this.getRegistration(t,e.typeHierarchyProvider);i&&n&&this.register({id:i,registerOptions:n})}registerLanguageProvider(e){const t=this._client,i=new r(t);return[n.languages.registerTypeHierarchyProvider(t.protocol2CodeConverter.asDocumentSelector(e.documentSelector),i),i]}}t.TypeHierarchyFeature=a},899:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forEach=t.mapAsync=t.map=t.Semaphore=t.Delayer=void 0;const n=i(294);t.Delayer=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e=>{this.onSuccess=e})).then((()=>{this.completionPromise=void 0,this.onSuccess=void 0;var e=this.task();return this.task=void 0,e}))),(t>=0||void 0===this.timeout)&&(this.timeout=(0,n.RAL)().timer.setTimeout((()=>{this.timeout=void 0,this.onSuccess(void 0)}),t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return void 0!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){void 0!==this.timeout&&(this.timeout.dispose(),this.timeout=void 0)}},t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,i)=>{this._waiting.push({thunk:e,resolve:t,reject:i}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,n.RAL)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};class o{constructor(e=15){this.yieldAfter=Math.max(e,15),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){const e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=2*this.total}}return!1}}t.map=async function(e,t,i,s){if(0===e.length)return[];const r=new Array(e.length),a=new o(s?.yieldAfter);function l(i){a.start();for(let n=i;n{(0,n.RAL)().timer.setImmediate((()=>{e(l(c))}))}));return r},t.mapAsync=async function(e,t,i,s){if(0===e.length)return[];const r=new Array(e.length),a=new o(s?.yieldAfter);async function l(n){a.start();for(let o=n;o{(0,n.RAL)().timer.setImmediate((()=>{e(l(c))}))}));return r},t.forEach=async function(e,t,i,s){if(0===e.length)return;const r=new o(s?.yieldAfter);function a(i){r.start();for(let n=i;n{(0,n.RAL)().timer.setImmediate((()=>{e(a(l))}))}))}},4652:(e,t)=>{"use strict";function i(e){return"string"==typeof e||e instanceof String}function n(e){return"function"==typeof e}function o(e){return Array.isArray(e)}function s(e){return e&&n(e.then)}Object.defineProperty(t,"__esModule",{value:!0}),t.asPromise=t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=n,t.array=o,t.stringArray=function(e){return o(e)&&e.every((e=>i(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=s,t.asPromise=function(e){return e instanceof Promise?e:s(e)?new Promise(((t,i)=>{e.then((e=>t(e)),(e=>i(e)))})):Promise.resolve(e)}},2667:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class i{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class n extends i{constructor(){super([n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-","4",n._randomHex(),n._randomHex(),n._randomHex(),"-",n._oneOf(n._timeHighBits),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return n._oneOf(n._chars)}}function o(){return new n}n._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],n._timeHighBits=["8","9","a","b"],t.empty=new i("00000000-0000-0000-0000-000000000000"),t.v4=o;const s=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function r(e){return s.test(e)}t.isUUID=r,t.parse=function(e){if(!r(e))throw new Error("invalid uuid");return new i(e)},t.generateUuid=function(){return o().asHex()}},9100:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=t.arrayDiff=void 0;const n=i(2667),o=i(6804),s=i(294);function r(e,t){if(void 0!==e)return e[t]}function a(e,t){return e.filter((e=>t.indexOf(e)<0))}t.arrayDiff=a,t.WorkspaceFoldersFeature=class{constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return s.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){const t=o.workspace.workspaceFolders;this.initializeWithFolders(t),e.workspaceFolders=void 0===t?null:t.map((e=>this.asProtocol(e)))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){const t=this._client;t.onRequest(s.WorkspaceFoldersRequest.type,(e=>{const i=()=>{const e=o.workspace.workspaceFolders;return void 0===e?null:e.map((e=>this.asProtocol(e)))},n=t.middleware.workspace;return n&&n.workspaceFolders?n.workspaceFolders(e,i):i()}));const i=r(r(r(e,"workspace"),"workspaceFolders"),"changeNotifications");let a;"string"==typeof i?a=i:!0===i&&(a=n.generateUuid()),a&&this.register({id:a,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){const i=a(this._initialFolders,e),n=a(e,this._initialFolders);(n.length>0||i.length>0)&&(t=this.doSendEvent(n,i))}else this._initialFolders?t=this.doSendEvent([],this._initialFolders):e&&(t=this.doSendEvent(e,[]));void 0!==t&&t.catch((e=>{this._client.error(`Sending notification ${s.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}doSendEvent(e,t){let i={event:{added:e.map((e=>this.asProtocol(e))),removed:t.map((e=>this.asProtocol(e)))}};return this._client.sendNotification(s.DidChangeWorkspaceFoldersNotification.type,i)}register(e){let t=e.id,i=this._client,n=o.workspace.onDidChangeWorkspaceFolders((e=>{let t=e=>this.doSendEvent(e.added,e.removed),n=i.middleware.workspace;(n&&n.didChangeWorkspaceFolders?n.didChangeWorkspaceFolders(e,t):t(e)).catch((e=>{this._client.error(`Sending notification ${s.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}));this._listeners.set(t,n),this.sendInitialEvent(o.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},1854:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolFeature=void 0;const n=i(6804),o=i(294),s=i(7482),r=i(253),a=i(2667);class l extends s.WorkspaceFeature{constructor(e){super(e,o.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=(0,s.ensure)((0,s.ensure)(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:r.SupportedSymbolKinds},t.tagSupport={valueSet:r.SupportedSymbolTags},t.resolveSupport={properties:["location.range"]}}initialize(e){e.workspaceSymbolProvider&&this.register({id:a.generateUuid(),registerOptions:!0===e.workspaceSymbolProvider?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){const t={provideWorkspaceSymbols:(e,t)=>{const i=this._client,n=(e,t)=>i.sendRequest(o.WorkspaceSymbolRequest.type,{query:e},t).then((e=>t.isCancellationRequested?null:i.protocol2CodeConverter.asSymbolInformations(e,t)),(e=>i.handleFailedRequest(o.WorkspaceSymbolRequest.type,t,e,null))),s=i.middleware;return s.provideWorkspaceSymbols?s.provideWorkspaceSymbols(e,t,n):n(e,t)},resolveWorkspaceSymbol:!0===e.resolveProvider?(e,t)=>{const i=this._client,n=(e,t)=>i.sendRequest(o.WorkspaceSymbolResolveRequest.type,i.code2ProtocolConverter.asWorkspaceSymbol(e),t).then((e=>t.isCancellationRequested?null:i.protocol2CodeConverter.asSymbolInformation(e)),(e=>i.handleFailedRequest(o.WorkspaceSymbolResolveRequest.type,t,e,null))),s=i.middleware;return s.resolveWorkspaceSymbol?s.resolveWorkspaceSymbol(e,t,n):n(e,t)}:void 0};return[n.languages.registerWorkspaceSymbolProvider(t),t]}}t.WorkspaceSymbolFeature=l},294:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const s=i(1200);o(i(1200),t),o(i(9372),t),t.createProtocolConnection=function(e,t,i,n){return(0,s.createMessageConnection)(e,t,i,n)}},9372:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,o(i(5953),t),o(i(4767),t),o(i(8599),t),o(i(6525),t);var s,r=i(2798);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return r.createProtocolConnection}}),(s=t.LSPErrorCodes||(t.LSPErrorCodes={})).lspReservedErrorRangeStart=-32899,s.RequestFailed=-32803,s.ServerCancelled=-32802,s.ContentModified=-32801,s.RequestCancelled=-32800,s.lspReservedErrorRangeEnd=-32800},2798:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const n=i(5953);t.createProtocolConnection=function(e,t,i,o){return n.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,n.createMessageConnection)(e,t,i,o)}},8599:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=void 0;const n=i(5953);t.RegistrationType=class{constructor(e){this.method=e}};class o extends n.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=o;class s extends n.RequestType{constructor(e){super(e,n.ParameterStructures.byName)}}t.ProtocolRequestType=s;class r extends n.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=r;class a extends n.NotificationType{constructor(e){super(e,n.ParameterStructures.byName)}}t.ProtocolNotificationType=a},4434:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const n=i(8599);var o,s,r;(r=t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})).method="textDocument/prepareCallHierarchy",r.type=new n.ProtocolRequestType(r.method),(s=t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})).method="callHierarchy/incomingCalls",s.type=new n.ProtocolRequestType(s.method),(o=t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={})).method="callHierarchy/outgoingCalls",o.type=new n.ProtocolRequestType(o.method)},7908:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const n=i(8599);var o;(o=t.DocumentColorRequest||(t.DocumentColorRequest={})).method="textDocument/documentColor",o.type=new n.ProtocolRequestType(o.method),(t.ColorPresentationRequest||(t.ColorPresentationRequest={})).type=new n.ProtocolRequestType("textDocument/colorPresentation")},5442:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const n=i(8599);(t.ConfigurationRequest||(t.ConfigurationRequest={})).type=new n.ProtocolRequestType("workspace/configuration")},7210:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const n=i(8599);var o;(o=t.DeclarationRequest||(t.DeclarationRequest={})).method="textDocument/declaration",o.type=new n.ProtocolRequestType(o.method)},5692:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const n=i(5953),o=i(2327),s=i(8599);var r,a,l,c;(t.DiagnosticServerCancellationData||(t.DiagnosticServerCancellationData={})).is=function(e){const t=e;return t&&o.boolean(t.retriggerRequest)},(c=t.DocumentDiagnosticReportKind||(t.DocumentDiagnosticReportKind={})).Full="full",c.Unchanged="unchanged",(l=t.DocumentDiagnosticRequest||(t.DocumentDiagnosticRequest={})).method="textDocument/diagnostic",l.type=new s.ProtocolRequestType(l.method),l.partialResult=new n.ProgressType,(a=t.WorkspaceDiagnosticRequest||(t.WorkspaceDiagnosticRequest={})).method="workspace/diagnostic",a.type=new s.ProtocolRequestType(a.method),a.partialResult=new n.ProgressType,(r=t.DiagnosticRefreshRequest||(t.DiagnosticRefreshRequest={})).method="workspace/diagnostic/refresh",r.type=new s.ProtocolRequestType0(r.method)},6190:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const n=i(8599);var o,s,r,a,l,c,d;(d=t.FileOperationPatternKind||(t.FileOperationPatternKind={})).file="file",d.folder="folder",(c=t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})).method="workspace/willCreateFiles",c.type=new n.ProtocolRequestType(c.method),(l=t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})).method="workspace/didCreateFiles",l.type=new n.ProtocolNotificationType(l.method),(a=t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})).method="workspace/willRenameFiles",a.type=new n.ProtocolRequestType(a.method),(r=t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})).method="workspace/didRenameFiles",r.type=new n.ProtocolNotificationType(r.method),(s=t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})).method="workspace/didDeleteFiles",s.type=new n.ProtocolNotificationType(s.method),(o=t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={})).method="workspace/willDeleteFiles",o.type=new n.ProtocolRequestType(o.method)},7029:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=void 0;const n=i(8599);var o;(o=t.FoldingRangeRequest||(t.FoldingRangeRequest={})).method="textDocument/foldingRange",o.type=new n.ProtocolRequestType(o.method)},9380:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const n=i(8599);var o;(o=t.ImplementationRequest||(t.ImplementationRequest={})).method="textDocument/implementation",o.type=new n.ProtocolRequestType(o.method)},6315:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const n=i(8599);var o,s,r;(r=t.InlayHintRequest||(t.InlayHintRequest={})).method="textDocument/inlayHint",r.type=new n.ProtocolRequestType(r.method),(s=t.InlayHintResolveRequest||(t.InlayHintResolveRequest={})).method="inlayHint/resolve",s.type=new n.ProtocolRequestType(s.method),(o=t.InlayHintRefreshRequest||(t.InlayHintRefreshRequest={})).method="workspace/inlayHint/refresh",o.type=new n.ProtocolRequestType0(o.method)},7425:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const n=i(8599);var o,s;(s=t.InlineValueRequest||(t.InlineValueRequest={})).method="textDocument/inlineValue",s.type=new n.ProtocolRequestType(s.method),(o=t.InlineValueRefreshRequest||(t.InlineValueRefreshRequest={})).method="workspace/inlineValue/refresh",o.type=new n.ProtocolRequestType0(o.method)},6525:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=void 0;const n=i(8599),o=i(4767),s=i(2327),r=i(9380);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return r.ImplementationRequest}});const a=i(8642);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const l=i(3402);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return l.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return l.DidChangeWorkspaceFoldersNotification}});const c=i(5442);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return c.ConfigurationRequest}});const d=i(7908);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return d.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return d.ColorPresentationRequest}});const h=i(7029);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return h.FoldingRangeRequest}});const u=i(7210);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return u.DeclarationRequest}});const g=i(2392);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return g.SelectionRangeRequest}});const p=i(7895);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return p.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return p.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return p.WorkDoneProgressCancelNotification}});const m=i(4434);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return m.CallHierarchyPrepareRequest}});const f=i(8489);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return f.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return f.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return f.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return f.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return f.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return f.SemanticTokensRegistrationType}});const _=i(1541);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return _.ShowDocumentRequest}});const v=i(527);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return v.LinkedEditingRangeRequest}});const b=i(6190);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return b.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return b.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return b.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return b.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return b.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return b.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return b.WillDeleteFilesRequest}});const C=i(1964);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return C.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return C.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return C.MonikerRequest}});const w=i(5318);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return w.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return w.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return w.TypeHierarchySupertypesRequest}});const y=i(7425);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return y.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return y.InlineValueRefreshRequest}});const S=i(6315);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return S.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return S.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return S.InlayHintRefreshRequest}});const x=i(5692);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return x.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return x.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return x.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return x.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return x.DiagnosticRefreshRequest}});const k=i(4460);var D,L,E,N,I,T,M,R,P,A,O,F,W,B,V,H,z,j,q,K,U,$,Z,G,Y,X,J,Q,ee,te,ie,ne,oe,se,re,ae,le,ce,de,he,ue,ge,pe,me;Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return k.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return k.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return k.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return k.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return k.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return k.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return k.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return k.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return k.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return k.DidCloseNotebookDocumentNotification}}),function(e){e.is=function(e){const t=e;return s.string(t.language)||s.string(t.scheme)||s.string(t.pattern)}}(D=t.TextDocumentFilter||(t.TextDocumentFilter={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebookType)||s.string(t.scheme)||s.string(t.pattern))}}(L=t.NotebookDocumentFilter||(t.NotebookDocumentFilter={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebook)||L.is(t.notebook))&&(void 0===t.language||s.string(t.language))}}(E=t.NotebookCellTextDocumentFilter||(t.NotebookCellTextDocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!s.string(t)&&!D.is(t)&&!E.is(t))return!1;return!0}}(N=t.DocumentSelector||(t.DocumentSelector={})),(t.RegistrationRequest||(t.RegistrationRequest={})).type=new n.ProtocolRequestType("client/registerCapability"),(t.UnregistrationRequest||(t.UnregistrationRequest={})).type=new n.ProtocolRequestType("client/unregisterCapability"),(me=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",me.Rename="rename",me.Delete="delete",(pe=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",pe.Transactional="transactional",pe.TextOnlyTransactional="textOnlyTransactional",pe.Undo="undo",(ge=t.PositionEncodingKind||(t.PositionEncodingKind={})).UTF8="utf-8",ge.UTF16="utf-16",ge.UTF32="utf-32",(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})).hasId=function(e){const t=e;return t&&s.string(t.id)&&t.id.length>0},(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})).is=function(e){const t=e;return t&&(null===t.documentSelector||N.is(t.documentSelector))},(ue=t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})).is=function(e){const t=e;return s.objectLiteral(t)&&(void 0===t.workDoneProgress||s.boolean(t.workDoneProgress))},ue.hasWorkDoneProgress=function(e){const t=e;return t&&s.boolean(t.workDoneProgress)},(t.InitializeRequest||(t.InitializeRequest={})).type=new n.ProtocolRequestType("initialize"),(t.InitializeErrorCodes||(t.InitializeErrorCodes={})).unknownProtocolVersion=1,(t.InitializedNotification||(t.InitializedNotification={})).type=new n.ProtocolNotificationType("initialized"),(t.ShutdownRequest||(t.ShutdownRequest={})).type=new n.ProtocolRequestType0("shutdown"),(t.ExitNotification||(t.ExitNotification={})).type=new n.ProtocolNotificationType0("exit"),(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).type=new n.ProtocolNotificationType("workspace/didChangeConfiguration"),(he=t.MessageType||(t.MessageType={})).Error=1,he.Warning=2,he.Info=3,he.Log=4,(t.ShowMessageNotification||(t.ShowMessageNotification={})).type=new n.ProtocolNotificationType("window/showMessage"),(t.ShowMessageRequest||(t.ShowMessageRequest={})).type=new n.ProtocolRequestType("window/showMessageRequest"),(t.LogMessageNotification||(t.LogMessageNotification={})).type=new n.ProtocolNotificationType("window/logMessage"),(t.TelemetryEventNotification||(t.TelemetryEventNotification={})).type=new n.ProtocolNotificationType("telemetry/event"),(de=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,de.Full=1,de.Incremental=2,(ce=t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).method="textDocument/didOpen",ce.type=new n.ProtocolNotificationType(ce.method),(le=t.TextDocumentContentChangeEvent||(t.TextDocumentContentChangeEvent={})).isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},le.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},(ae=t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).method="textDocument/didChange",ae.type=new n.ProtocolNotificationType(ae.method),(re=t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).method="textDocument/didClose",re.type=new n.ProtocolNotificationType(re.method),(se=t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).method="textDocument/didSave",se.type=new n.ProtocolNotificationType(se.method),(oe=t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})).Manual=1,oe.AfterDelay=2,oe.FocusOut=3,(ne=t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).method="textDocument/willSave",ne.type=new n.ProtocolNotificationType(ne.method),(ie=t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).method="textDocument/willSaveWaitUntil",ie.type=new n.ProtocolRequestType(ie.method),(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).type=new n.ProtocolNotificationType("workspace/didChangeWatchedFiles"),(te=t.FileChangeType||(t.FileChangeType={})).Created=1,te.Changed=2,te.Deleted=3,(t.RelativePattern||(t.RelativePattern={})).is=function(e){const t=e;return s.objectLiteral(t)&&(o.URI.is(t.baseUri)||o.WorkspaceFolder.is(t.baseUri))&&s.string(t.pattern)},(ee=t.WatchKind||(t.WatchKind={})).Create=1,ee.Change=2,ee.Delete=4,(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).type=new n.ProtocolNotificationType("textDocument/publishDiagnostics"),(Q=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,Q.TriggerCharacter=2,Q.TriggerForIncompleteCompletions=3,(J=t.CompletionRequest||(t.CompletionRequest={})).method="textDocument/completion",J.type=new n.ProtocolRequestType(J.method),(X=t.CompletionResolveRequest||(t.CompletionResolveRequest={})).method="completionItem/resolve",X.type=new n.ProtocolRequestType(X.method),(Y=t.HoverRequest||(t.HoverRequest={})).method="textDocument/hover",Y.type=new n.ProtocolRequestType(Y.method),(G=t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})).Invoked=1,G.TriggerCharacter=2,G.ContentChange=3,(Z=t.SignatureHelpRequest||(t.SignatureHelpRequest={})).method="textDocument/signatureHelp",Z.type=new n.ProtocolRequestType(Z.method),($=t.DefinitionRequest||(t.DefinitionRequest={})).method="textDocument/definition",$.type=new n.ProtocolRequestType($.method),(U=t.ReferencesRequest||(t.ReferencesRequest={})).method="textDocument/references",U.type=new n.ProtocolRequestType(U.method),(K=t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).method="textDocument/documentHighlight",K.type=new n.ProtocolRequestType(K.method),(q=t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).method="textDocument/documentSymbol",q.type=new n.ProtocolRequestType(q.method),(j=t.CodeActionRequest||(t.CodeActionRequest={})).method="textDocument/codeAction",j.type=new n.ProtocolRequestType(j.method),(z=t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})).method="codeAction/resolve",z.type=new n.ProtocolRequestType(z.method),(H=t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).method="workspace/symbol",H.type=new n.ProtocolRequestType(H.method),(V=t.WorkspaceSymbolResolveRequest||(t.WorkspaceSymbolResolveRequest={})).method="workspaceSymbol/resolve",V.type=new n.ProtocolRequestType(V.method),(B=t.CodeLensRequest||(t.CodeLensRequest={})).method="textDocument/codeLens",B.type=new n.ProtocolRequestType(B.method),(W=t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).method="codeLens/resolve",W.type=new n.ProtocolRequestType(W.method),(F=t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})).method="workspace/codeLens/refresh",F.type=new n.ProtocolRequestType0(F.method),(O=t.DocumentLinkRequest||(t.DocumentLinkRequest={})).method="textDocument/documentLink",O.type=new n.ProtocolRequestType(O.method),(A=t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).method="documentLink/resolve",A.type=new n.ProtocolRequestType(A.method),(P=t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).method="textDocument/formatting",P.type=new n.ProtocolRequestType(P.method),(R=t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).method="textDocument/rangeFormatting",R.type=new n.ProtocolRequestType(R.method),(M=t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).method="textDocument/onTypeFormatting",M.type=new n.ProtocolRequestType(M.method),(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})).Identifier=1,(T=t.RenameRequest||(t.RenameRequest={})).method="textDocument/rename",T.type=new n.ProtocolRequestType(T.method),(I=t.PrepareRenameRequest||(t.PrepareRenameRequest={})).method="textDocument/prepareRename",I.type=new n.ProtocolRequestType(I.method),(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).type=new n.ProtocolRequestType("workspace/executeCommand"),(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).type=new n.ProtocolRequestType("workspace/applyEdit")},527:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const n=i(8599);var o;(o=t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={})).method="textDocument/linkedEditingRange",o.type=new n.ProtocolRequestType(o.method)},1964:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const n=i(8599);var o,s,r;(r=t.UniquenessLevel||(t.UniquenessLevel={})).document="document",r.project="project",r.group="group",r.scheme="scheme",r.global="global",(s=t.MonikerKind||(t.MonikerKind={})).$import="import",s.$export="export",s.local="local",(o=t.MonikerRequest||(t.MonikerRequest={})).method="textDocument/moniker",o.type=new n.ProtocolRequestType(o.method)},4460:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const n=i(4767),o=i(2327),s=i(8599);var r,a,l,c,d,h,u,g,p,m;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(r=t.NotebookCellKind||(t.NotebookCellKind={})),function(e){e.create=function(e,t){const i={executionOrder:e};return!0!==t&&!1!==t||(i.success=t),i},e.is=function(e){const t=e;return o.objectLiteral(t)&&n.uinteger.is(t.executionOrder)&&(void 0===t.success||o.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(a=t.ExecutionSummary||(t.ExecutionSummary={})),function(e){function t(e,i){if(e===i)return!0;if(null==e||null==i)return!1;if(typeof e!=typeof i)return!1;if("object"!=typeof e)return!1;const n=Array.isArray(e),s=Array.isArray(i);if(n!==s)return!1;if(n&&s){if(e.length!==i.length)return!1;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const n=i(5953),o=i(8599);var s,r,a;(a=t.WorkDoneProgress||(t.WorkDoneProgress={})).type=new n.ProgressType,a.is=function(e){return e===a.type},(r=t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})).method="window/workDoneProgress/create",r.type=new o.ProtocolRequestType(r.method),(s=t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={})).method="window/workDoneProgress/cancel",s.type=new o.ProtocolNotificationType(s.method)},2392:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const n=i(8599);var o;(o=t.SelectionRangeRequest||(t.SelectionRangeRequest={})).method="textDocument/selectionRange",o.type=new n.ProtocolRequestType(o.method)},8489:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const n=i(8599);var o,s,r,a,l;(t.TokenFormat||(t.TokenFormat={})).Relative="relative",(l=t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})).method="textDocument/semanticTokens",l.type=new n.RegistrationType(l.method),(a=t.SemanticTokensRequest||(t.SemanticTokensRequest={})).method="textDocument/semanticTokens/full",a.type=new n.ProtocolRequestType(a.method),(r=t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})).method="textDocument/semanticTokens/full/delta",r.type=new n.ProtocolRequestType(r.method),(s=t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})).method="textDocument/semanticTokens/range",s.type=new n.ProtocolRequestType(s.method),(o=t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={})).method="workspace/semanticTokens/refresh",o.type=new n.ProtocolRequestType0(o.method)},1541:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const n=i(8599);var o;(o=t.ShowDocumentRequest||(t.ShowDocumentRequest={})).method="window/showDocument",o.type=new n.ProtocolRequestType(o.method)},8642:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const n=i(8599);var o;(o=t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).method="textDocument/typeDefinition",o.type=new n.ProtocolRequestType(o.method)},5318:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const n=i(8599);var o,s,r;(r=t.TypeHierarchyPrepareRequest||(t.TypeHierarchyPrepareRequest={})).method="textDocument/prepareTypeHierarchy",r.type=new n.ProtocolRequestType(r.method),(s=t.TypeHierarchySupertypesRequest||(t.TypeHierarchySupertypesRequest={})).method="typeHierarchy/supertypes",s.type=new n.ProtocolRequestType(s.method),(o=t.TypeHierarchySubtypesRequest||(t.TypeHierarchySubtypesRequest={})).method="typeHierarchy/subtypes",o.type=new n.ProtocolRequestType(o.method)},3402:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const n=i(8599);(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).type=new n.ProtocolRequestType0("workspace/workspaceFolders"),(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).type=new n.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")},2327:(e,t)=>{"use strict";function i(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every((e=>i(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},4881:(e,t,i)=>{"use strict";i.r(t),i.d(t,{TextDocument:()=>o});class n{constructor(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content}update(e,t){for(let t of e)if(n.isIncremental(t)){const e=a(t.range),i=this.offsetAt(e.start),n=this.offsetAt(e.end);this._content=this._content.substring(0,i)+t.text+this._content.substring(n,this._content.length);const o=Math.max(e.start.line,0),s=Math.max(e.end.line,0);let l=this._lineOffsets;const c=r(t.text,!1,i);if(s-o===c.length)for(let e=0,t=c.length;ee?n=o:i=o+1}let o=i-1;return{line:o,character:e-t[o]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let i=t[e.line],n=e.line+1i.line||t.line===i.line&&t.character>i.character?{start:i,end:t}:e}function l(e){const t=a(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,i,o){return new n(e,t,i,o)},e.update=function(e,t,i){if(e instanceof n)return e.update(t,i),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){let i=e.getText(),n=s(t.map(l),((e,t)=>{let i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i})),o=0;const r=[];for(const t of n){let n=e.offsetAt(t.range.start);if(no&&r.push(i.substring(o,n)),t.newText.length&&r.push(t.newText),o=e.offsetAt(t.range.end)}return r.push(i.substr(o)),r.join("")}}(o||(o={}))},4767:(e,t,i)=>{"use strict";var n,o,s,r,a,l,c,d,h,u,g,p,m,f,_,v,b,C,w,y,S,x,k,D,L,E,N,I;i.r(t),i.d(t,{AnnotatedTextEdit:()=>k,ChangeAnnotation:()=>S,ChangeAnnotationIdentifier:()=>x,CodeAction:()=>se,CodeActionContext:()=>oe,CodeActionKind:()=>ie,CodeActionTriggerKind:()=>ne,CodeDescription:()=>b,CodeLens:()=>re,Color:()=>h,ColorInformation:()=>u,ColorPresentation:()=>g,Command:()=>w,CompletionItem:()=>j,CompletionItemKind:()=>F,CompletionItemLabelDetails:()=>z,CompletionItemTag:()=>B,CompletionList:()=>q,CreateFile:()=>L,DeleteFile:()=>N,Diagnostic:()=>C,DiagnosticRelatedInformation:()=>f,DiagnosticSeverity:()=>_,DiagnosticTag:()=>v,DocumentHighlight:()=>Y,DocumentHighlightKind:()=>G,DocumentLink:()=>le,DocumentSymbol:()=>te,DocumentUri:()=>n,EOL:()=>ke,FoldingRange:()=>m,FoldingRangeKind:()=>p,FormattingOptions:()=>ae,Hover:()=>U,InlayHint:()=>be,InlayHintKind:()=>_e,InlayHintLabelPart:()=>ve,InlineValueContext:()=>fe,InlineValueEvaluatableExpression:()=>me,InlineValueText:()=>ge,InlineValueVariableLookup:()=>pe,InsertReplaceEdit:()=>V,InsertTextFormat:()=>W,InsertTextMode:()=>H,Location:()=>c,LocationLink:()=>d,MarkedString:()=>K,MarkupContent:()=>O,MarkupKind:()=>A,OptionalVersionedTextDocumentIdentifier:()=>R,ParameterInformation:()=>$,Position:()=>a,Range:()=>l,RenameFile:()=>E,SelectionRange:()=>ce,SemanticTokenModifiers:()=>he,SemanticTokenTypes:()=>de,SemanticTokens:()=>ue,SignatureInformation:()=>Z,SymbolInformation:()=>Q,SymbolKind:()=>X,SymbolTag:()=>J,TextDocument:()=>xe,TextDocumentEdit:()=>D,TextDocumentIdentifier:()=>T,TextDocumentItem:()=>P,TextEdit:()=>y,URI:()=>o,VersionedTextDocumentIdentifier:()=>M,WorkspaceChange:()=>Se,WorkspaceEdit:()=>I,WorkspaceFolder:()=>Ce,WorkspaceSymbol:()=>ee,integer:()=>s,uinteger:()=>r}),function(e){e.is=function(e){return"string"==typeof e}}(n||(n={})),function(e){e.is=function(e){return"string"==typeof e}}(o||(o={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(r||(r={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=r.MAX_VALUE),t===Number.MAX_VALUE&&(t=r.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return De.objectLiteral(t)&&De.uinteger(t.line)&&De.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,i,n){if(De.uinteger(e)&&De.uinteger(t)&&De.uinteger(i)&&De.uinteger(n))return{start:a.create(e,t),end:a.create(i,n)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments[".concat(e,", ").concat(t,", ").concat(i,", ").concat(n,"]"))},e.is=function(e){var t=e;return De.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(l||(l={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return De.defined(t)&&l.is(t.range)&&(De.string(t.uri)||De.undefined(t.uri))}}(c||(c={})),function(e){e.create=function(e,t,i,n){return{targetUri:e,targetRange:t,targetSelectionRange:i,originSelectionRange:n}},e.is=function(e){var t=e;return De.defined(t)&&l.is(t.targetRange)&&De.string(t.targetUri)&&l.is(t.targetSelectionRange)&&(l.is(t.originSelectionRange)||De.undefined(t.originSelectionRange))}}(d||(d={})),function(e){e.create=function(e,t,i,n){return{red:e,green:t,blue:i,alpha:n}},e.is=function(e){var t=e;return De.objectLiteral(t)&&De.numberRange(t.red,0,1)&&De.numberRange(t.green,0,1)&&De.numberRange(t.blue,0,1)&&De.numberRange(t.alpha,0,1)}}(h||(h={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return De.objectLiteral(t)&&l.is(t.range)&&h.is(t.color)}}(u||(u={})),function(e){e.create=function(e,t,i){return{label:e,textEdit:t,additionalTextEdits:i}},e.is=function(e){var t=e;return De.objectLiteral(t)&&De.string(t.label)&&(De.undefined(t.textEdit)||y.is(t))&&(De.undefined(t.additionalTextEdits)||De.typedArray(t.additionalTextEdits,y.is))}}(g||(g={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(p||(p={})),function(e){e.create=function(e,t,i,n,o,s){var r={startLine:e,endLine:t};return De.defined(i)&&(r.startCharacter=i),De.defined(n)&&(r.endCharacter=n),De.defined(o)&&(r.kind=o),De.defined(s)&&(r.collapsedText=s),r},e.is=function(e){var t=e;return De.objectLiteral(t)&&De.uinteger(t.startLine)&&De.uinteger(t.startLine)&&(De.undefined(t.startCharacter)||De.uinteger(t.startCharacter))&&(De.undefined(t.endCharacter)||De.uinteger(t.endCharacter))&&(De.undefined(t.kind)||De.string(t.kind))}}(m||(m={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return De.defined(t)&&c.is(t.location)&&De.string(t.message)}}(f||(f={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(_||(_={})),function(e){e.Unnecessary=1,e.Deprecated=2}(v||(v={})),function(e){e.is=function(e){var t=e;return De.objectLiteral(t)&&De.string(t.href)}}(b||(b={})),function(e){e.create=function(e,t,i,n,o,s){var r={range:e,message:t};return De.defined(i)&&(r.severity=i),De.defined(n)&&(r.code=n),De.defined(o)&&(r.source=o),De.defined(s)&&(r.relatedInformation=s),r},e.is=function(e){var t,i=e;return De.defined(i)&&l.is(i.range)&&De.string(i.message)&&(De.number(i.severity)||De.undefined(i.severity))&&(De.integer(i.code)||De.string(i.code)||De.undefined(i.code))&&(De.undefined(i.codeDescription)||De.string(null===(t=i.codeDescription)||void 0===t?void 0:t.href))&&(De.string(i.source)||De.undefined(i.source))&&(De.undefined(i.relatedInformation)||De.typedArray(i.relatedInformation,f.is))}}(C||(C={})),function(e){e.create=function(e,t){for(var i=[],n=2;n0&&(o.arguments=i),o},e.is=function(e){var t=e;return De.defined(t)&&De.string(t.title)&&De.string(t.command)}}(w||(w={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return De.objectLiteral(t)&&De.string(t.newText)&&l.is(t.range)}}(y||(y={})),function(e){e.create=function(e,t,i){var n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==i&&(n.description=i),n},e.is=function(e){var t=e;return De.objectLiteral(t)&&De.string(t.label)&&(De.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(De.string(t.description)||void 0===t.description)}}(S||(S={})),function(e){e.is=function(e){var t=e;return De.string(t)}}(x||(x={})),function(e){e.replace=function(e,t,i){return{range:e,newText:t,annotationId:i}},e.insert=function(e,t,i){return{range:{start:e,end:e},newText:t,annotationId:i}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return y.is(t)&&(S.is(t.annotationId)||x.is(t.annotationId))}}(k||(k={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return De.defined(t)&&R.is(t.textDocument)&&Array.isArray(t.edits)}}(D||(D={})),function(e){e.create=function(e,t,i){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==i&&(n.annotationId=i),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&De.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||De.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||De.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||x.is(t.annotationId))}}(L||(L={})),function(e){e.create=function(e,t,i,n){var o={kind:"rename",oldUri:e,newUri:t};return void 0===i||void 0===i.overwrite&&void 0===i.ignoreIfExists||(o.options=i),void 0!==n&&(o.annotationId=n),o},e.is=function(e){var t=e;return t&&"rename"===t.kind&&De.string(t.oldUri)&&De.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||De.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||De.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||x.is(t.annotationId))}}(E||(E={})),function(e){e.create=function(e,t,i){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==i&&(n.annotationId=i),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&De.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||De.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||De.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||x.is(t.annotationId))}}(N||(N={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return De.string(e.kind)?L.is(e)||E.is(e)||N.is(e):D.is(e)})))}}(I||(I={}));var T,M,R,P,A,O,F,W,B,V,H,z,j,q,K,U,$,Z,G,Y,X,J,Q,ee,te,ie,ne,oe,se,re,ae,le,ce,de,he,ue,ge,pe,me,fe,_e,ve,be,Ce,we=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,i){var n,o;if(void 0===i?n=y.insert(e,t):x.is(i)?(o=i,n=k.insert(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),n=k.insert(e,t,o)),this.edits.push(n),void 0!==o)return o},e.prototype.replace=function(e,t,i){var n,o;if(void 0===i?n=y.replace(e,t):x.is(i)?(o=i,n=k.replace(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),n=k.replace(e,t,o)),this.edits.push(n),void 0!==o)return o},e.prototype.delete=function(e,t){var i,n;if(void 0===t?i=y.del(e):x.is(t)?(n=t,i=k.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),i=k.del(e,n)),this.edits.push(i),void 0!==n)return n},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),ye=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var i;if(x.is(e)?i=e:(i=this.nextId(),t=e),void 0!==this._annotations[i])throw new Error("Id ".concat(i," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(i));return this._annotations[i]=t,this._size++,i},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),Se=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new ye(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(D.is(e)){var i=new we(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=i}}))):e.changes&&Object.keys(e.changes).forEach((function(i){var n=new we(e.changes[i]);t._textEditChanges[i]=n}))):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(R.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(n=this._textEditChanges[t.uri])){var i={textDocument:t,edits:o=[]};this._workspaceEdit.documentChanges.push(i),n=new we(o,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var n;if(!(n=this._textEditChanges[e])){var o=[];this._workspaceEdit.changes[e]=o,n=new we(o),this._textEditChanges[e]=n}return n},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new ye,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n,o,s;if(S.is(t)||x.is(t)?n=t:i=t,void 0===n?o=L.create(e,i):(s=x.is(n)?n:this._changeAnnotations.manage(n),o=L.create(e,i,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s},e.prototype.renameFile=function(e,t,i,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,s,r;if(S.is(i)||x.is(i)?o=i:n=i,void 0===o?s=E.create(e,t,n):(r=x.is(o)?o:this._changeAnnotations.manage(o),s=E.create(e,t,n,r)),this._workspaceEdit.documentChanges.push(s),void 0!==r)return r},e.prototype.deleteFile=function(e,t,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n,o,s;if(S.is(t)||x.is(t)?n=t:i=t,void 0===n?o=N.create(e,i):(s=x.is(n)?n:this._changeAnnotations.manage(n),o=N.create(e,i,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return De.defined(t)&&De.string(t.uri)}}(T||(T={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return De.defined(t)&&De.string(t.uri)&&De.integer(t.version)}}(M||(M={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return De.defined(t)&&De.string(t.uri)&&(null===t.version||De.integer(t.version))}}(R||(R={})),function(e){e.create=function(e,t,i,n){return{uri:e,languageId:t,version:i,text:n}},e.is=function(e){var t=e;return De.defined(t)&&De.string(t.uri)&&De.string(t.languageId)&&De.integer(t.version)&&De.string(t.text)}}(P||(P={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){var i=t;return i===e.PlainText||i===e.Markdown}}(A||(A={})),function(e){e.is=function(e){var t=e;return De.objectLiteral(e)&&A.is(t.kind)&&De.string(t.value)}}(O||(O={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(F||(F={})),function(e){e.PlainText=1,e.Snippet=2}(W||(W={})),function(e){e.Deprecated=1}(B||(B={})),function(e){e.create=function(e,t,i){return{newText:e,insert:t,replace:i}},e.is=function(e){var t=e;return t&&De.string(t.newText)&&l.is(t.insert)&&l.is(t.replace)}}(V||(V={})),function(e){e.asIs=1,e.adjustIndentation=2}(H||(H={})),function(e){e.is=function(e){var t=e;return t&&(De.string(t.detail)||void 0===t.detail)&&(De.string(t.description)||void 0===t.description)}}(z||(z={})),function(e){e.create=function(e){return{label:e}}}(j||(j={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(q||(q={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return De.string(t)||De.objectLiteral(t)&&De.string(t.language)&&De.string(t.value)}}(K||(K={})),function(e){e.is=function(e){var t=e;return!!t&&De.objectLiteral(t)&&(O.is(t.contents)||K.is(t.contents)||De.typedArray(t.contents,K.is))&&(void 0===e.range||l.is(e.range))}}(U||(U={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}($||($={})),function(e){e.create=function(e,t){for(var i=[],n=2;n=0;r--){var a=o[r],l=e.offsetAt(a.range.start),c=e.offsetAt(a.range.end);if(!(c<=s))throw new Error("Overlapping edit");n=n.substring(0,l)+a.newText+n.substring(c,n.length),s=l}return n}}(xe||(xe={}));var De,Le=function(){function e(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,i=!0,n=0;n0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(0===n)return a.create(0,e);for(;ie?n=o:i=o+1}var s=i-1;return a.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1{"use strict";var n;i.r(t),i.d(t,{URI:()=>o,Utils:()=>s}),n=(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var i,n="",o=0,s=-1,r=0,a=0;a<=e.length;++a){if(a2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",o=0):o=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),s=a,r=0;continue}}else if(2===n.length||1===n.length){n="",o=0,s=a,r=0;continue}t&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+e.slice(s+1,a):n=e.slice(s+1,a),o=a-s-1;s=a,r=0}else 46===i&&-1!==r?++r:r=-1}return n}var n={resolve:function(){for(var e,n="",o=!1,s=arguments.length-1;s>=-1&&!o;s--){var r;s>=0?r=arguments[s]:(void 0===e&&(e=process.cwd()),r=e),t(r),0!==r.length&&(n=r+"/"+n,o=47===r.charCodeAt(0))}return n=i(n,!o),o?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!n)).length||n||(e="."),e.length>0&&o&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,i=0;i0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":n.normalize(e)},relative:function(e,i){if(t(e),t(i),e===i)return"";if((e=n.resolve(e))===(i=n.resolve(i)))return"";for(var o=1;oc){if(47===i.charCodeAt(a+h))return i.slice(a+h+1);if(0===h)return i.slice(a+h)}else r>c&&(47===e.charCodeAt(o+h)?d=h:0===h&&(d=0));break}var u=e.charCodeAt(o+h);if(u!==i.charCodeAt(a+h))break;47===u&&(d=h)}var g="";for(h=o+d+1;h<=s;++h)h!==s&&47!==e.charCodeAt(h)||(0===g.length?g+="..":g+="/..");return g.length>0?g+i.slice(a+d):(a+=d,47===i.charCodeAt(a)&&++a,i.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var i=e.charCodeAt(0),n=47===i,o=-1,s=!0,r=e.length-1;r>=1;--r)if(47===(i=e.charCodeAt(r))){if(!s){o=r;break}}else s=!1;return-1===o?n?"/":".":n&&1===o?"//":e.slice(0,o)},basename:function(e,i){if(void 0!==i&&"string"!=typeof i)throw new TypeError('"ext" argument must be a string');t(e);var n,o=0,s=-1,r=!0;if(void 0!==i&&i.length>0&&i.length<=e.length){if(i.length===e.length&&i===e)return"";var a=i.length-1,l=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!r){o=n+1;break}}else-1===l&&(r=!1,l=n+1),a>=0&&(c===i.charCodeAt(a)?-1==--a&&(s=n):(a=-1,s=l))}return o===s?s=l:-1===s&&(s=e.length),e.slice(o,s)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!r){o=n+1;break}}else-1===s&&(r=!1,s=n+1);return-1===s?"":e.slice(o,s)},extname:function(e){t(e);for(var i=-1,n=0,o=-1,s=!0,r=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===o&&(s=!1,o=a+1),46===l?-1===i?i=a:1!==r&&(r=1):-1!==i&&(r=-1);else if(!s){n=a+1;break}}return-1===i||-1===o||0===r||1===r&&i===o-1&&i===n+1?"":e.slice(i,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var i=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return i?i===t.root?i+n:i+"/"+n:n}(0,e)},parse:function(e){t(e);var i={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return i;var n,o=e.charCodeAt(0),s=47===o;s?(i.root="/",n=1):n=0;for(var r=-1,a=0,l=-1,c=!0,d=e.length-1,h=0;d>=n;--d)if(47!==(o=e.charCodeAt(d)))-1===l&&(c=!1,l=d+1),46===o?-1===r?r=d:1!==h&&(h=1):-1!==r&&(h=-1);else if(!c){a=d+1;break}return-1===r||-1===l||0===h||1===h&&r===l-1&&r===a+1?-1!==l&&(i.base=i.name=0===a&&s?e.slice(1,l):e.slice(a,l)):(0===a&&s?(i.name=e.slice(1,r),i.base=e.slice(1,l)):(i.name=e.slice(a,r),i.base=e.slice(a,l)),i.ext=e.slice(r,l)),a>0?i.dir=e.slice(0,a-1):s&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},447:(e,t,i)=>{var n;if(i.r(t),i.d(t,{URI:()=>m,Utils:()=>D}),"object"==typeof process)n="win32"===process.platform;else if("object"==typeof navigator){var o=navigator.userAgent;n=o.indexOf("Windows")>=0}var s,r,a=(s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),l=/^\w[\w\d+.-]*$/,c=/^\//,d=/^\/\//;function h(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(e.authority,'", path: "').concat(e.path,'", query: "').concat(e.query,'", fragment: "').concat(e.fragment,'"}'));if(e.scheme&&!l.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!c.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(d.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 ("//")')}var u="",g="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,m=function(){function e(e,t,i,n,o,s){void 0===s&&(s=!1),"object"==typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||u,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==g&&(t=g+t):t=g}return t}(this.scheme,i||u),this.query=n||u,this.fragment=o||u,h(this,s))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return w(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,i=e.authority,n=e.path,o=e.query,s=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===i?i=this.authority:null===i&&(i=u),void 0===n?n=this.path:null===n&&(n=u),void 0===o?o=this.query:null===o&&(o=u),void 0===s?s=this.fragment:null===s&&(s=u),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&s===this.fragment?this:new _(t,i,n,o,s)},e.parse=function(e,t){void 0===t&&(t=!1);var i=p.exec(e);return i?new _(i[2]||u,k(i[4]||u),k(i[5]||u),k(i[7]||u),k(i[9]||u),t):new _(u,u,u,u,u)},e.file=function(e){var t=u;if(n&&(e=e.replace(/\\/g,g)),e[0]===g&&e[1]===g){var i=e.indexOf(g,2);-1===i?(t=e.substring(2),e=g):(t=e.substring(2,i),e=e.substring(i)||g)}return new _("file",t,e,u,u)},e.from=function(e){var t=new _(e.scheme,e.authority,e.path,e.query,e.fragment);return h(t,!0),t},e.prototype.toString=function(e){return void 0===e&&(e=!1),y(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var i=new _(t);return i._formatted=t.external,i._fsPath=t._sep===f?t.fsPath:null,i}return t},e}(),f=n?1:void 0,_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return a(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),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},t}(m),v=((r={})[58]="%3A",r[47]="%2F",r[63]="%3F",r[35]="%23",r[91]="%5B",r[93]="%5D",r[64]="%40",r[33]="%21",r[36]="%24",r[38]="%26",r[39]="%27",r[40]="%28",r[41]="%29",r[42]="%2A",r[43]="%2B",r[44]="%2C",r[59]="%3B",r[61]="%3D",r[32]="%20",r);function b(e,t){for(var i=void 0,n=-1,o=0;o=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s)-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),void 0!==i&&(i+=e.charAt(o));else{void 0===i&&(i=e.substr(0,o));var r=v[s];void 0!==r?(-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),i+=r):-1===n&&(n=o)}}return-1!==n&&(i+=encodeURIComponent(e.substring(n))),void 0!==i?i:e}function C(e){for(var t=void 0,i=0;i1&&"file"===e.scheme?"//".concat(e.authority).concat(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,n&&(i=i.replace(/\//g,"\\")),i}function y(e,t){var i=t?C:b,n="",o=e.scheme,s=e.authority,r=e.path,a=e.query,l=e.fragment;if(o&&(n+=o,n+=":"),(s||"file"===o)&&(n+=g,n+=g),s){var c=s.indexOf("@");if(-1!==c){var d=s.substr(0,c);s=s.substr(c+1),-1===(c=d.indexOf(":"))?n+=i(d,!1):(n+=i(d.substr(0,c),!1),n+=":",n+=i(d.substr(c+1),!1)),n+="@"}-1===(c=(s=s.toLowerCase()).indexOf(":"))?n+=i(s,!1):(n+=i(s.substr(0,c),!1),n+=s.substr(c))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2))(h=r.charCodeAt(1))>=65&&h<=90&&(r="/".concat(String.fromCharCode(h+32),":").concat(r.substr(3)));else if(r.length>=2&&58===r.charCodeAt(1)){var h;(h=r.charCodeAt(0))>=65&&h<=90&&(r="".concat(String.fromCharCode(h+32),":").concat(r.substr(2)))}n+=i(r,!0)}return a&&(n+="?",n+=i(a,!1)),l&&(n+="#",n+=t?l:b(l,!1)),n}function S(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+S(e.substr(3)):e}}var x=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(e){return e.match(x)?e.replace(x,(function(e){return S(e)})):e}var D,L=i(470),E=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,s=t.length;o{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(447)})();const{URI:o,Utils:s}=n},4748:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII="},6161:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjNDI0MjQyIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="},1096:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjQzVDNUM1Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="},5023:(e,t,i)=>{"use strict";e.exports=i.p+"ade705761eb7e702770d.ttf"},1405:(e,t,i)=>{"use strict";e.exports=i.p+"dc9ae6434bfd831400b6.wasm"}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={id:n,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.exports}i.m=e,i.amdO={},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),i.b=document.baseURI||self.location.href,i.nc=void 0,(()=>{"use strict";var e={};i.r(e),i.d(e,{PixelRatio:()=>ze,getZoomFactor:()=>je,isAndroid:()=>Xe,isChrome:()=>$e,isElectron:()=>Ye,isFirefox:()=>Ke,isSafari:()=>Ze,isStandalone:()=>Je,isWebKit:()=>Ue,isWebkitWebView:()=>Ge});var t={};i.r(t),i.d(t,{CancellationTokenSource:()=>D4,Emitter:()=>L4,KeyCode:()=>E4,KeyMod:()=>N4,MarkerSeverity:()=>P4,MarkerTag:()=>A4,Position:()=>I4,Range:()=>T4,Selection:()=>M4,SelectionDirection:()=>R4,Token:()=>F4,Uri:()=>O4,editor:()=>W4,languages:()=>B4});var n=i(6062),o=i.n(n),s=i(4036),r=i.n(s),a=i(6793),l=i.n(a),c=i(7892),d=i.n(c),h=i(1173),u=i.n(h),g=i(2464),p=i.n(g),m=i(6830),f={};f.styleTagTransform=p(),f.setAttributes=d(),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 _=i(6386),v=i.n(_);function b(e,t,...i){return function(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,i){const n=i[0];return void 0!==t[n]?t[n]:e})),i}(t,i)}const C=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(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 w(e){k(e)||C.onUnexpectedError(e)}function y(e){k(e)||C.onUnexpectedExternalError(e)}function S(e){if(e instanceof Error){let{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack}}return e}const x="Canceled";function k(e){return e instanceof D||e instanceof Error&&e.name===x&&e.message===x}class D extends Error{constructor(){super(x),this.name=this.message}}function L(){const e=new Error(x);return e.name=e.message,e}function E(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}class N extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}function I(e){const t=this;let i,n=!1;return function(){return n||(n=!0,i=e.apply(t,arguments)),i}}var T;!function(e){e.is=function(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]};const t=Object.freeze([]);e.empty=function(){return t},e.single=function*(e){yield e},e.from=function(e){return 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)for(const e of t)yield e},e.concatNested=function*(e){for(const t of e)for(const e of t)yield e},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.equals=function(e,t,i=((e,t)=>e===t)){const n=e[Symbol.iterator](),o=t[Symbol.iterator]();for(;;){const e=n.next(),t=o.next();if(e.done!==t.done)return!1;if(e.done)return!0;if(!i(e.value,t.value))return!1}}}(T||(T={}));var M;class R extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function P(e){return"function"==typeof e.dispose&&0===e.dispose.length}function A(e){if(T.is(e)){let 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 R(t);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function O(...e){const t=F((()=>A(e)));return t}function F(e){const t={dispose:I((()=>{e()}))};return t}class W{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){try{A(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?W.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}}W.DISABLE_DISPOSED_WARNING=!1;class B{constructor(){this._store=new W,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}B.None=Object.freeze({dispose(){}});class V{constructor(){this._isDisposed=!1}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(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}clearAndLeak(){const e=this._value;return this._value=void 0,e}}class H{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1}set(e){let t=e;return this.unset=()=>t=void 0,this.isset=()=>void 0!==t,this.dispose=()=>{t&&(t(),t=void 0)},this}}class z{constructor(e){this.object=e}dispose(){}}class j{constructor(e){this.element=e,this.next=j.Undefined,this.prev=j.Undefined}}j.Undefined=new j(void 0);class q{constructor(){this._first=j.Undefined,this._last=j.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===j.Undefined}clear(){let e=this._first;for(;e!==j.Undefined;){const t=e.next;e.prev=j.Undefined,e.next=j.Undefined,e=t}this._first=j.Undefined,this._last=j.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new j(e);if(this._first===j.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 n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==j.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==j.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==j.Undefined&&e.next!==j.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===j.Undefined&&e.next===j.Undefined?(this._first=j.Undefined,this._last=j.Undefined):e.next===j.Undefined?(this._last=this._last.prev,this._last.next=j.Undefined):e.prev===j.Undefined&&(this._first=this._first.next,this._first.prev=j.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==j.Undefined;)yield e.element,e=e.next}}const K="en";let U,$,Z=!1,G=!1,Y=!1,X=!1,J=!1,Q=!1,ee=!1,te=!1,ie=!1,ne=K,oe=null;const se="object"==typeof self?self:"object"==typeof i.g?i.g:{};let re;void 0!==se.vscode&&void 0!==se.vscode.process?re=se.vscode.process:"undefined"!=typeof process&&(re=process);const ae="string"==typeof(null===(M=null==re?void 0:re.versions)||void 0===M?void 0:M.electron),le=ae&&"renderer"===(null==re?void 0:re.type);if("object"!=typeof navigator||le)if("object"==typeof re){Z="win32"===re.platform,G="darwin"===re.platform,Y="linux"===re.platform,X=Y&&!!re.env.SNAP&&!!re.env.SNAP_REVISION,ee=ae,ie=!!re.env.CI||!!re.env.BUILD_ARTIFACTSTAGINGDIRECTORY,U=K,ne=K;const e=re.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];U=t.locale,ne=i||K,oe=t._translationsConfigFile}catch(e){}J=!0}else console.error("Unable to resolve platform.");else $=navigator.userAgent,Z=$.indexOf("Windows")>=0,G=$.indexOf("Macintosh")>=0,te=($.indexOf("Macintosh")>=0||$.indexOf("iPad")>=0||$.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Y=$.indexOf("Linux")>=0,Q=!0,U=navigator.language,ne=U;let ce=0;G?ce=1:Z?ce=3:Y&&(ce=2);const de=Z,he=G,ue=Y,ge=J,pe=Q,me=Q&&"function"==typeof se.importScripts,fe=te,_e=$,ve=ne,be=(()=>{if("function"==typeof se.postMessage&&!se.importScripts){let e=[];se.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}),se.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),Ce=G||te?2:Z?1:3;let we=!0,ye=!1;function Se(){if(!ye){ye=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);we=513===t[0]}return we}const xe=!!(_e&&_e.indexOf("Chrome")>=0),ke=!!(_e&&_e.indexOf("Firefox")>=0),De=!!(!xe&&_e&&_e.indexOf("Safari")>=0),Le=!!(_e&&_e.indexOf("Edg/")>=0),Ee=(_e&&_e.indexOf("Android"),se.performance&&"function"==typeof se.performance.now);class Ne{constructor(e){this._highResolution=Ee&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new Ne(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?se.performance.now():Date.now()}}var Ie;!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 r(((i,n=null,o)=>e((e=>i.call(n,t(e))),null,o)),i)}function n(e,t,i){return r(((i,n=null,o)=>e((e=>{t(e),i.call(n,e)}),null,o)),i)}function o(e,t,i){return r(((i,n=null,o)=>e((e=>t(e)&&i.call(n,e)),null,o)),i)}function s(e,t,n,o){let s=n;return i(e,(e=>(s=t(s,e),s)),o)}function r(e,t){let i;const n=new Pe({onFirstListenerAdd(){i=e(n.fire,n)},onLastListenerRemove(){i.dispose()}});return t&&t.add(n),n.event}function a(e,t,i=100,n=!1,o,s){let r,a,l,c=0;const d=new Pe({leakWarningThreshold:o,onFirstListenerAdd(){r=e((e=>{c++,a=t(a,e),n&&!l&&(d.fire(a),a=void 0),clearTimeout(l),l=setTimeout((()=>{const e=a;a=void 0,l=void 0,(!n||c>1)&&d.fire(e),c=0}),i)}))},onLastListenerRemove(){r.dispose()}});return s&&s.add(d),d.event}function l(e,t=((e,t)=>e===t),i){let n,s=!0;return o(e,(e=>{const i=s||!t(e,n);return s=!1,n=e,i}),i)}e.None=()=>B.None,e.once=t,e.map=i,e.forEach=n,e.filter=o,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>O(...e.map((e=>e((e=>t.call(i,e)),null,n))))},e.reduce=s,e.debounce=a,e.latch=l,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=[]){let n=i.slice(),o=e((e=>{n?n.push(e):r.fire(e)}));const s=()=>{n&&n.forEach((e=>r.fire(e))),n=null},r=new Pe({onFirstListenerAdd(){o||(o=e((e=>r.fire(e))))},onFirstListenerDidAdd(){n&&(t?setTimeout(s):s())},onLastListenerRemove(){o&&o.dispose(),o=null}});return r.event};class c{constructor(e){this.event=e}map(e){return new c(i(this.event,e))}forEach(e){return new c(n(this.event,e))}filter(e){return new c(o(this.event,e))}reduce(e,t){return new c(s(this.event,e,t))}latch(){return new c(l(this.event))}debounce(e,t=100,i=!1,n){return new c(a(this.event,e,t,i,n))}on(e,t,i){return this.event(e,t,i)}once(e,i,n){return t(this.event)(e,i,n)}}e.chain=function(e){return new c(e)},e.fromNodeEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new Pe({onFirstListenerAdd:()=>e.on(t,n),onLastListenerRemove:()=>e.removeListener(t,n)});return o.event},e.fromDOMEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new Pe({onFirstListenerAdd:()=>e.addEventListener(t,n),onLastListenerRemove:()=>e.removeEventListener(t,n)});return o.event},e.toPromise=function(e){return new Promise((i=>t(e)(i)))},e.runAndSubscribe=function(e,t){return t(void 0),e((e=>t(e)))},e.runAndSubscribeWithStore=function(e,t){let i=null;function n(e){null==i||i.dispose(),i=new W,t(e,i)}n(void 0);const o=e((e=>n(e)));return F((()=>{o.dispose(),null==i||i.dispose()}))}}(Ie||(Ie={}));class Te{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${Te._idPool++}`}start(e){this._stopWatch=new Ne(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Te._idPool=0;class Me{constructor(e){this.value=e}static create(){var e;return new Me(null!==(e=(new Error).stack)&&void 0!==e?e:"")}print(){console.warn(this.value.split("\n").slice(2).join("\n"))}}class Re{constructor(e,t,i){this.callback=e,this.callbackThis=t,this.stack=i,this.subscription=new H}invoke(e){this.callback.call(this.callbackThis,e)}}class Pe{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=(null===(t=this._options)||void 0===t?void 0:t._profName)?new Te(this._options._profName):void 0}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,this._listeners&&this._listeners.clear(),null===(e=this._deliveryQueue)||void 0===e||e.clear(),null===(i=null===(t=this._options)||void 0===t?void 0:t.onLastListenerRemove)||void 0===i||i.call(t),null===(n=this._leakageMon)||void 0===n||n.dispose())}get event(){return this._event||(this._event=(e,t,i)=>{var n,o,s;this._listeners||(this._listeners=new q);const r=this._listeners.isEmpty();let a,l;r&&(null===(n=this._options)||void 0===n?void 0:n.onFirstListenerAdd)&&this._options.onFirstListenerAdd(this),this._leakageMon&&this._listeners.size>=30&&(l=Me.create(),a=this._leakageMon.check(l,this._listeners.size+1));const c=new Re(e,t,l),d=this._listeners.push(c);r&&(null===(o=this._options)||void 0===o?void 0:o.onFirstListenerDidAdd)&&this._options.onFirstListenerDidAdd(this),(null===(s=this._options)||void 0===s?void 0:s.onListenerDidAdd)&&this._options.onListenerDidAdd(this,e,t);const h=c.subscription.set((()=>{a&&a(),!this._disposed&&(d(),this._options&&this._options.onLastListenerRemove)&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this))}));return i instanceof W?i.add(h):Array.isArray(i)&&i.push(h),h}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new q);for(let t of this._listeners)this._deliveryQueue.push([t,e]);for(null===(t=this._perfMon)||void 0===t||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[e,t]=this._deliveryQueue.shift();try{e.invoke(t)}catch(e){w(e)}}null===(i=this._perfMon)||void 0===i||i.stop()}}}class Ae extends Pe{constructor(e){super(e),this._isPaused=0,this._eventQueue=new q,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){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._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class Oe extends Ae{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 Fe{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 We{constructor(){this.listening=!1,this.inputEvent=Ie.None,this.inputEventListener=B.None,this.emitter=new Pe({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{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()}}class Be{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}Be.INSTANCE=new Be;class Ve extends B{constructor(){super(),this._onDidChange=this._register(new Pe),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){this._mediaQueryList&&this._mediaQueryList.removeEventListener("change",this._listener),this._mediaQueryList=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class He extends B{constructor(){super(),this._onDidChange=this._register(new Pe),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new Ve);this._register(e.onDidChange((()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)})))}get value(){return this._value}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}const ze=new class{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=new He),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}};function je(){return Be.INSTANCE.getZoomFactor()}const qe=navigator.userAgent,Ke=qe.indexOf("Firefox")>=0,Ue=qe.indexOf("AppleWebKit")>=0,$e=qe.indexOf("Chrome")>=0,Ze=!$e&&qe.indexOf("Safari")>=0,Ge=!$e&&!Ze&&Ue,Ye=qe.indexOf("Electron/")>=0,Xe=qe.indexOf("Android")>=0,Je=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches;function Qe(e){return Array.isArray(e)}function et(e){return"string"==typeof e}function tt(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function it(e){return"number"==typeof e&&!isNaN(e)}function nt(e){return!!e&&"function"==typeof e[Symbol.iterator]}function ot(e){return!0===e||!1===e}function st(e){return void 0===e}function rt(e){return!at(e)}function at(e){return st(e)||null===e}function lt(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function ct(e){if(at(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function dt(e){return"function"==typeof e}function ht(e,t){if(et(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(dt(t)){try{if(e instanceof t)return}catch(e){}if(!at(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function ut(e){const t=[];for(const i of function(e){let t=[],i=Object.getPrototypeOf(e);for(;Object.prototype!==i;)t=t.concat(Object.getOwnPropertyNames(i)),i=Object.getPrototypeOf(i);return t}(e))"function"==typeof e[i]&&t.push(i);return t}function gt(e){return null===e?void 0:e}function pt(e,t="Unreachable"){throw new Error(t)}ge||document.queryCommandSupported&&document.queryCommandSupported("copy")||navigator&&navigator.clipboard&&navigator.clipboard.writeText,ge||navigator&&navigator.clipboard&&navigator.clipboard.readText,ge||Je||navigator.keyboard,"ontouchstart"in window||navigator.maxTouchPoints;const mt=window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0);class ft{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 _t=new ft,vt=new ft,bt=new ft,Ct=new Array(230),wt={},yt=[],St=Object.create(null),xt=Object.create(null),kt=[],Dt=[];for(let e=0;e<=193;e++)kt[e]=-1;for(let e=0;e<=127;e++)Dt[e]=-1;var Lt;function Et(e,t){return(e|(65535&t)<<16>>>0)>>>0}function Nt(e,t){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new Mt(0!==n?[It(i,t),It(n,t)]:[It(i,t)])}function It(e,t){const i=!!(2048&e),n=!!(256&e);return new Tt(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}!function(){const e="",t=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[0,1,1,"Hyper",0,e,0,e,e,e],[0,1,2,"Super",0,e,0,e,e,e],[0,1,3,"Fn",0,e,0,e,e,e],[0,1,4,"FnLock",0,e,0,e,e,e],[0,1,5,"Suspend",0,e,0,e,e,e],[0,1,6,"Resume",0,e,0,e,e,e],[0,1,7,"Turbo",0,e,0,e,e,e],[0,1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[0,1,9,"WakeUp",0,e,0,e,e,e],[31,0,10,"KeyA",31,"A",65,"VK_A",e,e],[32,0,11,"KeyB",32,"B",66,"VK_B",e,e],[33,0,12,"KeyC",33,"C",67,"VK_C",e,e],[34,0,13,"KeyD",34,"D",68,"VK_D",e,e],[35,0,14,"KeyE",35,"E",69,"VK_E",e,e],[36,0,15,"KeyF",36,"F",70,"VK_F",e,e],[37,0,16,"KeyG",37,"G",71,"VK_G",e,e],[38,0,17,"KeyH",38,"H",72,"VK_H",e,e],[39,0,18,"KeyI",39,"I",73,"VK_I",e,e],[40,0,19,"KeyJ",40,"J",74,"VK_J",e,e],[41,0,20,"KeyK",41,"K",75,"VK_K",e,e],[42,0,21,"KeyL",42,"L",76,"VK_L",e,e],[43,0,22,"KeyM",43,"M",77,"VK_M",e,e],[44,0,23,"KeyN",44,"N",78,"VK_N",e,e],[45,0,24,"KeyO",45,"O",79,"VK_O",e,e],[46,0,25,"KeyP",46,"P",80,"VK_P",e,e],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[48,0,27,"KeyR",48,"R",82,"VK_R",e,e],[49,0,28,"KeyS",49,"S",83,"VK_S",e,e],[50,0,29,"KeyT",50,"T",84,"VK_T",e,e],[51,0,30,"KeyU",51,"U",85,"VK_U",e,e],[52,0,31,"KeyV",52,"V",86,"VK_V",e,e],[53,0,32,"KeyW",53,"W",87,"VK_W",e,e],[54,0,33,"KeyX",54,"X",88,"VK_X",e,e],[55,0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[22,0,36,"Digit1",22,"1",49,"VK_1",e,e],[23,0,37,"Digit2",23,"2",50,"VK_2",e,e],[24,0,38,"Digit3",24,"3",51,"VK_3",e,e],[25,0,39,"Digit4",25,"4",52,"VK_4",e,e],[26,0,40,"Digit5",26,"5",53,"VK_5",e,e],[27,0,41,"Digit6",27,"6",54,"VK_6",e,e],[28,0,42,"Digit7",28,"7",55,"VK_7",e,e],[29,0,43,"Digit8",29,"8",56,"VK_8",e,e],[30,0,44,"Digit9",30,"9",57,"VK_9",e,e],[21,0,45,"Digit0",21,"0",48,"VK_0",e,e],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[10,1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,0,56,"IntlHash",0,e,0,e,e,e],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"'",222,"VK_OEM_7","'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[59,1,64,"F1",59,"F1",112,"VK_F1",e,e],[60,1,65,"F2",60,"F2",113,"VK_F2",e,e],[61,1,66,"F3",61,"F3",114,"VK_F3",e,e],[62,1,67,"F4",62,"F4",115,"VK_F4",e,e],[63,1,68,"F5",63,"F5",116,"VK_F5",e,e],[64,1,69,"F6",64,"F6",117,"VK_F6",e,e],[65,1,70,"F7",65,"F7",118,"VK_F7",e,e],[66,1,71,"F8",66,"F8",119,"VK_F8",e,e],[67,1,72,"F9",67,"F9",120,"VK_F9",e,e],[68,1,73,"F10",68,"F10",121,"VK_F10",e,e],[69,1,74,"F11",69,"F11",122,"VK_F11",e,e],[70,1,75,"F12",70,"F12",123,"VK_F12",e,e],[0,1,76,"PrintScreen",0,e,0,e,e,e],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",e,e],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[14,1,80,"Home",14,"Home",36,"VK_HOME",e,e],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[13,1,83,"End",13,"End",35,"VK_END",e,e],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",e,e],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",e,e],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",e,e],[3,1,94,"NumpadEnter",3,e,0,e,e,e],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",e,e],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",e,e],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",e,e],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",e,e],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",e,e],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",e,e],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",e,e],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",e,e],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",e,e],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",e,e],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",e,e],[58,1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[0,1,108,"Power",0,e,0,e,e,e],[0,1,109,"NumpadEqual",0,e,0,e,e,e],[71,1,110,"F13",71,"F13",124,"VK_F13",e,e],[72,1,111,"F14",72,"F14",125,"VK_F14",e,e],[73,1,112,"F15",73,"F15",126,"VK_F15",e,e],[74,1,113,"F16",74,"F16",127,"VK_F16",e,e],[75,1,114,"F17",75,"F17",128,"VK_F17",e,e],[76,1,115,"F18",76,"F18",129,"VK_F18",e,e],[77,1,116,"F19",77,"F19",130,"VK_F19",e,e],[0,1,117,"F20",0,e,0,"VK_F20",e,e],[0,1,118,"F21",0,e,0,"VK_F21",e,e],[0,1,119,"F22",0,e,0,"VK_F22",e,e],[0,1,120,"F23",0,e,0,"VK_F23",e,e],[0,1,121,"F24",0,e,0,"VK_F24",e,e],[0,1,122,"Open",0,e,0,e,e,e],[0,1,123,"Help",0,e,0,e,e,e],[0,1,124,"Select",0,e,0,e,e,e],[0,1,125,"Again",0,e,0,e,e,e],[0,1,126,"Undo",0,e,0,e,e,e],[0,1,127,"Cut",0,e,0,e,e,e],[0,1,128,"Copy",0,e,0,e,e,e],[0,1,129,"Paste",0,e,0,e,e,e],[0,1,130,"Find",0,e,0,e,e,e],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",e,e],[0,1,136,"KanaMode",0,e,0,e,e,e],[0,0,137,"IntlYen",0,e,0,e,e,e],[0,1,138,"Convert",0,e,0,e,e,e],[0,1,139,"NonConvert",0,e,0,e,e,e],[0,1,140,"Lang1",0,e,0,e,e,e],[0,1,141,"Lang2",0,e,0,e,e,e],[0,1,142,"Lang3",0,e,0,e,e,e],[0,1,143,"Lang4",0,e,0,e,e,e],[0,1,144,"Lang5",0,e,0,e,e,e],[0,1,145,"Abort",0,e,0,e,e,e],[0,1,146,"Props",0,e,0,e,e,e],[0,1,147,"NumpadParenLeft",0,e,0,e,e,e],[0,1,148,"NumpadParenRight",0,e,0,e,e,e],[0,1,149,"NumpadBackspace",0,e,0,e,e,e],[0,1,150,"NumpadMemoryStore",0,e,0,e,e,e],[0,1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[0,1,152,"NumpadMemoryClear",0,e,0,e,e,e],[0,1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[0,1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[0,1,155,"NumpadClear",126,"Clear",12,"VK_CLEAR",e,e],[0,1,156,"NumpadClearEntry",0,e,0,e,e,e],[5,1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[4,1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[6,1,0,e,6,"Alt",18,"VK_MENU",e,e],[57,1,0,e,57,"Meta",0,"VK_COMMAND",e,e],[5,1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[4,1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[6,1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[57,1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[5,1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[4,1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[6,1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[57,1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[0,1,165,"BrightnessUp",0,e,0,e,e,e],[0,1,166,"BrightnessDown",0,e,0,e,e,e],[0,1,167,"MediaPlay",0,e,0,e,e,e],[0,1,168,"MediaRecord",0,e,0,e,e,e],[0,1,169,"MediaFastForward",0,e,0,e,e,e],[0,1,170,"MediaRewind",0,e,0,e,e,e],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",e,e],[0,1,174,"Eject",0,e,0,e,e,e],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[0,1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[0,1,180,"SelectTask",0,e,0,e,e,e],[0,1,181,"LaunchScreenSaver",0,e,0,e,e,e],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[0,1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[0,1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[0,1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[0,1,189,"ZoomToggle",0,e,0,e,e,e],[0,1,190,"MailReply",0,e,0,e,e,e],[0,1,191,"MailForward",0,e,0,e,e,e],[0,1,192,"MailSend",0,e,0,e,e,e],[109,1,0,e,109,"KeyInComposition",229,e,e,e],[111,1,0,e,111,"ABNT_C2",194,"VK_ABNT_C2",e,e],[91,1,0,e,91,"OEM_8",223,"VK_OEM_8",e,e],[0,1,0,e,0,e,0,"VK_KANA",e,e],[0,1,0,e,0,e,0,"VK_HANGUL",e,e],[0,1,0,e,0,e,0,"VK_JUNJA",e,e],[0,1,0,e,0,e,0,"VK_FINAL",e,e],[0,1,0,e,0,e,0,"VK_HANJA",e,e],[0,1,0,e,0,e,0,"VK_KANJI",e,e],[0,1,0,e,0,e,0,"VK_CONVERT",e,e],[0,1,0,e,0,e,0,"VK_NONCONVERT",e,e],[0,1,0,e,0,e,0,"VK_ACCEPT",e,e],[0,1,0,e,0,e,0,"VK_MODECHANGE",e,e],[0,1,0,e,0,e,0,"VK_SELECT",e,e],[0,1,0,e,0,e,0,"VK_PRINT",e,e],[0,1,0,e,0,e,0,"VK_EXECUTE",e,e],[0,1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[0,1,0,e,0,e,0,"VK_HELP",e,e],[0,1,0,e,0,e,0,"VK_APPS",e,e],[0,1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[0,1,0,e,0,e,0,"VK_PACKET",e,e],[0,1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[0,1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[0,1,0,e,0,e,0,"VK_ATTN",e,e],[0,1,0,e,0,e,0,"VK_CRSEL",e,e],[0,1,0,e,0,e,0,"VK_EXSEL",e,e],[0,1,0,e,0,e,0,"VK_EREOF",e,e],[0,1,0,e,0,e,0,"VK_PLAY",e,e],[0,1,0,e,0,e,0,"VK_ZOOM",e,e],[0,1,0,e,0,e,0,"VK_NONAME",e,e],[0,1,0,e,0,e,0,"VK_PA1",e,e],[0,1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]];let i=[],n=[];for(const e of t){const[t,o,s,r,a,l,c,d,h,u]=e;if(n[s]||(n[s]=!0,yt[s]=r,St[r]=s,xt[r.toLowerCase()]=s,o&&(kt[s]=a,0!==a&&3!==a&&5!==a&&4!==a&&6!==a&&57!==a&&(Dt[a]=s))),!i[a]){if(i[a]=!0,!l)throw new Error(`String representation missing for key code ${a} around scan code ${r}`);_t.define(a,l),vt.define(a,h||l),bt.define(a,u||h||l)}c&&(Ct[c]=a),d&&(wt[d]=a)}Dt[3]=46}(),function(e){e.toString=function(e){return _t.keyCodeToStr(e)},e.fromString=function(e){return _t.strToKeyCode(e)},e.toUserSettingsUS=function(e){return vt.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return bt.keyCodeToStr(e)},e.fromUserSettings=function(e){return vt.strToKeyCode(e)||bt.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return _t.keyCodeToStr(e)}}(Lt||(Lt={}));class Tt{constructor(e,t,i,n,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=o}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toChord(){return new Mt([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class Mt{constructor(e){if(0===e.length)throw E("parts");this.parts=e}}class Rt{constructor(e,t,i,n,o,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=o,this.keyAriaLabel=s}}const Pt=he?256:2048,At=he?2048:256;class Ot{constructor(e){this._standardKeyboardEventBrand=!0;let 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.keyCode=function(e){if(e.charCode){let t=String.fromCharCode(e.charCode).toUpperCase();return Lt.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(Ke){if(59===t)return 80;if(107===t)return 81;if(109===t)return 83;if(he&&224===t)return 57}else if(Ue){if(91===t)return 57;if(he&&93===t)return 57;if(!he&&92===t)return 57}return Ct[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._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}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|=Pt),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=At),t|=e,t}_computeRuntimeKeybinding(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new Tt(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let Ft=!1,Wt=null;function Bt(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return Ft=!0,null}catch(e){return Ft=!0,null}return e.parent}class Vt{static getSameOriginWindowChain(){if(!Wt){Wt=[];let e,t=window;do{e=Bt(t),e?Wt.push({window:t,iframeElement:t.frameElement||null}):Wt.push({window:t,iframeElement:null}),t=e}while(t)}return Wt.slice(0)}static hasDifferentOriginAncestor(){return Wt||this.getSameOriginWindowChain(),Ft}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,o=this.getSameOriginWindowChain();for(const e of o){if(i+=e.window.scrollY,n+=e.window.scrollX,e.window===t)break;if(!e.iframeElement)break;let o=e.iframeElement.getBoundingClientRect();i+=o.top,n+=o.left}return{top:i,left:n}}}class Ht{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=Vt.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class zt{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){let t=e,i=e;if(void 0!==t.wheelDeltaY)this.deltaY=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?this.deltaY=Ke&&!he?-e.deltaY/3:-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)this.deltaX=Ze&&de?-t.wheelDeltaX/120: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?this.deltaX=Ke&&!he?-e.deltaX/3:-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}const jt=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var qt;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof Kt||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ie.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:jt})}(qt||(qt={}));class Kt{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?jt:(this._emitter||(this._emitter=new Pe),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Ut{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 Kt),this._token}cancel(){this._token?this._token instanceof Kt&&this._token.cancel():this._token=qt.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Kt&&this._token.dispose():this._token=qt.None}}var $t=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},Zt=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,o,(t=e[i](t)).done,t.value)}))}}};function Gt(e){const t=new Ut,i=e(t.token),n=new Promise(((e,n)=>{const o=t.token.onCancellationRequested((()=>{o.dispose(),t.dispose(),n(new D)}));Promise.resolve(i).then((i=>{o.dispose(),t.dispose(),e(i)}),(e=>{o.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel()}then(e,t){return n.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return n.finally(e)}}}function Yt(e,t,i){return new Promise(((n,o)=>{const s=t.onCancellationRequested((()=>{s.dispose(),n(i)}));e.then(n,o).finally((()=>s.dispose()))}))}class Xt{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{this.queuedPromise=null;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)}))}))}}const Jt=Symbol("MicrotaskDelay");class Qt{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===Jt?(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(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(new D),this.completionPromise=null)}cancelTimeout(){var e;null===(e=this.deferred)||void 0===e||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class ei{constructor(e){this.delayer=new Qt(e),this.throttler=new Xt}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}dispose(){this.delayer.dispose()}}function ti(e,t){return t?new Promise(((i,n)=>{const o=setTimeout((()=>{s.dispose(),i()}),e),s=t.onCancellationRequested((()=>{clearTimeout(o),s.dispose(),n(new D)}))})):Gt((t=>ti(e,t)))}function ii(e,t=0){const i=setTimeout(e,t);return F((()=>clearTimeout(i)))}function ni(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 oi{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 si{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval((()=>{e()}),t)}}class ri{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(){this.runner&&this.runner()}}let ai;ai="function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback?e=>{be((()=>{if(t)return;const i=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining:()=>Math.max(0,i-Date.now())}))}));let t=!1;return{dispose(){t||(t=!0)}}}:(e,t)=>{const i=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}};class li{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=ai((()=>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 ci{constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}get isRejected(){return this.rejected}get isSettled(){return this.rejected||this.resolved}complete(e){return new Promise((t=>{this.completeCallback(e),this.resolved=!0,t()}))}cancel(){new Promise((e=>{this.errorCallback(new D),this.rejected=!0,e()}))}}var di;!function(e){e.settled=function(e){return $t(this,void 0,void 0,(function*(){let t;const i=yield 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(((t,i)=>$t(this,void 0,void 0,(function*(){try{yield e(t,i)}catch(e){i(e)}}))))}}(di||(di={}));class hi{constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new Pe,queueMicrotask((()=>$t(this,void 0,void 0,(function*(){const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{yield Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))))}static fromArray(e){return new hi((t=>{t.emitMany(e)}))}static fromPromise(e){return new hi((t=>$t(this,void 0,void 0,(function*(){t.emitMany(yield e)}))))}static fromPromises(e){return new hi((t=>$t(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>$t(this,void 0,void 0,(function*(){return t.emitOne(yield e)})))))}))))}static merge(e){return new hi((t=>$t(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>{var i,n;return $t(this,void 0,void 0,(function*(){var o,s;try{for(i=Zt(e);!(n=yield i.next()).done;){const e=n.value;t.emitOne(e)}}catch(e){o={error:e}}finally{try{n&&!n.done&&(s=i.return)&&(yield s.call(i))}finally{if(o)throw o.error}}}))})))}))))}[Symbol.asyncIterator](){let e=0;return{next:()=>$t(this,void 0,void 0,(function*(){for(;;){if(2===this._state)throw this._error;if(e$t(this,void 0,void 0,(function*(){var n,o;try{for(var s,r=Zt(e);!(s=yield r.next()).done;){const e=s.value;i.emitOne(t(e))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=r.return)&&(yield o.call(r))}finally{if(n)throw n.error}}}))))}map(e){return hi.map(this,e)}static filter(e,t){return new hi((i=>$t(this,void 0,void 0,(function*(){var n,o;try{for(var s,r=Zt(e);!(s=yield r.next()).done;){const e=s.value;t(e)&&i.emitOne(e)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=r.return)&&(yield o.call(r))}finally{if(n)throw n.error}}}))))}filter(e){return hi.filter(this,e)}static coalesce(e){return hi.filter(e,(e=>!!e))}coalesce(){return hi.coalesce(this)}static toPromise(e){var t,i,n,o;return $t(this,void 0,void 0,(function*(){const s=[];try{for(t=Zt(e);!(i=yield t.next()).done;){const e=i.value;s.push(e)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(o=t.return)&&(yield o.call(t))}finally{if(n)throw n.error}}return s}))}toPromise(){return hi.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())}}hi.EMPTY=hi.fromArray([]);class ui extends hi{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}let gi;if(void 0!==se.vscode&&void 0!==se.vscode.process){const e=se.vscode.process;gi={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd:()=>e.cwd()}}else gi="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 de?"win32":he?"darwin":"linux"},get arch(){},get env(){return{}},cwd:()=>"/"};const pi=gi.cwd,mi=gi.env,fi=gi.platform,_i=46,vi=47,bi=92,Ci=58;class wi 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 yi(e,t){if("string"!=typeof e)throw new wi(t,"string",e)}function Si(e){return e===vi||e===bi}function xi(e){return e===vi}function ki(e){return e>=65&&e<=90||e>=97&&e<=122}function Di(e,t,i,n){let o="",s=0,r=-1,a=0,l=0;for(let c=0;c<=e.length;++c){if(c2){const e=o.lastIndexOf(i);-1===e?(o="",s=0):(o=o.slice(0,e),s=o.length-1-o.lastIndexOf(i)),r=c,a=0;continue}if(0!==o.length){o="",s=0,r=c,a=0;continue}}t&&(o+=o.length>0?`${i}..`:"..",s=2)}else o.length>0?o+=`${i}${e.slice(r+1,c)}`:o=e.slice(r+1,c),s=c-r-1;r=c,a=0}else l===_i&&-1!==a?++a:a=-1}return o}function Li(e,t){if(null===t||"object"!=typeof t)throw new wi("pathObject","Object",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 Ei={resolve(...e){let t="",i="",n=!1;for(let o=e.length-1;o>=-1;o--){let s;if(o>=0){if(s=e[o],yi(s,"path"),0===s.length)continue}else 0===t.length?s=pi():(s=mi[`=${t}`]||pi(),(void 0===s||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===bi)&&(s=`${t}\\`));const r=s.length;let a=0,l="",c=!1;const d=s.charCodeAt(0);if(1===r)Si(d)&&(a=1,c=!0);else if(Si(d))if(c=!0,Si(s.charCodeAt(1))){let e=2,t=e;for(;e2&&Si(s.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(n){if(t.length>0)break}else if(i=`${s.slice(a)}\\${i}`,n=c,c&&t.length>0)break}return i=Di(i,!n,"\\",Si),n?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){yi(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 xi(s)?"\\":e;if(Si(s))if(o=!0,Si(e.charCodeAt(1))){let o=2,s=o;for(;o2&&Si(e.charCodeAt(2))&&(o=!0,n=3));let r=n0&&Si(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?o?`\\${r}`:r:o?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){yi(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return Si(i)||t>2&&ki(i)&&e.charCodeAt(1)===Ci&&Si(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&&Si(i.charCodeAt(0))){++o;const e=i.length;e>1&&Si(i.charCodeAt(1))&&(++o,e>2&&(Si(i.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(t=`\\${t.slice(o)}`)}return Ei.normalize(t)},relative(e,t){if(yi(e,"from"),yi(t,"to"),e===t)return"";const i=Ei.resolve(e),n=Ei.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let o=0;for(;oo&&e.charCodeAt(s-1)===bi;)s--;const r=s-o;let a=0;for(;aa&&t.charCodeAt(l-1)===bi;)l--;const c=l-a,d=rd){if(t.charCodeAt(a+u)===bi)return n.slice(a+u+1);if(2===u)return n.slice(a+u)}r>d&&(e.charCodeAt(o+u)===bi?h=u:2===u&&(h=3)),-1===h&&(h=0)}let g="";for(u=o+h+1;u<=s;++u)u!==s&&e.charCodeAt(u)!==bi||(g+=0===g.length?"..":"\\..");return a+=h,g.length>0?`${g}${n.slice(a,l)}`:(n.charCodeAt(a)===bi&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const t=Ei.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===bi){if(t.charCodeAt(1)===bi){const e=t.charCodeAt(2);if(63!==e&&e!==_i)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(ki(t.charCodeAt(0))&&t.charCodeAt(1)===Ci&&t.charCodeAt(2)===bi)return`\\\\?\\${t}`;return e},dirname(e){yi(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return Si(o)?e:".";if(Si(o)){if(i=n=1,Si(e.charCodeAt(1))){let o=2,s=o;for(;o2&&Si(e.charCodeAt(2))?3:2,n=i);let s=-1,r=!0;for(let i=t-1;i>=n;--i)if(Si(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&&yi(t,"ext"),yi(e,"path");let i,n=0,o=-1,s=!0;if(e.length>=2&&ki(e.charCodeAt(0))&&e.charCodeAt(1)===Ci&&(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(Si(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(Si(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){yi(e,"path");let t=0,i=-1,n=0,o=-1,s=!0,r=0;e.length>=2&&e.charCodeAt(1)===Ci&&ki(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(Si(t)){if(!s){n=a+1;break}}else-1===o&&(s=!1,o=a+1),t===_i?-1===i?i=a:1!==r&&(r=1):-1!==i&&(r=-1)}return-1===i||-1===o||0===r||1===r&&i===o-1&&i===n+1?"":e.slice(i,o)},format:Li.bind(null,"\\"),parse(e){yi(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return Si(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(Si(o)){if(n=1,Si(e.charCodeAt(1))){let t=2,o=t;for(;t0&&(t.root=e.slice(0,n));let s=-1,r=n,a=-1,l=!0,c=e.length-1,d=0;for(;c>=n;--c)if(o=e.charCodeAt(c),Si(o)){if(!l){r=c+1;break}}else-1===a&&(l=!1,a=c+1),o===_i?-1===s?s=c:1!==d&&(d=1):-1!==s&&(d=-1);return-1!==a&&(-1===s||0===d||1===d&&s===a-1&&s===r+1?t.base=t.name=e.slice(r,a):(t.name=e.slice(r,s),t.base=e.slice(r,a),t.ext=e.slice(s,a))),t.dir=r>0&&r!==n?e.slice(0,r-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},Ni={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const o=n>=0?e[n]:pi();yi(o,"path"),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===vi)}return t=Di(t,!i,"/",xi),i?`/${t}`:t.length>0?t:"."},normalize(e){if(yi(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===vi,i=e.charCodeAt(e.length-1)===vi;return 0===(e=Di(e,!t,"/",xi)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(yi(e,"path"),e.length>0&&e.charCodeAt(0)===vi),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?".":Ni.normalize(t)},relative(e,t){if(yi(e,"from"),yi(t,"to"),e===t)return"";if((e=Ni.resolve(e))===(t=Ni.resolve(t)))return"";const i=e.length,n=i-1,o=t.length-1,s=ns){if(t.charCodeAt(1+a)===vi)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else n>s&&(e.charCodeAt(1+a)===vi?r=a:0===a&&(r=0));let l="";for(a=1+r+1;a<=i;++a)a!==i&&e.charCodeAt(a)!==vi||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+r)}`},toNamespacedPath:e=>e,dirname(e){if(yi(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===vi;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===vi){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&&yi(t,"ext"),yi(e,"path");let i,n=0,o=-1,s=!0;if(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>=0;--i){const l=e.charCodeAt(i);if(l===vi){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>=0;--i)if(e.charCodeAt(i)===vi){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){yi(e,"path");let t=-1,i=0,n=-1,o=!0,s=0;for(let r=e.length-1;r>=0;--r){const a=e.charCodeAt(r);if(a!==vi)-1===n&&(o=!1,n=r+1),a===_i?-1===t?t=r:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){i=r+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===i+1?"":e.slice(t,n)},format:Li.bind(null,"/"),parse(e){yi(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===vi;let n;i?(t.root="/",n=1):n=0;let o=-1,s=0,r=-1,a=!0,l=e.length-1,c=0;for(;l>=n;--l){const t=e.charCodeAt(l);if(t!==vi)-1===r&&(a=!1,r=l+1),t===_i?-1===o?o=l:1!==c&&(c=1):-1!==o&&(c=-1);else if(!a){s=l+1;break}}if(-1!==r){const n=0===s&&i?1:s;-1===o||0===c||1===c&&o===r-1&&o===s+1?t.base=t.name=e.slice(n,r):(t.name=e.slice(n,o),t.base=e.slice(n,r),t.ext=e.slice(o,r))}return s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Ni.win32=Ei.win32=Ei,Ni.posix=Ei.posix=Ni;const Ii="win32"===fi?Ei.normalize:Ni.normalize,Ti="win32"===fi?Ei.resolve:Ni.resolve,Mi="win32"===fi?Ei.relative:Ni.relative,Ri="win32"===fi?Ei.dirname:Ni.dirname,Pi="win32"===fi?Ei.basename:Ni.basename,Ai="win32"===fi?Ei.extname:Ni.extname,Oi="win32"===fi?Ei.sep:Ni.sep,Fi=/^\w[\w\d+.-]*$/,Wi=/^\//,Bi=/^\/\//;function Vi(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&&!Fi.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!Wi.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(Bi.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 ("//")')}const Hi="",zi="/",ji=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class qi{constructor(e,t,i,n,o,s=!1){"object"==typeof e?(this.scheme=e.scheme||Hi,this.authority=e.authority||Hi,this.path=e.path||Hi,this.query=e.query||Hi,this.fragment=e.fragment||Hi):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||Hi,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==zi&&(t=zi+t):t=zi}return t}(this.scheme,i||Hi),this.query=n||Hi,this.fragment=o||Hi,Vi(this,s))}static isUri(e){return e instanceof qi||!!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}get fsPath(){return Yi(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=Hi),void 0===i?i=this.authority:null===i&&(i=Hi),void 0===n?n=this.path:null===n&&(n=Hi),void 0===o?o=this.query:null===o&&(o=Hi),void 0===s?s=this.fragment:null===s&&(s=Hi),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&s===this.fragment?this:new Ui(t,i,n,o,s)}static parse(e,t=!1){const i=ji.exec(e);return i?new Ui(i[2]||Hi,en(i[4]||Hi),en(i[5]||Hi),en(i[7]||Hi),en(i[9]||Hi),t):new Ui(Hi,Hi,Hi,Hi,Hi)}static file(e){let t=Hi;if(de&&(e=e.replace(/\\/g,zi)),e[0]===zi&&e[1]===zi){const i=e.indexOf(zi,2);-1===i?(t=e.substring(2),e=zi):(t=e.substring(2,i),e=e.substring(i)||zi)}return new Ui("file",t,e,Hi,Hi)}static from(e){const t=new Ui(e.scheme,e.authority,e.path,e.query,e.fragment);return Vi(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=de&&"file"===e.scheme?qi.file(Ei.join(Yi(e,!0),...t)).path:Ni.join(e.path,...t),e.with({path:i})}toString(e=!1){return Xi(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof qi)return e;{const t=new Ui(e);return t._formatted=e.external,t._fsPath=e._sep===Ki?e.fsPath:null,t}}return e}}const Ki=de?1:void 0;class Ui extends qi{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Yi(this,!1)),this._fsPath}toString(e=!1){return e?Xi(this,!0):(this._formatted||(this._formatted=Xi(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Ki),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 $i={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 Zi(e,t){let i,n=-1;for(let o=0;o=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s)-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),void 0!==i&&(i+=e.charAt(o));else{void 0===i&&(i=e.substr(0,o));const t=$i[s];void 0!==t?(-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),i+=t):-1===n&&(n=o)}}return-1!==n&&(i+=encodeURIComponent(e.substring(n))),void 0!==i?i:e}function Gi(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,de&&(i=i.replace(/\//g,"\\")),i}function Xi(e,t){const i=t?Gi:Zi;let n="",{scheme:o,authority:s,path:r,query:a,fragment:l}=e;if(o&&(n+=o,n+=":"),(s||"file"===o)&&(n+=zi,n+=zi),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.indexOf(":"),-1===e?n+=i(t,!1):(n+=i(t.substr(0,e),!1),n+=":",n+=i(t.substr(e+1),!1)),n+="@"}s=s.toLowerCase(),e=s.indexOf(":"),-1===e?n+=i(s,!1):(n+=i(s.substr(0,e),!1),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)}return a&&(n+="?",n+=i(a,!1)),l&&(n+="#",n+=t?l:Zi(l,!1)),n}function Ji(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+Ji(e.substr(3)):e}}const Qi=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function en(e){return e.match(Qi)?e.replace(Qi,(e=>Ji(e))):e}var tn;!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.userData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebook="vscode-notebook",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeInteractive="vscode-interactive",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls"}(tn||(tn={}));const nn=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&(i=`[${i}]`);const n=this._ports[t],o=this._connectionTokens[t];let s=`path=${encodeURIComponent(e.path)}`;return"string"==typeof o&&(s+=`&tkn=${encodeURIComponent(o)}`),qi.from({scheme:pe?this._preferredWebSchema:tn.vscodeRemoteResource,authority:`${i}:${n}`,path:"/vscode-remote-resource",query:s})}};class on{asBrowserUri(e,t){const i=this.toUri(e,t);return i.scheme===tn.vscodeRemote?nn.rewrite(i):i.scheme===tn.file&&(ge||me&&se.origin===`${tn.vscodeFileResource}://${on.FALLBACK_AUTHORITY}`)?i.with({scheme:tn.vscodeFileResource,authority:i.authority||on.FALLBACK_AUTHORITY,query:null,fragment:null}):i}toUri(e,t){return qi.isUri(e)?e:qi.parse(t.toUrl(e))}}on.FALLBACK_AUTHORITY="vscode-app";const sn=new on;function rn(e){for(;e.firstChild;)e.firstChild.remove()}function an(e){var t;return null!==(t=null==e?void 0:e.isConnected)&&void 0!==t&&t}class ln{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 cn(e,t,i,n){return new ln(e,t,i,n)}function dn(e){return function(t){return e(new Ht(t))}}let hn=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t?o=dn(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=function(e){return function(t){return e(new Ot(t))}}(i)),cn(e,t,o,n)};function un(e,t,i){return cn(e,fe&&mt?$n.POINTER_DOWN:$n.MOUSE_DOWN,t,i)}function gn(e,t,i){return cn(e,fe&&mt?$n.POINTER_UP:$n.MOUSE_UP,t,i)}function pn(e,t){return cn(e,"mouseout",(i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)}))}function mn(e,t,i){let n=null;const o=e=>s.fire(e),s=new Pe({onFirstListenerAdd:()=>{n||(n=new ln(e,t,o,i))},onLastListenerRemove:()=>{n&&(n.dispose(),n=null)}});return s}let fn,_n,vn=null;class bn{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){w(e)}}static sort(e,t){return t.priority-e.priority}}!function(){let e=[],t=null,i=!1,n=!1,o=()=>{for(i=!1,t=e,e=[],n=!0;t.length>0;)t.sort(bn.sort),t.shift().execute();n=!1};_n=(t,n=0)=>{let s=new bn(t,n);return e.push(s),i||(i=!0,function(e){if(!vn){const e=e=>setTimeout((()=>e((new Date).getTime())),0);vn=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}vn.call(self,e)}(o)),s},fn=(e,i)=>{if(n){let n=new bn(e,i);return t.push(n),n}return _n(e,i)}}();const Cn=function(e,t){return t};class wn extends B{constructor(e,t,i,n=Cn,o=8){super();let s=null,r=0,a=this._register(new oi),l=()=>{r=(new Date).getTime(),i(s),s=null};this._register(cn(e,t,(e=>{s=n(s,e);let t=(new Date).getTime()-r;t>=o?(a.cancel(),l()):a.setIfNotSet(l,o-t)})))}}function yn(e,t,i,n,o){return new wn(e,t,i,n,o)}function Sn(e){return document.defaultView.getComputedStyle(e,null)}function xn(e){if(e!==document.body)return new Dn(e.clientWidth,e.clientHeight);if(fe&&window.visualViewport)return new Dn(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new Dn(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new Dn(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new Dn(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class kn{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){let n=Sn(e),o="0";return n&&(o=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(i)),kn.convertToPixels(e,o)}static getBorderLeftWidth(e){return kn.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return kn.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return kn.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return kn.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return kn.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return kn.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return kn.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return kn.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return kn.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return kn.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return kn.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return kn.getDimension(e,"margin-bottom","marginBottom")}}class Dn{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new Dn(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof Dn?e:new Dn(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function Ln(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){i-=e.scrollTop;const o=Fn(e)?null:Sn(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=kn.getBorderLeftWidth(e),i+=kn.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function En(e){let t=e.getBoundingClientRect();return{left:t.left+Nn.scrollX,top:t.top+Nn.scrollY,width:t.width,height:t.height}}Dn.None=new Dn(0,0);const Nn=new class{get scrollX(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function In(e){let t=kn.getMarginLeft(e)+kn.getMarginRight(e);return e.offsetWidth+t}function Tn(e){let t=kn.getBorderLeftWidth(e)+kn.getBorderRightWidth(e),i=kn.getPaddingLeft(e)+kn.getPaddingRight(e);return e.offsetWidth-t-i}function Mn(e){let t=kn.getBorderTopWidth(e)+kn.getBorderBottomWidth(e),i=kn.getPaddingTop(e)+kn.getPaddingBottom(e);return e.offsetHeight-t-i}function Rn(e){let t=kn.getMarginTop(e)+kn.getMarginBottom(e);return e.offsetHeight+t}function Pn(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function An(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}function On(e,t,i){return!!An(e,t,i)}function Fn(e){return e&&!!e.host&&!!e.mode}function Wn(e){return!!Bn(e)}function Bn(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return Fn(e)?e:null}function Vn(){let e=document.activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Hn(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}let zn=null;function jn(){return zn||(zn=Hn()),zn}function qn(e,t,i=jn()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function Kn(e,t=jn()){if(!t)return;let i=function(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:[]}(t),n=[];for(let t=0;t=0;e--)t.sheet.deleteRule(n[e])}function Un(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const $n={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",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",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:Ue?"webkitAnimationStart":"animationstart",ANIMATION_END:Ue?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:Ue?"webkitAnimationIteration":"animationiteration"},Zn=function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)};class Gn extends B{constructor(e){super(),this._onDidFocus=this._register(new Pe),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new Pe),this.onDidBlur=this._onDidBlur.event;let t=Gn.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(i=!0,window.setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{Gn.hasFocusWithin(e)!==t&&(t?o():n())},this._register(cn(e,$n.FOCUS,n,!0)),this._register(cn(e,$n.BLUR,o,!0)),this._register(cn(e,$n.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(cn(e,$n.FOCUS_OUT,(()=>this._refreshStateHandler())))}static hasFocusWithin(e){const t=Bn(e);return Pn(t?t.activeElement:document.activeElement,e)}}function Yn(e){return new Gn(e)}function Xn(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function Jn(e,...t){e.innerText="",Xn(e,...t)}const Qn=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var eo;function to(e,t,i,...n){let o=Qn.exec(t);if(!o)throw new Error("Bad use of emmet");i=Object.assign({},i||{});let s,r=o[1]||"div";return s=e!==eo.HTML?document.createElementNS(e,r):document.createElement(r),o[3]&&(s.id=o[3]),o[4]&&(s.className=o[4].replace(/\./g," ").trim()),Object.keys(i).forEach((e=>{const t=i[e];void 0!==t&&(/^on\w+$/.test(e)?s[e]=t:"selected"===e?t&&s.setAttribute(e,"true"):s.setAttribute(e,t))})),s.append(...n),s}function io(e,t,...i){return to(eo.HTML,e,t,...i)}function no(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")}function oo(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function so(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function ro(e){window.open(e,"_blank","noopener")}function ao(e){return e?`url('${sn.asBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function lo(e){return`'${e.replace(/'/g,"%27")}'`}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(eo||(eo={})),io.SVG=function(e,t,...i){return to(eo.SVG,e,t,...i)},nn.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");class co extends Pe{constructor(){super(),this._subscriptions=new W,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(cn(window,"keydown",(e=>{if(e.defaultPrevented)return;const t=new Ot(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)),this._subscriptions.add(cn(window,"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)),this._subscriptions.add(cn(document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(cn(document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(cn(document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),this._subscriptions.add(cn(window,"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 co.instance||(co.instance=new co),co.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}var ho=i(6548),uo={};let go,po,mo,fo,_o;function vo(e){go&&(po.textContent!==e?(rn(mo),Co(po,e)):(rn(po),Co(mo,e)))}function bo(e){go&&(he?vo(e):fo.textContent!==e?(rn(_o),Co(fo,e)):(rn(fo),Co(_o,e)))}function Co(e,t){rn(e),t.length>2e4&&(t=t.substr(0,2e4)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}var wo;uo.styleTagTransform=p(),uo.setAttributes=d(),uo.insert=l().bind(null,"head"),uo.domAPI=r(),uo.insertStyleElement=u(),o()(ho.Z,uo),ho.Z&&ho.Z.locals&&ho.Z.locals,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]||[]}}(wo||(wo={}));const yo=xo("instantiationService");function So(e,t,i){t[wo.DI_TARGET]===t?t[wo.DI_DEPENDENCIES].push({id:e,index:i}):(t[wo.DI_DEPENDENCIES]=[{id:e,index:i}],t[wo.DI_TARGET]=t)}function xo(e){if(wo.serviceIds.has(e))return wo.serviceIds.get(e);const t=function(e,i,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");So(t,e,n)};return t.toString=()=>e,wo.serviceIds.set(e,t),t}const ko=xo("codeEditorService");class Do{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 Do(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return Do.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return Do.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{o();const e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),s}registerCommandAlias(e,t){return Wo.registerCommand(e,((e,...i)=>e.get(Fo).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return T.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}};Wo.registerCommand("noop",(()=>{}));class Bo{constructor(e){this.executor=e,this._didRun=!1}getValue(){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}}var Vo;function Ho(e){return!e||"string"!=typeof e||0===e.trim().length}const zo=/{(\d+)}/g;function jo(e,...t){return 0===t.length?e:e.replace(zo,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function qo(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function Ko(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Uo(e,t=" "){return Zo($o(e,t),t)}function $o(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 Zo(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 Go(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=Ko(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 Yo(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function Xo(e){return e.split(/\r\n|\r|\n/)}function Jo(e){for(let t=0,i=e.length;t=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function ts(e,t){return et?1:0}function is(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 ns(e,t){return os(e,t,0,e.length,0,t.length)}function os(e,t,i=0,n=e.length,o=0,s=t.length){for(;i=128||a>=128)return is(e.toLowerCase(),t.toLowerCase(),i,n,o,s);ss(r)&&(r-=32),ss(a)&&(a-=32);const l=r-a;if(0!==l)return l}const r=n-i,a=s-o;return ra?1:0}function ss(e){return e>=97&&e<=122}function rs(e){return e>=65&&e<=90}function as(e,t){return e.length===t.length&&0===os(e,t)}function ls(e,t){const i=t.length;return!(t.length>e.length)&&0===os(e,t,0,i)}function cs(e,t){let i,n=Math.min(e.length,t.length);for(i=0;i1){const n=e.charCodeAt(t-2);if(hs(n))return gs(n,i)}return i}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=ps(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class fs{constructor(e,t=0){this._iterator=new ms(e,t)}get offset(){return this._iterator.offset}nextGraphemeLength(){const e=Ts.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(Is(n,o)){t.setOffset(i);break}n=o}return t.offset-i}prevGraphemeLength(){const e=Ts.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(Is(o,n)){t.setOffset(i);break}n=o}return i-t.offset}eol(){return this._iterator.eol()}}function _s(e,t){return new fs(e,t).nextGraphemeLength()}function vs(e,t){return new fs(e,t).prevGraphemeLength()}const bs=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function Cs(e){return bs.test(e)}const ws=/^[\t\n\r\x20-\x7E]*$/;function ys(e){return ws.test(e)}const Ss=/[\u2028\u2029]/;function xs(e){return Ss.test(e)}function ks(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function Ds(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 Ls=String.fromCharCode(65279);function Es(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function Ns(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function Is(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 Ts{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]")}static getInstance(){return Ts._INSTANCE||(Ts._INSTANCE=new Ts),Ts._INSTANCE}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 Ms(e){return 127995<=e&&e<=127999}Ts._INSTANCE=null;class Rs{constructor(e){this.confusableDictionary=e}static getInstance(e){return Rs.cache.get(Array.from(e))}static getLocales(){return Rs._locales.getValue()}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}Vo=Rs,Rs.ambiguousCharacterData=new Bo((()=>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],"_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]}'))),Rs.cache=new class{constructor(e){this.computeFn=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.computeFn(e)),this.lastCache}}((e=>{function t(e){const t=new Map;for(let i=0;i!e.startsWith("_")&&e in n));0===s.length&&(s=["_default"]);for(const e of s)o=i(o,t(n[e]));const r=function(e,t){const i=new Map(e);for(const[e,n]of t)i.set(e,n);return i}(t(n._common),o);return new Rs(r)})),Rs._locales=new Bo((()=>Object.keys(Rs.ambiguousCharacterData.getValue()).filter((e=>!e.startsWith("_")))));class Ps{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(Ps.getRawData())),this._data}static isInvisibleCharacter(e){return Ps.getData().has(e)}static get codePoints(){return Ps.getData()}}Ps._data=void 0;const As=new Map;As.set("false",!1),As.set("true",!0),As.set("isMac",he),As.set("isLinux",ue),As.set("isWindows",de),As.set("isWeb",pe),As.set("isMacNative",he&&!pe),As.set("isEdge",Le),As.set("isFirefox",ke),As.set("isChrome",xe),As.set("isSafari",De);const Os=Object.prototype.hasOwnProperty;class Fs{static has(e){return Hs.create(e)}static equals(e,t){return zs.create(e,t)}static regex(e,t){return Js.create(e,t)}static not(e){return Us.create(e)}static and(...e){return tr.create(e,null)}static or(...e){return ir.create(e,null,!0)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let i=e.split("||");return ir.create(i.map((e=>this._deserializeAndExpression(e,t))),null,!0)}static _deserializeAndExpression(e,t){let i=e.split("&&");return tr.create(i.map((e=>this._deserializeOne(e,t))),null)}static _deserializeOne(e,t){if((e=e.trim()).indexOf("!=")>=0){let i=e.split("!=");return Ks.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){let i=e.split("==");return zs.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){let i=e.split("=~");return Js.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return js.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const t=e.split(">=");return Gs.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const t=e.split(">");return Zs.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const t=e.split("<=");return Xs.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const t=e.split("<");return Ys.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?Us.create(e.substr(1).trim()):Hs.create(e)}static _deserializeValue(e,t){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;let i=/^'([^']*)'$/.exec(e);return i?i[1].trim():e}static _deserializeRegexValue(e,t){if(Ho(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let i=e.indexOf("/"),n=e.lastIndexOf("/");if(i===n||i<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let o=e.slice(i+1,n),s="i"===e[n+1]?"i":"";try{return new RegExp(o,s)}catch(i){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${i}`);return console.warn(`bad regexp-value '${e}', parse error: ${i}`),null}}}function Ws(e,t){return e.cmp(t)}class Bs{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 Vs.INSTANCE}}Bs.INSTANCE=new Bs;class Vs{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 Bs.INSTANCE}}Vs.INSTANCE=new Vs;class Hs{constructor(e,t){this.key=e,this.negated=t,this.type=2}static create(e,t=null){const i=As.get(e);return"boolean"==typeof i?i?Vs.INSTANCE:Bs.INSTANCE:new Hs(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:sr(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=As.get(this.key);return"boolean"==typeof e?e?Vs.INSTANCE:Bs.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=Us.create(this.key,this)),this.negated}}class zs{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}static create(e,t,i=null){if("boolean"==typeof t)return t?Hs.create(e,i):Us.create(e,i);const n=As.get(e);return"boolean"==typeof n?t===(n?"true":"false")?Vs.INSTANCE:Bs.INSTANCE:new zs(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:rr(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=As.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?Vs.INSTANCE:Bs.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=Ks.create(this.key,this.value,this)),this.negated}}class js{constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}static create(e,t){return new js(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:rr(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.indexOf(i)>=0:"string"==typeof i&&"object"==typeof t&&null!==t&&Os.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=qs.create(this)),this.negated}}class qs{constructor(e){this._actual=e,this.type=11}static create(e){return new qs(e)}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(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class Ks{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}static create(e,t,i=null){if("boolean"==typeof t)return t?Us.create(e,i):Hs.create(e,i);const n=As.get(e);return"boolean"==typeof n?t===(n?"true":"false")?Bs.INSTANCE:Vs.INSTANCE:new Ks(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:rr(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=As.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?Bs.INSTANCE:Vs.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=zs.create(this.key,this.value,this)),this.negated}}class Us{constructor(e,t){this.key=e,this.negated=t,this.type=3}static create(e,t=null){const i=As.get(e);return"boolean"==typeof i?i?Bs.INSTANCE:Vs.INSTANCE:new Us(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:sr(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=As.get(this.key);return"boolean"==typeof e?e?Bs.INSTANCE:Vs.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Hs.create(this.key,this)),this.negated}}function $s(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):Bs.INSTANCE}class Zs{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}static create(e,t,i=null){return $s(t,(t=>new Zs(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:rr(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=Xs.create(this.key,this.value,this)),this.negated}}class Gs{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}static create(e,t,i=null){return $s(t,(t=>new Gs(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:rr(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=Ys.create(this.key,this.value,this)),this.negated}}class Ys{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}static create(e,t,i=null){return $s(t,(t=>new Ys(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:rr(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 Xs(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:rr(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=Zs.create(this.key,this.value,this)),this.negated}}class Js{constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}static create(e,t){return new Js(e,t)}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){let t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Qs.create(this)),this.negated}}class Qs{constructor(e){this._actual=e,this.type=8}static create(e){return new Qs(e)}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(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function er(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=i[i.length-1];if(9!==e.type)break;i.pop();const t=i.pop(),n=0===i.length,o=ir.create(e.expr.map((e=>tr.create([e,t],null))),null,n);o&&(i.push(o),i.sort(Ws))}return 1===i.length?i[0]:new tr(i,t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(let t of this.expr)e.push(t.negate());this.negated=ir.create(e,this,!0)}return this.negated}}class ir{constructor(e,t){this.expr=e,this.negated=t,this.type=9}static create(e,t,i){return ir._normalizeArr(e,t,i)}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(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const e of lr(t))for(const t of lr(i))n.push(tr.create([e,t],null));const o=0===e.length;e.unshift(ir.create(n,null,o))}this.negated=e[0]}return this.negated}}class nr extends Hs{constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?nr._info.push(Object.assign(Object.assign({},i),{key:e})):!0!==i&&nr._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}static all(){return nr._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return zs.create(this.key,e)}}nr._info=[];const or=xo("contextKeyService");function sr(e,t){return et?1:0}function rr(e,t,i,n){return ei?1:tn?1:0}function ar(e,t){if(6===t.type&&9!==e.type&&6!==e.type)for(const i of t.expr)if(e.equals(i))return!0;const i=lr(e.negate()).concat(lr(t));i.sort(Ws);for(let e=0;e{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function br(e){return vr.onColorThemeChange(e)}dr.add(_r,vr);class Cr extends B{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(){}}var wr=function(e,t){return function(i,n){t(i,n,e)}};function yr(e){return void 0!==e.command}class Sr{constructor(e){this.id=Sr._idPool++,this._debugName=e}}Sr._idPool=0,Sr.CommandPalette=new Sr("CommandPalette"),Sr.DebugBreakpointsContext=new Sr("DebugBreakpointsContext"),Sr.DebugCallStackContext=new Sr("DebugCallStackContext"),Sr.DebugConsoleContext=new Sr("DebugConsoleContext"),Sr.DebugVariablesContext=new Sr("DebugVariablesContext"),Sr.DebugWatchContext=new Sr("DebugWatchContext"),Sr.DebugToolBar=new Sr("DebugToolBar"),Sr.EditorContext=new Sr("EditorContext"),Sr.SimpleEditorContext=new Sr("SimpleEditorContext"),Sr.EditorContextCopy=new Sr("EditorContextCopy"),Sr.EditorContextPeek=new Sr("EditorContextPeek"),Sr.EditorTitle=new Sr("EditorTitle"),Sr.EditorTitleRun=new Sr("EditorTitleRun"),Sr.EditorTitleContext=new Sr("EditorTitleContext"),Sr.EmptyEditorGroup=new Sr("EmptyEditorGroup"),Sr.EmptyEditorGroupContext=new Sr("EmptyEditorGroupContext"),Sr.ExplorerContext=new Sr("ExplorerContext"),Sr.ExtensionContext=new Sr("ExtensionContext"),Sr.GlobalActivity=new Sr("GlobalActivity"),Sr.LayoutControlMenuSubmenu=new Sr("LayoutControlMenuSubmenu"),Sr.LayoutControlMenu=new Sr("LayoutControlMenu"),Sr.MenubarMainMenu=new Sr("MenubarMainMenu"),Sr.MenubarAppearanceMenu=new Sr("MenubarAppearanceMenu"),Sr.MenubarDebugMenu=new Sr("MenubarDebugMenu"),Sr.MenubarEditMenu=new Sr("MenubarEditMenu"),Sr.MenubarCopy=new Sr("MenubarCopy"),Sr.MenubarFileMenu=new Sr("MenubarFileMenu"),Sr.MenubarGoMenu=new Sr("MenubarGoMenu"),Sr.MenubarHelpMenu=new Sr("MenubarHelpMenu"),Sr.MenubarLayoutMenu=new Sr("MenubarLayoutMenu"),Sr.MenubarNewBreakpointMenu=new Sr("MenubarNewBreakpointMenu"),Sr.MenubarPanelAlignmentMenu=new Sr("MenubarPanelAlignmentMenu"),Sr.MenubarPanelPositionMenu=new Sr("MenubarPanelPositionMenu"),Sr.MenubarPreferencesMenu=new Sr("MenubarPreferencesMenu"),Sr.MenubarRecentMenu=new Sr("MenubarRecentMenu"),Sr.MenubarSelectionMenu=new Sr("MenubarSelectionMenu"),Sr.MenubarSwitchEditorMenu=new Sr("MenubarSwitchEditorMenu"),Sr.MenubarSwitchGroupMenu=new Sr("MenubarSwitchGroupMenu"),Sr.MenubarTerminalMenu=new Sr("MenubarTerminalMenu"),Sr.MenubarViewMenu=new Sr("MenubarViewMenu"),Sr.MenubarHomeMenu=new Sr("MenubarHomeMenu"),Sr.OpenEditorsContext=new Sr("OpenEditorsContext"),Sr.ProblemsPanelContext=new Sr("ProblemsPanelContext"),Sr.SCMChangeContext=new Sr("SCMChangeContext"),Sr.SCMResourceContext=new Sr("SCMResourceContext"),Sr.SCMResourceFolderContext=new Sr("SCMResourceFolderContext"),Sr.SCMResourceGroupContext=new Sr("SCMResourceGroupContext"),Sr.SCMSourceControl=new Sr("SCMSourceControl"),Sr.SCMTitle=new Sr("SCMTitle"),Sr.SearchContext=new Sr("SearchContext"),Sr.StatusBarWindowIndicatorMenu=new Sr("StatusBarWindowIndicatorMenu"),Sr.StatusBarRemoteIndicatorMenu=new Sr("StatusBarRemoteIndicatorMenu"),Sr.TestItem=new Sr("TestItem"),Sr.TestItemGutter=new Sr("TestItemGutter"),Sr.TestPeekElement=new Sr("TestPeekElement"),Sr.TestPeekTitle=new Sr("TestPeekTitle"),Sr.TouchBarContext=new Sr("TouchBarContext"),Sr.TitleBarContext=new Sr("TitleBarContext"),Sr.TunnelContext=new Sr("TunnelContext"),Sr.TunnelPrivacy=new Sr("TunnelPrivacy"),Sr.TunnelProtocol=new Sr("TunnelProtocol"),Sr.TunnelPortInline=new Sr("TunnelInline"),Sr.TunnelTitle=new Sr("TunnelTitle"),Sr.TunnelLocalAddressInline=new Sr("TunnelLocalAddressInline"),Sr.TunnelOriginInline=new Sr("TunnelOriginInline"),Sr.ViewItemContext=new Sr("ViewItemContext"),Sr.ViewContainerTitle=new Sr("ViewContainerTitle"),Sr.ViewContainerTitleContext=new Sr("ViewContainerTitleContext"),Sr.ViewTitle=new Sr("ViewTitle"),Sr.ViewTitleContext=new Sr("ViewTitleContext"),Sr.CommentThreadTitle=new Sr("CommentThreadTitle"),Sr.CommentThreadActions=new Sr("CommentThreadActions"),Sr.CommentTitle=new Sr("CommentTitle"),Sr.CommentActions=new Sr("CommentActions"),Sr.InteractiveToolbar=new Sr("InteractiveToolbar"),Sr.InteractiveCellTitle=new Sr("InteractiveCellTitle"),Sr.InteractiveCellExecute=new Sr("InteractiveCellExecute"),Sr.InteractiveInputExecute=new Sr("InteractiveInputExecute"),Sr.NotebookToolbar=new Sr("NotebookToolbar"),Sr.NotebookCellTitle=new Sr("NotebookCellTitle"),Sr.NotebookCellInsert=new Sr("NotebookCellInsert"),Sr.NotebookCellBetween=new Sr("NotebookCellBetween"),Sr.NotebookCellListTop=new Sr("NotebookCellTop"),Sr.NotebookCellExecute=new Sr("NotebookCellExecute"),Sr.NotebookCellExecutePrimary=new Sr("NotebookCellExecutePrimary"),Sr.NotebookDiffCellInputTitle=new Sr("NotebookDiffCellInputTitle"),Sr.NotebookDiffCellMetadataTitle=new Sr("NotebookDiffCellMetadataTitle"),Sr.NotebookDiffCellOutputsTitle=new Sr("NotebookDiffCellOutputsTitle"),Sr.NotebookOutputToolbar=new Sr("NotebookOutputToolbar"),Sr.NotebookEditorLayoutConfigure=new Sr("NotebookEditorLayoutConfigure"),Sr.BulkEditTitle=new Sr("BulkEditTitle"),Sr.BulkEditContext=new Sr("BulkEditContext"),Sr.TimelineItemContext=new Sr("TimelineItemContext"),Sr.TimelineTitle=new Sr("TimelineTitle"),Sr.TimelineTitleContext=new Sr("TimelineTitleContext"),Sr.AccountsContext=new Sr("AccountsContext"),Sr.PanelTitle=new Sr("PanelTitle"),Sr.AuxiliaryBarTitle=new Sr("AuxiliaryBarTitle"),Sr.TerminalInstanceContext=new Sr("TerminalInstanceContext"),Sr.TerminalEditorInstanceContext=new Sr("TerminalEditorInstanceContext"),Sr.TerminalNewDropdownContext=new Sr("TerminalNewDropdownContext"),Sr.TerminalTabContext=new Sr("TerminalTabContext"),Sr.TerminalTabEmptyAreaContext=new Sr("TerminalTabEmptyAreaContext"),Sr.TerminalInlineTabContext=new Sr("TerminalInlineTabContext"),Sr.WebviewContext=new Sr("WebviewContext"),Sr.InlineCompletionsActions=new Sr("InlineCompletionsActions"),Sr.NewFile=new Sr("NewFile");const xr=xo("menuService"),kr=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new Pe,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:e=>e===Sr.CommandPalette}}addCommand(e){return this.addCommands(T.single(e))}addCommands(e){for(const t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),F((()=>{let t=!1;for(const i of e)t=this._commands.delete(i.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)}))}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){return this.appendMenuItems(T.single({id:e,item:t}))}appendMenuItems(e){const t=new Set,i=new q;for(const{id:n,item:o}of e){let e=this._menuItems.get(n);e||(e=new q,this._menuItems.set(n,e)),i.push(e.push(o)),t.add(n)}return this._onDidChangeMenu.fire(t),F((()=>{if(i.size>0){for(let e of i)e();this._onDidChangeMenu.fire(t),i.clear()}}))}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===Sr.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)yr(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 Dr extends Po{constructor(e,t,i,n){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,[],"submenu"),this.item=e,this._menuService=t,this._contextKeyService=i,this._options=n}get actions(){const e=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),i=t.getActions(this._options);t.dispose();for(const[,t]of i)t.length>0&&(e.push(...t),e.push(new Ro));return e.length&&e.pop(),e}}let Lr=class e{constructor(t,i,n,o,s){var r,a;if(this._commandService=s,this.id=t.id,this.label=(null==n?void 0:n.renderShortTitle)&&t.shortTitle?"string"==typeof t.shortTitle?t.shortTitle:t.shortTitle.value:"string"==typeof t.title?t.title:t.title.value,this.tooltip=null!==(a="string"==typeof t.tooltip?t.tooltip:null===(r=t.tooltip)||void 0===r?void 0:r.value)&&void 0!==a?a:"",this.enabled=!t.precondition||o.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const e=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=o.contextMatchesRules(e.condition),this.checked&&e.tooltip&&(this.tooltip="string"==typeof e.tooltip?e.tooltip:e.tooltip.value),e.title&&(this.label="string"==typeof e.title?e.title:e.title.value)}this.item=t,this.alt=i?new e(i,void 0,n,o,s):void 0,this._options=n,pr.isThemeIcon(t.icon)&&(this.class=No.asClassName(t.icon))}dispose(){}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)}};Lr=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}([wr(3,or),wr(4,Fo)],Lr);class Er{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===Ce){if(e&&e.win)return e.win}else if(2===Ce){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=Er.bindToCurrentPlatform(e);if(t&&t.primary){const i=Nt(t.primary,Ce);i&&this._registerDefaultKeybinding(i,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let i=0,n=t.secondary.length;i=21&&e<=30||e>=31&&e<=56||80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&Er._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,i,n,o,s){1===Ce&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e.parts,command:t,commandArgs:i,when:s,weight1:n,weight2:o,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(Ir)),this._cachedMergedKeybindings.slice(0)}}const Nr=new Er;function Ir(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}dr.add("platform.keybindingsRegistry",Nr);const Tr=xo("telemetryService"),Mr=xo("logService");var Rr;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(Rr||(Rr={}));const Pr=Rr.Info;class Ar extends B{constructor(){super(...arguments),this.level=Pr,this._onDidChangeLogLevel=this._register(new Pe)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class Or extends Ar{constructor(e=Pr){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=Rr.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=Rr.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=Rr.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=Rr.Error&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}class Fr extends B{constructor(e){super(),this.logger=e,this._register(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)}error(e,...t){this.logger.error(e,...t)}}class Wr{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}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?Fs.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};Nr.registerKeybindingRule(i)}}Wo.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){kr.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 Br extends Wr{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i){return this._implementations.push({priority:e,name:t,implementation:i}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{if(e.get(or).contextMatchesRules(gt(this.precondition)))return this.runEditorCommand(e,n,t)}))}}class zr extends Hr{constructor(e){super(zr.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=Sr.EditorContext),t.title||(t.title=e.label),t.when=Fs.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}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(Tr).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class jr extends zr{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;enew Promise(((o,r)=>{try{o(n.invokeFunction(t,e.object.textEditorModel,Do.lift(s),i.slice(2)))}catch(e){r(e)}})).finally((()=>{e.dispose()}))))}))}function Kr(e){return Xr.INSTANCE.registerEditorCommand(e),e}function Ur(e){const t=new e;return Xr.INSTANCE.registerEditorAction(t),t}function $r(e){return Xr.INSTANCE.registerEditorAction(e),e}function Zr(e){Xr.INSTANCE.registerEditorAction(e)}function Gr(e,t){Xr.INSTANCE.registerEditorContribution(e,t)}var Yr;!function(e){e.getEditorCommand=function(e){return Xr.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return Xr.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return Xr.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return Xr.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return Xr.INSTANCE.getDiffEditorContributions()}}(Yr||(Yr={}));class Xr{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function Jr(e){return e.register(),e}Xr.INSTANCE=new Xr,dr.add("editor.contributions",Xr.INSTANCE);const Qr=Jr(new Br({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:Sr.MenubarEditMenu,group:"1_do",title:b(0,"&&Undo"),order:1},{menuId:Sr.CommandPalette,group:"",title:b(0,"Undo"),order:1}]}));Jr(new Vr(Qr,{id:"default:undo",precondition:void 0}));const ea=Jr(new Br({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:Sr.MenubarEditMenu,group:"1_do",title:b(0,"&&Redo"),order:2},{menuId:Sr.CommandPalette,group:"",title:b(0,"Redo"),order:1}]}));Jr(new Vr(ea,{id:"default:redo",precondition:void 0}));const ta=Jr(new Br({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:Sr.MenubarSelectionMenu,group:"1_basic",title:b(0,"&&Select All"),order:1},{menuId:Sr.CommandPalette,group:"",title:b(0,"Select All"),order:1}]}));class ia{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 ia.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return ia.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 ia.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 ia.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 ia.plusRange(this,e)}static plusRange(e,t){let i,n,o,s;return t.startLineNumbere.endLineNumber?(o=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(o=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(o=e.endLineNumber,s=e.endColumn),new ia(i,n,o,s)}intersectRanges(e){return ia.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn,r=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;return il?(o=l,s=c):o===l&&(s=Math.min(s,c)),i>o||i===o&&n>s?null:new ia(i,n,o,s)}equalsRange(e){return ia.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return ia.getEndPosition(this)}static getEndPosition(e){return new Do(e.endLineNumber,e.endColumn)}getStartPosition(){return ia.getStartPosition(this)}static getStartPosition(e){return new Do(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new ia(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new ia(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return ia.collapseToStart(this)}static collapseToStart(e){return new ia(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new ia(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new ia(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}}class na extends ia{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 na.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 na(this.startLineNumber,this.startColumn,e,t):new na(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new Do(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Do(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new na(e,t,this.endLineNumber,this.endColumn):new na(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new na(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new na(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new na(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new na(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;i0&&e.getLanguageId(r-1)===o;)r--;return new sa(e,o,r,s+1,e.getStartOffset(r),e.getEndOffset(s))}class sa{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 ra(e){return 0!=(3&e)}class aa{static _nextVisibleColumn(e,t,i){return 9===e?aa.nextRenderTabStop(t,i):ks(e)||Ds(e)?t+2:t+1}static visibleColumnFromColumn(e,t,i){const n=Math.min(t-1,e.length),o=e.substring(0,n),s=new fs(o);let r=0;for(;!s.eol();){const e=ps(o,n,s.offset);s.nextGraphemeLength(),r=this._nextVisibleColumn(e,r,i)}return r}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const n=e.length,o=new fs(e);let s=0,r=1;for(;!o.eol();){const a=ps(e,n,o.offset);o.nextGraphemeLength();const l=this._nextVisibleColumn(a,s,i),c=o.offset+1;if(l>=t)return l-t!0,da=()=>!1,ha=e=>" "===e||"\t"===e;class ua{constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const o=i.options,s=o.get(131);this.readOnly=o.get(81),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=o.get(104),this.lineHeight=o.get(59),this.pageSize=Math.max(1,Math.floor(s.height/this.lineHeight)-2),this.useTabStops=o.get(116),this.wordSeparators=o.get(117),this.emptySelectionClipboard=o.get(32),this.copyWithSyntaxHighlighting=o.get(21),this.multiCursorMergeOverlapping=o.get(69),this.multiCursorPaste=o.get(71),this.autoClosingBrackets=o.get(5),this.autoClosingQuotes=o.get(8),this.autoClosingDelete=o.get(6),this.autoClosingOvertype=o.get(7),this.autoSurround=o.get(11),this.autoIndent=o.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const r=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(r)for(const e of r)this.surroundingPairs[e.open]=e.close}static shouldRecreate(e){return e.hasChanged(131)||e.hasChanged(117)||e.hasChanged(32)||e.hasChanged(69)||e.hasChanged(71)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(116)||e.hasChanged(59)||e.hasChanged(81)}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=oa(t,i-1),o=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return la(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return ha;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e);case"always":return ca;case"never":return da}}_getLanguageDefinedShouldAutoClose(e){const t=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet();return e=>-1!==t.indexOf(e)}visibleColumnFromColumn(e,t){return aa.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=aa.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),o=e.getLineMinColumn(t);if(ns?s:n}}class ga{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new pa(e)}static fromViewState(e){return new ma(e)}static fromModelSelection(e){const t=na.liftSelection(e),i=new fa(ia.fromPositions(t.getSelectionStart()),0,t.getPosition(),0);return ga.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;io,l=n>s,c=ns)continue;if(pn)continue;if(g0&&n--,ba.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 Do(i,o));n=Math.max(n,s)}let r=i.toViewVisualColumn;return re.getLineMinColumn(t.lineNumber))return t.delta(void 0,-vs(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new Do(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),s=ka.atomicPosition(o,t.column-1,i,0);if(-1!==s&&s+1>=n)return new Do(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?La.leftPositionAtomicSoftTabs(t,i,e.tabSize):La.leftPosition(t,i);return new Da(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(La.clipPositionColumn(n,t),0),l=La.left(e,t,a);s=l.lineNumber,r=l.column}return i.move(n,s,r,0)}static clipPositionColumn(e,t){return new Do(e.lineNumber,La.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 ic?(i=c,n=r?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,l),o=u?0:l-aa.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==a){const e=new Do(i,n),s=t.normalizePosition(e,a);o+=n-s.column,i=s.lineNumber,n=s.column}return new Da(i,n,o)}static down(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i+s,r,1)}static moveDown(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.endLineNumber,r=i.selection.endColumn):(s=i.position.lineNumber,r=i.position.column);const a=La.down(e,t,s,r,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,i){const n=i.selection,o=La.down(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),s=La.down(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new fa(new ia(o.lineNumber,o.column,o.lineNumber,o.column),o.leftoverVisibleColumns,new Do(s.lineNumber,s.column),s.leftoverVisibleColumns)}static up(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i-s,r,0)}static moveUp(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.startLineNumber,r=i.selection.startColumn):(s=i.position.lineNumber,r=i.position.column);const a=La.up(e,t,s,r,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){const n=i.selection,o=La.up(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),s=La.up(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new fa(new ia(o.lineNumber,o.column,o.lineNumber,o.column),o.leftoverVisibleColumns,new Do(s.lineNumber,s.column),s.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,i,n){let o=i.position.lineNumber;for(;o>1&&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=d.length+1)return!1;const h=d.charAt(c.column-2),u=n.get(h);if(!u)return!1;if(va(h)){if("never"===i)return!1}else if("never"===t)return!1;const g=d.charAt(c.column-1);let p=!1;for(const e of u)e.open===h&&e.close===g&&(p=!0);if(!p)return!1;if("auto"===e){let e=!1;for(let t=0,i=r.length;t1){const e=t.getLineContent(n.lineNumber),o=Jo(e),s=-1===o?e.length+1:o+1;if(n.column<=s){const e=i.visibleColumnFromColumn(t,n),o=aa.prevIndentTabStop(e,i.indentSize),s=i.columnFromVisibleColumn(t,n.lineNumber,o);return new ia(n.lineNumber,s,n.lineNumber,n.column)}}return ia.fromPositions(Ea.getPositionAfterDeleteLeft(n,t),n)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=function(e,t){if(0===e)return 0;const i=function(e,t){const i=new ms(t,e);let n=i.prevCodePoint();for(;Ms(n)||65039===n||8419===n;){if(0===i.offset)return;n=i.prevCodePoint()}if(!Ds(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 ms(t,e);return n.prevCodePoint(),n.offset}(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 Do(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let o=null;i.sort(((e,t)=>Do.compare(e.getStartPosition(),t.getEndPosition())));for(let s=0,r=i.length;s1&&(null==o?void 0:o.endLineNumber)!==e.lineNumber?(i=e.lineNumber-1,a=t.getLineMaxColumn(e.lineNumber-1),l=e.lineNumber,c=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,a=1,l=e.lineNumber,c=t.getLineMaxColumn(e.lineNumber));const d=new ia(i,a,l,c);o=d,d.isEmpty()?n[s]=null:n[s]=new Ca(d,"")}else n[s]=null;else n[s]=new Ca(r,"")}return new _a(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}function Na(e){return e<0?0:e>255?255:0|e}function Ia(e){return e<0?0:e>4294967295?4294967295:0|e}class Ta{constructor(e){const t=Na(e);this._defaultValue=t,this._asciiMap=Ta._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);for(let i=0;i<256;i++)t[i]=e;return t}set(e,t){const i=Na(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}}class Ma{constructor(){this._actual=new Ta(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}}class Ra extends Ta{constructor(e){super(0);for(let t=0,i=e.length;t(t.hasOwnProperty(e)||(t[e]=(e=>new Ra(e))(e)),t[e])}();class Aa{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=Aa._findPreviousWordOnLine(e,t,new Do(o,s));if(0===n)return new Do(o,r?r.start+1:1);if(1===n)return r&&2===r.wordType&&r.end-r.start==1&&0===r.nextCharClass&&(r=Aa._findPreviousWordOnLine(e,t,new Do(o,r.start+1))),new Do(o,r?r.start+1:1);if(3===n){for(;r&&2===r.wordType;)r=Aa._findPreviousWordOnLine(e,t,new Do(o,r.start+1));return new Do(o,r?r.start+1:1)}return r&&s<=r.end+1&&(r=Aa._findPreviousWordOnLine(e,t,new Do(o,r.start+1))),new Do(o,r?r.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(1===t.column)return i>1?new Do(i-1,e.getLineMaxColumn(i-1)):t;const o=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=o.charCodeAt(e-2),s=o.charCodeAt(e-1);if(95===t&&95!==s)return new Do(i,e);if(ss(t)&&rs(s))return new Do(i,e);if(rs(t)&&rs(s)&&e+1=a.start+1&&(a=Aa._findNextWordOnLine(e,t,new Do(o,a.end+1))),s=a?a.start+1:t.getLineMaxColumn(o);return new Do(o,s)}static _moveWordPartRight(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i1?l=1:(a--,l=n.getLineMaxColumn(a)):(c&&l<=c.end+1&&(c=Aa._findPreviousWordOnLine(i,n,new Do(a,c.start+1))),c?l=c.end+1:l>1?l=1:(a--,l=n.getLineMaxColumn(a))),new ia(a,l,r.lineNumber,r.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new Do(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 ia(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 ia(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)},l=Aa._findPreviousWordOnLine(e,t,i);if(l&&s(l))return a(l);const c=Aa._findNextWordOnLine(e,t,i);return c&&s(c)?a(c):l&&c?r(l.end+1,c.start+1):l?r(l.start+1,l.end+1):c?r(c.start+1,c.end+1):r(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=Aa._moveWordPartLeft(e,i);return new ia(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=h.start+1&&(h=Aa._findNextWordOnLine(i,n,new Do(a,h.end+1))),h?l=h.start+1:lBoolean(e)))}class Wa{static addCursorDown(e,t,i){const n=[];let o=0;for(let s=0,r=t.length;st&&(i=t,n=e.model.getLineMaxColumn(i)),ga.fromModelState(new fa(new ia(s.lineNumber,1,i,n),0,new Do(i,n),0))}const a=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumbera){const i=e.getLineCount();let n=r.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),ga.fromViewState(t.viewState.move(t.modelState.hasSelection(),n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return ga.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,i,n){const o=e.model.validatePosition(n);return ga.fromModelState(Aa.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new ga(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return ga.fromViewState(new fa(new ia(i,n,i,n),0,new Do(i,n),0))}static moveTo(e,t,i,n,o){const s=e.model.validatePosition(n),r=o?e.coordinatesConverter.validateViewPosition(new Do(o.lineNumber,o.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return ga.fromViewState(t.viewState.move(i,r.lineNumber,r.column,0))}static simpleMove(e,t,i,n,o,s){switch(i){case 0:return 4===s?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===s?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===s?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===s?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return 2===s?t.map((t=>ga.fromViewState(La.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>ga.fromModelState(La.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===s?t.map((t=>ga.fromViewState(La.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>ga.fromModelState(La.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:oga.fromViewState(La.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let o=0,s=t.length;oga.fromViewState(La.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let o=0,s=t.length;o/?",Ha=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of Va)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function za(e){let t=Ha;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 ja={maxLen:1e3,windowSize:15,timeBudget:150};function qa(e,t,i,n,o=ja){if(i.length>o.maxLen){let s=e-o.maxLen/2;return s<0?s=0:n+=s,qa(e,t,i=i.substring(s,e+o.maxLen/2),n,o)}const s=Date.now(),r=e-1-n;let a=-1,l=null;for(let e=1;!(Date.now()-s>=o.timeBudget);e++){const n=r-o.windowSize*e;t.lastIndex=Math.max(0,n);const s=Ka(t,i,r,a);if(!s&&l)break;if(l=s,n<=0)break;a=n}if(l){const e={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return t.lastIndex=0,e}return null}function Ka(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}var Ua;!function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(Ua||(Ua={}));class $a{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;tnew $a(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new $a({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.colorizedBracketPairs?this._colorizedBracketPairs=Xa(e.colorizedBracketPairs.map((e=>[e[0],e[1]]))):e.brackets?this._colorizedBracketPairs=Xa(e.brackets.map((e=>[e[0],e[1]])).filter((e=>!("<"===e[0]&&">"===e[1])))):this._colorizedBracketPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new $a({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"==typeof e.autoCloseBefore?e.autoCloseBefore:Ya.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}function Xa(e){return e.filter((([e,t])=>""!==e&&""!==t))}function Ja(e,t=0){return e[e.length-(1+t)]}function Qa(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 s;o=s-1}}return-(n+1)}function tl(e,t){let i=0,n=e.length;if(0===n)return 0;for(;i=t.length)throw new TypeError("invalid index");let n=t[Math.floor(t.length*Math.random())],o=[],s=[],r=[];for(let 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 sl(e){return!Array.isArray(e)||0===e.length}function rl(e){return Array.isArray(e)&&e.length>0}function al(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 ll(e,t){return e.length>0?e[0]:t}function cl(e){return[].concat(...e)}function dl(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 hl(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)}function ul(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function gl(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function pl(e){return Array.isArray(e)?e:[e]}function ml(e,t,i,n){const o=fl(e,t),s=e.splice(o,i);return function(e,t,i){const n=fl(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))}Ya.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";const vl=(e,t)=>e-t;function bl(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n0&&(i=o)}return i}class Cl{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-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(){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}}const wl="undefined"!=typeof Buffer;let yl,Sl,xl,kl;class Dl{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return wl&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new Dl(e)}toString(){return wl?this.buffer.toString():(yl||(yl=new TextDecoder),yl.decode(this.buffer))}}function Ll(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function El(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function Nl(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function Il(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 Tl(e,t){return e[t]}function Ml(e,t,i){e[i]=t}function Rl(){return Sl||(Sl=new TextDecoder("UTF-16LE")),Sl}function Pl(){return kl||(kl=Se()?Rl():(xl||(xl=new TextDecoder("UTF-16BE")),xl)),kl}const Al="undefined"!=typeof TextDecoder;let Ol,Fl;function Wl(e,t,i){const n=[];let o=0;for(let s=0;snew Bl(e),Fl=function(e,t,i){const n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?Wl(e,t,i):Rl().decode(n)}):(Ol=e=>new Vl,Fl=Wl);class Bl{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return Pl().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||hs(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i[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 Hl(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 ql(e,t){return e.length-t.length}function Kl(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 Ul(e){const t=/^[\w ]+$/.test(e);return e=Ko(e),t?`\\b${e}\\b`:e}function $l(e){return Go(`(${e.map(Ul).join(")|(")})`,!0)}const Zl=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){if(Al){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return Pl().decode(t)}{const t=[];let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charAt(n);return t.join("")}}(e)),t}}();class Gl{static _findPrevBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const s=i.length-(o.index||0),r=o[0].length,a=n+s;return new ia(t,a-r+1,t,a+1)}static findPrevBracketInRange(e,t,i,n,o){const s=Zl(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 s=o.index||0,r=o[0].length;if(0===r)return null;const a=n+s;return new ia(t,a+1,t,a+1+r)}static findNextBracketInRange(e,t,i,n,o){const s=i.substring(n,o);return this.findNextBracketInText(e,t,s,n)}}class Yl{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 al(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if(ra(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,i-1)+e,r=Gl.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 l=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function Xl(e){return e.global&&(e.lastIndex=0),!0}class Jl{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&Xl(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&Xl(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&Xl(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&Xl(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}}class Ql{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=Ql._createOpenBracketRegExp(e[0]),i=Ql._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=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 uc(void 0));else for(const e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new uc(e)))}))),this._register(vc.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new uc(e.languageId))})))}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i){let n=vc.getLanguageConfiguration(e);if(!n){if(!i.isRegisteredLanguageId(e))throw new Error(`Language id "${e}" is not configured nor known`);n=new yc(e,{})}const o=function(e,t){const i=t.getValue(mc.brackets,{overrideIdentifier:e}),n=t.getValue(mc.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:fc(i),colorizedBracketPairs:fc(n)}}(n.languageId,t),s=Cc([n.underlyingConfig,o]);return new yc(n.languageId,s)}(e,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};pc=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}([hc(0,ec),hc(1,rc)],pc);const mc={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function fc(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}class _c{constructor(e){this.languageId=e}}const vc=new class{constructor(){this._entries=new Map,this._onDidChange=new Pe,this.onDidChange=this._onDidChange.event}register(e,t,i=0){let n=this._entries.get(e);n||(n=new bc(e),this._entries.set(e,n));const o=n.register(t,i);return this._onDidChange.fire(new _c(e)),F((()=>{o.dispose(),this._onDidChange.fire(new _c(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return(null==t?void 0:t.getResolvedConfiguration())||null}getComments(e){const t=this.getLanguageConfiguration(e);return t&&t.comments||null}getIndentRulesSupport(e){const t=this.getLanguageConfiguration(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,i){const n=e.getLanguageIdAtPosition(t,0);if(t>1){let o,s=-1;for(o=t-1;o>=1;o--){if(e.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}getInheritIndentForLine(e,t,i,n=!0){if(e<4)return null;const o=this.getIndentRulesSupport(t.getLanguageId());if(!o)return null;if(i<=1)return{indentation:"",action:null};const s=this.getPrecedingValidLine(t,i,o);if(s<0)return null;if(s<1)return{indentation:"",action:null};const r=t.getLineContent(s);if(o.shouldIncrease(r)||o.shouldIndentNextLine(r))return{indentation:Qo(r),action:Ua.Indent,line:s};if(o.shouldDecrease(r))return{indentation:Qo(r),action:null,line:s};{if(1===s)return{indentation:Qo(t.getLineContent(s)),action:null,line:s};const e=s-1,i=o.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:Qo(t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:Qo(t.getLineContent(s)),action:null,line:s};for(let e=s;e>0;e--){const i=t.getLineContent(e);if(o.shouldIncrease(i))return{indentation:Qo(i),action:Ua.Indent,line:e};if(o.shouldIndentNextLine(i)){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(e))){i=n;break}return{indentation:Qo(t.getLineContent(i+1)),action:null,line:i+1}}if(o.shouldDecrease(i))return{indentation:Qo(i),action:null,line:e}}return{indentation:Qo(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,i,n,o){if(e<4)return null;const s=this.getLanguageConfiguration(i);if(!s)return null;const r=this.getIndentRulesSupport(i);if(!r)return null;const a=this.getInheritIndentForLine(e,t,n),l=t.getLineContent(n);if(a){const i=a.line;if(void 0!==i){const n=s.onEnter(e,"",t.getLineContent(i),"");if(n){let e=Qo(t.getLineContent(i));return n.removeText&&(e=e.substring(0,e.length-n.removeText)),n.indentAction===Ua.Indent||n.indentAction===Ua.IndentOutdent?e=o.shiftIndent(e):n.indentAction===Ua.Outdent&&(e=o.unshiftIndent(e)),r.shouldDecrease(l)&&(e=o.unshiftIndent(e)),n.appendText&&(e+=n.appendText),Qo(e)}}return r.shouldDecrease(l)?a.action===Ua.Indent?a.indentation:o.unshiftIndent(a.indentation):a.action===Ua.Indent?o.shiftIndent(a.indentation):a.indentation}return null}getIndentForEnter(e,t,i,n){if(e<4)return null;t.forceTokenization(i.startLineNumber);const o=t.getLineTokens(i.startLineNumber),s=oa(o,i.startColumn-1),r=s.getLineContent();let a,l,c=!1;s.firstCharOffset>0&&o.getLanguageId(0)!==s.languageId?(c=!0,a=r.substr(0,i.startColumn-1-s.firstCharOffset)):a=o.getLineContent().substring(0,i.startColumn-1),l=i.isEmpty()?r.substr(i.startColumn-1-s.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-s.firstCharOffset);const d=this.getIndentRulesSupport(s.languageId);if(!d)return null;const h=a,u=Qo(a),g={getLineTokens:e=>t.getLineTokens(e),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i),getLineContent:e=>e===i.startLineNumber?h:t.getLineContent(e)},p=Qo(o.getLineContent()),m=this.getInheritIndentForLine(e,g,i.startLineNumber+1);if(!m){const e=c?p:u;return{beforeEnter:e,afterEnter:e}}let f=c?p:m.indentation;return m.action===Ua.Indent&&(f=n.shiftIndent(f)),d.shouldDecrease(l)&&(f=n.unshiftIndent(f)),{beforeEnter:c?p:u,afterEnter:f}}getIndentActionForType(e,t,i,n,o){if(e<4)return null;const s=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn);if(s.firstCharOffset)return null;const r=this.getIndentRulesSupport(s.languageId);if(!r)return null;const a=s.getLineContent(),l=a.substr(0,i.startColumn-1-s.firstCharOffset);let c;if(c=i.isEmpty()?a.substr(i.startColumn-1-s.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-s.firstCharOffset),!r.shouldDecrease(l+c)&&r.shouldDecrease(l+n+c)){const n=this.getInheritIndentForLine(e,t,i.startLineNumber,!1);if(!n)return null;let s=n.indentation;return n.action!==Ua.Indent&&(s=o.unshiftIndent(s)),s}return null}getIndentMetadata(e,t){const i=this.getIndentRulesSupport(e.getLanguageId());return i?t<1||t>e.getLineCount()?null:i.getIndentMetadata(e.getLineContent(t)):null}getEnterAction(e,t,i){const n=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),o=this.getLanguageConfiguration(n.languageId);if(!o)return null;const s=n.getLineContent(),r=s.substr(0,i.startColumn-1-n.firstCharOffset);let a;a=i.isEmpty()?s.substr(i.startColumn-1-n.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-n.firstCharOffset);let l="";if(i.startLineNumber>1&&0===n.firstCharOffset){const e=this.getScopedLineTokens(t,i.startLineNumber-1);e.languageId===n.languageId&&(l=e.getLineContent())}const c=o.onEnter(e,l,r,a);if(!c)return null;const d=c.indentAction;let h=c.appendText;const u=c.removeText||0;h?d===Ua.Indent&&(h="\t"+h):h=d===Ua.Indent||d===Ua.IndentOutdent?"\t":"";let g=this.getIndentationAtPosition(t,i.startLineNumber,i.startColumn);return u&&(g=g.substring(0,g.length-u)),{indentAction:d,appendText:h,removeText:u,indentation:g}}getIndentationAtPosition(e,t,i){let n=Qo(e.getLineContent(t));return n.length>i-1&&(n=n.substring(0,i-1)),n}getScopedLineTokens(e,t,i){return e.forceTokenization(t),oa(e.getLineTokens(t),void 0===i?e.getLineMaxColumn(t)-1:i-1)}};class bc{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new wc(e,t,++this._order);return this._entries.push(i),this._resolved=null,F((()=>{for(let e=0;ee.configuration))))}}function Cc(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 wc{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 yc{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 Ql(this.underlyingConfig):null,this.comments=yc._handleComments(this.underlyingConfig),this.characterPair=new Ya(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||Ha,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new Jl(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{}}getWordDefinition(){return za(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new zl(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new Yl(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new Za(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(){return this.characterPair.getAutoCloseBeforeSet()}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}}cc(gc,pc);const Sc=Object.create(null);function xc(e,t){if(t<=0)return"";Sc[e]||(Sc[e]=["",e]);const i=Sc[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}class kc{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,n,o){const s=aa.visibleColumnFromColumn(e,t,i);if(o){const e=xc(" ",n);return xc(e,aa.prevIndentTabStop(s,n)/n)}return xc("\t",aa.prevRenderTabStop(s,i)/i)}static shiftIndent(e,t,i,n,o){const s=aa.visibleColumnFromColumn(e,t,i);if(o){const e=xc(" ",n);return xc(e,aa.nextIndentTabStop(s,n)/n)}return xc("\t",aa.nextRenderTabStop(s,i)/i)}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let n=this._selection.endLineNumber;1===this._selection.endColumn&&i!==n&&(n-=1);const{tabSize:o,indentSize:s,insertSpaces:r}=this._opts,a=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,c=0;for(let d=i;d<=n;d++,l=c){c=0;const n=e.getLineContent(d);let h,u=Jo(n);if((!this._opts.isUnshift||0!==n.length&&0!==u)&&(a||this._opts.isUnshift||0!==n.length)){if(-1===u&&(u=n.length),d>1&&aa.visibleColumnFromColumn(n,u+1,o)%s!=0&&e.isCheapToTokenize(d-1)){const t=vc.getEnterAction(this._opts.autoIndent,e,new ia(d-1,e.getLineMaxColumn(d-1),d-1,e.getLineMaxColumn(d-1)));if(t){if(c=l,t.appendText)for(let e=0,i=t.appendText.length;e1){let n;for(n=i-1;n>=1&&!(es(t.getLineContent(n))>=0);n--);if(n<1)return null;const s=t.getLineMaxColumn(n),r=vc.getEnterAction(e.autoIndent,t,new ia(n,s,n,s));r&&(o=r.indentation+r.appendText)}return n&&(n===Ua.Indent&&(o=Lc.shiftIndent(e,o)),n===Ua.Outdent&&(o=Lc.unshiftIndent(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,t,i,n){let o="";const s=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,s),n=e.indentSize,r=n-i%n;for(let e=0;ethis._compositionType(i,e,o,s,r,a)));return new _a(4,l,{shouldPushStackElementBefore:Ic(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,s){if(!t.isEmpty())return null;const r=t.getPosition(),a=Math.max(1,r.column-n),l=Math.min(e.getLineMaxColumn(r.lineNumber),r.column+o),c=new ia(r.lineNumber,a,r.lineNumber,l);return e.getValueInRange(c)===i&&0===s?null:new Sa(c,i,0,s)}static _typeCommand(e,t,i){return i?new ya(e,t,!0):new Ca(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return Lc._typeCommand(n,"\n",i);if(!t.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){const o=Qo(t.getLineContent(n.startLineNumber)).substring(0,n.startColumn-1);return Lc._typeCommand(n,"\n"+e.normalizeIndentation(o),i)}const o=vc.getEnterAction(e.autoIndent,t,n);if(o){if(o.indentAction===Ua.None)return Lc._typeCommand(n,"\n"+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===Ua.Indent)return Lc._typeCommand(n,"\n"+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===Ua.IndentOutdent){const t=e.normalizeIndentation(o.indentation),s=e.normalizeIndentation(o.indentation+o.appendText),r="\n"+s+"\n"+t;return i?new ya(n,r,!0):new Sa(n,r,-1,s.length-t.length,!0)}if(o.indentAction===Ua.Outdent){const t=Lc.unshiftIndent(e,o.indentation);return Lc._typeCommand(n,"\n"+e.normalizeIndentation(t+o.appendText),i)}}const s=Qo(t.getLineContent(n.startLineNumber)).substring(0,n.startColumn-1);if(e.autoIndent>=4){const o=vc.getIndentForEnter(e.autoIndent,t,n,{unshiftIndent:t=>Lc.unshiftIndent(e,t),shiftIndent:t=>Lc.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(o){let s=e.visibleColumnFromColumn(t,n.getEndPosition());const r=n.endColumn,a=Jo(t.getLineContent(n.endLineNumber));if(n=a>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,a+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new ya(n,"\n"+e.normalizeIndentation(o.afterEnter),!0);{let t=0;return r<=a+1&&(e.insertSpaces||(s=Math.ceil(s/e.indentSize)),t=Math.min(s+1-e.normalizeIndentation(o.afterEnter).length-1,0)),new Sa(n,"\n"+e.normalizeIndentation(o.afterEnter),0,t,!0)}}}return Lc._typeCommand(n,"\n"+e.normalizeIndentation(s),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;eLc.shiftIndent(e,t),unshiftIndent:t=>Lc.unshiftIndent(e,t)});if(null===s)return null;if(s!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?Lc._typeCommand(new ia(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+n,!1):Lc._typeCommand(new ia(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)&&c)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 ia(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){const s=va(n),r=s?e.autoClosingQuotes:e.autoClosingBrackets,a=s?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if("never"===r)return null;for(const e of i)if(!e.isEmpty())return null;const l=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}})),c=this._findAutoClosingPairOpen(e,t,l.map((e=>new Do(e.lineNumber,e.beforeColumn))),n);if(!c)return null;const d=this._findContainedAutoClosingPair(e,c),h=d?d.close:"";let u=!0;for(const i of l){const{lineNumber:o,beforeColumn:s,afterColumn:l}=i,d=t.getLineContent(o),g=d.substring(0,s-1),p=d.substring(l-1);if(p.startsWith(h)||(u=!1),p.length>0){const t=p.charAt(0);if(!Lc._isBeforeClosingBrace(e,p)&&!a(t))return null}if(1===c.open.length&&("'"===n||'"'===n)&&"always"!==r){const t=Pa(e.wordSeparators);if(g.length>0){const e=g.charCodeAt(g.length-1);if(0===t.get(e))return null}}if(!t.isCheapToTokenize(o))return null;t.forceTokenization(o);const m=oa(t.getLineTokens(o),s-1);if(!c.shouldAutoClose(m,s-m.firstCharOffset))return null;const f=c.findNeutralCharacter();if(f){const e=t.getTokenTypeIfInsertingCharacter(o,s,f);if(!c.isOK(e))return null}}return u?c.close.substring(0,c.close.length-h.length):c.close}static _runAutoClosingOpenCharType(e,t,i,n,o,s,r){const a=[];for(let e=0,t=n.length;enew Ca(new ia(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new _a(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const a=this._getAutoClosingPairClose(t,i,o,r,!0);return null!==a?this._runAutoClosingOpenCharType(e,t,i,o,r,!0,a):null}static typeWithInterceptors(e,t,i,n,o,s,r){if(!e&&"\n"===r){const e=[];for(let t=0,s=o.length;t{const i=e.get(ko).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=document.activeElement;return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(ko).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 Fc{constructor(e){super(e),this._minimalReveal=e.minimalReveal,this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[Wa.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)])&&e.revealPrimaryCursor(t.source,!0,this._minimalReveal)}}e.MoveTo=Kr(new t({id:"_moveTo",minimalReveal:!0,inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=Kr(new t({id:"_moveToSelect",minimalReveal:!1,inSelectionMode:!0,precondition:void 0}));class i extends Fc{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,i.viewStates.map((e=>ga.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=Kr(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){const o=e.model.validatePosition(n.position),s=e.coordinatesConverter.validateViewPosition(new Do(n.viewPosition.lineNumber,n.viewPosition.column),o),r=n.doColumnSelect?i.fromViewLineNumber:s.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return ba.columnSelect(e.cursorConfig,e,r,a,s.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=Kr(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return ba.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=Kr(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return ba.columnSelectRight(e.cursorConfig,e,i)}});class n extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return ba.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=Kr(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=Kr(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:3595,linux:{primary:0}}}));class o extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return ba.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=Kr(new o({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=Kr(new o({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:3596,linux:{primary:0}}}));class s extends Fc{constructor(){super({id:"cursorMove",precondition:void 0,description:Ba.description})}runCoreEditorCommand(e,t){const i=Ba.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,s._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 Wa.simpleMove(e,t,i.direction,n,o,i.unit);case 11:case 13:case 12:case 14:return Wa.viewportMove(e,t,i.direction,n,o);default:return null}}}e.CursorMoveImpl=s,e.CursorMove=Kr(new s);class r extends Fc{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,Wa.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=Kr(new r({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=Kr(new r({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:1039}})),e.CursorRight=Kr(new r({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=Kr(new r({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:1041}})),e.CursorUp=Kr(new r({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=Kr(new r({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=Kr(new r({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:11}})),e.CursorPageUpSelect=Kr(new r({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:1035}})),e.CursorDown=Kr(new r({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=Kr(new r({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=Kr(new r({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:12}})),e.CursorPageDownSelect=Kr(new r({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:1036}})),e.CreateCursor=Kr(new class extends Fc{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let i;i=t.wholeLine?Wa.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):Wa.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 ia(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(i.at)switch(i.at){case Ac.RawAtArgument.Top:a=3;break;case Ac.RawAtArgument.Center:a=1;break;case Ac.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends Wc{constructor(){super(ta)}runDOMCommand(){Ke&&(document.activeElement.focus(),document.activeElement.select()),document.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,[Wa.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=Kr(new class extends Fc{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[ga.fromModelSelection(t.selection)])}})}(Oc||(Oc={}));const Bc=Fs.and(Rc.textInputFocus,Rc.columnSelection);function Vc(e,t){Nr.registerKeybindingRule({id:e,primary:t,when:Bc,weight:1})}function Hc(e){return e.register(),e}var zc;Vc(Oc.CursorColumnSelectLeft.id,1039),Vc(Oc.CursorColumnSelectRight.id,1041),Vc(Oc.CursorColumnSelectUp.id,1040),Vc(Oc.CursorColumnSelectPageUp.id,1035),Vc(Oc.CursorColumnSelectDown.id,1042),Vc(Oc.CursorColumnSelectPageDown.id,1036),function(e){class t extends Hr{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=Kr(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:Rc.writable,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Lc.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=Kr(new class extends t{constructor(){super({id:"outdent",precondition:Rc.writable,kbOpts:{weight:0,kbExpr:Fs.and(Rc.editorTextFocus,Rc.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Lc.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=Kr(new class extends t{constructor(){super({id:"tab",precondition:Rc.writable,kbOpts:{weight:0,kbExpr:Fs.and(Rc.editorTextFocus,Rc.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Lc.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=Kr(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=Ea.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=Kr(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:Rc.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=Ea.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 Wc{constructor(){super(Qr)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(81))return t.getModel().undo()}},e.Redo=new class extends Wc{constructor(){super(ea)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(81))return t.getModel().redo()}}}(zc||(zc={}));class jc extends Wr{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(ko).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function qc(e,t){Hc(new jc("default:"+e,e)),Hc(new jc(e,e,t))}qc("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),qc("replacePreviousChar"),qc("compositionType"),qc("compositionStart"),qc("compositionEnd"),qc("paste"),qc("cut");const Kc=xo("markerDecorationsService");let Uc=class{constructor(e,t){}dispose(){}};var $c,Zc;Uc.ID="editor.contrib.markerDecorations",Uc=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=1,Zc=Kc,function(e,t){Zc(e,t,$c)})],Uc),Gr(Uc.ID,Uc);var Gc=i(1724),Yc={};function Xc(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((i=>{e[i]&&"object"==typeof e[i]?t[i]=Xc(e[i]):t[i]=e[i]})),t}Yc.styleTagTransform=p(),Yc.setAttributes=d(),Yc.insert=l().bind(null,"head"),Yc.domAPI=r(),Yc.insertStyleElement=u(),o()(Gc.Z,Yc),Gc.Z&&Gc.Z.locals&&Gc.Z.locals;const Jc=Object.prototype.hasOwnProperty;function Qc(e,t){return ed(e,t,new Set)}function ed(e,t,i){if(at(e))return e;const n=t(e);if(void 0!==n)return n;if(Qe(e)){const n=[];for(const o of e)n.push(ed(o,t,i));return n}if(tt(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(let o in e)Jc.call(e,o)&&(n[o]=ed(e[o],t,i));return i.delete(e),n}return e}function td(e,t,i=!0){return tt(e)?(tt(t)&&Object.keys(t).forEach((n=>{n in e?i&&(tt(e[n])&&tt(t[n])?td(e[n],t[n],i):e[n]=t[n]):e[n]=t[n]})),e):t}function id(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;i{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()})),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())}}class sd{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontStyle="",this._fontFeatureSettings="",this._textDecoration="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}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){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}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)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}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 rd(e){return new sd(e)}const ad={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}};class ld{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class cd{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class dd{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return ud(e,t)}compute(e,t,i){return i}}class hd{constructor(e,t){this.newValue=e,this.didChange=t}}function ud(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new hd(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&Qa(e,t);return new hd(t,i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const o=ud(e[n],t[n]);o.didChange&&(e[n]=o.newValue,i=!0)}return new hd(e,i)}class gd{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return ud(e,t)}validate(e){return this.defaultValue}}class pd{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return ud(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function md(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class fd extends pd{constructor(e,t,i,n){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return md(e,this.defaultValue)}}function _d(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 vd extends pd{constructor(e,t,i,n,o,s){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}static clampedInt(e,t,i,n){return _d(e,t,i,n)}validate(e){return vd.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class bd extends pd{constructor(e,t,i,n,o){void 0!==o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}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}validate(e){return this.validationFn(bd.float(e,this.defaultValue))}}class Cd extends pd{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return Cd.string(e,this.defaultValue)}}function wd(e,t,i){return"string"!=typeof e||-1===i.indexOf(e)?t:e}class yd extends pd{constructor(e,t,i,n,o){void 0!==o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return wd(e,this.defaultValue,this._allowedValues)}}class Sd extends dd{constructor(e,t,i,n,o,s,r){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 xd;!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"}(xd||(xd={}));class kd extends dd{constructor(){super(45,"fontLigatures",kd.OFF,{anyOf:[{type:"boolean",description:b(0,"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:b(0,"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:b(0,"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?kd.OFF:"true"===e?kd.ON:e:Boolean(e)?kd.ON:kd.OFF}}kd.OFF='"liga" off, "calt" off',kd.ON='"liga" on, "calt" on';class Dd extends dd{constructor(){super(47,"fontWeight",Bd.fontWeight,{anyOf:[{type:"number",minimum:Dd.MINIMUM_VALUE,maximum:Dd.MAXIMUM_VALUE,errorMessage:b(0,'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:Dd.SUGGESTION_VALUES}],default:Bd.fontWeight,description:b(0,'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(vd.clampedInt(e,Bd.fontWeight,Dd.MINIMUM_VALUE,Dd.MAXIMUM_VALUE))}}Dd.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],Dd.MINIMUM_VALUE=1,Dd.MAXIMUM_VALUE=1e3;class Ld extends gd{constructor(){super(131)}compute(e,t,i){return Ld.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})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:Math.floor(e.viewLineCount/n)}}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.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,d=e.minimap.renderCharacters;let h=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const u=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,m=e.verticalScrollbarWidth,f=e.viewLineCount,_=e.remainingWidth,v=e.isViewportWrapping,b=d?2:3;let C=Math.floor(o*n);const w=C/o;let y=!1,S=!1,x=b*h,k=h/o,D=1;if("fill"===g||"fit"===g){const{typicalViewportLineCount:i,extraLinesBeyondLastLine:s,desiredRatio:l,minimapLineCount:d}=Ld.computeContainedMinimapLineCount({viewLineCount:f,scrollBeyondLastLine:c,height:n,lineHeight:a,pixelRatio:o});if(f/d>1)y=!0,S=!0,h=1,x=1,k=h/o;else{let n=!1,c=h+1;if("fit"===g){const e=Math.ceil((f+s)*x);v&&r&&_<=t.stableFitRemainingWidth?(n=!0,c=t.stableFitMaxMinimapScale):n=e>C}if("fill"===g||n){y=!0;const n=h;x=Math.min(a*o,Math.max(1,Math.floor(1/l))),v&&r&&_<=t.stableFitRemainingWidth&&(c=t.stableFitMaxMinimapScale),h=Math.min(c,Math.max(1,Math.floor(x/b))),h>n&&(D=Math.min(2,h/n)),k=h/o/D,C=Math.ceil(Math.max(i,f+s)*x),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=_,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const L=Math.floor(u*k),E=Math.min(L,Math.max(0,Math.floor((_-m-2)*k/(l+k)))+8);let N=Math.floor(o*E);const I=N/o;return N=Math.floor(N*D),{renderMinimap:d?1:2,minimapLeft:"left"===p?0:i-E-m,minimapWidth:E,minimapHeightIsEditorHeight:y,minimapIsSampling:S,minimapScale:h,minimapLineHeight:x,minimapCanvasInnerWidth:N,minimapCanvasInnerHeight:C,minimapCanvasOuterWidth:I,minimapCanvasOuterHeight:w}}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,c=t.viewLineCount,d=e.get(123),h="inherit"===d?e.get(122):d,u="inherit"===h?e.get(118):h,g=e.get(121),p=e.get(2),m=t.isDominatedByLongLines,f=e.get(50),_=0!==e.get(60).renderType,v=e.get(61),b=e.get(94),C=e.get(65),w=e.get(92),y=w.verticalScrollbarSize,S=w.verticalHasArrows,x=w.arrowSize,k=w.horizontalScrollbarSize,D=e.get(58),L=e.get(37);let E;if("string"==typeof D&&/^\d+(\.\d+)?ch$/.test(D)){const e=parseFloat(D.substr(0,D.length-2));E=vd.clampedInt(e*r,0,0,1e3)}else E=vd.clampedInt(D,0,0,1e3);L&&(E+=16);let N=0;if(_){const e=Math.max(s,v);N=Math.round(e*a)}let I=0;f&&(I=o);let T=0,M=T+I,R=M+N,P=R+E;const A=i-I-N-E;let O=!1,F=!1,W=-1;2!==p&&("inherit"===h&&m?(O=!0,F=!0):"on"===u||"bounded"===u?F=!0:"wordWrapColumn"===u&&(W=g));const B=Ld._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:b,minimap:C,verticalScrollbarWidth:y,viewLineCount:c,remainingWidth:A,isViewportWrapping:F},t.memory||new cd);0!==B.renderMinimap&&0===B.minimapLeft&&(T+=B.minimapWidth,M+=B.minimapWidth,R+=B.minimapWidth,P+=B.minimapWidth);const V=A-B.minimapWidth,H=Math.max(1,Math.floor((V-y-2)/r)),z=S?x:0;return F&&(W=Math.max(1,H),"bounded"===u&&(W=Math.min(W,g))),{width:i,height:n,glyphMarginLeft:T,glyphMarginWidth:I,lineNumbersLeft:M,lineNumbersWidth:N,decorationsLeft:R,decorationsWidth:E,contentLeft:P,contentWidth:V,minimap:B,viewportColumn:H,isWordWrapMinified:O,isViewportWrapping:F,wrappingColumn:W,verticalScrollbarWidth:y,horizontalScrollbarHeight:k,overviewRuler:{top:z,width:y,height:n-2*z,right:0}}}}function Ed(e){const t=e.get(87);return"editable"===t?e.get(81):"on"!==t}function Nd(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}const Id="inUntrustedWorkspace",Td="editor.unicodeHighlight.allowedCharacters",Md="editor.unicodeHighlight.invisibleCharacters",Rd="editor.unicodeHighlight.nonBasicASCII",Pd="editor.unicodeHighlight.ambiguousCharacters",Ad="editor.unicodeHighlight.includeComments",Od="editor.unicodeHighlight.includeStrings",Fd="editor.unicodeHighlight.allowedLocales";function Wd(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const Bd={fontFamily:he?"Menlo, Monaco, 'Courier New', monospace":ue?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:he?12:14,lineHeight:0,letterSpacing:0},Vd=[];function Hd(e){return Vd[e.id]=e,e}const zd={acceptSuggestionOnCommitCharacter:Hd(new fd(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:b(0,"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:Hd(new yd(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",b(0,"Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:b(0,"Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:Hd(new class extends dd{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[b(0,"The editor will use platform APIs to detect when a Screen Reader is attached."),b(0,"The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),b(0,"The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:b(0,"Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}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:Hd(new vd(3,"accessibilityPageSize",10,1,1073741824,{description:b(0,"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.")})),ariaLabel:Hd(new Cd(4,"ariaLabel",b(0,"Editor content"))),autoClosingBrackets:Hd(new yd(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",b(0,"Use language configurations to determine when to autoclose brackets."),b(0,"Autoclose brackets only when the cursor is to the left of whitespace."),""],description:b(0,"Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:Hd(new yd(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",b(0,"Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:b(0,"Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Hd(new yd(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",b(0,"Type over closing quotes or brackets only if they were automatically inserted."),""],description:b(0,"Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Hd(new yd(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",b(0,"Use language configurations to determine when to autoclose quotes."),b(0,"Autoclose quotes only when the cursor is to the left of whitespace."),""],description:b(0,"Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Hd(new Sd(9,"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:[b(0,"The editor will not insert indentation automatically."),b(0,"The editor will keep the current line's indentation."),b(0,"The editor will keep the current line's indentation and honor language defined brackets."),b(0,"The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),b(0,"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:b(0,"Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Hd(new fd(10,"automaticLayout",!1)),autoSurround:Hd(new yd(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[b(0,"Use language configurations to determine when to automatically surround selections."),b(0,"Surround with quotes but not brackets."),b(0,"Surround with brackets but not quotes."),""],description:b(0,"Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Hd(new class extends dd{constructor(){const e={enabled:ad.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,description:b(0,"Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(e){return e&&"object"==typeof e?{enabled:md(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),bracketPairGuides:Hd(new class extends dd{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[b(0,"Enables bracket pair guides."),b(0,"Enables bracket pair guides only for the active bracket pair."),b(0,"Disables bracket pair guides.")],default:e.bracketPairs,description:b(0,"Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[b(0,"Enables horizontal guides as addition to vertical bracket pair guides."),b(0,"Enables horizontal guides only for the active bracket pair."),b(0,"Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:b(0,"Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:b(0,"Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:b(0,"Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:e.highlightActiveIndentation,description:b(0,"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:Wd(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:Wd(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:md(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:md(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:md(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}),stickyTabStops:Hd(new fd(104,"stickyTabStops",!1,{description:b(0,"Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Hd(new fd(14,"codeLens",!0,{description:b(0,"Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Hd(new Cd(15,"codeLensFontFamily","",{description:b(0,"Controls the font family for CodeLens.")})),codeLensFontSize:Hd(new vd(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:b(0,"Controls the font size in pixels for CodeLens. When set to `0`, 90% of `#editor.fontSize#` is used.")})),colorDecorators:Hd(new fd(17,"colorDecorators",!0,{description:b(0,"Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:Hd(new fd(18,"columnSelection",!1,{description:b(0,"Enable that the selection with the mouse and keys is doing column selection.")})),comments:Hd(new class extends dd{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:b(0,"Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:b(0,"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:md(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:md(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:Hd(new fd(20,"contextmenu",!0)),copyWithSyntaxHighlighting:Hd(new fd(21,"copyWithSyntaxHighlighting",!0,{description:b(0,"Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Hd(new Sd(22,"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:b(0,"Control the cursor animation style.")})),cursorSmoothCaretAnimation:Hd(new fd(23,"cursorSmoothCaretAnimation",!1,{description:b(0,"Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Hd(new Sd(24,"cursorStyle",xd.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return xd.Line;case"block":return xd.Block;case"underline":return xd.Underline;case"line-thin":return xd.LineThin;case"block-outline":return xd.BlockOutline;case"underline-thin":return xd.UnderlineThin}}),{description:b(0,"Controls the cursor style.")})),cursorSurroundingLines:Hd(new vd(25,"cursorSurroundingLines",0,0,1073741824,{description:b(0,"Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:Hd(new yd(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[b(0,"`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),b(0,"`cursorSurroundingLines` is enforced always.")],description:b(0,"Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:Hd(new vd(27,"cursorWidth",0,0,1073741824,{markdownDescription:b(0,"Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Hd(new fd(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:Hd(new fd(29,"disableMonospaceOptimizations",!1)),domReadOnly:Hd(new fd(30,"domReadOnly",!1)),dragAndDrop:Hd(new fd(31,"dragAndDrop",!0,{description:b(0,"Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Hd(new class extends fd{constructor(){super(32,"emptySelectionClipboard",!0,{description:b(0,"Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),extraEditorClassName:Hd(new Cd(33,"extraEditorClassName","")),fastScrollSensitivity:Hd(new bd(34,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:b(0,"Scrolling speed multiplier when pressing `Alt`.")})),find:Hd(new class extends dd{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:b(0,"Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[b(0,"Never seed search string from the editor selection."),b(0,"Always seed search string from the editor selection, including word at cursor position."),b(0,"Only seed search string from the editor selection.")],description:b(0,"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:[b(0,"Never turn on Find in Selection automatically (default)."),b(0,"Always turn on Find in Selection automatically."),b(0,"Turn on Find in Selection automatically when multiple lines of content are selected.")],description:b(0,"Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:b(0,"Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:he},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:b(0,"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:b(0,"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:md(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":wd(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":wd(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:md(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:md(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:md(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:Hd(new fd(36,"fixedOverflowWidgets",!1)),folding:Hd(new fd(37,"folding",!0,{description:b(0,"Controls whether the editor has code folding enabled.")})),foldingStrategy:Hd(new yd(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[b(0,"Use a language-specific folding strategy if available, else the indentation-based one."),b(0,"Use the indentation-based folding strategy.")],description:b(0,"Controls the strategy for computing folding ranges.")})),foldingHighlight:Hd(new fd(39,"foldingHighlight",!0,{description:b(0,"Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Hd(new fd(40,"foldingImportsByDefault",!1,{description:b(0,"Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:Hd(new vd(41,"foldingMaximumRegions",5e3,10,65e3,{description:b(0,"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:Hd(new fd(42,"unfoldOnClickAfterEndOfLine",!1,{description:b(0,"Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Hd(new Cd(43,"fontFamily",Bd.fontFamily,{description:b(0,"Controls the font family.")})),fontInfo:Hd(new class extends gd{constructor(){super(44)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:Hd(new kd),fontSize:Hd(new class extends pd{constructor(){super(46,"fontSize",Bd.fontSize,{type:"number",minimum:6,maximum:100,default:Bd.fontSize,description:b(0,"Controls the font size in pixels.")})}validate(e){const t=bd.float(e,this.defaultValue);return 0===t?Bd.fontSize:bd.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:Hd(new Dd),formatOnPaste:Hd(new fd(48,"formatOnPaste",!1,{description:b(0,"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:Hd(new fd(49,"formatOnType",!1,{description:b(0,"Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Hd(new fd(50,"glyphMargin",!0,{description:b(0,"Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Hd(new class extends dd{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:[b(0,"Show peek view of the results (default)"),b(0,"Go to the primary result and show a peek view"),b(0,"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(51,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:b(0,"This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:b(0,"Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:b(0,"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:b(0,"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:b(0,"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:b(0,"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:b(0,"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:b(0,"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:b(0,"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:b(0,"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:b(0,"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:wd(r.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=r.multipleDefinitions)&&void 0!==t?t:wd(r.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=r.multipleTypeDefinitions)&&void 0!==i?i:wd(r.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=r.multipleDeclarations)&&void 0!==n?n:wd(r.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=r.multipleImplementations)&&void 0!==o?o:wd(r.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(s=r.multipleReferences)&&void 0!==s?s:wd(r.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Cd.string(r.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Cd.string(r.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Cd.string(r.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Cd.string(r.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Cd.string(r.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:Hd(new fd(52,"hideCursorInOverviewRuler",!1,{description:b(0,"Controls whether the cursor should be hidden in the overview ruler.")})),hover:Hd(new class extends dd{constructor(){const e={enabled:!0,delay:300,sticky:!0,above:!0};super(53,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:b(0,"Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:b(0,"Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:b(0,"Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:b(0,"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:md(t.enabled,this.defaultValue.enabled),delay:vd.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:md(t.sticky,this.defaultValue.sticky),above:md(t.above,this.defaultValue.above)}}}),inDiffEditor:Hd(new fd(54,"inDiffEditor",!1)),letterSpacing:Hd(new bd(56,"letterSpacing",Bd.letterSpacing,(e=>bd.clamp(e,-5,20)),{description:b(0,"Controls the letter spacing in pixels.")})),lightbulb:Hd(new class extends dd{constructor(){const e={enabled:!0};super(57,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:b(0,"Enables the code action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:md(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),lineDecorationsWidth:Hd(new pd(58,"lineDecorationsWidth",10)),lineHeight:Hd(new class extends bd{constructor(){super(59,"lineHeight",Bd.lineHeight,(e=>bd.clamp(e,0,150)),{markdownDescription:b(0,"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:Hd(new class extends dd{constructor(){super(60,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[b(0,"Line numbers are not rendered."),b(0,"Line numbers are rendered as absolute number."),b(0,"Line numbers are rendered as distance in lines to cursor position."),b(0,"Line numbers are rendered every 10 lines.")],default:"on",description:b(0,"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:Hd(new vd(61,"lineNumbersMinChars",5,1,300)),linkedEditing:Hd(new fd(62,"linkedEditing",!1,{description:b(0,"Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:Hd(new fd(63,"links",!0,{description:b(0,"Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Hd(new yd(64,"matchBrackets","always",["always","near","never"],{description:b(0,"Highlight matching brackets.")})),minimap:Hd(new class extends dd{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(65,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:b(0,"Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[b(0,"The minimap has the same size as the editor contents (and might scroll)."),b(0,"The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),b(0,"The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:b(0,"Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:b(0,"Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:b(0,"Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:b(0,"Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:b(0,"Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:b(0,"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:md(t.enabled,this.defaultValue.enabled),size:wd(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:wd(t.side,this.defaultValue.side,["right","left"]),showSlider:wd(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:md(t.renderCharacters,this.defaultValue.renderCharacters),scale:vd.clampedInt(t.scale,1,1,3),maxColumn:vd.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:Hd(new yd(66,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Hd(new bd(67,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:b(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Hd(new fd(68,"mouseWheelZoom",!1,{markdownDescription:b(0,"Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Hd(new fd(69,"multiCursorMergeOverlapping",!0,{description:b(0,"Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Hd(new Sd(70,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?he?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[b(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),b(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:b(0,"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. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:Hd(new yd(71,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[b(0,"Each cursor pastes a single line of the text."),b(0,"Each cursor pastes the full text.")],markdownDescription:b(0,"Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:Hd(new fd(72,"occurrencesHighlight",!0,{description:b(0,"Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:Hd(new fd(73,"overviewRulerBorder",!0,{description:b(0,"Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Hd(new vd(74,"overviewRulerLanes",3,0,3)),padding:Hd(new class extends dd{constructor(){super(75,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:b(0,"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:b(0,"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:vd.clampedInt(t.top,0,0,1e3),bottom:vd.clampedInt(t.bottom,0,0,1e3)}}}),parameterHints:Hd(new class extends dd{constructor(){const e={enabled:!0,cycle:!1};super(76,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:b(0,"Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:b(0,"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:md(t.enabled,this.defaultValue.enabled),cycle:md(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:Hd(new yd(77,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[b(0,"Focus the tree when opening peek"),b(0,"Focus the editor when opening peek")],description:b(0,"Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:Hd(new fd(78,"definitionLinkOpensInPeek",!1,{description:b(0,"Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Hd(new class extends dd{constructor(){const e={other:!0,comments:!1,strings:!1};super(79,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:b(0,"Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:b(0,"Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:b(0,"Enable quick suggestions outside of strings and comments.")}}}],default:e,description:b(0,"Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if("boolean"==typeof e)return e;if(e&&"object"==typeof e){const t=e,i={other:md(t.other,this.defaultValue.other),comments:md(t.comments,this.defaultValue.comments),strings:md(t.strings,this.defaultValue.strings)};return!!(i.other&&i.comments&&i.strings)||!!(i.other||i.comments||i.strings)&&i}return this.defaultValue}}),quickSuggestionsDelay:Hd(new vd(80,"quickSuggestionsDelay",10,0,1073741824,{description:b(0,"Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Hd(new fd(81,"readOnly",!1)),renameOnType:Hd(new fd(82,"renameOnType",!1,{description:b(0,"Controls whether the editor auto renames on type."),markdownDeprecationMessage:b(0,"Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Hd(new fd(83,"renderControlCharacters",!0,{description:b(0,"Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:Hd(new fd(84,"renderFinalNewline",!0,{description:b(0,"Render last line number when the file ends with a newline.")})),renderLineHighlight:Hd(new yd(85,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",b(0,"Highlights both the gutter and the current line.")],description:b(0,"Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Hd(new fd(86,"renderLineHighlightOnlyWhenFocus",!1,{description:b(0,"Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Hd(new yd(87,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Hd(new yd(88,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",b(0,"Render whitespace characters except for single spaces between words."),b(0,"Render whitespace characters only on selected text."),b(0,"Render only trailing whitespace characters."),""],description:b(0,"Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Hd(new vd(89,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:Hd(new fd(90,"roundedSelection",!0,{description:b(0,"Controls whether selections should have rounded corners.")})),rulers:Hd(new class extends dd{constructor(){const e=[],t={type:"number",description:b(0,"Number of monospace characters at which this editor ruler will render.")};super(91,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:b(0,"Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:b(0,"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(let i of e)if("number"==typeof i)t.push({column:vd.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:vd.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:Hd(new class extends dd{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};super(92,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[b(0,"The vertical scrollbar will be visible only when necessary."),b(0,"The vertical scrollbar will always be visible."),b(0,"The vertical scrollbar will always be hidden.")],default:"auto",description:b(0,"Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[b(0,"The horizontal scrollbar will be visible only when necessary."),b(0,"The horizontal scrollbar will always be visible."),b(0,"The horizontal scrollbar will always be hidden.")],default:"auto",description:b(0,"Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:b(0,"The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:b(0,"The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:b(0,"Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=vd.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=vd.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:vd.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Nd(t.vertical,this.defaultValue.vertical),horizontal:Nd(t.horizontal,this.defaultValue.horizontal),useShadows:md(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:md(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:md(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:md(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:md(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:vd.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:vd.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:md(t.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:Hd(new vd(93,"scrollBeyondLastColumn",5,0,1073741824,{description:b(0,"Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Hd(new fd(94,"scrollBeyondLastLine",!0,{description:b(0,"Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Hd(new fd(95,"scrollPredominantAxis",!0,{description:b(0,"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:Hd(new fd(96,"selectionClipboard",!0,{description:b(0,"Controls whether the Linux primary clipboard should be supported."),included:ue})),selectionHighlight:Hd(new fd(97,"selectionHighlight",!0,{description:b(0,"Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Hd(new fd(98,"selectOnLineNumbers",!0)),showFoldingControls:Hd(new yd(99,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[b(0,"Always show the folding controls."),b(0,"Only show the folding controls when the mouse is over the gutter.")],description:b(0,"Controls when the folding controls on the gutter are shown.")})),showUnused:Hd(new fd(100,"showUnused",!0,{description:b(0,"Controls fading out of unused code.")})),showDeprecated:Hd(new fd(126,"showDeprecated",!0,{description:b(0,"Controls strikethrough deprecated variables.")})),inlayHints:Hd(new class extends dd{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(127,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:b(0,"Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:b(0,"Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:b(0,"Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:md(t.enabled,this.defaultValue.enabled),fontSize:vd.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Cd.string(t.fontFamily,this.defaultValue.fontFamily)}}}),snippetSuggestions:Hd(new yd(101,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[b(0,"Show snippet suggestions on top of other suggestions."),b(0,"Show snippet suggestions below other suggestions."),b(0,"Show snippets suggestions with other suggestions."),b(0,"Do not show snippet suggestions.")],description:b(0,"Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Hd(new class extends dd{constructor(){super(102,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:b(0,"Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:md(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}),smoothScrolling:Hd(new fd(103,"smoothScrolling",!1,{description:b(0,"Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Hd(new vd(105,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Hd(new class extends dd{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!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(106,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[b(0,"Insert suggestion without overwriting text right of the cursor."),b(0,"Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:b(0,"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:b(0,"Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:b(0,"Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:b(0,"Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:b(0,"Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:b(0,"Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:b(0,"Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:b(0,"Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:b(0,"Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:b(0,"This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:b(0,"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:b(0,"When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:b(0,"When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:wd(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:md(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:md(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:md(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:md(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:md(t.showIcons,this.defaultValue.showIcons),showStatusBar:md(t.showStatusBar,this.defaultValue.showStatusBar),preview:md(t.preview,this.defaultValue.preview),previewMode:wd(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:md(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:md(t.showMethods,this.defaultValue.showMethods),showFunctions:md(t.showFunctions,this.defaultValue.showFunctions),showConstructors:md(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:md(t.showDeprecated,this.defaultValue.showDeprecated),showFields:md(t.showFields,this.defaultValue.showFields),showVariables:md(t.showVariables,this.defaultValue.showVariables),showClasses:md(t.showClasses,this.defaultValue.showClasses),showStructs:md(t.showStructs,this.defaultValue.showStructs),showInterfaces:md(t.showInterfaces,this.defaultValue.showInterfaces),showModules:md(t.showModules,this.defaultValue.showModules),showProperties:md(t.showProperties,this.defaultValue.showProperties),showEvents:md(t.showEvents,this.defaultValue.showEvents),showOperators:md(t.showOperators,this.defaultValue.showOperators),showUnits:md(t.showUnits,this.defaultValue.showUnits),showValues:md(t.showValues,this.defaultValue.showValues),showConstants:md(t.showConstants,this.defaultValue.showConstants),showEnums:md(t.showEnums,this.defaultValue.showEnums),showEnumMembers:md(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:md(t.showKeywords,this.defaultValue.showKeywords),showWords:md(t.showWords,this.defaultValue.showWords),showColors:md(t.showColors,this.defaultValue.showColors),showFiles:md(t.showFiles,this.defaultValue.showFiles),showReferences:md(t.showReferences,this.defaultValue.showReferences),showFolders:md(t.showFolders,this.defaultValue.showFolders),showTypeParameters:md(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:md(t.showSnippets,this.defaultValue.showSnippets),showUsers:md(t.showUsers,this.defaultValue.showUsers),showIssues:md(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:Hd(new class extends dd{constructor(){const e={enabled:!0,mode:"subwordSmart"};super(55,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:b(0,"Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:md(t.enabled,this.defaultValue.enabled),mode:wd(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}),suggestFontSize:Hd(new vd(107,"suggestFontSize",0,0,1e3,{markdownDescription:b(0,"Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:Hd(new vd(108,"suggestLineHeight",0,0,1e3,{markdownDescription:b(0,"Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:Hd(new fd(109,"suggestOnTriggerCharacters",!0,{description:b(0,"Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Hd(new yd(110,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[b(0,"Always select the first suggestion."),b(0,"Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),b(0,"Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:b(0,"Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Hd(new yd(111,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[b(0,"Tab complete will insert the best matching suggestion when pressing tab."),b(0,"Disable tab completions."),b(0,"Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:b(0,"Enables tab completions.")})),tabIndex:Hd(new vd(112,"tabIndex",0,-1,1073741824)),unicodeHighlight:Hd(new class extends dd{constructor(){const e={nonBasicASCII:Id,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:Id,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(113,"unicodeHighlight",e,{[Rd]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Id],default:e.nonBasicASCII,description:b(0,"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.")},[Md]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:b(0,"Controls whether characters that just reserve space or have no width at all are highlighted.")},[Pd]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:b(0,"Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[Ad]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Id],default:e.includeComments,description:b(0,"Controls whether characters in comments should also be subject to unicode highlighting.")},[Od]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Id],default:e.includeStrings,description:b(0,"Controls whether characters in strings should also be subject to unicode highlighting.")},[Td]:{restricted:!0,type:"object",default:e.allowedCharacters,description:b(0,"Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[Fd]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:b(0,"Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&(id(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0)),t.allowedLocales&&(id(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0));const n=super.applyUpdate(e,t);return i?new hd(n.newValue,!0):n}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:Wd(t.nonBasicASCII,Id,[!0,!1,Id]),invisibleCharacters:md(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:md(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:Wd(t.includeComments,Id,[!0,!1,Id]),includeStrings:Wd(t.includeStrings,Id,[!0,!1,Id]),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:Hd(new yd(114,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[b(0,"Unusual line terminators are automatically removed."),b(0,"Unusual line terminators are ignored."),b(0,"Unusual line terminators prompt to be removed.")],description:b(0,"Remove unusual line terminators that might cause problems.")})),useShadowDOM:Hd(new fd(115,"useShadowDOM",!0)),useTabStops:Hd(new fd(116,"useTabStops",!0,{description:b(0,"Inserting and deleting whitespace follows tab stops.")})),wordSeparators:Hd(new Cd(117,"wordSeparators",Va,{description:b(0,"Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Hd(new yd(118,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[b(0,"Lines will never wrap."),b(0,"Lines will wrap at the viewport width."),b(0,"Lines will wrap at `#editor.wordWrapColumn#`."),b(0,"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:b(0,"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:Hd(new Cd(119,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:Hd(new Cd(120,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:Hd(new vd(121,"wordWrapColumn",80,1,1073741824,{markdownDescription:b(0,"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:Hd(new yd(122,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Hd(new yd(123,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:Hd(new Sd(124,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],(function(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}),{enumDescriptions:[b(0,"No indentation. Wrapped lines begin at column 1."),b(0,"Wrapped lines get the same indentation as the parent."),b(0,"Wrapped lines get +1 indentation toward the parent."),b(0,"Wrapped lines get +2 indentation toward the parent.")],description:b(0,"Controls the indentation of wrapped lines.")})),wrappingStrategy:Hd(new yd(125,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[b(0,"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."),b(0,"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.")],description:b(0,"Controls the algorithm that computes wrapping points.")})),editorClassName:Hd(new class extends gd{constructor(){super(128)}compute(e,t,i){const n=["monaco-editor"];return t.get(33)&&n.push(t.get(33)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(66)?n.push("mouse-default"):"copy"===t.get(66)&&n.push("mouse-copy"),t.get(100)&&n.push("showUnused"),t.get(126)&&n.push("showDeprecated"),n.join(" ")}}),pixelRatio:Hd(new class extends gd{constructor(){super(129)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:Hd(new class extends gd{constructor(){super(130)}compute(e,t,i){return!!t.get(81)||e.tabFocusMode}}),layoutInfo:Hd(new Ld),wrappingInfo:Hd(new class extends gd{constructor(){super(132)}compute(e,t,i){const n=t.get(131);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}})};function jd(e,t){e instanceof sd?(e.setFontFamily(t.getMassagedFontFamily(Ze?Bd.fontFamily:null)),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(Ze?Bd.fontFamily:null),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}class qd{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class Kd{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),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");jd(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");jd(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");jd(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");Kd._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;ethis._values[e]))}}const Xd=new class extends B{constructor(){super(),this._onDidChange=this._register(new Pe),this.onDidChange=this._onDidChange.event,this._cache=new Yd,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new Yd,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=window.setTimeout((()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()}),5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(e){if(!this._cache.has(e)){let t=this._actualReadFontInfo(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new Gd({pixelRatio:ze.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}_createRequest(e,t,i,n){const o=new qd(e,t);return i.push(o),n&&n.push(o),o}_actualReadFontInfo(e){const t=[],i=[],n=this._createRequest("n",0,t,i),o=this._createRequest("m",0,t,null),s=this._createRequest(" ",0,t,i),r=this._createRequest("0",0,t,i),a=this._createRequest("1",0,t,i),l=this._createRequest("2",0,t,i),c=this._createRequest("3",0,t,i),d=this._createRequest("4",0,t,i),h=this._createRequest("5",0,t,i),u=this._createRequest("6",0,t,i),g=this._createRequest("7",0,t,i),p=this._createRequest("8",0,t,i),m=this._createRequest("9",0,t,i),f=this._createRequest("→",0,t,i),_=this._createRequest("→",0,t,null),v=this._createRequest("·",0,t,i),b=this._createRequest(String.fromCharCode(11825),0,t,null),C="|/-_ilm%";for(let e=0,n=C.length;e.001){y=!1;break}}let x=!0;return y&&_.width!==S&&(x=!1),_.width>f.width&&(x=!1),new Gd({pixelRatio:ze.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:y,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:o.width,canUseHalfwidthRightwardsArrow:x,spaceWidth:s.width,middotWidth:v.width,wsmiddotWidth:b.width,maxDigitWidth:w},!0)}},Jd=Object.prototype.hasOwnProperty;class Qd{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)}}const eh=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new Pe,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}},th=xo("accessibilityService"),ih=new nr("accessibilityModeEnabled",!1);let nh=class extends B{constructor(e,t,i,n){super(),this._accessibilityService=n,this._onDidChange=this._register(new Pe),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new Pe),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new cd,this.isSimpleWidget=e,this._containerObserver=this._register(new od(i,t.dimension)),this._rawOptions=lh(t),this._validatedOptions=ah.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register(Ud.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(eh.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(Xd.onDidChange((()=>this._recomputeOptions()))),this._register(ze.onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=ah.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=Zd.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:eh.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return ah.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:oh(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:Ue||Ke,pixelRatio:ze.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return Xd.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=lh(e);ah.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=ah.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())}};function oh(){let e="";return Ze||Ge||(e+="no-user-select "),Ze&&(e+="no-minimap-shadow "),he&&(e+="mac "),e}nh=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,th)],nh);class sh{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class rh{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 ah{static validateOptions(e){const t=new sh;for(const i of Vd){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 rh;for(const n of Vd)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))&&Qa(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!ah._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of Vd){const s=!ah._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=s,s&&(n=!0)}return n?new ld(i):null}static applyUpdate(e,t){let i=!1;for(const n of Vd)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 lh(e){const t=Xc(e);return function(e){const t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");const i=e.lineNumbers;!0===i?e.lineNumbers="on":!1===i&&(e.lineNumbers="off"),!1===e.autoClosingBrackets&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never"),"visible"===e.cursorBlinking&&(e.cursorBlinking="solid");const n=e.renderWhitespace;!0===n?e.renderWhitespace="boundary":!1===n&&(e.renderWhitespace="none");const o=e.renderLineHighlight;!0===o?e.renderLineHighlight="line":!1===o&&(e.renderLineHighlight="none");const s=e.acceptSuggestionOnEnter;!0===s?e.acceptSuggestionOnEnter="on":!1===s&&(e.acceptSuggestionOnEnter="off");const r=e.tabCompletion;!1===r?e.tabCompletion="off":!0===r&&(e.tabCompletion="onlySnippets");const a=e.suggest;a&&"object"==typeof a.filteredTypes&&a.filteredTypes&&function(e,t){for(let i in e)if(Jd.call(e,i)&&!1===t({key:i,value:e[i]}))return}({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"},(e=>{const t=a.filteredTypes[e.key];!1===t&&(a[e.value]=t)}));const l=e.hover;!0===l?e.hover={enabled:!0}:!1===l&&(e.hover={enabled:!1});const c=e.parameterHints;!0===c?e.parameterHints={enabled:!0}:!1===c&&(e.parameterHints={enabled:!1});const d=e.autoIndent;!0===d?e.autoIndent="full":!1===d&&(e.autoIndent="advanced");const h=e.matchBrackets;!0===h?e.matchBrackets="always":!1===h&&(e.matchBrackets="never");const{renderIndentGuides:u,highlightActiveIndentGuide:g}=e;e.guides||(e.guides={}),void 0!==u&&(e.guides.indentation=!!u),void 0!==g&&(e.guides.highlightActiveIndentation=!!g)}(t),t}function ch(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]}}var dh;!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(dh||(dh={}));class hh extends B{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(cn(document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),this._register(cn(document,"touchend",(e=>this.onTouchEnd(e)))),this._register(cn(document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}static addTarget(e){return hh.isTouchDevice()?(hh.INSTANCE||(hh.INSTANCE=new hh),hh.INSTANCE.targets.push(e),{dispose:()=>{hh.INSTANCE.targets=hh.INSTANCE.targets.filter((t=>t!==e))}}):B.None}static ignoreTarget(e){return hh.isTouchDevice()?(hh.INSTANCE||(hh.INSTANCE=new hh),hh.INSTANCE.ignoreTargets.push(e),{dispose:()=>{hh.INSTANCE.ignoreTargets=hh.INSTANCE.ignoreTargets.filter((t=>t!==e))}}):B.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i=hh.HOLD_DELAY&&Math.abs(s.initialPageX-Ja(s.rollingPageX))<30&&Math.abs(s.initialPageY-Ja(s.rollingPageY))<30){let e=this.newGestureEvent(dh.Contextmenu,s.initialTarget);e.pageX=Ja(s.rollingPageX),e.pageY=Ja(s.rollingPageY),this.dispatchEvent(e)}else if(1===i){let e=Ja(s.rollingPageX),i=Ja(s.rollingPageY),n=Ja(s.rollingTimestamps)-s.rollingTimestamps[0],o=e-s.rollingPageX[0],r=i-s.rollingPageY[0];const a=this.targets.filter((e=>s.initialTarget instanceof Node&&e.contains(s.initialTarget)));this.inertia(a,t,Math.abs(o)/n,o>0?1:-1,e,Math.abs(r)/n,r>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(dh.End,s.initialTarget)),delete this.activeTouches[o.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===dh.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>hh.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==dh.Change&&e.type!==dh.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}))}inertia(e,t,i,n,o,s,r,a){this.handle=_n((()=>{let l=Date.now(),c=l-t,d=0,h=0,u=!0;i+=hh.SCROLL_FRICTION*c,s+=hh.SCROLL_FRICTION*c,i>0&&(u=!1,d=n*i*c),s>0&&(u=!1,h=r*s*c);let g=this.newGestureEvent(dh.Change);g.translationX=d,g.translationY=h,e.forEach((e=>e.dispatchEvent(g))),u||this.inertia(e,l,i,n,o+d,s,r,a+h)}))}onTouchMove(e){let t=Date.now();for(let i=0,n=e.changedTouches.length;i3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(n.pageX),o.rollingPageY.push(n.pageY),o.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}function uh(e,t){let i=new Ht(t);return i.preventDefault(),{leftButton:i.leftButton,buttons:i.buttons,posx:i.posx,posy:i.posy}}hh.SCROLL_FRICTION=-.005,hh.HOLD_DELAY=700,hh.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)}([ch],hh,"isTouchDevice",null);class gh{constructor(){this._hooks=new W,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,i,n,o){if(this.isMonitoring())return;this._mouseMoveEventMerger=i,this._mouseMoveCallback=n,this._onStopCallback=o;const s=Vt.getSameOriginWindowChain(),r=fe?"pointermove":"mousemove",a=s.map((e=>e.window.document)),l=Bn(e);l&&a.unshift(l);for(const e of a)this._hooks.add(yn(e,r,(e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)}),((e,t)=>this._mouseMoveEventMerger(e,t)))),this._hooks.add(cn(e,"mouseup",(e=>this.stopMonitoring(!0))));if(Vt.hasDifferentOriginAncestor()){let e=s[s.length-1];this._hooks.add(cn(e.window.document,"mouseout",(e=>{"html"===new Ht(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(cn(e.window.document,"mouseover",(e=>{"html"===new Ht(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(cn(e.window.document.body,"mouseleave",(e=>{this.stopMonitoring(!0)})))}}}function ph(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}class mh{constructor(e,t,i,n=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=ph(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class fh{constructor(e,t,i,n){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=ph(Math.max(Math.min(1,t),0),3),this.l=ph(Math.max(Math.min(1,i),0),3),this.a=ph(Math.max(Math.min(1,n),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,s=Math.max(t,i,n),r=Math.min(t,i,n);let a=0,l=0;const c=(r+s)/2,d=s-r;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),s){case t:a=(i-n)/d+(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:o}=e;let s,r,a;if(0===i)s=r=a=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;s=fh._hue2rgb(o,e,t+1/3),r=fh._hue2rgb(o,e,t),a=fh._hue2rgb(o,e,t-1/3)}return new mh(Math.round(255*s),Math.round(255*r),Math.round(255*a),o)}}class _h{constructor(e,t,i,n){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=ph(Math.max(Math.min(1,t),0),3),this.v=ph(Math.max(Math.min(1,i),0),3),this.a=ph(Math.max(Math.min(1,n),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),r=0===o?0:s/o;let a;return a=0===s?0:o===t?((i-n)/s%6+6)%6:o===i?(n-t)/s+2:(t-i)/s+4,new _h(Math.round(60*a),r,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:o}=e,s=n*i,r=s*(1-Math.abs(t/60%2-1)),a=n-s;let[l,c,d]=[0,0,0];return t<60?(l=s,c=r):t<120?(l=r,c=s):t<180?(c=s,d=r):t<240?(c=r,d=s):t<300?(l=r,d=s):t<=360&&(l=s,d=r),l=Math.round(255*(l+a)),c=Math.round(255*(c+a)),d=Math.round(255*(d+a)),new mh(l,c,d,o)}}class vh{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof mh)this.rgba=e;else if(e instanceof fh)this._hsla=e,this.rgba=fh.toRGBA(e);else{if(!(e instanceof _h))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=_h.toRGBA(e)}}static fromHex(e){return vh.Format.CSS.parseHex(e)||vh.red}get hsla(){return this._hsla?this._hsla:fh.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:_h.fromRGBA(this.rgba)}equals(e){return!!e&&mh.equals(this.rgba,e.rgba)&&fh.equals(this.hsla,e.hsla)&&_h.equals(this.hsva,e.hsva)}getRelativeLuminance(){return ph(.2126*vh._relativeLuminanceForComponent(this.rgba.r)+.7152*vh._relativeLuminanceForComponent(this.rgba.g)+.0722*vh._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()0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};function wh(e){return`--vscode-${e.replace(/\./g,"-")}`}dr.add(bh,Ch);const yh="base.contributions.colors",Sh=new class{constructor(){this._onDidChangeSchema=new Pe,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){let s={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=s;let r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(r.deprecationMessage=o),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 Tp(i.defaults[t.type],t)}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{let 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 xh(e,t,i,n,o){return Sh.registerColor(e,t,i,n,o)}dr.add(yh,Sh);const kh=xh("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},b(0,"Overall foreground color. This color is only used if not overridden by a component.")),Dh=xh("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},b(0,"Overall foreground color for error messages. This color is only used if not overridden by a component.")),Lh=(xh("descriptionForeground",{light:"#717171",dark:Ep(kh,.7),hc:Ep(kh,.7)},b(0,"Foreground color for description text providing additional information, for example for a label.")),xh("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},b(0,"The default color for icons in the workbench."))),Eh=xh("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},b(0,"Overall border color for focused elements. This color is only used if not overridden by a component.")),Nh=xh("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},b(0,"An extra border around elements to separate them from others for greater contrast.")),Ih=xh("contrastActiveBorder",{light:null,dark:null,hc:Eh},b(0,"An extra border around active elements to separate them from others for greater contrast.")),Th=(xh("selection.background",{light:null,dark:null,hc:null},b(0,"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.")),xh("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hc:vh.black},b(0,"Color for text separators.")),xh("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},b(0,"Foreground color for links in text."))),Mh=xh("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},b(0,"Foreground color for links in text when clicked on and on mouse hover.")),Rh=(xh("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hc:"#D7BA7D"},b(0,"Foreground color for preformatted text segments.")),xh("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hc:null},b(0,"Background color for block quotes in text.")),xh("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hc:vh.white},b(0,"Border color for block quotes in text.")),xh("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:vh.black},b(0,"Background color for code blocks in text."))),Ph=xh("widget.shadow",{dark:Ep(vh.black,.36),light:Ep(vh.black,.16),hc:null},b(0,"Shadow color of widgets such as find/replace inside the editor.")),Ah=xh("input.background",{dark:"#3C3C3C",light:vh.white,hc:vh.black},b(0,"Input box background.")),Oh=xh("input.foreground",{dark:kh,light:kh,hc:kh},b(0,"Input box foreground.")),Fh=xh("input.border",{dark:null,light:null,hc:Nh},b(0,"Input box border.")),Wh=xh("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:Nh},b(0,"Border color of activated options in input fields.")),Bh=(xh("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hc:null},b(0,"Background color of activated options in input fields.")),xh("inputOption.activeBackground",{dark:Ep(Eh,.4),light:Ep(Eh,.2),hc:vh.transparent},b(0,"Background hover color of options in input fields."))),Vh=xh("inputOption.activeForeground",{dark:vh.white,light:vh.black,hc:null},b(0,"Foreground color of activated options in input fields.")),Hh=(xh("input.placeholderForeground",{light:Ep(kh,.5),dark:Ep(kh,.5),hc:Ep(kh,.7)},b(0,"Input box foreground color for placeholder text.")),xh("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:vh.black},b(0,"Input validation background color for information severity."))),zh=xh("inputValidation.infoForeground",{dark:null,light:null,hc:null},b(0,"Input validation foreground color for information severity.")),jh=xh("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:Nh},b(0,"Input validation border color for information severity.")),qh=xh("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:vh.black},b(0,"Input validation background color for warning severity.")),Kh=xh("inputValidation.warningForeground",{dark:null,light:null,hc:null},b(0,"Input validation foreground color for warning severity.")),Uh=xh("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:Nh},b(0,"Input validation border color for warning severity.")),$h=xh("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:vh.black},b(0,"Input validation background color for error severity.")),Zh=xh("inputValidation.errorForeground",{dark:null,light:null,hc:null},b(0,"Input validation foreground color for error severity.")),Gh=xh("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:Nh},b(0,"Input validation border color for error severity.")),Yh=xh("dropdown.background",{dark:"#3C3C3C",light:vh.white,hc:vh.black},b(0,"Dropdown background.")),Xh=(xh("dropdown.listBackground",{dark:null,light:null,hc:vh.black},b(0,"Dropdown list background.")),xh("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:vh.white},b(0,"Dropdown foreground."))),Jh=xh("dropdown.border",{dark:Yh,light:"#CECECE",hc:Nh},b(0,"Dropdown border.")),Qh=(xh("checkbox.background",{dark:Yh,light:Yh,hc:Yh},b(0,"Background color of checkbox widget.")),xh("checkbox.foreground",{dark:Xh,light:Xh,hc:Xh},b(0,"Foreground color of checkbox widget.")),xh("checkbox.border",{dark:Jh,light:Jh,hc:Jh},b(0,"Border color of checkbox widget.")),xh("button.foreground",{dark:vh.white,light:vh.white,hc:vh.white},b(0,"Button foreground color."))),eu=xh("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},b(0,"Button background color.")),tu=xh("button.hoverBackground",{dark:Lp(eu,.2),light:Dp(eu,.2),hc:null},b(0,"Button background color when hovering.")),iu=(xh("button.border",{dark:Nh,light:Nh,hc:Nh},b(0,"Button border color.")),xh("button.secondaryForeground",{dark:vh.white,light:vh.white,hc:vh.white},b(0,"Secondary button foreground color.")),xh("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hc:null},b(0,"Secondary button background color."))),nu=(xh("button.secondaryHoverBackground",{dark:Lp(iu,.2),light:Dp(iu,.2),hc:null},b(0,"Secondary button background color when hovering.")),xh("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:vh.black},b(0,"Badge background color. Badges are small information labels, e.g. for search results count."))),ou=xh("badge.foreground",{dark:vh.white,light:"#333",hc:vh.white},b(0,"Badge foreground color. Badges are small information labels, e.g. for search results count.")),su=xh("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},b(0,"Scrollbar shadow to indicate that the view is scrolled.")),ru=xh("scrollbarSlider.background",{dark:vh.fromHex("#797979").transparent(.4),light:vh.fromHex("#646464").transparent(.4),hc:Ep(Nh,.6)},b(0,"Scrollbar slider background color.")),au=xh("scrollbarSlider.hoverBackground",{dark:vh.fromHex("#646464").transparent(.7),light:vh.fromHex("#646464").transparent(.7),hc:Ep(Nh,.8)},b(0,"Scrollbar slider background color when hovering.")),lu=xh("scrollbarSlider.activeBackground",{dark:vh.fromHex("#BFBFBF").transparent(.4),light:vh.fromHex("#000000").transparent(.6),hc:Nh},b(0,"Scrollbar slider background color when clicked on.")),cu=xh("progressBar.background",{dark:vh.fromHex("#0E70C0"),light:vh.fromHex("#0E70C0"),hc:Nh},b(0,"Background color of the progress bar that can show for long running operations.")),du=xh("editorError.background",{dark:null,light:null,hc:null},b(0,"Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),hu=xh("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},b(0,"Foreground color of error squigglies in the editor.")),uu=xh("editorError.border",{dark:null,light:null,hc:vh.fromHex("#E47777").transparent(.8)},b(0,"Border color of error boxes in the editor.")),gu=xh("editorWarning.background",{dark:null,light:null,hc:null},b(0,"Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),pu=xh("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},b(0,"Foreground color of warning squigglies in the editor.")),mu=xh("editorWarning.border",{dark:null,light:null,hc:vh.fromHex("#FFCC00").transparent(.8)},b(0,"Border color of warning boxes in the editor.")),fu=xh("editorInfo.background",{dark:null,light:null,hc:null},b(0,"Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),_u=xh("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},b(0,"Foreground color of info squigglies in the editor.")),vu=xh("editorInfo.border",{dark:null,light:null,hc:vh.fromHex("#3794FF").transparent(.8)},b(0,"Border color of info boxes in the editor.")),bu=xh("editorHint.foreground",{dark:vh.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},b(0,"Foreground color of hint squigglies in the editor.")),Cu=xh("editorHint.border",{dark:null,light:null,hc:vh.fromHex("#eeeeee").transparent(.8)},b(0,"Border color of hint boxes in the editor.")),wu=(xh("sash.hoverBorder",{dark:Eh,light:Eh,hc:Eh},b(0,"Border color of active sashes.")),xh("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:vh.black},b(0,"Editor background color."))),yu=xh("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:vh.white},b(0,"Editor default foreground color.")),Su=xh("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},b(0,"Background color of editor widgets, such as find/replace.")),xu=xh("editorWidget.foreground",{dark:kh,light:kh,hc:kh},b(0,"Foreground color of editor widgets, such as find/replace.")),ku=xh("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:Nh},b(0,"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.")),Du=xh("editorWidget.resizeBorder",{light:null,dark:null,hc:null},b(0,"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.")),Lu=xh("quickInput.background",{dark:Su,light:Su,hc:Su},b(0,"Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),Eu=xh("quickInput.foreground",{dark:xu,light:xu,hc:xu},b(0,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),Nu=xh("quickInputTitle.background",{dark:new vh(new mh(255,255,255,.105)),light:new vh(new mh(0,0,0,.06)),hc:"#000000"},b(0,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),Iu=xh("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:vh.white},b(0,"Quick picker color for grouping labels.")),Tu=xh("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:vh.white},b(0,"Quick picker color for grouping borders.")),Mu=xh("keybindingLabel.background",{dark:new vh(new mh(128,128,128,.17)),light:new vh(new mh(221,221,221,.4)),hc:vh.transparent},b(0,"Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Ru=xh("keybindingLabel.foreground",{dark:vh.fromHex("#CCCCCC"),light:vh.fromHex("#555555"),hc:vh.white},b(0,"Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),Pu=xh("keybindingLabel.border",{dark:new vh(new mh(51,51,51,.6)),light:new vh(new mh(204,204,204,.4)),hc:new vh(new mh(111,195,223))},b(0,"Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),Au=xh("keybindingLabel.bottomBorder",{dark:new vh(new mh(68,68,68,.6)),light:new vh(new mh(187,187,187,.4)),hc:new vh(new mh(111,195,223))},b(0,"Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),Ou=xh("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},b(0,"Color of the editor selection.")),Fu=xh("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},b(0,"Color of the selected text for high contrast.")),Wu=xh("editor.inactiveSelectionBackground",{light:Ep(Ou,.5),dark:Ep(Ou,.5),hc:Ep(Ou,.5)},b(0,"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),Bu=xh("editor.selectionHighlightBackground",{light:Ip(Ou,wu,.3,.6),dark:Ip(Ou,wu,.3,.6),hc:null},b(0,"Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),Vu=xh("editor.selectionHighlightBorder",{light:null,dark:null,hc:Ih},b(0,"Border color for regions with the same content as the selection.")),Hu=xh("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},b(0,"Color of the current search match.")),zu=xh("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},b(0,"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),ju=xh("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},b(0,"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),qu=xh("editor.findMatchBorder",{light:null,dark:null,hc:Ih},b(0,"Border color of the current search match.")),Ku=xh("editor.findMatchHighlightBorder",{light:null,dark:null,hc:Ih},b(0,"Border color of the other search matches.")),Uu=xh("editor.findRangeHighlightBorder",{dark:null,light:null,hc:Ep(Ih,.4)},b(0,"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),$u=(xh("searchEditor.findMatchBackground",{light:Ep(zu,.66),dark:Ep(zu,.66),hc:zu},b(0,"Color of the Search Editor query matches.")),xh("searchEditor.findMatchBorder",{light:Ep(Ku,.66),dark:Ep(Ku,.66),hc:Ku},b(0,"Border color of the Search Editor query matches.")),xh("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},b(0,"Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0)),Zu=xh("editorHoverWidget.background",{light:Su,dark:Su,hc:Su},b(0,"Background color of the editor hover.")),Gu=xh("editorHoverWidget.foreground",{light:xu,dark:xu,hc:xu},b(0,"Foreground color of the editor hover.")),Yu=xh("editorHoverWidget.border",{light:ku,dark:ku,hc:ku},b(0,"Border color of the editor hover.")),Xu=xh("editorHoverWidget.statusBarBackground",{dark:Lp(Zu,.2),light:Dp(Zu,.05),hc:Su},b(0,"Background color of the editor hover status bar.")),Ju=xh("editorLink.activeForeground",{dark:"#4E94CE",light:vh.blue,hc:vh.cyan},b(0,"Color of active links.")),Qu=xh("editorInlayHint.foreground",{dark:Ep(ou,.8),light:Ep(ou,.8),hc:ou},b(0,"Foreground color of inline hints")),eg=xh("editorInlayHint.background",{dark:Ep(nu,.6),light:Ep(nu,.3),hc:nu},b(0,"Background color of inline hints")),tg=xh("editorInlayHint.typeForeground",{dark:Qu,light:Qu,hc:Qu},b(0,"Foreground color of inline hints for types")),ig=xh("editorInlayHint.typeBackground",{dark:eg,light:eg,hc:eg},b(0,"Background color of inline hints for types")),ng=xh("editorInlayHint.parameterForeground",{dark:Qu,light:Qu,hc:Qu},b(0,"Foreground color of inline hints for parameters")),og=xh("editorInlayHint.parameterBackground",{dark:eg,light:eg,hc:eg},b(0,"Background color of inline hints for parameters")),sg=xh("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},b(0,"The color used for the lightbulb actions icon.")),rg=xh("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},b(0,"The color used for the lightbulb auto fix actions icon.")),ag=new vh(new mh(155,185,85,.2)),lg=new vh(new mh(255,0,0,.2)),cg=xh("diffEditor.insertedTextBackground",{dark:ag,light:ag,hc:null},b(0,"Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),dg=xh("diffEditor.removedTextBackground",{dark:lg,light:lg,hc:null},b(0,"Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),hg=xh("diffEditor.insertedLineBackground",{dark:null,light:null,hc:null},b(0,"Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),ug=xh("diffEditor.removedLineBackground",{dark:null,light:null,hc:null},b(0,"Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),gg=xh("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hc:null},b(0,"Background color for the margin where lines got inserted.")),pg=xh("diffEditorGutter.removedLineBackground",{dark:null,light:null,hc:null},b(0,"Background color for the margin where lines got removed.")),mg=xh("diffEditorOverview.insertedForeground",{dark:null,light:null,hc:null},b(0,"Diff overview ruler foreground for inserted content.")),fg=xh("diffEditorOverview.removedForeground",{dark:null,light:null,hc:null},b(0,"Diff overview ruler foreground for removed content.")),_g=xh("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},b(0,"Outline color for the text that got inserted.")),vg=xh("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},b(0,"Outline color for text that got removed.")),bg=xh("diffEditor.border",{dark:null,light:null,hc:Nh},b(0,"Border color between the two text editors.")),Cg=xh("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},b(0,"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),wg=xh("list.focusBackground",{dark:null,light:null,hc:null},b(0,"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.")),yg=xh("list.focusForeground",{dark:null,light:null,hc:null},b(0,"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.")),Sg=xh("list.focusOutline",{dark:Eh,light:Eh,hc:Ih},b(0,"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.")),xg=xh("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},b(0,"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.")),kg=xh("list.activeSelectionForeground",{dark:vh.white,light:vh.white,hc:null},b(0,"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.")),Dg=xh("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},b(0,"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.")),Lg=xh("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},b(0,"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.")),Eg=xh("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},b(0,"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.")),Ng=xh("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},b(0,"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.")),Ig=xh("list.inactiveFocusBackground",{dark:null,light:null,hc:null},b(0,"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.")),Tg=xh("list.inactiveFocusOutline",{dark:null,light:null,hc:null},b(0,"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.")),Mg=xh("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},b(0,"List/Tree background when hovering over items using the mouse.")),Rg=xh("list.hoverForeground",{dark:null,light:null,hc:null},b(0,"List/Tree foreground when hovering over items using the mouse.")),Pg=xh("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},b(0,"List/Tree drag and drop background when moving items around using the mouse.")),Ag=xh("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:Eh},b(0,"List/Tree foreground color of the match highlights when searching inside the list/tree.")),Og=xh("list.focusHighlightForeground",{dark:Ag,light:(Fg=xg,Wg=Ag,"#9DDDFF",{op:5,if:Fg,then:Wg,else:"#9DDDFF"}),hc:Ag},b(0,"List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));var Fg,Wg;xh("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hc:"#B89500"},b(0,"List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),xh("list.errorForeground",{dark:"#F88070",light:"#B01011",hc:null},b(0,"Foreground color of list items containing errors.")),xh("list.warningForeground",{dark:"#CCA700",light:"#855F00",hc:null},b(0,"Foreground color of list items containing warnings."));const Bg=xh("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:vh.black},b(0,"Background color of the type filter widget in lists and trees.")),Vg=xh("listFilterWidget.outline",{dark:vh.transparent,light:vh.transparent,hc:"#f38518"},b(0,"Outline color of the type filter widget in lists and trees.")),Hg=xh("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:Nh},b(0,"Outline color of the type filter widget in lists and trees, when there are no matches.")),zg=(xh("list.filterMatchBackground",{dark:zu,light:zu,hc:null},b(0,"Background color of the filtered match.")),xh("list.filterMatchBorder",{dark:Ku,light:Ku,hc:Nh},b(0,"Border color of the filtered match.")),xh("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},b(0,"Tree stroke color for the indentation guides."))),jg=xh("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},b(0,"Table border color between columns.")),qg=xh("tree.tableOddRowsBackground",{dark:Ep(kh,.04),light:Ep(kh,.04),hc:null},b(0,"Background color for odd table rows.")),Kg=(xh("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hc:"#A7A8A9"},b(0,"List/Tree foreground color for items that are deemphasized. ")),xh("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,b(0,"Please use quickInputList.focusBackground instead"))),Ug=xh("quickInputList.focusForeground",{dark:kg,light:kg,hc:kg},b(0,"Quick picker foreground color for the focused item.")),$g=xh("quickInputList.focusIconForeground",{dark:Dg,light:Dg,hc:Dg},b(0,"Quick picker icon foreground color for the focused item.")),Zg=xh("quickInputList.focusBackground",{dark:Np(Kg,xg),light:Np(Kg,xg),hc:null},b(0,"Quick picker background color for the focused item.")),Gg=xh("menu.border",{dark:null,light:null,hc:Nh},b(0,"Border color of menus.")),Yg=xh("menu.foreground",{dark:Xh,light:kh,hc:Xh},b(0,"Foreground color of menu items.")),Xg=xh("menu.background",{dark:Yh,light:Yh,hc:Yh},b(0,"Background color of menu items.")),Jg=xh("menu.selectionForeground",{dark:kg,light:kg,hc:kg},b(0,"Foreground color of the selected menu item in menus.")),Qg=xh("menu.selectionBackground",{dark:xg,light:xg,hc:xg},b(0,"Background color of the selected menu item in menus.")),ep=xh("menu.selectionBorder",{dark:null,light:null,hc:Ih},b(0,"Border color of the selected menu item in menus.")),tp=xh("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:Nh},b(0,"Color of a separator menu item in menus.")),ip=xh("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},b(0,"Toolbar background when hovering over actions using the mouse")),np=(xh("toolbar.hoverOutline",{dark:null,light:null,hc:Ih},b(0,"Toolbar outline when hovering over actions using the mouse")),xh("toolbar.activeBackground",{dark:Lp(ip,.1),light:Dp(ip,.1),hc:null},b(0,"Toolbar background when holding the mouse over actions")),xh("editor.snippetTabstopHighlightBackground",{dark:new vh(new mh(124,124,124,.3)),light:new vh(new mh(10,50,100,.2)),hc:new vh(new mh(124,124,124,.3))},b(0,"Highlight background color of a snippet tabstop.")),xh("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},b(0,"Highlight border color of a snippet tabstop.")),xh("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},b(0,"Highlight background color of the final tabstop of a snippet.")),xh("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new vh(new mh(10,50,100,.5)),hc:"#525252"},b(0,"Highlight border color of the final tabstop of a snippet.")),xh("breadcrumb.foreground",{light:Ep(kh,.8),dark:Ep(kh,.8),hc:Ep(kh,.8)},b(0,"Color of focused breadcrumb items.")),xh("breadcrumb.background",{light:wu,dark:wu,hc:wu},b(0,"Background color of breadcrumb items.")),xh("breadcrumb.focusForeground",{light:Dp(kh,.2),dark:Lp(kh,.1),hc:Lp(kh,.1)},b(0,"Color of focused breadcrumb items.")),xh("breadcrumb.activeSelectionForeground",{light:Dp(kh,.2),dark:Lp(kh,.1),hc:Lp(kh,.1)},b(0,"Color of selected breadcrumb items.")),xh("breadcrumbPicker.background",{light:Su,dark:Su,hc:Su},b(0,"Background color of breadcrumb item picker.")),vh.fromHex("#40C8AE").transparent(.5)),op=vh.fromHex("#40A6FF").transparent(.5),sp=vh.fromHex("#606060").transparent(.4),rp=.4,ap=xh("merge.currentHeaderBackground",{dark:np,light:np,hc:null},b(0,"Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),lp=(xh("merge.currentContentBackground",{dark:Ep(ap,rp),light:Ep(ap,rp),hc:Ep(ap,rp)},b(0,"Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),xh("merge.incomingHeaderBackground",{dark:op,light:op,hc:null},b(0,"Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),cp=(xh("merge.incomingContentBackground",{dark:Ep(lp,rp),light:Ep(lp,rp),hc:Ep(lp,rp)},b(0,"Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),xh("merge.commonHeaderBackground",{dark:sp,light:sp,hc:null},b(0,"Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),dp=(xh("merge.commonContentBackground",{dark:Ep(cp,rp),light:Ep(cp,rp),hc:Ep(cp,rp)},b(0,"Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),xh("merge.border",{dark:null,light:null,hc:"#C3DF6F"},b(0,"Border color on headers and the splitter in inline merge-conflicts."))),hp=(xh("editorOverviewRuler.currentContentForeground",{dark:Ep(ap,1),light:Ep(ap,1),hc:dp},b(0,"Current overview ruler foreground for inline merge-conflicts.")),xh("editorOverviewRuler.incomingContentForeground",{dark:Ep(lp,1),light:Ep(lp,1),hc:dp},b(0,"Incoming overview ruler foreground for inline merge-conflicts.")),xh("editorOverviewRuler.commonContentForeground",{dark:Ep(cp,1),light:Ep(cp,1),hc:dp},b(0,"Common ancestor overview ruler foreground for inline merge-conflicts.")),xh("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},b(0,"Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0)),up=xh("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},b(0,"Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),gp=xh("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},b(0,"Minimap marker color for find matches."),!0),pp=xh("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},b(0,"Minimap marker color for repeating editor selections."),!0),mp=xh("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},b(0,"Minimap marker color for the editor selection."),!0),fp=xh("minimap.errorHighlight",{dark:new vh(new mh(255,18,18,.7)),light:new vh(new mh(255,18,18,.7)),hc:new vh(new mh(255,50,50,1))},b(0,"Minimap marker color for errors.")),_p=xh("minimap.warningHighlight",{dark:pu,light:pu,hc:mu},b(0,"Minimap marker color for warnings.")),vp=xh("minimap.background",{dark:null,light:null,hc:null},b(0,"Minimap background color.")),bp=xh("minimap.foregroundOpacity",{dark:vh.fromHex("#000f"),light:vh.fromHex("#000f"),hc:vh.fromHex("#000f")},b(0,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),Cp=xh("minimapSlider.background",{light:Ep(ru,.5),dark:Ep(ru,.5),hc:Ep(ru,.5)},b(0,"Minimap slider background color.")),wp=xh("minimapSlider.hoverBackground",{light:Ep(au,.5),dark:Ep(au,.5),hc:Ep(au,.5)},b(0,"Minimap slider background color when hovering.")),yp=xh("minimapSlider.activeBackground",{light:Ep(lu,.5),dark:Ep(lu,.5),hc:Ep(lu,.5)},b(0,"Minimap slider background color when clicked on.")),Sp=xh("problemsErrorIcon.foreground",{dark:hu,light:hu,hc:hu},b(0,"The color used for the problems error icon.")),xp=xh("problemsWarningIcon.foreground",{dark:pu,light:pu,hc:pu},b(0,"The color used for the problems warning icon.")),kp=xh("problemsInfoIcon.foreground",{dark:_u,light:_u,hc:_u},b(0,"The color used for the problems info icon."));function Dp(e,t){return{op:0,value:e,factor:t}}function Lp(e,t){return{op:1,value:e,factor:t}}function Ep(e,t){return{op:2,value:e,factor:t}}function Np(...e){return{op:3,values:e}}function Ip(e,t,i,n){return{op:4,value:e,background:t,factor:i,transparency:n}}function Tp(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?vh.fromHex(e):t.getColor(e):e instanceof vh?e:"object"==typeof e?function(e,t){var i,n,o;switch(e.op){case 0:return null===(i=Tp(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=Tp(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(o=Tp(e.value,t))||void 0===o?void 0:o.transparent(e.factor);case 3:for(const i of e.values){const e=Tp(i,t);if(e)return e}return;case 5:return Tp(t.defines(e.if)?e.then:e.else,t);case 4:{const i=Tp(e.value,t);if(!i)return;const n=Tp(e.background,t);return n?i.isDarkerThan(n)?vh.getLighterColor(i,n,e.factor).transparent(e.transparency):vh.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw pt()}}(e,t):void 0}xh("charts.foreground",{dark:kh,light:kh,hc:kh},b(0,"The foreground color used in charts.")),xh("charts.lines",{dark:Ep(kh,.5),light:Ep(kh,.5),hc:Ep(kh,.5)},b(0,"The color used for horizontal lines in charts.")),xh("charts.red",{dark:hu,light:hu,hc:hu},b(0,"The red color used in chart visualizations.")),xh("charts.blue",{dark:_u,light:_u,hc:_u},b(0,"The blue color used in chart visualizations.")),xh("charts.yellow",{dark:pu,light:pu,hc:pu},b(0,"The yellow color used in chart visualizations.")),xh("charts.orange",{dark:gp,light:gp,hc:gp},b(0,"The orange color used in chart visualizations.")),xh("charts.green",{dark:"#89D185",light:"#388A34",hc:"#89D185"},b(0,"The green color used in chart visualizations.")),xh("charts.purple",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},b(0,"The purple color used in chart visualizations."));const Mp="vscode://schemas/workbench-colors";let Rp=dr.as(bh);Rp.registerSchema(Mp,Sh.getColorSchema());const Pp=new ri((()=>Rp.notifySchemaChanged(Mp)),200);Sh.onDidChangeSchema((()=>{Pp.isScheduled()||Pp.schedule()}));class Ap{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new Op(this.x-Nn.scrollX,this.y-Nn.scrollY)}}class Op{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new Ap(this.clientX+Nn.scrollX,this.clientY+Nn.scrollY)}}class Fp{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class Wp{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function Bp(e){const t=En(e);return new Fp(t.left,t.top,t.width,t.height)}function Vp(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 Wp(s,r)}class Hp extends Ht{constructor(e,t){super(e),this._editorMouseEventBrand=void 0,this.pos=new Ap(this.posx,this.posy),this.editorPos=Bp(t),this.relativePos=Vp(t,this.editorPos,this.pos)}}class zp{constructor(e){this._editorViewDomNode=e}_create(e){return new Hp(e,this._editorViewDomNode)}onContextMenu(e,t){return cn(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return cn(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return cn(e,"mousedown",(e=>{t(this._create(e))}))}onMouseLeave(e,t){return pn(e,(e=>{t(this._create(e))}))}onMouseMoveThrottled(e,t,i,n){return yn(e,"mousemove",t,((e,t)=>i(e,this._create(t))),n)}}class jp{constructor(e){this._editorViewDomNode=e}_create(e){return new Hp(e,this._editorViewDomNode)}onPointerUp(e,t){return cn(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return cn(e,"pointerdown",(e=>{t(this._create(e))}))}onPointerLeave(e,t){return n=e=>{t(this._create(e))},cn(i=e,"pointerout",(e=>{let t=e.relatedTarget;for(;t&&t!==i;)t=t.parentNode;t!==i&&n(e)}));var i,n}onPointerMoveThrottled(e,t,i,n){return yn(e,"pointermove",t,((e,t)=>i(e,this._create(t))),n)}}class qp extends B{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new gh),this._keydownListener=null}startMonitoring(e,t,i,n,o){this._keydownListener=hn(document,"keydown",(e=>{e.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalMouseMoveMonitor.startMonitoring(e,t,((e,t)=>i(e,new Hp(t,this._editorViewDomNode))),n,(e=>{this._keydownListener.dispose(),o(e)}))}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class Kp{constructor(e){this._editor=e,this._instanceId=++Kp._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new ri((()=>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 n=this._counter++;i=new Up(t,`dyn-rule-${this._instanceId}-${n}`,Wn(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())}}Kp._idPool=0;class Up{constructor(e,t,i,n){this.key=e,this.className=t,this.properties=n,this._referenceCount=0,this._styleElement=Hn(i),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?`var(${wh(n.id)})`:n,i+=`\n\t${$p(e)}: ${o};`}return i+="\n}",i}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function $p(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}class Zp extends B{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=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;ol)return null;if((t=Math.min(l,Math.max(0,t)))===(n=Math.min(l,Math.max(0,n)))&&i===o&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(i,s,r)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let c=e.children[t].firstChild,d=e.children[n].firstChild;if(c&&d||(!c&&0===i&&t>0&&(c=e.children[t-1].firstChild,i=1073741824),!d&&0===o&&n>0&&(d=e.children[n-1].firstChild,o=1073741824)),!c||!d)return null;i=Math.min(c.textContent.length,Math.max(0,i)),o=Math.min(d.textContent.length,Math.max(0,o));const h=this._readClientRects(c,i,d,o,a);return this._createHorizontalRangesFromClientRects(h,s,r)}}class om{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=o||(r[a++]=new om(Math.max(1,t.startColumn-n+1),Math.min(s+1,t.endColumn-n+1),t.className,t.type));return r}static filter(e,t,i,n){if(0===e.length)return[];const o=[];let s=0;for(let r=0,a=e.length;rt)continue;if(l.isEmpty()&&(0===a.type||3===a.type))continue;const c=l.startLineNumber===t?l.startColumn:i,d=l.endLineNumber===t?l.endColumn:n;o[s++]=new om(c,d,a.inlineClassName,a.type)}return o}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=om._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 am{constructor(e,t,i){this._linePartBrand=void 0,this.endIndex=e,this.type=t,this.metadata=i}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class lm{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class cm{constructor(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,f,_,v){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=r,this.lineTokens=a,this.lineDecorations=l.sort(om.compare),this.tabSize=c,this.startVisibleColumn=d,this.spaceWidth=h,this.stopRenderingLineAfter=p,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=f,this.fontLigatures=_,this.selectionsOnLine=v&&v.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}setColumnInfo(e,t,i,n){const o=(t<<16|i<<0)>>>0;this._data[e-1]=o,this._absoluteOffsets[e-1]=n+i}getAbsoluteOffset(e){return 0===this._absoluteOffsets.length?0:this._absoluteOffsets[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=hm.getPartIndex(t),n=hm.getCharIndex(t);return new dm(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=hm.getPartIndex(r),c=hm.getCharIndex(r);let d;return d=l!==hm.getPartIndex(a)?t:hm.getCharIndex(a),i-c<=d-i?o:s}}class um{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function gm(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendASCIIString("");let i=0,n=0,o=0;for(const s of e.lineDecorations)1!==s.type&&2!==s.type||(t.appendASCIIString(''),1===s.type&&(o|=1,i++),2===s.type&&(o|=2,n++));t.appendASCIIString("");const s=new hm(1,i+n);return s.setColumnInfo(1,i,0,0),new um(s,!1,o)}return t.appendASCIIString(""),new um(new hm(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,n=e.canUseHalfwidthRightwardsArrow,o=e.containsForeignElements,s=e.lineContent,r=e.len,a=e.isOverflowing,l=e.parts,c=e.fauxIndentLength,d=e.tabSize,h=e.startVisibleColumn,u=e.containsRTL,g=e.spaceWidth,p=e.renderSpaceCharCode,m=e.renderWhitespace,f=e.renderControlCharacters,_=new hm(r+1,l.length);let v=!1,b=0,C=h,w=0,y=0,S=0,x=0;u?t.appendASCIIString(''):t.appendASCIIString("");for(let e=0,a=l.length;e=c&&(t+=n)}}for(D&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(g*i)),t.appendASCIIString('px"')),t.appendASCII(62);b1?t.write1(8594):t.write1(65515);for(let e=2;e<=i;e++)t.write1(160)}else i=1,t.write1(p);w+=i,b>=c&&(C+=i)}S=i}else{let i=0;for(t.appendASCII(62);b=c&&(C+=r)}S=i}L?y++:y=0,b>=r&&!v&&a.isPseudoAfter()&&(v=!0,_.setColumnInfo(b+1,e,w,x)),t.appendASCIIString("")}return v||_.setColumnInfo(r+1,l.length-1,w,x),a&&t.appendASCIIString(""),t.appendASCIIString(""),new um(_,u,o)}(function(e){const t=e.lineContent;let i,n;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(n[o++]=new am(t,"",0));for(let s=0,r=e.getCount();s=i){n[o++]=new am(i,a,0);break}n[o++]=new am(r,a,0)}return n}(e.lineTokens,e.fauxIndentLength,n);e.renderControlCharacters&&!e.isBasicASCII&&(o=function(e,t){const i=[];let n=new am(0,"",0),o=0;for(const s of t){const t=s.endIndex;for(;on.endIndex&&(n=new am(o,s.type,s.metadata),i.push(n)),n=new am(o+1,"mtkcontrol",s.metadata),i.push(n));o>n.endIndex&&(n=new am(t,s.type,s.metadata),i.push(n))}return i}(t,o)),(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(o=function(e,t,i,n){const o=e.continuesWithWrappedLine,s=e.fauxIndentLength,r=e.tabSize,a=e.startVisibleColumn,l=e.useMonospaceOptimizations,c=e.selectionsOnLine,d=1===e.renderWhitespace,h=3===e.renderWhitespace,u=e.renderSpaceWidth!==e.spaceWidth,g=[];let p=0,m=0,f=n[m].type,_=n[m].endIndex;const v=n.length;let b,C=!1,w=Jo(t);-1===w?(C=!0,w=i,b=i):b=es(t);let y=!1,S=0,x=c&&c[S],k=a%r;for(let e=s;e=x.endOffset&&(S++,x=c&&c[S]),eb)a=!0;else if(9===o)a=!0;else if(32===o)if(d)if(y)a=!0;else{const n=e+1e),a&&h&&(a=C||e>b),y){if(!a||!l&&k>=r){if(u)for(let t=(p>0?g[p-1].endIndex:s)+1;t<=e;t++)g[p++]=new am(t,"mtkw",1);else g[p++]=new am(e,"mtkw",1);k%=r}}else(e===_||a&&e>s)&&(g[p++]=new am(e,f,0),k%=r);for(9===o?k=r:ks(o)?k+=2:k++,y=a;e===_&&(m++,m0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(D=!0)}else D=!0;if(D)if(u)for(let e=(p>0?g[p-1].endIndex:s)+1;e<=i;e++)g[p++]=new am(e,"mtkw",1);else g[p++]=new am(i,"mtkw",1);else g[p++]=new am(i,f,0);return g}(e,t,n,o));let s=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;t1&&hs(e.charCodeAt(a-2))&&a--,l>1&&hs(e.charCodeAt(l-2))&&l--;const h=a-1,u=l-2;o=n.consumeLowerThan(h,o,i),0===n.count&&(o=h),n.insert(u,c,d)}return n.consumeLowerThan(1073741824,o,i),i}}.normalize(e,n),s=o.length;let r=0;const a=[];let l=0,c=0;for(let e=0,t=i.length;ec&&(c=e.startOffset,a[l++]=new am(c,d,h)),!(e.endOffset+1<=n)){c=n,a[l++]=new am(c,d+" "+e.className,h|e.metadata);break}c=e.endOffset+1,a[l++]=new am(c,d+" "+e.className,h|e.metadata),r++}n>c&&(c=n,a[l++]=new am(c,d,h))}const d=i[i.length-1].endIndex;if(r=50&&(o[s++]=new am(l+1,t,i),c=l+1,l=-1);c!==a&&(o[s++]=new am(a,t,i))}else o[s++]=r;n=a}else for(let e=0,i=t.length;e50){const e=i.type,t=i.metadata,l=Math.ceil(a/50);for(let i=1;i=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e}function vm(e){return e.toString(16).toUpperCase().padStart(4,"0")}const bm=!!ge||!(ue||Ke||Ze);let Cm=!0;class wm{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1,this.endNode=t}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();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}}class ym{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(44);this.renderWhitespace=i.get(88),this.renderControlCharacters=i.get(83),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(29),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(59),this.stopRenderingLineAfter=i.get(105),this.fontLigatures=i.get(45)}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 Sm{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=rd(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return(this._options.themeType===hr.HIGH_CONTRAST||"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=om.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let a=null;if(s.themeType===hr.HIGH_CONTRAST||"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 c=gm(l,n);n.appendASCIIString("");let d=null;return Cm&&bm&&o.isBasicASCII&&s.useMonospaceOptimizations&&0===c.containsForeignElements&&o.content.length<300&&l.lineTokens.getCount()<100&&(d=new xm(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping)),d||(d=Lm(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=d,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof xm}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof xm?this._renderedViewLine.monospaceAssumptionsAreValid():Cm}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof xm&&(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;let s=!1;-1!==o&&t>o+1&&i>o+1&&(s=!0),-1!==o&&t>o+1&&(t=o+1),-1!==o&&i>o+1&&(i=o+1);const r=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return r&&r.length>0?new im(s,r):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}Sm.CLASS_NAME="view-line";class xm{constructor(e,t,i){this.domNode=e,this.input=t,this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return Cm;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),Cm=!1),Cm}toSlowRenderedLine(){return Lm(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const o=this._getCharPosition(t),s=this._getCharPosition(i);return[new em(o,s-o)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffset(e);return this._charWidth*t}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.getColumn(new dm(o,i),n)}}class km{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(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),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 em(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 em(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();const t=this._getReadingTarget(e);return t.firstChild?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=nm.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.clientRectScale,n.endNode);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const o=this._characterMapping.getDomPosition(i),s=nm.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n.clientRectDeltaLeft,n.clientRectScale,n.endNode);if(!s||0===s.length)return-1;const r=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getAbsoluteOffset(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 em(0,this.getWidth())];const o=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(i);return nm.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,s.partIndex,s.charIndex,n.clientRectDeltaLeft,n.clientRectScale,n.endNode)}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.getColumn(new dm(o,i),n)}}class Dm extends km{_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=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class Pm{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(131),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(59),this.stickyTabStops=n.get(104),this.typicalHalfwidthCharacterWidth=n.get(44).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return Pm.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 Do(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new Do(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,Wm._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}{constructor(e,t,i,n,o){super(e,t,i,n),this._ctx=e,o?(this.target=o,this.targetPath=Yp.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 Rm.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};return o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,n,i.range,s):(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(!Rm.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new Do(1,1),Om);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new Do(i,n),Om)}if(i){if(Rm.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),o=Fm(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new Do(i,1),o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=Fm(t.mouseContentHorizontalOffset-n),s=new Do(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(s,o)}}return t.fulfillUnknown()}const n=Wm._doHitTest(e,t);return 1===n.type?Wm.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(Rm.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Do(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(Rm.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 Do(i,n))}}return null}static _hitTestScrollbar(e,t){if(Rm.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Do(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(131),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return Wm._getMouseColumn(n,t.get(44).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=Fm(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const l=e.visibleRangeForPosition(s,r);if(!l)return t.fulfillUnknown(n);const c=l.left;if(t.mouseContentHorizontalOffset===c)return t.fulfillContentText(n,null,{mightBeForeignElement:!!o,injectedText:o});const d=[];if(d.push({offset:l.left,column:r}),r>1){const t=e.visibleRangeForPosition(s,r-1);t&&d.push({offset:t.left,column:r-1})}if(re.offset-t.offset));const h=t.pos.toClientCoordinates(),u=i.getBoundingClientRect(),g=u.left<=h.clientX&&h.clientX<=u.right;for(let e=1;e=t.editorPos.y+t.editorPos.height&&(o=t.editorPos.y+t.editorPos.height-1);const s=new Ap(t.pos.x,o),r=this._actualDoHitTestWithCaretRangeFromPoint(e,s.toClientCoordinates());return 1===r.type?r:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=Bn(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=window.getComputedStyle(o,null).getPropertyValue("font"),s=o.innerText;let r,a=e.left,l=0;if(t>e.left+e.width)l=s.length;else{const e=Bm.getInstance();for(let n=0;nthis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(131).height;const n=new zp(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),Vm(this.mouseTargetFactory),Hm.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e)))),this._register(cn(this.viewHelper.viewDomNode,$n.MOUSE_WHEEL,(e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(68))return;const t=new zt(e);if(he?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey){const e=Ud.getZoomLevel(),i=t.deltaY>0?1:-1;Ud.setZoomLevel(e+i),t.preventDefault(),t.stopPropagation()}}),{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(131)){const e=this._context.configuration.options.get(131).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const i=new Op(e,t).toPageCoordinates(),n=Bp(this.viewHelper.viewDomNode);if(i.yn.y+n.height||i.xn.x+n.width)return null;const o=Vp(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=Bn(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._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(l&&(i||o&&s))c(),this._mouseDownOperation.start(t.type,e);else if(n)e.preventDefault();else if(r){const i=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(i.viewZoneId)&&(c(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else a&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(c(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}Hm.MOUSE_MOVE_MINIMUM_TIME=100;class zm extends B{constructor(e,t,i,n,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._createMouseTarget=n,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new qp(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new oi),this._mouseState=new jm,this._currentSelection=new na(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,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const n=this._context.configuration.options;if(!n.get(81)&&n.get(31)&&!n.get(18)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===i.type&&i.position&&this._currentSelection.containsPosition(i.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Vm(null),(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!0);e&&e instanceof KeyboardEvent?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(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Vm(null),(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet((()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))}),10)}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 t=n.getCurrentScrollTop()+e.relativePos.y,s=Pm.getZoneAtCoord(this._context,t);if(s){const e=this._helpPositionJumpOverViewZone(s);if(e)return Mm.createOutsideEditor(o,e)}const r=n.getLineNumberAtVerticalOffset(t);return Mm.createOutsideEditor(o,new Do(r,i.getLineMaxColumn(r)))}const s=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);return e.posxt.x+t.width?Mm.createOutsideEditor(o,new Do(s,i.getLineMaxColumn(s))):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 Mm.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new Do(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,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 jm{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 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}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>jm.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)}}var qm,Km;jm.CLEAR_MOUSE_DOWN_COUNT_TIME=400,function(e){e.text="text/plain",e.binary="application/octet-stream",e.unknown="application/unknown",e.markdown="text/markdown",e.latex="text/latex",e.uriList="text/uri-list"}(qm||(qm={}));class Um{constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selectionStartPosition=n,this.selectionEndPosition=o}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e){return new Um(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new Um(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-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};const n=Math.min(cs(e.value,t.value),e.selectionStart,t.selectionStart),o=Math.min(ds(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),s=(e.value.substring(n,e.value.length-o),t.value.substring(n,t.value.length-o)),r=e.selectionStart-n,a=e.selectionEnd-n;if(t.selectionStart-n===t.selectionEnd-n){return{text:s,replacePrevCharCnt:e.selectionStart-n,replaceNextCharCnt:0,positionDelta:0}}return{text:s,replacePrevCharCnt:a-r,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(cs(e.value,t.value),e.selectionEnd),n=Math.min(ds(e.value,t.value),e.value.length-e.selectionEnd),o=e.value.substring(i,e.value.length-n),s=t.value.substring(i,t.value.length-n),r=(e.selectionStart,e.selectionEnd-i),a=(t.selectionStart,t.selectionEnd-i);return{text:s,replacePrevCharCnt:r,replaceNextCharCnt:o.length-r,positionDelta:a-s.length}}}Um.EMPTY=new Um("",0,0,null,null);class $m{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t;return new ia(i+1,1,i+t+1,1)}static fromEditorSelection(e,t,i,n,o){const s=$m._getPageOfLine(i.startLineNumber,n),r=$m._getRangeForPage(s,n),a=$m._getPageOfLine(i.endLineNumber,n),l=$m._getRangeForPage(a,n),c=r.intersectRanges(new ia(1,1,i.startLineNumber,i.startColumn));let d=t.getValueInRange(c,1);const h=t.getLineCount(),u=t.getLineMaxColumn(h),g=l.intersectRanges(new ia(i.endLineNumber,i.endColumn,h,u));let p,m=t.getValueInRange(g,1);if(s===a||s+1===a)p=t.getValueInRange(i,1);else{const e=r.intersectRanges(i),n=l.intersectRanges(i);p=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(n,1)}if(o){const e=500;d.length>e&&(d=d.substring(d.length-e,d.length)),m.length>e&&(m=m.substring(0,e)),p.length>2*e&&(p=p.substring(0,e)+String.fromCharCode(8230)+p.substring(p.length-e,p.length))}return new Um(d+p+m,d.length,d.length+p.length,new Do(i.startLineNumber,i.startColumn),new Do(i.endLineNumber,i.endColumn))}}!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(Km||(Km={}));const Zm={forceCopyWithSyntaxHighlighting:!1};class Gm{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)}}Gm.INSTANCE=new Gm;class Ym{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){const t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}class Xm extends B{constructor(e,t,i,n){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._onFocus=this._register(new Pe),this.onFocus=this._onFocus.event,this._onBlur=this._register(new Pe),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new Pe),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new Pe),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new Pe),this.onCut=this._onCut.event,this._onPaste=this._register(new Pe),this.onPaste=this._onPaste.event,this._onType=this._register(new Pe),this.onType=this._onType.event,this._onCompositionStart=this._register(new Pe),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new Pe),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new Pe),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new Pe),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new ri((()=>this._onCut.fire()),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new ri((()=>this.writeScreenReaderContent("asyncFocusGain")),0)),this._textAreaState=Um.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let o=null;this._register(this._textArea.onKeyDown((e=>{const t=new Ot(e);(109===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),o=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new Ot(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{const t=new Ym;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&o&&o.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===o.code||"ArrowLeft"===o.code))return 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=>{const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=Um.readFromTextArea(this._textArea),i=Um.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=Um.readFromTextArea(this._textArea),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=Um.readFromTextArea(this._textArea),t=Um.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=Um.readFromTextArea(this._textArea),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=Um.readFromTextArea(this._textArea),i=Um.deduceInput(this._textAreaState,t,2===this._OS);0===i.replacePrevCharCnt&&1===i.text.length&&hs(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]=Jm.getTextData(e.clipboardData);t&&(i=i||Gm.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return cn(document,"selectionchange",(t=>{if(!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.selectionStartPosition||!this._textAreaState.selectionEndPosition)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 l=this._textAreaState.deduceEditorPosition(r),c=this._host.deduceModelPosition(l[0],l[1],l[2]),d=this._textAreaState.deduceEditorPosition(a),h=this._host.deduceModelPosition(d[0],d[1],d[2]),u=new na(c.lineNumber,c.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(u)}))}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.writeScreenReaderContent("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}writeScreenReaderContent(e){this._currentComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};Gm.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&Jm.setTextData(e.clipboardData,t.text,t.html,i)}}class Jm{static getTextData(e){const t=e.getData(qm.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[t,i]}static setTextData(e,t,i,n){e.setData(qm.text,t),"string"==typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}}class Qm extends B{constructor(e){super(),this._actual=e,this.onKeyDown=this._register(mn(this._actual,"keydown")).event,this.onKeyUp=this._register(mn(this._actual,"keyup")).event,this.onCompositionStart=this._register(mn(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(mn(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(mn(this._actual,"compositionend")).event,this.onInput=this._register(mn(this._actual,"input")).event,this.onCut=this._register(mn(this._actual,"cut")).event,this.onCopy=this._register(mn(this._actual,"copy")).event,this.onPaste=this._register(mn(this._actual,"paste")).event,this.onFocus=this._register(mn(this._actual,"focus")).event,this.onBlur=this._register(mn(this._actual,"blur")).event,this._onSyntheticTap=this._register(new Pe),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(cn(this._actual,Km.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=Bn(this._actual);return e?e.activeElement===this._actual:!!an(this._actual)&&document.activeElement===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 o=null;const s=Bn(n);o=s?s.activeElement:document.activeElement;const r=o===n,a=n.selectionStart,l=n.selectionEnd;if(r&&a===t&&l===i)Ke&&window.parent!==window&&n.focus();else{if(r)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(Ke&&window.parent!==window&&n.focus());try{const e=function(e){let t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),function(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}(n,e)}catch(e){}}}}class ef extends Hm{constructor(e,t,i){super(e,t,i),this._register(hh.addTarget(this.viewHelper.linesContentDomNode)),this._register(cn(this.viewHelper.linesContentDomNode,dh.Tap,(e=>this.onTap(e)))),this._register(cn(this.viewHelper.linesContentDomNode,dh.Change,(e=>this.onChange(e)))),this._register(cn(this.viewHelper.linesContentDomNode,dh.Contextmenu,(e=>this._onContextMenu(new Hp(e,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(cn(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new jp(this.viewHelper.viewDomNode);this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),Vm(this.mouseTargetFactory),Hm.MOUSE_MOVE_MINIMUM_TIME)),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=>this._onMouseDown(e))))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new Hp(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===t.type&&null!==t.detail.injectedText})}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e)}}class tf extends Hm{constructor(e,t,i){super(e,t,i),this._register(hh.addTarget(this.viewHelper.linesContentDomNode)),this._register(cn(this.viewHelper.linesContentDomNode,dh.Tap,(e=>this.onTap(e)))),this._register(cn(this.viewHelper.linesContentDomNode,dh.Change,(e=>this.onChange(e)))),this._register(cn(this.viewHelper.linesContentDomNode,dh.Contextmenu,(e=>this._onContextMenu(new Hp(e,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new Hp(e,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(Km.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class nf extends B{constructor(e,t,i){super(),fe&&mt?this.handler=this._register(new ef(e,t,i)):window.TouchEvent?this.handler=this._register(new tf(e,t,i)):this.handler=this._register(new Hm(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var of=i(7953),sf={};sf.styleTagTransform=p(),sf.setAttributes=d(),sf.insert=l().bind(null,"head"),sf.domAPI=r(),sf.insertStyleElement=u(),o()(of.Z,sf),of.Z&&of.Z.locals&&of.Z.locals;var rf=i(1107),af={};af.styleTagTransform=p(),af.setAttributes=d(),af.insert=l().bind(null,"head"),af.domAPI=r(),af.insertStyleElement=u(),o()(rf.Z,af),rf.Z&&rf.Z.locals&&rf.Z.locals;class lf extends Zp{}const cf=xh("editor.lineHighlightBackground",{dark:null,light:null,hc:null},b(0,"Background color for the highlight of line at the cursor position.")),df=xh("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},b(0,"Background color for the border around the line at the cursor position.")),hf=xh("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},b(0,"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),uf=xh("editor.rangeHighlightBorder",{dark:null,light:null,hc:Ih},b(0,"Background color of the border around highlighted ranges."),!0),gf=xh("editor.symbolHighlightBackground",{dark:zu,light:zu,hc:null},b(0,"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),pf=xh("editor.symbolHighlightBorder",{dark:null,light:null,hc:Ih},b(0,"Background color of the border around highlighted symbols."),!0),mf=xh("editorCursor.foreground",{dark:"#AEAFAD",light:vh.black,hc:vh.white},b(0,"Color of the editor cursor.")),ff=xh("editorCursor.background",null,b(0,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),_f=xh("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},b(0,"Color of whitespace characters in the editor.")),vf=xh("editorIndentGuide.background",{dark:_f,light:_f,hc:_f},b(0,"Color of the editor indentation guides.")),bf=xh("editorIndentGuide.activeBackground",{dark:_f,light:_f,hc:_f},b(0,"Color of the active editor indentation guides.")),Cf=xh("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:vh.white},b(0,"Color of editor line numbers.")),wf=xh("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:Ih},b(0,"Color of editor active line number"),!1,b(0,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),yf=xh("editorLineNumber.activeForeground",{dark:wf,light:wf,hc:wf},b(0,"Color of editor active line number")),Sf=xh("editorRuler.foreground",{dark:"#5A5A5A",light:vh.lightgrey,hc:vh.white},b(0,"Color of the editor rulers.")),xf=(xh("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},b(0,"Foreground color of editor CodeLens")),xh("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},b(0,"Background color behind matching brackets"))),kf=xh("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:Nh},b(0,"Color for matching brackets boxes")),Df=xh("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},b(0,"Color of the overview ruler border.")),Lf=xh("editorOverviewRuler.background",null,b(0,"Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),Ef=xh("editorGutter.background",{dark:wu,light:wu,hc:wu},b(0,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),Nf=xh("editorUnnecessaryCode.border",{dark:null,light:null,hc:vh.fromHex("#fff").transparent(.8)},b(0,"Border color of unnecessary (unused) source code in the editor.")),If=xh("editorUnnecessaryCode.opacity",{dark:vh.fromHex("#000a"),light:vh.fromHex("#0007"),hc:null},b(0,"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.")),Tf=xh("editorGhostText.border",{dark:null,light:null,hc:vh.fromHex("#fff").transparent(.8)},b(0,"Border color of ghost text in the editor.")),Mf=xh("editorGhostText.foreground",{dark:vh.fromHex("#ffffff56"),light:vh.fromHex("#0007"),hc:null},b(0,"Foreground color of the ghost text in the editor.")),Rf=xh("editorGhostText.background",{dark:null,light:null,hc:null},b(0,"Background color of the ghost text in the editor.")),Pf=new vh(new mh(0,122,204,.6)),Af=xh("editorOverviewRuler.rangeHighlightForeground",{dark:Pf,light:Pf,hc:Pf},b(0,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Of=xh("editorOverviewRuler.errorForeground",{dark:new vh(new mh(255,18,18,.7)),light:new vh(new mh(255,18,18,.7)),hc:new vh(new mh(255,50,50,1))},b(0,"Overview ruler marker color for errors.")),Ff=xh("editorOverviewRuler.warningForeground",{dark:pu,light:pu,hc:mu},b(0,"Overview ruler marker color for warnings.")),Wf=xh("editorOverviewRuler.infoForeground",{dark:_u,light:_u,hc:vu},b(0,"Overview ruler marker color for infos.")),Bf=xh("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},b(0,"Foreground color of brackets (1). Requires enabling bracket pair colorization.")),Vf=xh("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},b(0,"Foreground color of brackets (2). Requires enabling bracket pair colorization.")),Hf=xh("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},b(0,"Foreground color of brackets (3). Requires enabling bracket pair colorization.")),zf=xh("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Foreground color of brackets (4). Requires enabling bracket pair colorization.")),jf=xh("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Foreground color of brackets (5). Requires enabling bracket pair colorization.")),qf=xh("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Foreground color of brackets (6). Requires enabling bracket pair colorization.")),Kf=xh("editorBracketHighlight.unexpectedBracket.foreground",{dark:new vh(new mh(255,18,18,.8)),light:new vh(new mh(255,18,18,.8)),hc:new vh(new mh(255,50,50,1))},b(0,"Foreground color of unexpected brackets.")),Uf=xh("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),$f=xh("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Zf=xh("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Gf=xh("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),Yf=xh("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),Xf=xh("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Jf=xh("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),Qf=xh("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),e_=xh("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),t_=xh("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),i_=xh("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),n_=xh("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},b(0,"Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));xh("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hc:"#ff0000"},b(0,"Border color used to highlight unicode characters.")),br(((e,t)=>{const i=e.getColor(wu);i&&t.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${i}; }`);const n=e.getColor(yu);n&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${n}; }`);const o=e.getColor(Ef);o&&t.addRule(`.monaco-editor .margin { background-color: ${o}; }`);const s=e.getColor(hf);s&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${s}; }`);const r=e.getColor(uf);r&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${r}; }`);const a=e.getColor(gf);a&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${a}; }`);const l=e.getColor(pf);l&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${l}; }`);const c=e.getColor(_f);c&&(t.addRule(`.monaco-editor .mtkw { color: ${c} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${c} !important; }`))}));class o_ extends lf{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new Do(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(59);const t=e.get(60);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(84);const i=e.get(131);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}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Do(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=ue?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o='
',s=this._context.viewModel.getLineCount(),r=[];for(let e=i;e<=n;e++){const n=e-i;if(!this._renderFinalNewline&&e===s&&0===this._context.viewModel.getLineLength(e)){r[n]="";continue}const a=this._getLineRenderLineNumber(e);a?e===this._activeLineNumber?r[n]='
'+a+"
":r[n]=o+a+"
":r[n]=""}this._renderResult=r}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}o_.CLASS_NAME="line-numbers",br(((e,t)=>{const i=e.getColor(Cf);i&&t.addRule(`.monaco-editor .line-numbers { color: ${i}; }`);const n=e.getColor(yf);n&&t.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${n}; }`)}));class s_ extends Gp{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(131);this._canUseLayerHinting=!t.get(28),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=rd(document.createElement("div")),this._domNode.setClassName(s_.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=rd(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(s_.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(131);return this._canUseLayerHinting=!t.get(28),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)}}s_.CLASS_NAME="glyph-margin",s_.OUTER_CLASS_NAME="margin";var r_=i(8809),a_={};a_.styleTagTransform=p(),a_.setAttributes=d(),a_.insert=l().bind(null,"head"),a_.domAPI=r(),a_.insertStyleElement=u(),o()(r_.Z,a_),r_.Z&&r_.Z.locals&&r_.Z.locals;var l_,c_,d_,h_,u_,g_,p_,m_=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class f_ extends B{constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}get isResolved(){return this._isResolved}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return m_(this,void 0,void 0,(function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}))}_create(){return m_(this,void 0,void 0,(function*(){const e=yield Promise.resolve(this._factory.createTokenizationSupport());this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}))}}class __{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static getFontStyle(e){return(15360&e)>>>10}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}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)}}}class v_{constructor(e,t,i){this._tokenBrand=void 0,this.offset=e,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class b_{constructor(e,t){this._tokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}class C_{constructor(e,t){this._encodedTokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}!function(e){const t=new Map;t.set(0,Oo.symbolMethod),t.set(1,Oo.symbolFunction),t.set(2,Oo.symbolConstructor),t.set(3,Oo.symbolField),t.set(4,Oo.symbolVariable),t.set(5,Oo.symbolClass),t.set(6,Oo.symbolStruct),t.set(7,Oo.symbolInterface),t.set(8,Oo.symbolModule),t.set(9,Oo.symbolProperty),t.set(10,Oo.symbolEvent),t.set(11,Oo.symbolOperator),t.set(12,Oo.symbolUnit),t.set(13,Oo.symbolValue),t.set(15,Oo.symbolEnum),t.set(14,Oo.symbolConstant),t.set(15,Oo.symbolEnum),t.set(16,Oo.symbolEnumMember),t.set(17,Oo.symbolKeyword),t.set(27,Oo.symbolSnippet),t.set(18,Oo.symbolText),t.set(19,Oo.symbolColor),t.set(20,Oo.symbolFile),t.set(21,Oo.symbolReference),t.set(22,Oo.symbolCustomColor),t.set(23,Oo.symbolFolder),t.set(24,Oo.symbolTypeParameter),t.set(25,Oo.account),t.set(26,Oo.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=Oo.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}}(l_||(l_={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(c_||(c_={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(d_||(d_={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(h_||(h_={})),function(e){const t=new Map;t.set(0,Oo.symbolFile),t.set(1,Oo.symbolModule),t.set(2,Oo.symbolNamespace),t.set(3,Oo.symbolPackage),t.set(4,Oo.symbolClass),t.set(5,Oo.symbolMethod),t.set(6,Oo.symbolProperty),t.set(7,Oo.symbolField),t.set(8,Oo.symbolConstructor),t.set(9,Oo.symbolEnum),t.set(10,Oo.symbolInterface),t.set(11,Oo.symbolFunction),t.set(12,Oo.symbolVariable),t.set(13,Oo.symbolConstant),t.set(14,Oo.symbolString),t.set(15,Oo.symbolNumber),t.set(16,Oo.symbolBoolean),t.set(17,Oo.symbolArray),t.set(18,Oo.symbolObject),t.set(19,Oo.symbolKey),t.set(20,Oo.symbolNull),t.set(21,Oo.symbolEnumMember),t.set(22,Oo.symbolStruct),t.set(23,Oo.symbolEvent),t.set(24,Oo.symbolOperator),t.set(25,Oo.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=Oo.symbolProperty),i}}(u_||(u_={}));class w_{constructor(e){this.value=e}}w_.Comment=new w_("comment"),w_.Imports=new w_("imports"),w_.Region=new w_("region"),function(e){e.is=function(e){return!(!e||"object"!=typeof e)&&"string"==typeof e.id&&"string"==typeof e.title}}(g_||(g_={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(p_||(p_={}));const y_=new class{constructor(){this._map=new Map,this._factories=new Map,this._onDidChange=new Pe,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),F((()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))}))}registerFactory(e,t){var i;null===(i=this._factories.get(e))||void 0===i||i.dispose();const n=new f_(this,e,t);return this._factories.set(e,n),F((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}getOrCreate(e){return m_(this,void 0,void 0,(function*(){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(yield i.resolve(),this.get(e))}))}get(e){return this._map.get(e)||null}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._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};class S_{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 Do(this.modelLineNumber,this.distanceToModelLineStart+1),i=new Do(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 x_=Ke;class k_ extends Gp{constructor(t,i,n){super(t),this._primaryCursorPosition=new Do(1,1),this._primaryCursorVisibleRange=null,this._viewController=i,this._visibleRangeProvider=n,this._scrollLeft=0,this._scrollTop=0;const o=this._context.configuration.options,s=o.get(131);this._setAccessibilityOptions(o),this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._contentHeight=s.height,this._fontInfo=o.get(44),this._lineHeight=o.get(59),this._emptySelectionClipboard=o.get(32),this._copyWithSyntaxHighlighting=o.get(21),this._visibleTextArea=null,this._selections=[new na(1,1,1,1)],this._modelSelections=[new na(1,1,1,1)],this._lastRenderPosition=null,this.textArea=rd(document.createElement("textarea")),Yp.write(this.textArea,6),this.textArea.setClassName("inputarea monaco-mouse-cursor-text"),this.textArea.setAttribute("wrap","off"),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(o)),this.textArea.setAttribute("tabindex",String(o.get(112))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",b(0,"editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),o.get(30)&&o.get(81)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=rd(document.createElement("div")),this.textAreaCover.setPosition("absolute");const r={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t)},a={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,de),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(Zm.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:e=>{if(1===this._accessibilitySupport){if(he){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new Um(i,i.length,i.length,t,t)}}return Um.EMPTY}if(Xe){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition(),[i,n]=this._getAndroidWordAtPosition(t);if(i.length>0)return new Um(i,n,n,t,t)}return Um.EMPTY}return $m.fromEditorSelection(e,r,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},l=this._register(new Qm(this.textArea.domNode));this._textAreaInput=this._register(new Xm(a,l,Ce,e)),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?this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta):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);return{distanceToModelLineStart:a.column-1-l,widthOfHiddenTextBefore:function(e,t){if(0===e.length)return 0;const i=document.createElement("div");i.style.position="absolute",i.style.top="-50000px",i.style.width="50000px";const n=document.createElement("span");jd(n,t),n.style.whiteSpace="pre",n.append(e),i.appendChild(n),document.body.appendChild(i);const o=n.offsetWidth;return document.body.removeChild(i),o}(o.substring(0,o.length-l),this._fontInfo)}})(),{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,ia.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new S_(this._context,i.startLineNumber,n,o,s),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName("inputarea monaco-mouse-cursor-text 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._render(),this.textArea.setClassName("inputarea monaco-mouse-cursor-text"),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)})))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=Pa('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');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=Pa(this._context.configuration.options.get(117));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(!hs(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){return 1===e.get(2)?b(0,"The editor is not accessible at this time. Press {0} for options.",ue?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===zd.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(131);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(44),this._lineHeight=t.get(59),this._emptySelectionClipboard=t.get(32),this._copyWithSyntaxHighlighting=t.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(112))),(e.hasChanged(30)||e.hasChanged(81))&&(t.get(30)&&t.get(81)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("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)}prepareRender(e){this._primaryCursorPosition=new Do(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea&&this._visibleTextArea.prepareRender(e)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){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 c=this._context.viewModel.getViewLineData(i.lineNumber),d=c.tokens.findTokenIndexAtOffset(i.column-1),h=d===c.tokens.findTokenIndexAtOffset(n.column-1),u=this._visibleTextArea.definePresentation(h?c.tokens.getPresentation(d):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:(y_.getColorMap()||[])[u.foreground],italic:u.italic,bold:u.bold,underline:u.underline,strikethrough:u.strikethrough})}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight)this._renderAtTopLeft();else if(he){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:e,width:x_?0:1,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const i=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=i*this._lineHeight}else this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:e,width:x_?0:1,height:x_?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:x_?0:1,height:x_?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;jd(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?vh.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(50)?i.setClassName("monaco-editor-background textAreaCover "+s_.OUTER_CLASS_NAME):0!==n.get(60).renderType?i.setClassName("monaco-editor-background textAreaCover "+o_.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}}class D_{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){Oc.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):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){Oc.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){Oc.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Oc.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Oc.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){Oc.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){Oc.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){Oc.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){Oc.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){Oc.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){Oc.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){Oc.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){Oc.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){Oc.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)}}class L_{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return L_.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i=Object.assign({},e);return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),i}}var E_;class N_{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 Error("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=i&&s<=n&&(this._lines[s-this._rendLineNumberStart].onContentChanged(),o=!0);return o}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 I_{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new N_((()=>this._host.createVisibleLine()))}_createDomNode(){const e=rd(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(131)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}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");T_._ttPolicy&&(t=T_._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;te}),T_._sb=Ol(1e5);class M_ extends Gp{constructor(e){super(e),this._visibleLines=new I_(this),this.domNode=this._visibleLines.domNode,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.appendASCIIString(o),n.appendASCIIString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class P_ extends M_{constructor(e){super(e);const t=this._context.configuration.options.get(131);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(131);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 A_ extends M_{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(131);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),jd(this.domNode,t.get(44))}onConfigurationChanged(e){const t=this._context.configuration.options;jd(this.domNode,t.get(44));const i=t.get(131);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 O_{constructor(e,t){this._coordinateBrand=void 0,this.top=e,this.left=t}}class F_ extends Gp{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=rd(document.createElement("div")),Yp.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=rd(document.createElement("div")),Yp.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new W_(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i){this._widgets[e.getId()].setPosition(t,i),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const i=e.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class W_{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=rd(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,o=n.get(131);this._fixedOverflowWidgets=n.get(36),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=n.get(59),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(59),e.hasChanged(131)){const e=t.get(131);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const e=this._context.viewModel.model.validateRange(this._range);(this._context.viewModel.coordinatesConverter.modelPositionIsVisible(e.getStartPosition())||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(e.getEndPosition()))&&(this._viewRange=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(e))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._viewRange&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n,o){const s=e.top,r=s,a=t.top+this._lineHeight,l=s-n,c=r>=n,d=a,h=o.viewportHeight-a>=n;let u=e.left,g=t.left;return u+i>o.scrollLeft+o.viewportWidth&&(u=o.scrollLeft+o.viewportWidth-i),g+i>o.scrollLeft+o.viewportWidth&&(g=o.scrollLeft+o.viewportWidth-i),us){const e=r-(s-n);r-=e,i-=e}if(r=22,f=c+n<=d.height-22;return this._fixedOverflowWidgets?{fitsAbove:m,aboveTop:Math.max(l,22),aboveLeft:u,fitsBelow:f,belowTop:c,belowLeft:p}:{fitsAbove:m,aboveTop:s,aboveLeft:h,fitsBelow:f,belowTop:r,belowLeft:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new O_(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];let i=t[0],n=t[0];for(const e of t)e.lineNumbern.lineNumber&&(n=e);let o=1073741824;for(const e of i.ranges)e.lefte.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&&B_(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&&B_(this._actual.afterRender,this._actual,this._renderData.position)}}function B_(e,t,...i){try{return e.call(t,...i)}catch(e){return null}}var V_=i(1136),H_={};H_.styleTagTransform=p(),H_.setAttributes=d(),H_.insert=l().bind(null,"head"),H_.domAPI=r(),H_.insertStyleElement=u(),o()(V_.Z,H_),V_.Z&&V_.Z.locals&&V_.Z.locals;class z_ extends lf{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(131);this._lineHeight=t.get(59),this._renderLineHighlight=t.get(85),this._renderLineHighlightOnlyWhenFocus=t.get(86),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new na(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map((e=>e.positionLineNumber));t.sort(((e,t)=>e-t)),Qa(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const i=this._selections.every((e=>e.isEmpty()));return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(131);return this._lineHeight=t.get(59),this._renderLineHighlight=t.get(85),this._renderLineHighlightOnlyWhenFocus=t.get(86),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=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length;let s=0;const r=[];for(let e=i;e<=n;e++){const n=e-i;for(;s=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 j_ extends z_{_renderOne(e){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class q_ extends z_{_renderOne(e){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}br(((e,t)=>{const i=e.getColor(cf);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(df)){const i=e.getColor(df);i&&(t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));var K_=i(8592),U_={};U_.styleTagTransform=p(),U_.setAttributes=d(),U_.insert=l().bind(null,"head"),U_.domAPI=r(),U_.insertStyleElement=u(),o()(K_.Z,U_),K_.Z&&K_.Z.locals&&K_.Z.locals;class $_ extends lf{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=t.get(44).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(59),this._typicalHalfwidthCharacterWidth=t.get(44).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:ia.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),c=Math.min(r.range.endLineNumber,s);for(let e=l;e<=c;e++)i[e-o]+=a}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber;let s=null,r=!1,a=null;for(let l=0,c=t.length;l';r[l]+=s}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Z_ extends B{onclick(e,t){this._register(cn(e,$n.CLICK,(e=>t(new Ht(e)))))}onmousedown(e,t){this._register(cn(e,$n.MOUSE_DOWN,(e=>t(new Ht(e)))))}onmouseover(e,t){this._register(cn(e,$n.MOUSE_OVER,(e=>t(new Ht(e)))))}onnonbubblingmouseout(e,t){this._register(pn(e,(e=>t(new Ht(e)))))}onkeydown(e,t){this._register(cn(e,$n.KEY_DOWN,(e=>t(new Ot(e)))))}onkeyup(e,t){this._register(cn(e,$n.KEY_UP,(e=>t(new Ot(e)))))}oninput(e,t){this._register(cn(e,$n.INPUT,t))}onblur(e,t){this._register(cn(e,$n.BLUR,t))}onfocus(e,t){this._register(cn(e,$n.FOCUS,t))}ignoreGesture(e){hh.ignoreTarget(e)}}class G_ extends Z_{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(...e.icon.classNamesArray),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._mouseMoveMonitor=this._register(new gh),this.onmousedown(this.bgDomNode,(e=>this._arrowMouseDown(e))),this.onmousedown(this.domNode,(e=>this._arrowMouseDown(e))),this._mousedownRepeatTimer=this._register(new si),this._mousedownScheduleRepeatTimer=this._register(new oi)}_arrowMouseDown(e){this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet((()=>{this._mousedownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24)}),200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,uh,(e=>{}),(()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()}}class Y_ extends B{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 oi)}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((()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)}),0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}class X_ extends Z_{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 Y_(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new gh),this._shouldRender=!0,this.domNode=rd(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,(e=>this._domNodeMouseDown(e)))}_createArrow(e){const t=this._register(new G_(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=rd(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.onmousedown(this.slider.domNode,(e=>{e.leftButton&&(e.preventDefault(),this._sliderMouseDown(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()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);i<=o&&o<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{}))):this._onMouseDown(e)}_onMouseDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,i=e.browserEvent.offsetY;else{const n=En(this.domNode.domNode);t=e.posx-n.left,i=e.posy-n.top}const n=this._mouseDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))}_sliderMouseDown(e,t){const i=this._sliderMousePosition(e),n=this._sliderOrthogonalMousePosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,uh,(e=>{const t=this._sliderOrthogonalMousePosition(e),s=Math.abs(t-n);if(de&&s>140)return void this._setDesiredScrollPositionNow(o.getScrollPosition());const r=this._sliderMousePosition(e)-i;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(r))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()})),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()}}class J_{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 J_(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))),c=(r-l)/(n-i),d=o*c;return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const e=J_._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 tthis._host.onMouseWheel(new zt(null,1,0))}),this._createArrow({className:"scra",icon:Oo.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new zt(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}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_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 ev extends X_{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new J_(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:Oo.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new zt(null,0,1))}),this._createArrow({className:"scra",icon:Oo.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new zt(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}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_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}}class tv{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 tv(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 tv(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 iv extends B{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new Pe),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new tv(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){const i=this._state.withScrollDimensions(e,t);this._setState(i,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.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 sv(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=sv.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}_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 nv{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function ov(e,t){const i=t-e;return function(t){return e+i*function(e){return 1-function(e){return Math.pow(e,3)}(1-e)}(t)}}class sv{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 n,o;return e0&&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}}cv.INSTANCE=new cv;class dv extends Z_{constructor(e,t,i){super(),this._onScroll=this._register(new Pe),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new Pe),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,he&&(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 ev(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new Q_(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=rd(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=rd(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=rd(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.onnonbubblingmouseout(this._listenOnDomNode,(e=>this._onMouseOut(e))),this._hideTimeout=this._register(new oi),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=A(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,he&&(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()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=A(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new zt(e))};this._mouseWheelToDispose.push(cn(this._listenOnDomNode,$n.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=cv.INSTANCE;{const i=window.devicePixelRatio/je();de||ue?t.accept(Date.now(),e.deltaX/i,e.deltaY/i):t.accept(Date.now(),e.deltaX,e.deltaY)}let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(n)>=Math.abs(o)?o=0:n=0),this._options.flipAxes&&([n,o]=[o,n]);const s=!he&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||o||(o=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(n){const e=50*n,t=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}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&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(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()}_onMouseOut(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 hv extends dv{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new iv({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>_n(e)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class uv extends dv{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 gv extends dv{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new iv({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>_n(e)});super(e,t,i),this._register(i),this._element=e,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})}}class pv extends Gp{constructor(e,t,i,n){super(e);const o=this._context.configuration.options,s=o.get(92),r=o.get(67),a=o.get(34),l=o.get(95),c={listenOnDomNode:i.domNode,className:"editor-scrollable "+fr(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:l,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new uv(t.domNode,c,this._context.viewLayout.getScrollable())),Yp.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=rd(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(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(cn(i.domNode,"scroll",(e=>d(i.domNode,!0,!0)))),this._register(cn(t.domNode,"scroll",(e=>d(t.domNode,!0,!1)))),this._register(cn(n.domNode,"scroll",(e=>d(n.domNode,!0,!1)))),this._register(cn(this.scrollbarDomNode.domNode,"scroll",(e=>d(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(131);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(65).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}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(92)||e.hasChanged(67)||e.hasChanged(34)){const e=this._context.configuration.options,t=e.get(92),i=e.get(67),n=e.get(34),o=e.get(95),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(131)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+fr(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}br(((e,t)=>{const i=e.getColor(su);i&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tbox-shadow: ${i} 0 6px 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tbox-shadow: ${i} 6px 0 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\tbox-shadow: ${i} 6px 6px 6px -6px inset;\n\t\t\t}\n\t\t`);const n=e.getColor(ru);n&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\tbackground: ${n};\n\t\t\t}\n\t\t`);const o=e.getColor(au);o&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\tbackground: ${o};\n\t\t\t}\n\t\t`);const s=e.getColor(lu);s&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\tbackground: ${s};\n\t\t\t}\n\t\t`)}));var mv=i(3640),fv={};fv.styleTagTransform=p(),fv.setAttributes=d(),fv.insert=l().bind(null,"head"),fv.domAPI=r(),fv.insertStyleElement=u(),o()(mv.Z,fv),mv.Z&&mv.Z.locals&&mv.Z.locals;class _v{constructor(e,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class vv extends lf{_render(e,t,i){const n=[];for(let i=e;i<=t;i++)n[i-e]=[];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.className',r=[];for(let e=t;e<=i;e++){const i=e-t,o=n[i];0===o.length?r[i]="":r[i]='
=this._renderResult.length?"":this._renderResult[i]}}var Cv,wv=i(7946),yv={};function Sv(e,t){let i=0,n=0;const o=e.length;for(;nn)throw new Error("Illegal value for lineNumber");const o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide);let r=-2,a=-1,l=-2,c=-1;const d=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,c=-1;for(let t=e;t=0){l=t,c=e;break}}}};let h=-2,u=-1,g=-2,p=-1;const m=e=>{if(-2===h){h=-1,u=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){h=t,u=e;break}}}if(-1!==g&&(-2===g||g=0){g=t,p=e;break}}}};let f=0,_=!0,v=0,b=!0,C=0,w=0;for(let o=0;_||b;o++){const r=e-o,g=e+o;o>1&&(r<1||r1&&(g>n||g>i)&&(b=!1),o>5e4&&(_=!1,b=!1);let y=-1;if(_&&r>=1){const e=this._computeIndentLevel(r-1);e>=0?(l=r-1,c=e,y=Math.ceil(e/this.textModel.getOptions().indentSize)):(d(r),y=this._getIndentLevelForWhitespaceLine(s,a,c))}let S=-1;if(b&&g<=n){const e=this._computeIndentLevel(g-1);e>=0?(h=g-1,u=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(g),S=this._getIndentLevelForWhitespaceLine(s,u,p))}if(0!==o){if(1===o){if(g<=n&&S>=0&&w+1===S){_=!1,f=g,v=g,C=S;continue}if(r>=1&&y>=0&&y-1===w){b=!1,f=r,v=r,C=y;continue}if(f=e,v=e,C=w,0===C)return{startLineNumber:f,endLineNumber:v,indent:C}}_&&(y>=C?f=r:_=!1),b&&(S>=C?v=g:b=!1)}else w=y}return{startLineNumber:f,endLineNumber:v,indent:C}}getLinesBracketGuides(e,t,i,n){var o,s,r,a,l;const c=[],d=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new ia(e,1,t,this.textModel.getLineMaxColumn(t)));let h;i&&d.length>0&&(h=null===(o=function(e,t){const i=function(e,t){for(let i=e.length-1;i>=0;i--)if(t(e[i]))return i;return-1}(e,(e=>e.range.startLineNumber!==e.range.endLineNumber));if(-1!==i)return e[i]}(e<=i.lineNumber&&i.lineNumber<=t?d.filter((e=>ia.strictContainsPosition(e.range,i))):this.textModel.bracketPairs.getBracketPairsInRange(ia.fromPositions(i))))||void 0===o?void 0:o.range);const u=new Cl(d),g=new Array,p=new Array,m=new Lv;for(let i=e;i<=t;i++){let e=new Array;p.length>0&&(e=e.concat(p),p.length=0),c.push(e);for(const e of u.takeWhile((e=>e.openingBracketRange.startLineNumber<=i))||[]){if(e.range.startLineNumber===e.range.endLineNumber)continue;const t=Math.min(this.getVisibleColumnFromPosition(e.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition(null!==(r=null===(s=e.closingBracketRange)||void 0===s?void 0:s.getStartPosition())&&void 0!==r?r:e.range.getEndPosition()),e.minVisibleColumnIndentation+1);let i=!1;e.closingBracketRange&&Jo(this.textModel.getLineContent(e.closingBracketRange.startLineNumber))=0;o--){const s=g[o];if(!s)continue;const r=n.highlightActive&&h&&s.bracketPair.range.equalsRange(h),a=m.getInlineClassNameOfLevel(s.nestingLevel)+(r?" "+m.activeClassName:"");(r||n.includeInactive)&&s.renderHorizontalEndLineAtTheBottom&&s.end.lineNumber===i+1&&p.push(new xv(s.guideVisibleColumn,a,null)),s.end.lineNumber<=i||s.start.lineNumber>=i||s.guideVisibleColumn>=t&&!r||(t=s.guideVisibleColumn,(r||n.includeInactive)&&e.push(new xv(s.guideVisibleColumn,a,null)))}e.sort(((e,t)=>e.visibleColumn-t.visibleColumn))}return c}getVisibleColumnFromPosition(e){return aa.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,c=-2,d=-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!==c&&(-2===c||c=0){c=e,d=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(s,l,d)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:ta||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 Do(c,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?Cv.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?Cv.EnabledForActive:Cv.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(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(),c=[];for(let i=e;i<=t;i++){const t=new Array;c.push(t);const d=n?n[i-e]:[],h=new Cl(d),u=o?o[i-e]:[];for(let e=1;e<=u;e++){const n=(e-1)*l+1,o=0===d.length&&s<=i&&i<=r&&e===a;t.push(...h.takeWhile((e=>e.visibleColumn!0))||[])}return c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Nv(e){if(!e||!e.isTransparent())return e}br(((e,t)=>{const i=e.getColor(vf);i&&t.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=e.getColor(bf)||i;n&&t.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${n} inset; }`);const o=[{bracketColor:Bf,guideColor:Uf,guideColorActive:Jf},{bracketColor:Vf,guideColor:$f,guideColorActive:Qf},{bracketColor:Hf,guideColor:Zf,guideColorActive:e_},{bracketColor:zf,guideColor:Gf,guideColorActive:t_},{bracketColor:jf,guideColor:Yf,guideColorActive:i_},{bracketColor:qf,guideColor:Xf,guideColorActive:n_}],s=new Lv,r=o.map((t=>{var i,n;const o=e.getColor(t.bracketColor),s=e.getColor(t.guideColor),r=e.getColor(t.guideColorActive),a=Nv(null!==(i=Nv(s))&&void 0!==i?i:null==o?void 0:o.transparent(.3)),l=Nv(null!==(n=Nv(r))&&void 0!==n?n:o);if(a&&l)return{guideColor:a,guideColorActive:l}})).filter(rt);if(r.length>0){for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .${s.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.${s.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${s.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${s.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}}));var Iv=i(5305),Tv={};Tv.styleTagTransform=p(),Tv.setAttributes=d(),Tv.insert=l().bind(null,"head"),Tv.domAPI=r(),Tv.insertStyleElement=u(),o()(Iv.Z,Tv),Iv.Z&&Iv.Z.locals&&Iv.Z.locals;class Mv{constructor(){this._currentVisibleRange=new ia(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Rv{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 Pv{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 ri((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new Mv,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new Sm(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(132)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(44),n=t.get(132),o=t.get(131);return this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(89),this._horizontalScrollbarHeight=o.horizontalScrollbarHeight,this._cursorSurroundingLines=t.get(25),this._cursorSurroundingLinesStyle=t.get(26),this._canUseLayerHinting=!t.get(28),jd(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(131)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new ym(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 Rv(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 Pv(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 Do(n,1);const o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(ns)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const a=this._context.viewModel.getLineMinColumn(n);return ri?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=ia.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let o=[],s=0;const r=new wm(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Do(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(ec)continue;const d=e===n.startLineNumber?n.startColumn:1,h=e===n.endLineNumber?n.endColumn:this._context.viewModel.getLineMaxColumn(e),u=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,d,h,r);if(u){if(t&&ethis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,new wm(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new tm(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_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()):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();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.schedule(),ue&&!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(!c)return-1;u=d}else if(5===s||6===s)if(6===s&&r<=d&&h<=l)u=r;else{const e=d-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<=d&&h<=l)u=r;else{const e=(d+h)/2;u=Math.max(0,e-a/2)}else u=this._computeMinimumScrolling(r,l,d,h,3===s,4===s);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let o=1073741824,s=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)o=Math.min(o,Math.round(e.left)),s=Math.max(s,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)o=Math.min(o,Math.round(t.left)),s=Math.max(s,Math.round(t.left+t.width))}return e.minimalReveal||(o=Math.max(0,o-Av.HORIZONTAL_EXTRA_PX),s+=this._revealHorizontalRightPadding),"selections"===e.type&&s-o>t.width?null:{scrollLeft:this._computeMinimumScrolling(i,n,o,s),maxHorizontalOffset:s}}_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}}Av.HORIZONTAL_EXTRA_PX=30;var Ov=i(2342),Fv={};Fv.styleTagTransform=p(),Fv.setAttributes=d(),Fv.insert=l().bind(null,"head"),Fv.domAPI=r(),Fv.insertStyleElement=u(),o()(Ov.Z,Fv),Ov.Z&&Ov.Z.locals&&Ov.Z.locals;class Wv extends vv{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(131);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(131);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){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let e=0,o=t.length;e
',s=[];for(let e=t;e<=i;e++){const i=e-t,r=n[i];let a="";for(let e=0,t=r.length;e';o[i]=r}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var zv=i(1922),jv={};jv.styleTagTransform=p(),jv.setAttributes=d(),jv.insert=l().bind(null,"head"),jv.domAPI=r(),jv.insertStyleElement=u(),o()(zv.Z,jv),zv.Z&&zv.Z.locals&&zv.Z.locals;class qv{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=qv._clamp(e),this.g=qv._clamp(t),this.b=qv._clamp(i),this.a=qv._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}}qv.Empty=new qv(0,0,0,0);class Kv extends B{constructor(){super(),this._onDidChange=new Pe,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(y_.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}static getInstance(){return this._INSTANCE||(this._INSTANCE=new Kv),this._INSTANCE}_updateColorMap(){const e=y_.getColorMap();if(!e)return this._colors=[qv.Empty],void(this._backgroundIsLight=!0);this._colors=[qv.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}}Kv._INSTANCE=null;class Uv{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 $v{constructor(e,t){this.tabSize=e,this.data=t}}class Zv{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 Gv{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=Gv.isBasicASCII(i,s),this.containsRTL=Gv.containsRTL(i,this.isBasicASCII,o),this.tokens=r,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=c}static isBasicASCII(e,t){return!t||ys(e)}static containsRTL(e,t,i){return!(t||!i)&&Cs(e)}}class Yv{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class Xv{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new Yv(new ia(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class Jv{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class Qv{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static cmp(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}}const eb=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();class tb{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=tb.soften(e,.8),this.charDataLight=tb.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=c?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,_=r.r,v=r.g,b=r.b,C=o.r-_,w=o.g-v,y=o.b-b,S=Math.max(s,a),x=e.data;let k=m*h*u,D=i*f+4*t;for(let e=0;ee.width||i+d>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,_=p+(n.g-p)*u,v=m+(n.b-m)*u,b=Math.max(o,r),C=e.data;let w=i*h+4*t;for(let e=0;e{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=ib[e[i]]<<4|15&ib[e[i+1]];return t},ob={1:I((()=>nb("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:I((()=>nb("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class sb{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=ob[e]?new tb(ob[e](),e):sb.createFromSampleData(sb.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 eb)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=sb._downsample(e,t);return new tb(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;tsb.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=mb._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=mb._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(vp);return i?new qv(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(bp);return t?qv._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.showSlider===e.showSlider&&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 fb{constructor(e,t,i,n,o,s,r,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=s,this.startLineNumber=r,this.endLineNumber=a}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,i,n,o,s,r,a,l,c,d){const h=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){const t=a*e.lineHeight+(e.scrollBeyondLastLine?o-e.lineHeight:0),i=Math.max(1,Math.floor(o*o/t)),n=Math.max(0,e.minimapHeight-i),s=n/(c-o),d=l*s,h=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new fb(l,c,h,s,d,i,1,Math.min(r,u))}let m,f;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)}f=e.scrollBeyondLastLine?(r-1)*u/h:Math.max(0,r*u/h-m),f=Math.min(e.minimapHeight-m,f);const _=f/(c-o),v=l*_;let b=0;if(e.scrollBeyondLastLine&&(b=o/p-1),g>=r+b)return new fb(l,c,f>0,_,v,m,1,r);{let e=Math.max(1,Math.floor(t-v*h/u));d&&d.scrollHeight===c&&(d.scrollTop>l&&(e=Math.min(e,d.startLineNumber)),d.scrollTop_b.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=r-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]=Cb.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(e.leftButton&&this._lastRenderData){const t=En(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e.buttons,e.posx,i,e.posy,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.browserEvent.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderMouseMoveMonitor=new gh,this._sliderMouseDownListener=hn(this._slider.domNode,"mousedown",(e=>{e.preventDefault(),e.stopPropagation(),e.leftButton&&this._lastRenderData&&this._startSliderDragging(e.buttons,e.posx,e.posy,e.posy,this._lastRenderData.renderedLayout)})),this._gestureDisposable=hh.addTarget(this._domNode.domNode),this._sliderTouchStartListener=cn(this._domNode.domNode,dh.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=cn(this._domNode.domNode,dh.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=hn(this._domNode.domNode,dh.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i,n,o){this._slider.toggleClassName("active",!0);const s=(e,n)=>{const s=Math.abs(n-t);if(de&&s>140)return void this._model.setScrollTop(o.scrollTop);const r=e-i;this._model.setScrollTop(o.getDesiredScrollTopFromDelta(r))};n!==i&&s(n,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,uh,(e=>s(e.posy,e.posx)),(()=>{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._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}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 bb(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){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(mp),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=fb.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(ia.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 c=new Sb(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,c,e,s),this._renderDecorationsLineHighlights(l,i,c,e,s);const d=new Sb(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,s,a,r,n),this._renderDecorationsHighlights(l,i,d,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=Math.max(n.startLineNumber,a.startLineNumber),l=Math.min(n.endLineNumber,a.endLineNumber);if(t>l)continue;for(let e=t;e<=l;e++)i.set(e,!0);const c=(t-n.startLineNumber)*o,d=(l-n.startLineNumber)*o+o;r>=c||(r>s&&e.fillRect(8,s,e.canvas.width,r-s),s=c),r=d}r>s&&e.fillRect(8,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!==ab.Inline)continue;const c=Math.max(n.startLineNumber,a.range.startLineNumber),d=Math.min(n.endLineNumber,a.range.endLineNumber);if(c>d)continue;const h=l.getColor(this._theme.value);if(!h||h.isTransparent())continue;let u=s.get(h.toString());u||(u=h.transparent(.5).toString(),s.set(h.toString(),u)),e.fillStyle=u;for(let t=c;t<=d;t++){if(i.has(t))continue;i.set(t,!0);const s=(c-n.startLineNumber)*o;e.fillRect(8,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=Math.max(n.startLineNumber,l.startLineNumber),c=Math.min(n.endLineNumber,l.endLineNumber);if(!(t>c))for(let d=t;d<=c;d++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,d,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 c=Math.max(n.startLineNumber,l.range.startLineNumber),d=Math.min(n.endLineNumber,l.range.endLineNumber);if(c>d)continue;const h=t.getColor(this._theme.value);if(h&&!h.isTransparent())for(let u=c;u<=d;u++)switch(t.position){case ab.Inline:this.renderDecorationOnLine(e,i,l.range,h,n,u,o,o,s,r,a);continue;case ab.Gutter:{const t=(u-n.startLineNumber)*o,i=2;this.renderDecoration(e,h,i,t,2,o);continue}}}}renderDecorationOnLine(e,t,i,n,o,s,r,a,l,c,d){const h=(s-o.startLineNumber)*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,c,d),_=this.getXOffsetForPosition(t,s,m,l,c,d);this.renderDecoration(e,n,f,h,_-f,r)}getXOffsetForPosition(e,t,i,n,o,s){if(1===i)return 8;if((i-1)*o>=s)return s;let r=e.get(t);if(!r){const i=this._model.getLineContent(t);r=[8];let a=8;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,w=h.a/255,y=new qv(Math.round((h.r-d.r)*w+d.r),Math.round((h.g-d.g)*w+d.g),Math.round((h.b-d.b)*w+d.b),255);let S=0;const x=[];for(let e=0,s=i-t+1;e=0&&o_)return;const r=m.charCodeAt(C);if(9===r){const e=h-(C+w)%h;w+=e-1,b+=e*s}else if(32===r)b+=s;else{const h=ks(r)?2:1;for(let u=0;u_)return}}}}}class Sb{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]}}br(((e,t)=>{const i=e.getColor(Cp);i&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${i}; }`);const n=e.getColor(wp);n&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${n}; }`);const o=e.getColor(yp);o&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${o}; }`);const s=e.getColor(su);s&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)}));var xb=i(3181),kb={};kb.styleTagTransform=p(),kb.setAttributes=d(),kb.insert=l().bind(null,"head"),kb.domAPI=r(),kb.insertStyleElement=u(),o()(xb.Z,kb),xb.Z&&xb.Z.locals&&xb.Z.locals;class Db extends Gp{constructor(e){super(e);const t=this._context.configuration.options.get(131);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,this._domNode=rd(document.createElement("div")),Yp.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(131);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=rd(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference!==t&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.parentNode.removeChild(e),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let e=0,i=t.length;e=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&&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 Eb extends Gp{constructor(e){super(e),this._domNode=rd(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=y_.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new Lb(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))}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;tt&&(e=t-a),_=e-a,v=e+a}_>p+1||s!==u?(0!==e&&l.fillRect(c[u],g,d[u],p-g),u=s,g=_,p=v):v>p&&(p=v)}l.fillRect(c[u],g,d[u],p-g)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,i=e/2|0,s=this._settings.x[7],r=this._settings.w[7];l.fillStyle=this._settings.cursorColor;let a=-100,c=-100;for(let d=0,h=this._cursorPositions.length;dt&&(u=t-i);const g=u-i,p=g+e;g>c+1?(0!==d&&l.fillRect(s,a,r,c-a),a=g,c=p):p>c&&(c=p)}l.fillRect(s,a,r,c-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())}}class Nb{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 Ib{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&&(u=i-g);const p=a.color;let m=this._color2Id[p];m||(m=++this._lastAssignedId,this._color2Id[p]=m,this._id2Color[m]=p);const f=new Nb(u-g,u+g,m);a.setColorZone(f),s.push(f)}return this._colorZonesInvalid=!1,s.sort(Nb.compare),s}}class Mb extends Zp{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=rd(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new Tb((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(59)),this._zoneManager.setPixelRatio(i.get(129)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(59)&&(this._zoneManager.setLineHeight(t.get(59)),this._render()),e.hasChanged(129)&&(this._zoneManager.setPixelRatio(t.get(129)),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,c=a.to;t!==o?(e.fillRect(0,s,n,r-s),o=t,e.fillStyle=i[o],s=l,r=c):r>=l?r=Math.max(r,c):(e.fillRect(0,s,n,r-s),s=l,r=c)}e.fillRect(0,s,n,r-s)}}var Rb=i(7830),Pb={};Pb.styleTagTransform=p(),Pb.setAttributes=d(),Pb.insert=l().bind(null,"head"),Pb.domAPI=r(),Pb.insertStyleElement=u(),o()(Rb.Z,Pb),Rb.Z&&Rb.Z.locals&&Rb.Z.locals;class Ab extends Gp{constructor(e){super(e),this.domNode=rd(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(91),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(91),this._typicalHalfwidthCharacterWidth=t.get(44).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=rd(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;t{const i=e.getColor(Sf);i&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${i} inset; }`)}));var Ob=i(6748),Fb={};Fb.styleTagTransform=p(),Fb.setAttributes=d(),Fb.insert=l().bind(null,"head"),Fb.domAPI=r(),Fb.insertStyleElement=u(),o()(Ob.Z,Fb),Ob.Z&&Ob.Z.locals&&Ob.Z.locals;class Wb extends Gp{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(92);this._useShadows=t.useShadows,this._domNode=rd(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(131);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(92);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":"")}}br(((e,t)=>{const i=e.getColor(su);i&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${i} 0 6px 6px -6px inset; }`)}));var Bb=i(7660),Vb={};Vb.styleTagTransform=p(),Vb.setAttributes=d(),Vb.insert=l().bind(null,"head"),Vb.domAPI=r(),Vb.insertStyleElement=u(),o()(Bb.Z,Vb),Bb.Z&&Bb.Z.locals&&Bb.Z.locals;class Hb{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class zb{constructor(e,t){this.lineNumber=e,this.ranges=t}}function jb(e){return new Hb(e)}function qb(e){return new zb(e.lineNumber,e.ranges.map(jb))}class Kb extends lf{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(59),this._roundedSelection=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(44).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(59),this._roundedSelection=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(44).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;Ub(a-i)i&&(c.top=1),Ub(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 c=0,d=n.length;c1,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 Ub(e){return e<0?-e:e}Kb.SELECTION_CLASS_NAME="selected-text",Kb.SELECTION_TOP_LEFT="top-left-radius",Kb.SELECTION_BOTTOM_LEFT="bottom-left-radius",Kb.SELECTION_TOP_RIGHT="top-right-radius",Kb.SELECTION_BOTTOM_RIGHT="bottom-right-radius",Kb.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",Kb.ROUNDED_PIECE_WIDTH=10,br(((e,t)=>{const i=e.getColor(Ou);i&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const n=e.getColor(Wu);n&&t.addRule(`.monaco-editor .selected-text { background-color: ${n}; }`);const o=e.getColor(Fu);o&&!o.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${o}; }`)}));var $b=i(4274),Zb={};Zb.styleTagTransform=p(),Zb.setAttributes=d(),Zb.insert=l().bind(null,"head"),Zb.domAPI=r(),Zb.insertStyleElement=u(),o()($b.Z,Zb),$b.Z&&$b.Z.locals&&$b.Z.locals;class Gb{constructor(e,t,i,n,o,s){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=o,this.textContentClassName=s}}class Yb{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(44);this._cursorStyle=t.get(24),this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=rd(document.createElement("div")),this._domNode.setClassName("cursor monaco-mouse-cursor-text"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),jd(this._domNode,i),this._domNode.setDisplay("none"),this._position=new Do(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(44);return this._cursorStyle=t.get(24),this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),jd(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,o]=function(e,t){t>0&&us(e.charCodeAt(t))&&t--;const i=t+_s(e,t);return[i-vs(e,i),i]}(i,t-1);return[new Do(e,n+1),i.substring(n,o)]}_prepareRender(e){let t="";const[i,n]=this._getGraphemeAwarePosition();if(this._cursorStyle===xd.Line||this._cursorStyle===xd.LineThin){const o=e.visibleRangeForPosition(i);if(!o||o.outsideRenderedLine)return null;let s;this._cursorStyle===xd.Line?(s=so(this._lineCursorWidth>0?this._lineCursorWidth:2),s>2&&(t=n)):s=so(1);let r=o.left;s>=2&&r>=1&&(r-=1);const a=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta;return new Gb(a,r,s,this._lineHeight,t,"")}const o=e.linesVisibleRangesForRange(new ia(i.lineNumber,i.column,i.lineNumber,i.column+n.length),!1);if(!o||0===o.length)return null;const s=o[0];if(s.outsideRenderedLine||0===s.ranges.length)return null;const r=s.ranges[0],a=r.width<1?this._typicalHalfwidthCharacterWidth:r.width;let l="";if(this._cursorStyle===xd.Block){const e=this._context.viewModel.getViewLineData(i.lineNumber);t=n;const o=e.tokens.findTokenIndexAtOffset(i.column-1);l=e.tokens.getClassName(o)}let c=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta,d=this._lineHeight;return this._cursorStyle!==xd.Underline&&this._cursorStyle!==xd.UnderlineThin||(c+=this._lineHeight-2,d=2),new Gb(c,r.left,a,d,t,l)}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 monaco-mouse-cursor-text ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),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 Xb extends Gp{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(81),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new Yb(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=rd(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 oi,this._cursorFlatBlinkInterval=new si,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(81),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),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()}),Xb.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),Xb.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case xd.Line:e+=" cursor-line-style";break;case xd.Block:e+=" cursor-block-style";break;case xd.Underline:e+=" cursor-underline-style";break;case xd.LineThin:e+=" cursor-line-thin-style";break;case xd.BlockOutline:e+=" cursor-block-outline-style";break;case xd.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 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(mf);if(i){let n=e.getColor(ff);n||(n=i.opposite()),t.addRule(`.monaco-editor .inputarea.ime-input { caret-color: ${i}; }`),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),"hc"===e.type&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}}));const Jb=()=>{throw new Error("Invalid change accessor")};class Qb extends Gp{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(131);this._lineHeight=t.get(59),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=rd(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=rd(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{e(t)}catch(e){w(e)}}(e,n),n.addZone=Jb,n.removeZone=Jb,n.layoutZone=Jb})),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:rd(t.domNode),marginDomNode:t.marginDomNode?rd(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){w(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){w(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;t{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new Tm(e,t)},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 Do(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(131);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(128)+" "+fr(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}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(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=fn(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){!function(e){try{e()}catch(e){w(e)}}((()=>this._actualRender()))}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!an(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new iC(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new Xp(this._context.viewLayout,i,this._viewLines);for(const t of e)t.prepareRender(n);for(const t of e)t.render(n),t.onDidRender()}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop},1),this._context.viewModel.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},1)}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 Do(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?L_.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new Mb(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()}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){let t=e.position&&e.position.range||null;if(null===t){const i=e.position?e.position.position:null;null!==i&&(t=new ia(i.lineNumber,i.column,i.lineNumber,i.column))}const i=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,i),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()}}class oC{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new fa(new ia(1,1,1,1),0,new Do(1,1),0),new fa(new ia(1,1,1,1),0,new Do(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 ga(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return na.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 fa(ia.fromPositions(r,a),t.selectionStartLeftoverVisibleColumns+n.column-r.column,s,t.leftoverVisibleColumns+i.column-s.column)}_setState(e,t,i){if(i&&(i=oC._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 fa(i,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 fa(n,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 fa(n,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new Do(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new Do(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new ia(n.lineNumber,n.column,o.lineNumber,o.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new fa(s,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class sC{constructor(e){this.context=e,this.cursors=[new oC(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(e=this.cursors,t=_l((e=>e.viewState.position),Do.compare),bl(e,((e,i)=>-t(e,i)))).viewState.position;var e,t}getBottomMostViewPosition(){return function(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n=0&&(i=o)}return i}(this.cursors,_l((e=>e.viewState.position),Do.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(ga.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),ia.compareRangesUsingStarts));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class rC{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class aC{constructor(){this.changeType=1}}class lC{constructor(e,t,i,n,o){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=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 lC(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new lC(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}}class cC{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class dC{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class hC{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class uC{constructor(){this.changeType=5}}class gC{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;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 AC{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class OC{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}merge(e){return 0!==e.kind?this:new OC(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class FC{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return 1!==e.kind?this:new FC(this.oldHasFocus,e.hasFocus)}}class WC{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)}merge(e){return 2!==e.kind?this:new WC(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class BC{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class VC{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;tzC.MAX_CURSOR_COUNT&&(n=n.slice(0,zC.MAX_CURSOR_COUNT),o=!0);const s=jC.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,s,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=ia.fromPositions(r[0],r[0]),e.emitViewEvent(new EC(t,i,a,l,n,o,s))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const i=ga.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,i)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,ga.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,ga.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&&(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 na(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new na(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):s[i]=e.selectionsBefore[i];return s}));r||(r=e.selectionsBefore);const a=[];for(let 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{ia.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=na.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 w(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-ia.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}}.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);const i=[],n=[];for(let t=0;t0&&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=jC.from(this._model,this);if(s.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new bC(a,r)),!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 VC(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,c=n.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,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=jC.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){w(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}getAutoClosedCharacters(){return qC.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit((()=>{"keyboard"===t&&(this._executeEditOperation(Lc.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i{this._executeEditOperation(Lc.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 na(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(Lc.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(Ea.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new _a(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new _a(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}zC.MAX_CURSOR_COUNT=1e4;class jC{constructor(e,t){this.modelVersionId=e,this.cursorState=t}static from(e,t){return new jC(e.getVersionId(),t.getCursorStates())}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 KC{constructor(e,t,i,n,o,s){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=o,this._contextKeyService=s}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}const UC={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},$C="base.contributions.configuration",ZC={properties:{},patternProperties:{}},GC={properties:{},patternProperties:{}},YC={properties:{},patternProperties:{}},XC={properties:{},patternProperties:{}},JC={properties:{},patternProperties:{}},QC={properties:{},patternProperties:{}},ew="vscode://schemas/settings/resourceLanguage",tw=dr.as(bh),iw=new RegExp("\\[([^\\]]+)\\]","g"),nw="^(\\[([^\\]]+)\\])+$",ow=new RegExp(nw);function sw(e){const t=[];if(ow.test(e)){let i=iw.exec(e);for(;null==i?void 0:i.length;){const n=i[1].trim();n&&t.push(n),i=iw.exec(e)}}return al(t)}const rw=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new Pe,this._onDidUpdateConfiguration=new Pe,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:b(0,"Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},tw.registerSchema(ew,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=this.doRegisterConfigurations(e,t);tw.registerSchema(ew,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){var t;const i=[],n=[];for(const{overrides:o,source:s}of e)for(const e in o)if(i.push(e),ow.test(e)){const i=Object.assign(Object.assign({},(null===(t=this.configurationDefaultsOverrides.get(e))||void 0===t?void 0:t.value)||{}),o[e]);this.configurationDefaultsOverrides.set(e,{source:s,value:i});const r={type:"object",default:i,description:b(0,"Configure settings to be overridden for {0} language.",e),$ref:ew,defaultDefaultValue:i,source:et(s)?void 0:s};n.push(...sw(e)),this.configurationProperties[e]=r,this.defaultLanguageConfigurationOverridesNode.properties[e]=r}else{this.configurationDefaultsOverrides.set(e,{value:o[e],source:s});const t=this.configurationProperties[e];t&&(this.updatePropertyDefaultValue(e,t),this.updateSchema(e,t))}this.registerOverrideIdentifiers(n),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i,defaultsOverrides:!0})}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t){const i=[];return e.forEach((e=>{i.push(...this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties)),this.configurationContributors.push(e),this.registerJSONConfiguration(e)})),i}validateAndRegisterProperties(e,t=!0,i,n,o=3){o=at(e.scope)?o:e.scope;let s=[],r=e.properties;if(r)for(let e in r){if(t&&aw(e)){delete r[e];continue}const a=r[e];a.source=i,a.defaultDefaultValue=r[e].default,this.updatePropertyDefaultValue(e,a),ow.test(e)?a.scope=void 0:(a.scope=at(a.scope)?o:a.scope,a.restricted=at(a.restricted)?!!(null==n?void 0:n.includes(e)):a.restricted),!r[e].hasOwnProperty("included")||r[e].included?(this.configurationProperties[e]=r[e],!r[e].deprecationMessage&&r[e].markdownDeprecationMessage&&(r[e].deprecationMessage=r[e].markdownDeprecationMessage),s.push(e)):(this.excludedConfigurationProperties[e]=r[e],delete r[e])}let a=e.allOf;if(a)for(let e of a)s.push(...this.validateAndRegisterProperties(e,t,i,n,o));return s}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=e=>{let i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);let n=e.allOf;n&&n.forEach(t)};t(e)}updateSchema(e,t){switch(ZC.properties[e]=t,t.scope){case 1:GC.properties[e]=t;break;case 2:YC.properties[e]=t;break;case 6:XC.properties[e]=t;break;case 3:JC.properties[e]=t;break;case 4:QC.properties[e]=t;break;case 5:QC.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:b(0,"Configure editor settings to be overridden for a language."),errorMessage:b(0,"This setting does not support per-language configuration."),$ref:ew};this.updatePropertyDefaultValue(t,i),ZC.properties[t]=i,GC.properties[t]=i,YC.properties[t]=i,XC.properties[t]=i,JC.properties[t]=i,QC.properties[t]=i}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){const e={type:"object",description:b(0,"Configure editor settings to be overridden for a language."),errorMessage:b(0,"This setting does not support per-language configuration."),$ref:ew};ZC.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,GC.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,YC.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,XC.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,JC.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,QC.patternProperties["^(\\[([^\\]]+)\\])+$"]=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;st(n)&&(n=t.defaultDefaultValue,o=void 0),st(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 aw(e){return e.trim()?ow.test(e)?b(0,"Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==rw.getConfigurationProperties()[e]?b(0,"Cannot register '{0}'. This property is already registered.",e):null:b(0,"Cannot register an empty property")}dr.add($C,rw);const lw=new class{constructor(){this._onDidChangeLanguages=new Pe,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"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0),dr.as($C).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}]);class dw{constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}static createEmpty(e,t){const i=dw.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new dw(n,e,t)}equals(e){return e instanceof dw&&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=__.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return __.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return __.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return __.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return __.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return __.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return dw.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new hw(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 o=new Array;let s=0;for(;;){const r=ts){n+=this._text.substring(s,a.offset);const e=this._tokens[1+(t<<1)];o.push(n.length,e),s=a.offset}n+=a.text,o.push(n.length,a.tokenMetadata),i++}}return new dw(new Uint32Array(o),n,this._languageIdCodec)}}dw.defaultTokenMetadata=16793600;class hw{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 hw&&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}}const uw=new class{clone(){return this}equals(e){return this===e}};function gw(e,t){return new b_([new v_(0,"",e)],t)}function pw(e,t){const i=new Uint32Array(2);return i[0]=0,i[1]=(16384|e<<0|2<<23)>>>0,new C_(i,null===t?uw:t)}const mw={getInitialState:()=>uw,tokenizeEncoded:(e,t,i)=>pw(0,i)};function fw(e,t,i,n,o,s,r){let a="
",l=n,c=0,d=!0;for(let h=0,u=t.getCount();h0;)r&&d?(g+=" ",d=!1):(g+=" ",d=!0),e--;break}case 60:g+="<",d=!1;break;case 62:g+=">",d=!1;break;case 38:g+="&",d=!1;break;case 0:g+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",d=!1;break;case 13:g+="​",d=!1;break;case 32:r&&d?(g+=" ",d=!1):(g+=" ",d=!0);break;default:g+=String.fromCharCode(t),d=!1}}if(a+=`${g}`,u>o||l>=o)break}return a+="
",a}function _w(e,t,i){let n='
';const o=Xo(e);let s=i.getInitialState();for(let e=0,r=o.length;e0&&(n+="
");const a=i.tokenizeEncoded(r,!0,s);dw.convertToEndOffset(a.tokens,r.length);const l=new dw(a.tokens,r,t).inflate();let c=0;for(let e=0,t=l.getCount();e${qo(r.substring(c,i))}`,c=i}s=a.endState}return n+="
",n}class vw{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class bw{constructor(e,t,i,n,o){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=o,this.prefixSum=0}}class Cw{constructor(e,t,i,n){this._instanceId=Ns(++Cw.INSTANCE_COUNT),this._pendingChanges=new vw,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,o=e.length;for(;n>>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 bw(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=Cw.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,t+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)+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,c;-1===r?(r=a,c=s+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let d=o,h=d;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++){if(-1===f){const t=d,n=d+i;(t<=m&&mm)&&(f=e)}for(d+=i,p[e-n]=h,h+=i;c===e;)h+=l,d+=l,r++,r>=a?c=s+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(d>=t){s=e;break}}-1===f&&(f=s);const _=0|this.getVerticalOffsetForLineNumber(s);let v=n,b=s;return vt&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:s,relativeVerticalOffset:p,centeredLineNumber:f,completelyVisibleStartLineNumber:v,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}}Cw.INSTANCE_COUNT=0;class ww{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 yw extends B{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new Pe),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new ww(0,0,0,0),this._scrollable=this._register(new iv({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 OC(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)}}class Sw extends B{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(131),s=n.get(75);this._linesLayout=new Cw(t,n.get(59),s.top,s.bottom),this._scrollable=this._register(new yw(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new ww(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(103)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(59)&&this._linesLayout.setLineHeight(t.get(59)),e.hasChanged(75)){const e=t.get(75);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(131)){const e=t.get(131),i=e.contentWidth,n=e.height,o=this._scrollable.getScrollDimensions(),s=o.contentWidth;this._scrollable.setScrollDimensions(new ww(i,o.contentWidth,n,this._getContentHeight(i,n,s)))}else this._updateHeight();e.hasChanged(103)&&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(92);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(94)?o+=Math.max(0,t-n.get(59)-n.get(75).bottom):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 ww(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new Uv(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new Uv(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(132),n=t.get(44);if(i.isViewportWrapping){const i=t.get(131),o=t.get(65);return e>i.contentWidth+n.typicalHalfwidthCharacterWidth&&o.enabled&&"right"===o.side?e+i.verticalScrollbarWidth:e}{const i=t.get(93)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+i,o)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new ww(t.width,this._computeContentWidth(e),t.height,t.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){return this._linesLayout.getVerticalOffsetForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class xw{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 n=e.range,o=e.options;let s;if(o.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new Do(n.startLineNumber,1),0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new Do(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);s=new ia(e.lineNumber,e.column,t.lineNumber,t.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new Jv(s,o),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,Ed(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber,o=[];let s=0;const r=[];for(let e=i;e<=n;e++)r[e-i]=[];for(let e=0,a=t.length;e1===e))}function Lw(e,t){return Ew(e,t.range,(e=>2===e))}function Ew(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const o=e.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}class Nw{constructor(e,t,i){this.range=e,this.nestingLevel=t,this.isInvalid=i}}class Iw extends class{constructor(e,t,i,n){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n}}{constructor(e,t,i,n,o){super(e,t,i,n),this.minVisibleColumnIndentation=o}}class Tw{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}Tw.zero=new Tw(0,0);const Mw=Math.pow(2,26);function Rw(e,t){return e*Mw+t}function Pw(e){const t=e,i=Math.floor(t/Mw);return new Tw(i,t-i*Mw)}function Aw(e,t){return t=t}function Bw(e){return Rw(e.lineNumber-1,e.column-1)}function Vw(e,t){const i=e,n=Math.floor(i/Mw),o=i-n*Mw,s=t,r=Math.floor(s/Mw);return new ia(n+1,o+1,r+1,s-r*Mw+1)}class Hw{constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}}class zw{constructor(e,t){this.documentLength=t,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>jw.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx];return function(e,t){const i=e,n=t;if(n-i<=0)return 0;const o=Math.floor(i/Mw),s=Math.floor(n/Mw),r=n-s*Mw;return o===s?Rw(0,r-(i-o*Mw)):Rw(s-o,r)}(e,t?this.translateOldToCur(t.offsetObj):this.documentLength)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?Rw(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):Rw(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Pw(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?Rw(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):Rw(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(0===n){const e=1<e};class $w{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}}class Zw{constructor(e){this._length=e}get length(){return this._length}}class Gw extends Zw{constructor(e,t,i,n,o){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=o}static create(e,t,i){let n=e.length;return t&&(n=Aw(n,t.length)),i&&(n=Aw(n,i.length)),new Gw(n,e,t,i,t?t.missingOpeningBracketIds:Kw.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=new Array;return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new Gw(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(Aw(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class Yw extends Zw{constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}static create23(e,t,i,n=!1){let o=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(o=Aw(o,t.length),s=s.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");o=Aw(o,i.length),s=s.merge(i.missingOpeningBracketIds)}return n?new Jw(o,e.listHeight+1,e,t,i,s):new Xw(o,e.listHeight+1,e,t,i,s)}static getEmpty(){return new ey(0,0,[],Kw.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}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;let t,i=this;for(;4===i.kind&&(t=i.childrenLength)>0;)i=i.getChild(t-1);return i.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;nthis.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.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,o=n.getCount();let s=null;if(this.lineTokenOffset1e3)break}if(i>1500)break}const n=(o=e,s=t,r=this.lineIdx,a=this.lineCharOffset,o!==r?Rw(r-o,a):Rw(0,a-s));var o,s,r,a;return new ry(n,0,-1,Kw.getEmpty(),new ny(n))}}class cy{constructor(e,t){this.text=e,this._offset=0,this.idx=0;const i=t.getRegExpStr()?new RegExp(t.getRegExpStr()+"|\n","g"):null,n=[];let o,s=0,r=0,a=0,l=0;const c=new Array;for(let e=0;e<60;e++)c.push(new ry(Rw(0,e),0,-1,Kw.getEmpty(),new ny(Rw(0,e))));const d=new Array;for(let e=0;e<60;e++)d.push(new ry(Rw(1,e),0,-1,Kw.getEmpty(),new ny(Rw(1,e))));if(i)for(i.lastIndex=0;null!==(o=i.exec(e));){const e=o.index,i=o[0];if("\n"===i)s++,r=e+1;else{if(a!==e){let t;if(l===s){const i=e-a;if(ifunction(e){const t=Ko(e);return/^[\w ]+$/.test(e)?`\\b${t}\\b`:t}(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e)}findClosingTokenText(e){for(const[t,i]of this.map)if(i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class hy{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){const t=this.languageIdToBracketTokens.get(e);if(!t)return!1;const i=dy.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider).getRegExpStr();return t.getRegExpStr()!==i}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=dy.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function uy(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){const n=i>>1;for(let o=0;o=3?e[2]:null,t)}function gy(e,t){return Math.abs(e.listHeight-t.listHeight)}function py(e,t){return e.listHeight===t.listHeight?Yw.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i=e=e.toMutable();const n=new Array;let o;for(;;){if(t.listHeight===i.listHeight){o=t;break}if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeLastElementMutable()}for(let e=n.length-1;e>=0;e--){const t=n[e];o?t.childrenLength>=3?o=Yw.create23(t.unappendChild(),o,null,!1):(t.appendChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?Yw.create23(e,o,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable();const n=new Array;for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeFirstElementMutable()}let o=t;for(let e=n.length-1;e>=0;e--){const t=n[e];o?t.childrenLength>=3?o=Yw.create23(o,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?Yw.create23(o,e,null,!1):e}(t,e)}class my{constructor(e){this.lastOffset=0,this.nextNodes=[e],this.offsets=[0],this.idxs=[]}readLongestNodeAt(e,t){if(Ow(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=_y(this.nextNodes);if(!i)return;const n=_y(this.offsets);if(Ow(e,n))return;if(Ow(n,e))if(Aw(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=fy(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=fy(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=_y(this.offsets),t=_y(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=_y(this.nextNodes),n=fy(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push(Aw(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function fy(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function _y(e){return e.length>0?e[e.length-1]:void 0}function vy(e,t,i,n){return new by(e,t,i,n).parseDocument()}class by{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 my(i):void 0,this.positionMapper=new zw(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Kw.getEmpty());return e||(e=Yw.getEmpty()),e}parseList(e){const t=new Array;for(;;){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;const n=this.parseChild(e);4===n.kind&&0===n.childrenLength||t.push(n)}const i=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?uy(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())gy(n,o)<=gy(o,e)?(n=py(n,o),o=e):o=py(o,e);return py(n,o)}(t):uy(t,this.createImmutableLists);return i}parseChild(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(0!==t){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>!!Ow(i.length,t)&&i.canBeReused(e)));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new sy(t.bracketIds,t.length);case 0:return t.astNode;case 1:{const i=e.merge(t.bracketIds),n=this.parseList(i),o=this.tokenizer.peek();return o&&2===o.kind&&(o.bracketId===t.bracketId||o.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),Gw.create(t.astNode,n,o.astNode)):Gw.create(t.astNode,n,null)}default:throw new Error("unexpected")}}}class Cy extends B{constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new Pe,this.denseKeyProvider=new $w,this.brackets=new hy(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,0===e.backgroundTokenizationState){const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new cy(this.textModel.getValue(),e);this.initialAstWithoutTokens=vy(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else 2===e.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):1===e.backgroundTokenizationState&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(e){return this.brackets.didLanguageChange(e)}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new Hw(Rw(e.fromLineNumber-1,0),Rw(e.toLineNumber,0),Rw(e.toLineNumber-e.fromLineNumber+1,0))));this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=e.changes.map((e=>{const t=ia.lift(e.range);return new Hw(Bw(t.getStartPosition()),Bw(t.getEndPosition()),function(e){const t=Xo(e);return Rw(t.length-1,t[t.length-1].length)}(e.text))})).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(t,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(e,t,i){const n=t;return vy(new ay(this.textModel,this.brackets),e,n,i)}getBracketsInRange(e){const t=Rw(e.startLineNumber-1,e.startColumn-1),i=Rw(e.endLineNumber-1,e.endColumn-1),n=new Array,o=this.initialAstWithoutTokens||this.astWithTokens;return wy(o,0,o.length,t,i,n),n}getBracketPairsInRange(e,t){const i=new Array,n=Bw(e.getStartPosition()),o=Bw(e.getEndPosition()),s=this.initialAstWithoutTokens||this.astWithTokens,r=new yy(i,t,this.textModel);return Sy(s,0,s.length,n,o,r),i}}function wy(e,t,i,n,o,s,r=0){if(4===e.kind)for(const a of e.children)i=Aw(t,a.length),Fw(t,o)&&Ww(i,n)&&wy(a,t,i,n,o,s,r),t=i;else if(2===e.kind){if(r++,i=Aw(t,e.openingBracket.length),Fw(t,o)&&Ww(i,n)){const n=Vw(t,i);s.push(new Nw(n,r-1,!e.closingBracket))}if(t=i,e.child){const a=e.child;i=Aw(t,a.length),Fw(t,o)&&Ww(i,n)&&wy(a,t,i,n,o,s,r),t=i}if(e.closingBracket){if(i=Aw(t,e.closingBracket.length),Fw(t,o)&&Ww(i,n)){const e=Vw(t,i);s.push(new Nw(e,r-1,!1))}t=i}}else if(3===e.kind){const e=Vw(t,i);s.push(new Nw(e,r-1,!0))}else if(1===e.kind){const e=Vw(t,i);s.push(new Nw(e,r-1,!1))}}class yy{constructor(e,t,i){this.result=e,this.includeMinIndentation=t,this.textModel=i}}function Sy(e,t,i,n,o,s,r=0){var a;if(2===e.kind){const n=Aw(t,e.openingBracket.length);let o=-1;s.includeMinIndentation&&(o=e.computeMinIndentation(t,s.textModel)),s.result.push(new Iw(Vw(t,i),Vw(t,n),e.closingBracket?Vw(Aw(n,(null===(a=e.child)||void 0===a?void 0:a.length)||0),i):void 0,r,o)),r++}let l=t;for(const t of e.children){const e=l;l=Aw(l,t.length),Fw(e,o)&&Fw(n,l)&&Sy(t,e,l,n,o,s,r)}}class xy extends B{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new V),this.onDidChangeEmitter=new Pe,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())})))}get isDocumentSupported(){return this.textModel.getValueLength()<=5e6}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.isDocumentSupported){if(!this.bracketPairsTree.value){const i=new W;this.bracketPairsTree.value=(e=i.add(new Cy(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))||[]}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))||[]}getBracketsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketsInRange(e))||[]}findMatchingBracketUp(e,t,i){const n=e.toLowerCase(),o=this.textModel.validatePosition(t),s=this.textModel.getLanguageIdAtPosition(o.lineNumber,o.column),r=this.languageConfigurationService.getLanguageConfiguration(s).brackets;if(!r)return null;const a=r.textIsBracket[n];return a?Ly(this._findMatchingBracketUp(a,o,ky(i))):null}matchBracket(e,t){const i=ky(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(ra(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(ra(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.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&&!ra(n.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,r,s),c=null;for(;;){const n=Gl.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 Dy)return null;c=i}}a=n.endColumn-1}if(c)return c}if(s>0&&n.getStartOffset(s)===e.column-1){const r=s-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!ra(n.getStandardTokenType(r))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,r),c=Gl.findPrevBracketInRange(a.reversedRegex,i,o,s,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){const e=o.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),i=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof Dy?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 Dy?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 Dy.INSTANCE;const c=Gl.findPrevBracketInRange(o,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?s++:e.isClose(d)&&s--,0===s)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this.textModel.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=o-1,l=s.length,c=s.length;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;r>=0;r--){const t=i.getLanguageId(r)===n&&!ra(i.getStandardTokenType(r));if(t)d?l=i.getStartOffset(r):(l=i.getStartOffset(r),c=i.getEndOffset(r));else if(d&&l!==c){const t=a(e,s,l,c);if(t)return t}d=t}if(d&&l!==c){const t=a(e,s,l,c);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 Dy.INSTANCE;const c=Gl.findNextBracketInRange(o,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?s++:e.isClose(d)&&s--,0===s)return c;a=c.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this.textModel.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=0,l=0,c=0;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;r=1;e--){const o=this.textModel.getLineTokens(e),s=o.getCount(),r=this.textModel.getLineContent(e);let a=s-1,l=r.length,c=r.length;if(e===t.lineNumber){a=o.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=o.getLanguageId(a);i!==e&&(i=e,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets)}let d=!0;for(;a>=0;a--){const t=o.getLanguageId(a);if(i!==t){if(n&&d&&l!==c){const t=Gl.findPrevBracketInRange(n.reversedRegex,e,r,l,c);if(t)return this._toFoundBracket(n,t);d=!1}i=t,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets}const s=!!n&&!ra(o.getStandardTokenType(a));if(s)d?l=o.getStartOffset(a):(l=o.getStartOffset(a),c=o.getEndOffset(a));else if(n&&d&&l!==c){const t=Gl.findPrevBracketInRange(n.reversedRegex,e,r,l,c);if(t)return this._toFoundBracket(n,t)}d=s}if(n&&d&&l!==c){const t=Gl.findPrevBracketInRange(n.reversedRegex,e,r,l,c);if(t)return this._toFoundBracket(n,t)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e),i=this.textModel.getLineCount();let n=null,o=null;for(let e=t.lineNumber;e<=i;e++){const i=this.textModel.getLineTokens(e),s=i.getCount(),r=this.textModel.getLineContent(e);let a=0,l=0,c=0;if(e===t.lineNumber){a=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=i.getLanguageId(a);n!==e&&(n=e,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets)}let d=!0;for(;a{if(!s.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(i&&++l%100==0&&!i())return Dy.INSTANCE;const a=Gl.findNextBracketInRange(e.forwardRegex,t,n,o,s);if(!a)break;const c=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),d=e.textIsBracket[c];if(d&&(d.isOpen(c)?r[d.index]++:d.isClose(c)&&r[d.index]--,-1===r[d.index]))return this._matchFoundBracket(a,d,!1,i);o=a.endColumn-1}return null};let d=null,h=null;for(let e=n.lineNumber;e<=o;e++){const t=this.textModel.getLineTokens(e),i=t.getCount(),o=this.textModel.getLineContent(e);let s=0,r=0,l=0;if(e===n.lineNumber){s=t.findTokenIndexAtOffset(n.column-1),r=n.column-1,l=n.column-1;const e=t.getLanguageId(s);d!==e&&(d=e,h=this.languageConfigurationService.getLanguageConfiguration(d).brackets,a(d,h))}let u=!0;for(;s!0;{const t=Date.now();return()=>Date.now()-t<=e}}class Dy{constructor(){this._searchCanceledBrand=void 0}}function Ly(e){return e instanceof Dy?null:e}Dy.INSTANCE=new Dy;class Ey extends B{constructor(e){super(),this.textModel=e,this.colorProvider=new Ny,this.onDidChangeEmitter=new Pe,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){if(void 0===t)return[];if(!this.colorizationOptions.enabled)return[];const n=new Array,o=this.textModel.bracketPairs.getBracketsInRange(e);for(const e of o)n.push({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e)},ownerId:0,range:e.range});return n}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new ia(1,1,this.textModel.getLineCount(),1),e,t):[]}}class Ny{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}function Iy(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}br(((e,t)=>{const i=[Bf,Vf,Hf,zf,jf,qf],n=new Ny;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(Kf)}; }`);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}; }`)}}));class Ty{constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}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}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${Iy(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${Iy(this.oldText)}")`:`(replace@${this.oldPosition} "${Iy(this.oldText)}" with "${Iy(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;Il(e,n,i),i+=4;for(let o=0;oe.length)return!1;if(i){if(!ls(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===n&&i--,e.charAt(i)===n}return t.charAt(t.length-1)!==n&&(t+=n),0===e.indexOf(t)}function Fy(e){return e>=65&&e<=90||e>=97&&e<=122}function Wy(e,t){return!!(void 0!==t?t:de)&&Fy(e.charCodeAt(0))&&58===e.charCodeAt(1)}function By(e){return Yi(e,!0)}class Vy{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:ts(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===tn.file)return Oy(By(e),By(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(Yy(e.authority,t.authority))return Oy(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return qi.joinPath(e,...t)}basenameOrAuthority(e){return qy(e)||e.authority}basename(e){return Ni.basename(e.path)}extname(e){return Ni.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===tn.file?t=qi.file(Ri(By(e))).path:(t=Ni.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===tn.file?qi.file(Ii(By(e))).path:Ni.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!Yy(e.authority,t.authority))return;if(e.scheme===tn.file){const i=Mi(By(e),By(t));return de?Py(i):i}let i=e.path||"/",n=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,n.length);eAy(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=Oi){return Xy(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=Oi){let i=!1;if(e.scheme===tn.file){const n=By(e);i=void 0!==n&&n.length===Ay(n).length&&n[n.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||Xy(e,t)?e:e.with({path:e.path+"/"})}}const Hy=new Vy((()=>!1)),zy=(new Vy((e=>e.scheme!==tn.file||!ue)),new Vy((e=>!0)),Hy.isEqual.bind(Hy)),jy=(Hy.isEqualOrParent.bind(Hy),Hy.getComparisonKey.bind(Hy),Hy.basenameOrAuthority.bind(Hy)),qy=Hy.basename.bind(Hy),Ky=Hy.extname.bind(Hy),Uy=Hy.dirname.bind(Hy),$y=Hy.joinPath.bind(Hy),Zy=Hy.normalizePath.bind(Hy),Gy=(Hy.relativePath.bind(Hy),Hy.resolvePath.bind(Hy)),Yy=(Hy.isAbsolutePath.bind(Hy),Hy.isEqualAuthority.bind(Hy)),Xy=Hy.hasTrailingPathSeparator.bind(Hy);var Jy;function Qy(e){return e.toString()}Hy.removeTrailingPathSeparator.bind(Hy),Hy.addTrailingPathSeparator.bind(Hy),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}}(Jy||(Jy={}));class eS{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}static create(e,t){const i=e.getAlternativeVersionId(),n=iS(e);return new eS(i,i,n,n,t,t,[])}append(e,t,i,n,o){var s,r;t.length>0&&(this.changes=(r=t,null===(s=this.changes)||0===s.length?r:new My(s,r).compress())),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(Il(e,t?t.length:0,i),i+=4,t)for(const n of t)Il(e,n.selectionStartLineNumber,i),i+=4,Il(e,n.selectionStartColumn,i),i+=4,Il(e,n.positionLineNumber,i),i+=4,Il(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=Nl(e,t);t+=4;for(let o=0;oe.toString())).join(", ")}matchesResource(e){return(qi.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 eS}append(e,t,i,n,o){this._data instanceof eS&&this._data.append(e,t,i,n,o)}close(){this._data instanceof eS&&(this._data=this._data.serialize())}open(){this._data instanceof eS||(this._data=eS.deserialize(this._data))}undo(){if(qi.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof eS&&(this._data=this._data.serialize());const e=eS.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(qi.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof eS&&(this._data=this._data.serialize());const e=eS.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof eS&&(this._data=this._data.serialize()),this._data.byteLength+168}}function iS(e){return"\n"===e.getEOL()?0:1}function nS(e){return!!e&&(e instanceof tS||e instanceof class{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=Qy(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}get resources(){return this._editStackElementsArr.map((e=>e.resource))}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=Qy(e);return this._editStackElementsMap.has(t)}setModel(e){const t=Qy(qi.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=Qy(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,o){const s=Qy(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=Qy(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${qy(t.resource)}: ${t}`);return`{${e.join(", ")}}`}})}class oS{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);nS(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);nS(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(nS(t)&&t.canAppend(this._model))return t;const i=new tS(this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],iS(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),s=oS._computeCursorState(i,o),r=o.map(((e,t)=>({index:t,textChange:e.textChange})));return r.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),n.append(this._model,r.map((e=>e.textChange)),iS(this._model),this._model.getAlternativeVersionId(),s),s}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return w(e),null}}}class sS{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function rS(e,t,i,n,o){let s;for(o.spacesDiff=0,o.looksLikeAlignment=!1,s=0;s0&&a>0)return;if(l>0&&c>0)return;const d=Math.abs(a-c),h=Math.abs(r-l);if(0===d)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?o++:m>1&&s++,rS(r,a,h,p,d),d.looksLikeAlignment&&(!i||t!==d.spacesDiff))continue;const _=d.spacesDiff;_<=8&&c[_]++,r=h,a=p}let h=i;o!==s&&(h=o{const i=c[t];i>e&&(e=i,u=t)})),4===u&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(u=2)}return{insertSpaces:h,tabSize:u}}function lS(e){return(1&e.metadata)>>>0}function cS(e,t){e.metadata=254&e.metadata|t<<0}function dS(e){return(2&e.metadata)>>>1==1}function hS(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function uS(e){return(4&e.metadata)>>>2==1}function gS(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function pS(e,t){e.metadata=231&e.metadata|t<<3}function mS(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class fS{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,cS(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,gS(this,!1),pS(this,1),mS(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,hS(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;gS(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),pS(this,this.options.stickiness),mS(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 _S=new fS(null,0,0);_S.parent=_S,_S.left=_S,_S.right=_S,cS(_S,0);class vS{constructor(){this.root=_S,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o){return this.root===_S?[]:function(e,t,i,n,o,s){let r=e.root,a=0,l=0,c=0,d=0;const h=[];let u=0;for(;r!==_S;)if(dS(r))hS(r.left,!1),hS(r.right,!1),r===r.parent.right&&(a-=r.parent.delta),r=r.parent;else{if(!dS(r.left)){if(l=a+r.maxEnd,li)hS(r,!0);else{if(d=a+r.end,d>=t){r.setCachedOffsets(c,d,s);let e=!0;n&&r.ownerId&&r.ownerId!==n&&(e=!1),o&&uS(r)&&(e=!1),e&&(h[u++]=r)}hS(r,!0),r.right===_S||dS(r.right)||(a+=r.delta,r=r.right)}}return hS(e.root,!1),h}(this,e,t,i,n,o)}search(e,t,i){return this.root===_S?[]:function(e,t,i,n){let o=e.root,s=0,r=0,a=0;const l=[];let c=0;for(;o!==_S;){if(dS(o)){hS(o.left,!1),hS(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),o=o.parent;continue}if(o.left!==_S&&!dS(o.left)){o=o.left;continue}r=s+o.start,a=s+o.end,o.setCachedOffsets(r,a,n);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&uS(o)&&(e=!1),e&&(l[c++]=o),hS(o,!0),o.right===_S||dS(o.right)||(s+=o.delta,o=o.right)}return hS(e.root,!1),l}(this,e,t,i)}collectNodesFromOwner(e){return function(e,t){let i=e.root;const n=[];let o=0;for(;i!==_S;)dS(i)?(hS(i.left,!1),hS(i.right,!1),i=i.parent):i.left===_S||dS(i.left)?(i.ownerId===t&&(n[o++]=i),hS(i,!0),i.right===_S||dS(i.right)||(i=i.right)):i=i.left;return hS(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const i=[];let n=0;for(;t!==_S;)dS(t)?(hS(t.left,!1),hS(t.right,!1),t=t.parent):t.left===_S||dS(t.left)?t.right===_S||dS(t.right)?(i[n++]=t,hS(t,!0)):t=t.right:t=t.left;return hS(e.root,!1),i}(this)}insert(e){wS(this,e),this._normalizeDeltaIfNecessary()}delete(e){yS(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 c=0;for(;n!==_S;)if(dS(n))hS(n.left,!1),hS(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!dS(n.left)){if(s=o+n.maxEnd,si?hS(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[c++]=n),hS(n,!0),n.right===_S||dS(n.right)||(o+=n.delta,n=n.right))}return hS(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),hS(o,!0)):(hS(o,!0),o.right===_S||dS(o.right)||(s+=o.delta,o=o.right))}hS(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let s=0,r=o.length;si)&&1!==n&&(2===n||t)}function CS(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,c=n,d=Math.min(l,c),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&&bS(h,r,t,e)&&(u=!0),!p&&bS(g,a,t,e)&&(p=!0)}if(d>0&&!o){const e=l>c?2:0;!u&&bS(h,r,t+d,e)&&(u=!0),!p&&bS(g,a,t+d,e)&&(p=!0)}{const n=o?1:0;!u&&bS(h,r,i,n)&&(e.start=t+c,u=!0),!p&&bS(g,a,i,n)&&(e.end=t+c,p=!0)}const m=c-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 wS(e,t){if(e.root===_S)return t.parent=_S,t.left=_S,t.right=_S,cS(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,c=n.end+i,(r===l?a-c:r-l)<0){if(n.left===_S){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===_S){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,c;t.parent=n,t.left=_S,t.right=_S,cS(t,1)}(e,t),ES(t.parent);let i=t;for(;i!==e.root&&1===lS(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===lS(t)?(cS(i.parent,0),cS(t,0),cS(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,xS(e,i)),cS(i.parent,0),cS(i.parent.parent,1),kS(e,i.parent.parent))}else{const t=i.parent.parent.left;1===lS(t)?(cS(i.parent,0),cS(t,0),cS(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,kS(e,i)),cS(i.parent,0),cS(i.parent.parent,1),xS(e,i.parent.parent))}return cS(e.root,0),t}function yS(e,t){let i,n;if(t.left===_S?(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===_S?(i=t.left,n=t):(n=function(e){for(;e.left!==_S;)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,cS(i,0),t.detach(),SS(),LS(i),void(e.root.parent=_S);const o=1===lS(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,cS(n,lS(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==_S&&(n.left.parent=n),n.right!==_S&&(n.right.parent=n)),t.detach(),o)return ES(i.parent),n!==t&&(ES(n),ES(n.parent)),void SS();let s;for(ES(i),ES(i.parent),n!==t&&(ES(n),ES(n.parent));i!==e.root&&0===lS(i);)i===i.parent.left?(s=i.parent.right,1===lS(s)&&(cS(s,0),cS(i.parent,1),xS(e,i.parent),s=i.parent.right),0===lS(s.left)&&0===lS(s.right)?(cS(s,1),i=i.parent):(0===lS(s.right)&&(cS(s.left,0),cS(s,1),kS(e,s),s=i.parent.right),cS(s,lS(i.parent)),cS(i.parent,0),cS(s.right,0),xS(e,i.parent),i=e.root)):(s=i.parent.left,1===lS(s)&&(cS(s,0),cS(i.parent,1),kS(e,i.parent),s=i.parent.left),0===lS(s.left)&&0===lS(s.right)?(cS(s,1),i=i.parent):(0===lS(s.left)&&(cS(s.right,0),cS(s,1),xS(e,s),s=i.parent.left),cS(s,lS(i.parent)),cS(i.parent,0),cS(s.left,0),kS(e,i.parent),i=e.root));cS(i,0),SS()}function SS(){_S.parent=_S,_S.delta=0,_S.start=0,_S.end=0}function xS(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!==_S&&(i.left.parent=t),i.parent=t.parent,t.parent===_S?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,LS(t),LS(i)}function kS(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!==_S&&(i.right.parent=t),i.parent=t.parent,t.parent===_S?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,LS(t),LS(i)}function DS(e){let t=e.end;if(e.left!==_S){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==_S){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function LS(e){e.maxEnd=DS(e)}function ES(e){for(;e!==_S;){const t=DS(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class NS{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!==IS)return TS(this.right);let e=this;for(;e.parent!==IS&&e.parent.left!==e;)e=e.parent;return e.parent===IS?IS:e.parent}prev(){if(this.left!==IS)return MS(this.left);let e=this;for(;e.parent!==IS&&e.parent.right!==e;)e=e.parent;return e.parent===IS?IS:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const IS=new NS(null,0);function TS(e){for(;e.left!==IS;)e=e.left;return e}function MS(e){for(;e.right!==IS;)e=e.right;return e}function RS(e){return e===IS?0:e.size_left+e.piece.length+RS(e.right)}function PS(e){return e===IS?0:e.lf_left+e.piece.lineFeedCnt+PS(e.right)}function AS(){IS.parent=IS}function OS(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!==IS&&(i.left.parent=t),i.parent=t.parent,t.parent===IS?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function FS(e,t){const i=t.left;t.left=i.right,i.right!==IS&&(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===IS?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function WS(e,t){let i,n;if(t.left===IS?(n=t,i=n.right):t.right===IS?(n=t,i=n.left):(n=TS(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),AS(),void(e.root.parent=IS);const o=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,HS(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,HS(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!==IS&&(n.left.parent=n),n.right!==IS&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,HS(e,n)),t.detach(),i.parent.left===i){const t=RS(i),n=PS(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,VS(e,i.parent,o,s)}}if(HS(e,i.parent),o)return void AS();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,OS(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,FS(e,s),s=i.parent.right),s.color=i.parent.color,i.parent.color=0,s.right.color=0,OS(e,i.parent),i=e.root)):(s=i.parent.left,1===s.color&&(s.color=0,i.parent.color=1,FS(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,OS(e,s),s=i.parent.left),s.color=i.parent.color,i.parent.color=0,s.left.color=0,FS(e,i.parent),i=e.root));i.color=0,AS()}function BS(e,t){for(HS(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&&OS(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,FS(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&&FS(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,OS(e,t.parent.parent))}e.root.color=0}function VS(e,t,i,n){for(;t!==e.root&&t!==IS;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function HS(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=RS((t=t.parent).left)-t.size_left,n=PS(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}}IS.parent=IS,IS.left=IS,IS.right=IS,IS.color=0;class zS{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=Go(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 ub(t,this.wordSeparators?Pa(this.wordSeparators):null,i?this.searchString:null)}}function jS(e,t,i){if(!i)return new db(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 KS{static findMatches(e,t,i,n,o){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,i,new $S(s.wordSeparators,s.regex),n,o):this._doFindMatchesLineByLine(e,i,s,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,s){let r,a,l=0;if(n?(l=n.findLineFeedCountBeforeOffset(o),r=t+o+l):r=t+o,n){const e=n.findLineFeedCountBeforeOffset(o+s.length)-l;a=r+s.length+e}else a=r+s.length;const c=e.getPositionAt(r),d=e.getPositionAt(a);return new ia(c.lineNumber,c.column,d.lineNumber,d.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 qS(r):null,l=[];let c,d=0;for(i.reset(0);c=i.next(r);)if(l[d++]=jS(this._getMultilineMatchRange(e,s,r,a,c.index,c[0]),c,n),d>=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=a))return o;return o}const c=new $S(e.wordSeparators,e.regex);let d;c.reset(0);do{if(d=c.next(t),d&&(s[o++]=jS(new ia(i,d.index+1+n,i,d.index+1+d[0].length+n),d,r),o>=a))return o}while(d);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new $S(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 Do(t.lineNumber,1),s=e.getOffsetAt(o),r=e.getLineCount(),a=e.getValueInRange(new ia(o.lineNumber,o.column,r,e.getLineMaxColumn(r)),1),l="\r\n"===e.getEOL()?new qS(a):null;i.reset(t.column-1);let c=i.next(a);return c?jS(this._getMultilineMatchRange(e,s,a,l,c.index,c[0]),c,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new Do(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?jS(new ia(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 $S(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 ia(1,1,t.lineNumber,t.column),i,n,9990);if(o.length>0)return o[o.length-1];const s=e.getLineCount();return t.lineNumber!==s||t.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new Do(s,e.getLineMaxColumn(s)),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=jS(new ia(i,o.index+1,i,o.index+1+o[0].length),o,n);return s}}function US(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 $S{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 n=i.index,o=i[0].length;if(n===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){ps(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=n,this._prevMatchLength=o,!this._wordSeparators||US(this._wordSeparators,e,t,n,o))return i}while(i);return null}}const ZS=65535;function GS(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class YS{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function XS(e,t=!0){const i=[0];let n=1;for(let t=0,o=e.length;t(e!==IS&&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 tx{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 ix{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new QS("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=IS,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=XS(e[t].buffer));const i=new JS(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 tx(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 QS(t,XS(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 ex(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==IS;)if(n.left!==IS&&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!==IS;)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=this.getOffsetAt(i+1,1);return new Do(i+1,n-e+1)}return new Do(i+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===IS){const t=this.getOffsetAt(i+1,1);return new Do(i+1,n-e-t+1)}t=t.right}return new Do(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!==IS;){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===IS)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,c=s.start.line,d=s.end.line;let h=l[c]+s.start.column;if(n&&(10===a.charCodeAt(h)&&(h++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(c===d)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[c+1]-this._EOLLength)):a.substring(h,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=c+1;ne+g,t.reset(0)):(_=h.buffer,v=e=>e,t.reset(g));do{if(m=t.next(_),m){if(v(m.index)>=p)return c;this.positionInBuffer(e,v(m.index)-u,f);const t=this.getLineFeedCnt(e.piece.bufferIndex,o,f),s=f.line===o.line?f.column-o.column+n:f.column+1,r=s+m[0].length;if(d[c++]=jS(new ia(i+t,s,i+t,r),m,a),v(m.index)+m[0].length>=p)return c;if(c>=l)return c}}while(m);return c}findMatchesLineByLine(e,t,i,n){const o=[];let s=0;const r=new $S(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 c=this.positionInBuffer(a.node,a.remainder);const d=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,c,d,t,i,n,s,o),o;let h=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,c,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,d=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[c.line+l],p=h===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(u,r,h,p,c,this.positionInBuffer(u,g-d),t,i,n,s,o),s>=n)return o;h+=l}const d=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const a=this.getLineContent(h).substring(d,e.endColumn-1);return s=this._findMatchesInLine(t,r,a,e.endLineNumber,d,s,o,i,n),o}if(s=this._findMatchesInLine(t,r,this.getLineContent(h).substr(d),h,d,s,o,i,n),s>=n)return o;h++,a=this.nodeAt2(h,1),u=a.node,c=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,c,d,t,i,n,s,o),o}_findMatchesInLine(e,t,i,n,o,s,r,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,d=i.length;let h=-a;for(;-1!==(h=i.indexOf(t,h+a));)if((!c||US(c,i,d,h,a))&&(r[s++]=new db(new ia(n,h+1+o,n,h+1+a+o),null),s>=l))return s;return s}let d;t.reset(0);do{if(d=t.next(i),d&&(r[s++]=jS(new ia(n,d.index+1+o,n,d.index+1+d[0].length+o),d,a),s>=l))return s}while(d);return s}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==IS){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 JS(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 JS(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 c=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=d))break;a=c+1}return i?(i.line=c,i.column=r-h,null):{line:c,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;tZS){const t=[];for(;e.length>ZS;){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,ZS),e=e.substring(ZS));const o=XS(n);t.push(new JS(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 QS(n,o))}const i=XS(e);return t.push(new JS(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 QS(e,i)),t}let t=this._buffers[0].buffer.length;const i=XS(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!==IS;){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!==IS;)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,c=r-o,d=i.length+c;e.piece=new JS(i.bufferIndex,i.start,s,a,d),VS(this,e,c,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),c=i.length+l;e.piece=new JS(i.bufferIndex,s,i.end,r,c),VS(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,c=this.getLineFeedCnt(n.bufferIndex,n.start,l),d=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new JS(n.bufferIndex,n.start,l,c,d),VS(this,e,d-r,c-a);const h=new JS(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=XS(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!==IS;)if(i.left!==IS&&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!==IS;){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===IS||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!==IS&&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 JS(e.piece.bufferIndex,e.piece.start,o,r,s),VS(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,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new JS(t.piece.bufferIndex,a,t.piece.end,c,l),VS(this,t,-1,-1),0===t.piece.length&&i.push(t);const d=this.createNewPieces("\r\n");this.rbInsertRight(e,d[0]);for(let e=0;ee.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=s;const u=this._doApplyEdits(a);let g=null;if(t&&d.length>0){d.sort(((e,t)=>t.lineNumber-e.lineNumber)),g=[];for(let e=0,t=d.length;e0&&d[e-1].lineNumber===t)continue;const i=d[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===Jo(n)&&g.push(t)}}return this._onDidChangeContent.fire(),new gb(h,u,g)}_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 ia(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(""),[c,d,h]=nx(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:c,firstLineLength:d,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(ox._sortOpsDescending);const t=[];for(let i=0;i0){const e=r.eolCount+1;c=1===e?new ia(a,l,a,l+r.firstLineLength):new ia(a,l,a+e-1,r.lastLineLength+1)}else c=new ia(a,l,a,l);i=c.endLineNumber,n=c.endColumn,t.push(c),o=r}return t}static _sortOpsAscending(e,t){const i=ia.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=ia.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class sx{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 YS(GS(e),n,o,s,r);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new QS(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=Cs(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=xs(e))}finish(e=!0){return this._finish(),new sx(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=XS(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}class ax{constructor(e,t){this._startLineNumber=e,this._tokens=t}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class lx{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new ax(e,[t]))}finalize(){return this._tokens}}class cx{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}delete(e,t){0===t||e>=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;e{const t=this._textModel.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&(this._resetTokenizationState(),this._textModel.clearTokens())}))),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(e){if(e.isFlush)this._resetTokenizationState();else{if(this._tokenizationStateStore)for(let t=0,i=e.changes.length;t{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._textModel.setTokens(t.finalize(),!this._hasLinesToTokenize())}tokenizeViewport(e,t){const i=new lx;this._tokenizeViewport(i,e,t),this._textModel.setTokens(i.finalize(),!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new lx;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.finalize(),!this._hasLinesToTokenize())}getTokenTypeIfInsertingCharacter(e,t){if(!this._tokenizationStateStore)return 0;this.forceTokenization(e.lineNumber);const i=this._tokenizationStateStore.getBeginState(e.lineNumber-1);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=ux(this._languageIdCodec,n,this._tokenizationStateStore.tokenizationSupport,s,!0,i),a=new dw(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;if(!this._tokenizationStateStore)return null;this.forceTokenization(n);const s=this._tokenizationStateStore.getBeginState(n-1);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),c=ux(this._languageIdCodec,l,this._tokenizationStateStore.tokenizationSupport,a,!0,s);return new dw(c.tokens,a,this._languageIdCodec)}isCheapToTokenize(e){if(!this._tokenizationStateStore)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e1&&e>=1;e--){const t=this._textModel.getLineFirstNonWhitespaceColumn(e);if(0!==t&&t=0;e--)a=ux(this._languageIdCodec,r,this._tokenizationStateStore.tokenizationSupport,o[e],!1,a).endState;for(let n=t;n<=i;n++){const t=this._textModel.getLineContent(n),i=ux(this._languageIdCodec,r,this._tokenizationStateStore.tokenizationSupport,t,!0,a);e.add(n,i.tokens),this._tokenizationStateStore.markMustBeTokenized(n-1),a=i.endState}}}function ux(e,t,i,n,o,s){let r=null;if(i)try{r=i.tokenizeEncoded(n,o,s.clone())}catch(e){w(e)}return r||(r=pw(e.encodeLanguageId(t),s)),dw.convertToEndOffset(r.tokens,n.length),r}const gx=new Uint32Array(0).buffer;class px{static deleteBeginning(e,t){return null===e||e===gx?e:px.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===gx)return e;const i=mx(e),n=i[i.length-2];return px.delete(e,t,n)}static delete(e,t,i){if(null===e||e===gx||t===i)return e;const n=mx(e),o=n.length>>>1;if(0===t&&n[n.length-2]===i)return gx;const s=dw.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 d=new Uint32Array(a);return d.set(n.subarray(0,a),0),d.buffer}static append(e,t){if(t===gx)return e;if(e===gx)return t;if(null===e)return e;if(null===t)return null;const i=mx(e),n=mx(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=dw.findIndexInTokensArray(n,t);s>0&&n[s-1<<1]===t&&s--;for(let e=s;e1&&(t=__.getLanguageId(n[1])!==e),!t)return gx}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=_x(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]=px.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=px.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=px.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=px.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=px.insert(this._lineTokens[n],e.column-1,i))}}function _x(e){return(16384|e<<0|2<<23)>>>0}class vx{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 n=null;for(let e=0,t=this._pieces.length;ei.endLineNumber){n=n||{index:e};break}if(o.removeTokens(i),o.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(o.endLineNumberi.endLineNumber){n=n||{index:e};continue}const[s,r]=o.split(i);s.isEmpty()?n=n||{index:e}:r.isEmpty()||(this._pieces.splice(e,1,s,r),e++,t++,n=n||{index:e})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=hl(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){const i=this._pieces;if(0===i.length)return t;const n=i[vx._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const o=t.getCount(),s=n.getCount();let r=0;const a=[];let l=0,c=0;const d=(e,t)=>{e!==c&&(c=e,a[l++]=e,a[l++]=t)};for(let e=0;e>>0,c=~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)}}const bx=xo("undoRedoService");class Cx{constructor(e,t){this.resource=e,this.elements=t}}class wx{constructor(){this.id=wx._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}wx._ID=0,wx.None=new wx;class yx{constructor(){this.id=yx._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}yx._ID=0,yx.None=new yx;var Sx=function(e,t){return function(i,n){t(i,n,e)}};function xx(e,t){return("string"==typeof e?function(e){const t=new rx;return t.acceptChunk(e),t.finish()}(e):e).create(t)}let kx=0;class Dx{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 Lx=()=>{throw new Error("Invalid change accessor")};let Ex=class e extends B{constructor(t,i,n,o=null,s,r,a){super(),this._undoRedoService=s,this._languageService=r,this._languageConfigurationService=a,this._onWillDispose=this._register(new Pe),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Vx((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new Pe),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new Pe),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new Pe),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new Pe),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new Pe),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new Pe),this._eventEmitter=this._register(new Hx),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new Pe),kx++,this.id="$model"+kx,this.isForSimpleWidget=n.isForSimpleWidget,this._associatedResource=null==o?qi.parse("inmemory://model/"+kx):o,this._attachedEditorCount=0;const{textBuffer:l,disposable:c}=xx(t,n.defaultEOL);this._buffer=l,this._bufferDisposable=c,this._options=e.resolveOptions(this._buffer,n);const d=this._buffer.getLineCount(),h=this._buffer.getValueLengthInRange(new ia(1,1,d,this._buffer.getLineLength(d)+1),0);n.largeFileOptimizations?this._isTooLargeForTokenization=h>e.LARGE_FILE_SIZE_THRESHOLD||d>e.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=h>e.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageId=i,this._languageRegistryListener=this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._instanceId=Ns(kx),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Tx,this._commandManager=new oS(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new fx(this._languageService.languageIdCodec),this._semanticTokens=new vx(this._languageService.languageIdCodec),this._tokenization=new hx(this,this._languageService.languageIdCodec),this._bracketPairColorizer=this._register(new xy(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new Dv(this,this._languageConfigurationService)),this._decorationProvider=this._register(new Ey(this)),this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})))}static resolveOptions(e,t){if(t.detectIndentation){const i=aS(e,t.tabSize,t.insertSpaces);return new cb({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new cb({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return O(this._eventEmitter.fastEvent((t=>e(t.rawContentChangedEvent))),this._onDidChangeInjectedText.event((t=>e(t))))}get bracketPairs(){return this._bracketPairColorizer}get guides(){return this._guidesTextModelPart}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(2===this._backgroundTokenizationState)return;const t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this._bracketPairColorizer.handleDidChangeBackgroundTokenizationState(),this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new ox([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=B.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._isDisposing||(this._bracketPairColorizer.handleDidChangeContent(t),this._tokenization.handleDidChangeContent(t),this._eventEmitter.fire(new mC(e,t)))}setValue(e){if(this._assertNotDisposed(),null===e)return;const{textBuffer:t,disposable:i}=xx(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,s,r){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),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._tokens.flush(),this._semanticTokens.flush(),this._decorations=Object.create(null),this._decorationsTree=new Tx,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new gC([new aC],this._versionId,!1,!1),this._createContentChanged2(new ia(1,1,o,s),0,n,this.getValue(),!1,!1,!0))}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 gC([new uC],this._versionId,!1,!1),this._createContentChanged2(new ia(1,1,o,s),0,n,this.getValue(),!1,!1,!1))}_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}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.indentSize,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 cb({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._bracketPairColorizer.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=aS(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),la(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(Ss.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){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new Dx(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 Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),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 Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("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),c=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return i===o&&n===s&&r===l&&a===c&&e instanceof ia&&!(e instanceof na)?e:new ia(o,s,l,c)}_isValidPosition(e,t,i){return"number"==typeof e&&"number"==typeof t&&(!isNaN(e)&&!isNaN(t)&&(!(e<1||t<1)&&((0|e)===e&&(0|t)===t&&(!(e>this._buffer.getLineCount())&&(1===t||!(t>this.getLineMaxColumn(e))&&(1!==i||!hs(this._buffer.getLineCharCode(e,t-2))))))))}_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 Do(1,1);if(n>s)return new Do(s,this.getLineMaxColumn(s));if(o<=1)return new Do(n,1);const r=this.getLineMaxColumn(n);return o>=r?new Do(n,r):1===i&&hs(this._buffer.getLineCharCode(n,o-2))?new Do(n,o-1):new Do(n,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof Do&&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=hs(e),a=hs(t);return!r&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof ia&&!(e instanceof na)&&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=hs(e),a=hs(t);return i||a?n===s&&o===r?new ia(n,o-1,s,r-1):i&&a?new ia(n,o-1,s,r+1):i?new ia(n,o-1,s,r):new ia(n,o,s,r+1):new ia(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 ia(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=>ia.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 c;if(l.push(a.reduce(((e,t)=>ia.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new zS(e,i,n,o).parseSearchRequest();if(!t)return[];c=e=>this.findMatchesLineByLine(e,t,s,r)}else c=t=>KS.findMatches(this,new zS(e,i,n,o),t,s,r);return l.map(c).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 zS(e,i,n,o).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new ia(r.lineNumber,r.column,a,this.getLineMaxColumn(a)),c=this.findMatchesLineByLine(l,t,s,1);return KS.findNextMatch(this,new zS(e,i,n,o),r,s),c.length>0?c[0]:(l=new ia(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),c=this.findMatchesLineByLine(l,t,s,1),c.length>0?c[0]:null)}return KS.findNextMatch(this,new zS(e,i,n,o),r,s)}findPreviousMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);return KS.findPreviousMatch(this,new zS(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 hb?e:new hb(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 ia(n,1,n,o);t.push(new hb(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)}_applyUndo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new ia(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 ia(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(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),s=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,0!==s.length){for(let e=0,t=s.length;e0?t.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(t.rangeOffset,t.rangeLength,t.text.length,t.forceMoveMarkers)}const e=[];this._increaseVersionId();let t=i;for(let i=0,n=s.length;i=0;t--){const i=a+t,n=g+t;v.takeFromEndWhile((e=>e.lineNumber>n));const o=v.takeFromEndWhile((e=>e.lineNumber===n));e.push(new cC(i,this.getLineContent(n),o))}if(he.lineNumbere.lineNumber===t))}e.push(new hC(n+1,a+d,c,l))}t+=u}this._emitContentChangedEvent(new gC(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===n.reverseEdits?void 0:n.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=[...e].map((e=>new cC(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new pC(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,Bx(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){w(e)}return i.addDecoration=Lx,i.changeDecoration=Lx,i.changeDecorationOptions=Lx,i.removeDecoration=Lx,i.deltaDecorations=Lx,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_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:Wx[i]}])[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(Wx[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,n=!1){const o=this.getLineCount(),s=Math.min(o,Math.max(1,e)),r=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(r),l=new ia(s,1,r,a),c=this._getDecorationsInRange(l,i,n);return c.push(...this._decorationProvider.getDecorationsInRange(l,i,n)),c}getDecorationsInRange(e,t=0,i=!1){const n=this.validateRange(e),o=this._getDecorationsInRange(n,t,i);return o.push(...this._decorationProvider.getDecorationsInRange(n,t,i)),o}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}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 lC.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,n,o,t,i)}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)}n!==o?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){const n=this.getVersionId(),o=t.length;let s=0;const r=i.length;let a=0;const l=new Array(r);for(;s0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||(this._bracketPairColorizer.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),i=this._tokens.getTokens(this._languageId,e-1,t);return this._semanticTokens.addSparseTokens(e,i)}getLanguageId(){return this._languageId}setMode(e){if(this._languageId===e)return;const t={oldLanguage:this._languageId,newLanguage:e};this._languageId=e,this._bracketPairColorizer.handleDidChangeLanguage(t),this._tokenization.handleDidChangeLanguage(t),this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const i=this.validatePosition(new Do(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}getTokenTypeIfInsertingCharacter(e,t,i){const n=this.validatePosition(new Do(e,t));return this._tokenization.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){const n=this.validatePosition(e);return this._tokenization.tokenizeLineWithEdit(n,t,i)}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}getWordAtPosition(t){this._assertNotDisposed();const i=this.validatePosition(t),n=this.getLineContent(i.lineNumber),o=this._getLineTokens(i.lineNumber),s=o.findTokenIndexAtOffset(i.column-1),[r,a]=e._findLanguageBoundaries(o,s),l=qa(i.column,this.getLanguageConfiguration(o.getLanguageId(s)).getWordDefinition(),n.substring(r,a),r);if(l&&l.startColumn<=t.column&&t.column<=l.endColumn)return l;if(s>0&&r===i.column-1){const[r,a]=e._findLanguageBoundaries(o,s-1),l=qa(i.column,this.getLanguageConfiguration(o.getLanguageId(s-1)).getWordDefinition(),n.substring(r,a),r);if(l&&l.startColumn<=t.column&&t.column<=l.endColumn)return l}return null}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=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}([Sx(4,bx),Sx(5,rc),Sx(6,gc)],Ex);class Tx{constructor(){this._decorationsTree0=new vS,this._decorationsTree1=new vS,this._injectedTextDecorationsTree=new vS}ensureAllNodesHaveRanges(e){this.getAll(e,0,!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){const s=e.getVersionId(),r=this._intervalSearch(t,i,n,o,s);return this._ensureNodesHaveRanges(e,r)}_intervalSearch(e,t,i,n,o){const s=this._decorationsTree0.intervalSearch(e,t,i,n,o),r=this._decorationsTree1.intervalSearch(e,t,i,n,o),a=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,o);return s.concat(r).concat(a)}getInjectedTextInInterval(e,t,i,n){const o=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,o);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);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n){const o=e.getVersionId(),s=this._search(t,i,n,o);return this._ensureNodesHaveRanges(e,s)}_search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{const i=this._decorationsTree0.search(e,t,n),o=this._decorationsTree1.search(e,t,n),s=this._injectedTextDecorationsTree.search(e,t,n);return i.concat(o).concat(s)}}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){Ix(e)?this._injectedTextDecorationsTree.insert(e):Nx(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Ix(e)?this._injectedTextDecorationsTree.delete(e):Nx(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){Ix(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Nx(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 Mx(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class Rx{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Px extends Rx{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:rb.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 Ax extends Rx{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?vh.fromHex(e):t.getColor(e.id)}}class Ox{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}static from(e){return e instanceof Ox?e:new Ox(e)}}class Fx{constructor(e){var t,i;this.description=e.description,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?Mx(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Px(e.overviewRuler):null,this.minimap=e.minimap?new Ax(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?Mx(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?Mx(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?Mx(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?Mx(e.marginClassName):null,this.inlineClassName=e.inlineClassName?Mx(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?Mx(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?Mx(e.afterContentClassName):null,this.after=e.after?Ox.from(e.after):null,this.before=e.before?Ox.from(e.before):null,this.hideInCommentTokens=null!==(t=e.hideInCommentTokens)&&void 0!==t&&t,this.hideInStringTokens=null!==(i=e.hideInStringTokens)&&void 0!==i&&i}static register(e){return new Fx(e)}static createDynamic(e){return new Fx(e)}}Fx.EMPTY=Fx.register({description:"empty"});const Wx=[Fx.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Fx.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Fx.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Fx.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Bx(e){return e instanceof Fx?e:Fx.createDynamic(e)}class Vx extends B{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new Pe),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;if(this._deferredCnt--,0===this._deferredCnt){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(e)}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){this._affectsMinimap||(this._affectsMinimap=!(!e.minimap||!e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!(!e.overviewRuler||!e.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class Hx extends B{constructor(){super(),this._fastEmitter=this._register(new Pe),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new Pe),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))}}function zx(e,t){return null===e?t?qx.INSTANCE:Kx.INSTANCE:new jx(e,t)}class jx{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 lC(0,0,e+1,this._projectionData.injectionOptions[t],0)));s=lC.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=$x(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,c=a.injectionOptions;let d,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(d-o,0),l=t+Math.min(h-o,s);r!==l&&n.push(new Xv(r,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(h<=s))break;e+=r,t++}}}d=l?e.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:c[t].content,tokenMetadata:dw.defaultTokenMetadata})))):e.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=$x(n.wrappedTextIndentLength)+l);const c=this._projectionData.getMinOutputOffset(i)+1,d=l.length+1,h=i+1=Ux.length)for(let t=1;t<=e;t++)Ux[t]=Zx(t);return Ux[e]}function Zx(e){return new Array(e+1).join(" ")}class Gx{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Ia(e);const i=this.values,n=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(i.length+o),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+o),this.values.set(t,e),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Ia(e),t=Ia(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;const o=i.length-e;return t>=o&&(t=o),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=Ia(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 Xx(n,e-s)}}class Yx{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 Xx(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=hl(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;nt.lineNumber===e+1));s.addRequest(i[e],n,t?t[e]:null)}const a=s.finalize(),l=[],c=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(ia.compareRangesUsingStarts);let d=1,h=0,u=-1,g=u+1=d&&t<=h,n=zx(a[e],!i);l[e]=n.getViewLineCount(),this.modelLineProjections[e]=n}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new Yx(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=e.map((e=>this.model.validateRange(e))),i=function(e){if(0===e.length)return[];const t=e.slice();t.sort(ia.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,o=t[0].endLineNumber;for(let e=1,s=t.length;eo+1?(i.push(new ia(n,1,o,1)),n=s.startLineNumber,o=s.endLineNumber):s.endLineNumber>o&&(o=s.endLineNumber)}return i.push(new ia(n,1,o,1)),i}(t),n=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(ia.compareRangesUsingStarts);if(i.length===n.length){let e=!1;for(let t=0;t({range:e,options:Fx.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,o);const s=i;let r=1,a=0,l=-1,c=l+1=r&&t<=a?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){const o=this.fontInfo.equals(e),s=this.wrappingStrategy===t,r=this.wrappingColumn===i,a=this.wrappingIndent===n;if(o&&s&&r&&a)return!1;const l=o&&s&&!r&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let c=null;if(l){c=[];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,c=l+r-1,u=c+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 Qx(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(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 Do(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 Do(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;te.horizontalLine?new xv(e.visibleColumn,e.className,new kv(e.horizontalLine.top,this.convertModelPositionToViewPosition(n.modelLineNumber,e.horizontalLine.endColumn).column)):e)),s.push(i)}}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 c=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 d=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,o)&&(d=0===n?1:2),s.push(l),r.push(d),null===c&&(c=new Do(e+1,0))}else null!==c&&(o=o.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,e)),c=null)}null!==c&&(o=o.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const d=t-e+1,h=new Array(d);let u=0;for(let e=0,t=o.length;et&&(h=!0,d=t-o+1),l.getViewLinesData(this.model,n+1,c,d,o-e,i,a),o+=d,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 c=r.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new Do(o+1,c)).equals(i)?new Do(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 ia(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 Do(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new ia(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2){const n=this.model.validatePosition(new Do(e,t)),o=n.lineNumber,s=n.column;let r=o-1,a=!1;for(;r>0&&!this.modelLineProjections[r].isVisible();)r--,a=!0;if(0===r&&!this.modelLineProjections[r].isVisible())return new Do(1,1);const l=1+this.projectedModelLineLineCounts.getPrefixSum(r);let c;return c=a?this.modelLineProjections[r].getViewPositionOfModelPosition(l,this.model.getLineMaxColumn(r+1),i):this.modelLineProjections[o-1].getViewPositionOfModelPosition(l,s,i),c}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return ia.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new ia(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){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),o=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(o.lineNumber-n.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new ia(n.lineNumber,1,o.lineNumber,o.column),t,i);let s=[];const r=n.lineNumber-1,a=o.lineNumber-1;let l=null;for(let e=r;e<=a;e++)if(this.modelLineProjections[e].isVisible())null===l&&(l=new Do(e+1,e===r?n.column:1));else if(null!==l){const n=this.model.getLineMaxColumn(e);s=s.concat(this.model.getDecorationsInRange(new ia(l.lineNumber,l.column,e,n),t,i)),l=null}null!==l&&(s=s.concat(this.model.getDecorationsInRange(new ia(l.lineNumber,l.column,o.lineNumber,o.column),t,i)),l=null),s.sort(((e,t)=>{const i=ia.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));let c=[],d=0,h=null;for(const e of s){const t=e.id;h!==t&&(h=t,c[d++]=e)}return c}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 Qx{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class ek{constructor(e,t){this.modelRange=e,this.viewLines=t}}class tk{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){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}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 ik{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new nk(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 DC(t,i)}onModelLinesInserted(e,t,i,n){return new LC(t,i)}onModelLineChanged(e,t,i){return[!1,new kC(t,t),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}}class ok extends B{constructor(e,t,i,n,o,s,r,a){if(super(),this.languageConfigurationService=r,this._themeService=a,this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new PC,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new ua(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new ri((()=>this.tokenizeViewport()),50)),this._updateConfigurationViewLineCount=this._register(new ri((()=>this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,this.model.isTooLargeForTokenization())this._lines=new ik(this.model);else{const e=this._configuration.options,t=e.get(44),i=e.get(125),s=e.get(132),r=e.get(124);this._lines=new Jx(this._editorId,this.model,n,o,t,this.model.getOptions().tabSize,i,s.wrappingColumn,r)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new zC(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new Sw(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new NC(e)),this._eventDispatcher.emitOutgoingEvent(new WC(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 xw(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(Kv.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new MC)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new IC(e))}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),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())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=new ia(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber)),i=this._toModelVisibleRanges(t);for(const e of i)this.model.tokenizeViewport(e.startLineNumber,e.endLineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new yC(e)),this._eventDispatcher.emitOutgoingEvent(new FC(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new fC)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new _C)}_onConfigurationChanged(e,t){let i=null;if(-1!==this._viewportStartLine){const e=new Do(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let n=!1;const o=this._configuration.options,s=o.get(44),r=o.get(125),a=o.get(132),l=o.get(124);if(this._lines.setWrappingSettings(s,r,a.wrappingColumn,l)&&(e.emitViewEvent(new wC),e.emitViewEvent(new xC),e.emitViewEvent(new CC(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(81)&&(this._decorations.reset(),e.emitViewEvent(new CC(null))),e.emitViewEvent(new vC(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const e=this.coordinatesConverter.convertModelPositionToViewPosition(i),t=this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:t+this._viewportStartLineDelta},1)}ua.shouldRecreate(t)&&(this.cursorConfig=new ua(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.changes,s=e instanceof gC?e.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 Cl(a);for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new wC),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,c]=this._lines.onModelLineChanged(s,e.lineNumber,i);n=o,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),c&&(t.emitViewEvent(c),this.viewLayout.onLinesDeleted(c.fromLineNumber,c.toLineNumber));break}}null!==s&&this._lines.acceptVersionId(s),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new xC),t.emitViewEvent(new CC(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._tokenizeViewportSoon.schedule()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new SC),this.cursorConfig=new ua(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new ua(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new wC),e.emitViewEvent(new xC),e.emitViewEvent(new CC(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new ua(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new CC(e))})))}setHiddenAreas(e){let t=!1;try{const i=this._eventDispatcher.beginEmitViewEvents();t=this._lines.setHiddenAreas(e),t&&(i.emitViewEvent(new wC),i.emitViewEvent(new xC),i.emitViewEvent(new CC(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),t&&this._eventDispatcher.emitOutgoingEvent(new BC)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(131),t=this._configuration.options.get(59),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 ia(o,this.getLineMinColumn(o),s,this.getLineMaxColumn(s)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_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||(se.toInlineDecoration(t)))]),new Gv(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,i,n,s.tokens,r,o,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new $v(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,Ed(this._configuration.options)),i=new sk;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;e&&e.invalidateCachedColor();const i=t.options.minimap;i&&i.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}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(ia.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===cw)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 ia(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(44),s=this._getColorMap();let r;return/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===Bd.fontFamily?r=Bd.fontFamily:(r=o.fontFamily,r=r.replace(/"/g,"'"),/[,']/.test(r)||/[+ ]/.test(r)&&(r=`'${r}'`),r=`${r}, ${Bd.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.getLineTokens(e),c=l.getLineContent(),d=e===i?n-1:0,h=e===o?s-1:c.length;a+=""===c?"
":fw(c,l.inflate(),t,d,h,r,de)}return a}_getColorMap(){const e=y_.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 HC):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._cursor.setIsDoingComposition(!1),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 ia(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new EC(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new ia(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new EC(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,o){this._withViewEventsCollector((s=>s.emitViewEvent(new EC(e,!1,i,null,n,t,o))))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new RC),this._eventDispatcher.emitOutgoingEvent(new BC))}_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 sk{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 Qv(e,t,[o,i,n]);this._asMap[e]=s,this.asArray.push(s)}}}class rk{constructor(...e){this._entries=new Map;for(let[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)}}var ak;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(ak||(ak={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(o){return o?as(t,o)?e.Error:as(i,o)||as("warn",o)?e.Warning:as(n,o)?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"}}}(ak||(ak={}));const lk=ak;var ck=lk;const dk=xo("notificationService");class hk{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 pk(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 pk(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&&uk(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(gk(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!uk(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!gk(this.injectionOptions[t].cursorStops));)t--;return e}}if(1===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}pt()}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 uk(e){return null==e||e===lb.Right||e===lb.Both}function gk(e){return null==e||e===lb.Left||e===lb.Both}class pk{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new Do(e+this.outputLineIndex,this.outputOffset+1)}}class mk{constructor(e,t){this.classifier=new fk(e,t)}static create(e){return new mk(e.get(120),e.get(119))}createLineBreaksComputer(e,t,i,n){const o=[],s=[],r=[];return{addRequest:(e,t,i)=>{o.push(e),s.push(t),r.push(i)},finalize:()=>{const a=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,l=[];for(let e=0,c=o.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 _k=[],vk=[];function bk(e,t,i,n,o,s,r){if(-1===o)return null;const a=i.length;if(a<=1)return null;const l=t.breakOffsets,c=t.breakOffsetsVisibleColumn,d=xk(i,n,o,s,r),h=o-d,u=_k,g=vk;let p=0,m=0,f=0,_=o;const v=l.length;let b=0;if(b>=0){let e=Math.abs(c[b]-_);for(;b+1=e)break;e=t,b++}}for(;bt&&(t=m,o=f);let r=0,d=0,C=0,w=0;if(o<=_){let f=o,v=0===t?0:i.charCodeAt(t-1),b=0===t?0:e.get(v),y=!0;for(let o=t;om&&Sk(0,b,a,l)&&(r=t,d=f),f+=c,f>_){t>m?(C=t,w=f-c):(C=o+1,w=f),f-d>h&&(r=0),y=!1;break}v=a,b=l}if(y){p>0&&(u[p]=l[l.length-1],g[p]=c[l.length-1],p++);break}}if(0===r){let a=o,l=i.charCodeAt(t),c=e.get(l),u=!1;for(let n=t-1;n>=m;n--){const t=n+1,o=i.charCodeAt(n);if(9===o){u=!0;break}let g,p;if(us(o)?(n--,g=0,p=2):(g=e.get(o),p=ks(o)?s:1),a<=_){if(0===C&&(C=t,w=a),a<=_-h)break;if(Sk(0,g,l,c)){r=t,d=a;break}}a-=p,l=o,c=g}if(0!==r){const e=h-(w-d);if(e<=n){const t=i.charCodeAt(C);let o;o=hs(t)?2:wk(t,w,n,s),e-o<0&&(r=0)}}if(u){b--;continue}}if(0===r&&(r=C,d=w),r<=m){const e=i.charCodeAt(m);hs(e)?(r=m+2,d=f+2):(r=m+1,d=f+wk(e,f,n,s))}for(m=r,u[p]=r,f=d,g[p]=d,p++,_=d+h;b<0||b=y)break;y=e,b++}}return 0===p?null:(u.length=p,g.length=p,_k=t.breakOffsets,vk=t.breakOffsetsVisibleColumn,t.breakOffsets=u,t.breakOffsetsVisibleColumn=g,t.wrappedTextIndentLength=d,t)}function Ck(e,t,i,n,o,s,r){const a=lC.applyInjectedText(t,i);let l,c;if(i&&i.length>0?(l=i.map((e=>e.options)),c=i.map((e=>e.column-1))):(l=null,c=null),-1===o)return l?new hk(c,l,[a.length],[],0):null;const d=a.length;if(d<=1)return l?new hk(c,l,[a.length],[],0):null;const h=xk(a,n,o,s,r),u=o-h,g=[],p=[];let m=0,f=0,_=0,v=o,b=a.charCodeAt(0),C=e.get(b),w=wk(b,0,n,s),y=1;hs(b)&&(w+=1,b=a.charCodeAt(1),C=e.get(b),y++);for(let t=y;tv&&((0===f||w-_>u)&&(f=i,_=w-l),g[m]=f,p[m]=_,m++,v=_+u,f=0),b=o,C=r}return 0!==m||i&&0!==i.length?(g[m]=d,p[m]=w,new hk(c,l,g,p,h)):null}function wk(e,t,i,n){return 9===e?i-t%i:ks(e)||e<32?n:1}function yk(e,t){return t-e%t}function Sk(e,t,i,n){return 32!==i&&(2===t||3===t&&2!==n||1===n||3===n&&1!==t)}function xk(e,t,i,n,o){let s=0;if(0!==o){const r=Jo(e);if(-1!==r){for(let i=0;ii&&(s=0)}}return s}var kk;const Dk=null===(kk=window.trustedTypes)||void 0===kk?void 0:kk.createPolicy("domLineBreaksComputer",{createHTML:e=>e});class Lk{static create(){return new Lk}constructor(){}createLineBreaksComputer(e,t,i,n){const o=[],s=[];return{addRequest:(e,t,i)=>{o.push(e),s.push(t)},finalize:()=>function(e,t,i,n,o,s){var r;function a(t){const i=s[t];if(i){const n=lC.applyInjectedText(e[t],i),o=i.map((e=>e.options)),s=i.map((e=>e.column-1));return new hk(s,o,[n.length],[],0)}return null}if(-1===n){const t=[];for(let i=0,n=e.length;il?(a=0,c=0):d=l-e}const u=r.substr(a),b=Ek(u,c,i,d,g,h);p[n]=a,m[n]=c,f[n]=u,_[n]=b[0],v[n]=b[1]}const b=g.build(),C=null!==(r=null==Dk?void 0:Dk.createHTML(b))&&void 0!==r?r:b;u.innerHTML=C,u.style.position="absolute",u.style.top="10000",u.style.wordWrap="break-word",document.body.appendChild(u);const w=document.createRange(),y=Array.prototype.slice.call(u.children,0),S=[];for(let t=0;te.options)),c=h.map((e=>e.column-1))):(l=null,c=null),S[t]=new hk(c,l,e,r,n)}return document.body.removeChild(u),S}(o,e,t,i,n,s)}}}function Ek(e,t,i,n,o,s){if(0!==s){const e=String(s);o.appendASCIIString('
');const r=e.length;let a=t,l=0;const c=[],d=[];let h=0");for(let t=0;t"),c[t]=l,d[t]=a;const n=h;h=t+1"),c[e.length]=l,d[e.length]=a,o.appendASCIIString("
"),[c,d]}function Nk(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),s=[];try{Ik(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 Ik(e,t,i,n,o,s,r,a){if(n===s)return;if(o=o||Tk(e,t,i[n],i[n+1]),r=r||Tk(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,c=Tk(e,t,i[l],i[l+1]);Ik(e,t,i,n,o,l,c,a),Ik(e,t,i,l,c,s,r,a)}function Tk(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()}const Mk=xo("ILanguageFeaturesService");var Rk=function(e,t){return function(i,n){t(i,n,e)}};let Pk=0;class Ak{constructor(e,t,i,n,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=o}dispose(){A(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Ok=class e extends B{constructor(e,t,i,n,o,s,r,a,l,c,d,h){super(),this.languageConfigurationService=d,this._onDidDispose=this._register(new Pe),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new Pe),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new Pe),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new Pe),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new Pe),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new Pe),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new Pe),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new Pe),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new Pe),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new Pe),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new Pe),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new Pe),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new Fk),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new Fk),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new Pe),this.onWillType=this._onWillType.event,this._onDidType=this._register(new Pe),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new Pe),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new Pe),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new Pe),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new Pe),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new Pe),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new Pe),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new Pe),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new Pe),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new Pe),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new Pe),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new Pe),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new Pe),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new Pe),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new Pe),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new Pe),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new Pe),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new Pe),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new Pe),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._bannerDomNode=null;const u=Object.assign({},t);let g;this._domElement=e,this._overflowWidgetsDomNode=u.overflowWidgetsDomNode,delete u.overflowWidgetsDomNode,this._id=++Pk,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,u,c)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(131)){const e=t.get(131);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(r.createScoped(this._domElement)),this._notificationService=l,this._codeEditorService=o,this._commandService=s,this._themeService=a,this._register(new Wk(this,this._contextKeyService)),this._register(new Bk(this,this._contextKeyService,h)),this._instantiationService=n.createChild(new rk([or,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new Vk(e),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},g=Array.isArray(i.contributions)?i.contributions:Yr.getEditorContributions();for(const e of g)if(this._contributions[e.id])w(new Error(`Cannot have two contributions with the same id ${e.id}`));else try{const t=this._instantiationService.createInstance(e.ctor,this);this._contributions[e.id]=t}catch(e){w(e)}Yr.getEditorActions().forEach((e=>{if(this._actions[e.id])return void w(new Error(`Cannot have two actions with the same id ${e.id}`));const t=new KC(e.id,e.label,e.alias,gt(e.precondition),(()=>this._instantiationService.invokeFunction((t=>Promise.resolve(e.runEditorCommand(t,this,null))))),this._contextKeyService);this._actions[t.id]=t})),this._codeEditorService.addCodeEditor(this)}get isSimpleWidget(){return this._configuration.isSimpleWidget}_createConfiguration(e,t,i){return new nh(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return UC.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;tia.lift(e))))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return aa.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(!Do.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(!ia.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 ia(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(!Do.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new ia(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=na.isISelection(e),n=ia.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 na(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 ia(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(!ia.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(ia.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]);const i=t.contributionsState||{},n=Object.keys(this._contributions);for(let e=0,t=n.length;ee.isSupported())),e}getAction(e){return this._actions[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()).then(void 0,w):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.getSelection().getStartPosition();this._modelData.viewModel.paste(t,i,n,e);const r=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new ia(s.lineNumber,s.column,r.lineNumber,r.column),languageId:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=Yr.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,w)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&!this._configuration.options.get(81)&&(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!!this._modelData&&!this._configuration.options.get(81)&&(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(81))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)}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,Ed(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,Ed(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){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(131)}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}delegateVerticalScrollbarMouseDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeContainer(e),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."),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)}}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(t){if(!this._modelData||!this._modelData.hasRealView)return null;const i=this._modelData.model.validatePosition(t),n=this._configuration.options,o=n.get(131);return{top:e._getVerticalOffsetForPosition(this._modelData,i.lineNumber,i.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(i.lineNumber,i.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft(),height:n.get(59)}}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){jd(e,this._configuration.options.get(44))}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()),e.onBeforeAttached();const i=new ok(this._id,this._configuration,e,Lk.create(),mk.create(this._configuration.options),(e=>_n(e)),this.languageConfigurationService,this._themeService);t.push(e.onDidChangeDecorations((e=>this._onDidChangeModelDecorations.fire(e)))),t.push(e.onDidChangeLanguage((t=>{this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._onDidChangeModelLanguage.fire(t)}))),t.push(e.onDidChangeLanguageConfiguration((e=>this._onDidChangeModelLanguageConfiguration.fire(e)))),t.push(e.onDidChangeContent((e=>this._onDidChangeModelContent.fire(e)))),t.push(e.onDidChangeOptions((e=>this._onDidChangeModelOptions.fire(e)))),t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(i.onEvent((e=>{switch(e.kind){case 0:this._onDidContentSizeChange.fire(e);break;case 1:this._editorTextFocus.setValue(e.hasFocus);break;case 2:this._onDidScrollChange.fire(e);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{e.reachedMaxCursorCount&&this._notificationService.warn(b(0,"The number of cursors has been limited to {0}.",zC.MAX_CURSOR_COUNT));const t=[];for(let i=0,n=e.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 L_(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 nC(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}};Ok=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}([Rk(3,yo),Rk(4,ko),Rk(5,Fo),Rk(6,or),Rk(7,ur),Rk(8,dk),Rk(9,th),Rk(10,gc),Rk(11,Mk)],Ok);class Fk extends B{constructor(){super(),this._onDidChangeToTrue=this._register(new Pe),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new Pe),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 Wk extends B{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=Rc.editorSimpleInput.bindTo(t),this._editorFocus=Rc.focus.bindTo(t),this._textInputFocus=Rc.textInputFocus.bindTo(t),this._editorTextFocus=Rc.editorTextFocus.bindTo(t),this._editorTabMovesFocus=Rc.tabMovesFocus.bindTo(t),this._editorReadonly=Rc.readOnly.bindTo(t),this._inDiffEditor=Rc.inDiffEditor.bindTo(t),this._editorColumnSelection=Rc.columnSelection.bindTo(t),this._hasMultipleSelections=Rc.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=Rc.hasNonEmptySelection.bindTo(t),this._canUndo=Rc.canUndo.bindTo(t),this._canRedo=Rc.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._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(130)),this._editorReadonly.set(e.get(81)),this._inDiffEditor.set(e.get(54)),this._editorColumnSelection.set(e.get(18))}_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 Bk extends B{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=Rc.languageId.bindTo(t),this._hasCompletionItemProvider=Rc.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=Rc.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=Rc.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=Rc.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=Rc.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=Rc.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=Rc.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=Rc.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=Rc.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=Rc.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=Rc.hasReferenceProvider.bindTo(t),this._hasRenameProvider=Rc.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=Rc.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=Rc.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=Rc.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=Rc.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=Rc.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=Rc.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=Rc.isInWalkThroughSnippet.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._isInWalkThrough.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._isInWalkThrough.set(e.uri.scheme===tn.walkThroughSnippet)})):this.reset()}}class Vk extends B{constructor(e){super(),this._onChange=this._register(new Pe),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(Yn(e)),this._register(this._domFocusTracker.onDidFocus((()=>{this._hasFocus=!0,this._onChange.fire(void 0)}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasFocus=!1,this._onChange.fire(void 0)})))}hasFocus(){return this._hasFocus}}const Hk=encodeURIComponent("");function jk(e){return Hk+encodeURIComponent(e.toString())+zk}const qk=encodeURIComponent('');br(((e,t)=>{const i=e.getColor(uu);i&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${i}; }`);const n=e.getColor(hu);n&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${jk(n)}") repeat-x bottom left; }`);const o=e.getColor(du);o&&t.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${o}; }`);const s=e.getColor(mu);s&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${s}; }`);const r=e.getColor(pu);r&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${jk(r)}") repeat-x bottom left; }`);const a=e.getColor(gu);a&&t.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=e.getColor(vu);l&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const c=e.getColor(_u);c&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${jk(c)}") repeat-x bottom left; }`);const d=e.getColor(fu);d&&t.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${d}; }`);const h=e.getColor(Cu);h&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${h}; }`);const u=e.getColor(bu);var g;u&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${g=u,qk+encodeURIComponent(g.toString())+Kk}") no-repeat bottom left; }`);const p=e.getColor(If);p&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${p.rgba.a}; }`);const m=e.getColor(Nf);m&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${m}; }`);const f=e.getColor(yu)||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${f}}`)}));var Uk=i(8824),$k={};$k.styleTagTransform=p(),$k.setAttributes=d(),$k.insert=l().bind(null,"head"),$k.domAPI=r(),$k.insertStyleElement=u(),o()(Uk.Z,$k),Uk.Z&&Uk.Z.locals&&Uk.Z.locals;class Zk{constructor(e,t,i){const n=e=>this.emitter.fire(e);this.emitter=new Pe({onFirstListenerAdd:()=>e.addEventListener(t,n,i),onLastListenerRemove:()=>e.removeEventListener(t,n,i)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function Gk(e){return e.preventDefault(),e.stopPropagation(),e}var Yk=i(6820),Xk={};Xk.styleTagTransform=p(),Xk.setAttributes=d(),Xk.insert=l().bind(null,"head"),Xk.domAPI=r(),Xk.insertStyleElement=u(),o()(Yk.Z,Xk),Yk.Z&&Yk.Z.locals&&Yk.Z.locals;var Jk,Qk=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"}(Jk||(Jk={}));const eD=new Pe,tD=new Pe;class iD{constructor(){this.disposables=new W}get onPointerMove(){return this.disposables.add(new Zk(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new Zk(window,"mouseup")).event}dispose(){this.disposables.dispose()}}Qk([ch],iD.prototype,"onPointerMove",null),Qk([ch],iD.prototype,"onPointerUp",null);class nD{constructor(e){this.el=e,this.disposables=new W}get onPointerMove(){return this.disposables.add(new Zk(this.el,dh.Change)).event}get onPointerUp(){return this.disposables.add(new Zk(this.el,dh.End)).event}dispose(){this.disposables.dispose()}}Qk([ch],nD.prototype,"onPointerMove",null),Qk([ch],nD.prototype,"onPointerUp",null);class oD{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}Qk([ch],oD.prototype,"onPointerMove",null),Qk([ch],oD.prototype,"onPointerUp",null);const sD="pointer-events-disabled";class rD extends B{constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new Qt(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new Pe),this._onDidStart=this._register(new Pe),this._onDidChange=this._register(new Pe),this._onDidReset=this._register(new Pe),this._onDidEnd=this._register(new Pe),this.orthogonalStartSashDisposables=this._register(new W),this.orthogonalStartDragHandleDisposables=this._register(new W),this.orthogonalEndSashDisposables=this._register(new W),this.orthogonalEndDragHandleDisposables=this._register(new W),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=Xn(e,io(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),he&&this.el.classList.add("mac");const n=this._register(new Zk(this.el,"mousedown")).event;this._register(n((e=>this.onPointerStart(e,new iD)),this));const o=this._register(new Zk(this.el,"dblclick")).event;this._register(o(this.onPointerDoublePress,this));const s=this._register(new Zk(this.el,"mouseenter")).event;this._register(s((()=>rD.onMouseEnter(this))));const r=this._register(new Zk(this.el,"mouseleave")).event;this._register(r((()=>rD.onMouseLeave(this)))),this._register(hh.addTarget(this.el));const a=Ie.map(this._register(new Zk(this.el,dh.Start)).event,(e=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(a((e=>this.onPointerStart(e,new nD(this.el))),this));const l=this._register(new Zk(this.el,dh.Tap)).event,c=Ie.map(Ie.filter(Ie.debounce(l,((e,t)=>{var i;return{event:t,count:(null!==(i=null==e?void 0:e.count)&&void 0!==i?i:0)+1}}),250),(({count:e})=>2===e)),(({event:e})=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(c(this.onPointerDoublePress,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(eD.event((e=>{this.size=e,this.layout()})))),this._register(tD.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()}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.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=Xn(this.el,io(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(F((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new Zk(this._orthogonalStartDragHandle,"mouseenter")).event((()=>rD.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new Zk(this._orthogonalStartDragHandle,"mouseleave")).event((()=>rD.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.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=Xn(this.el,io(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(F((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new Zk(this._orthogonalEndDragHandle,"mouseenter")).event((()=>rD.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new Zk(this._orthogonalEndDragHandle,"mouseleave")).event((()=>rD.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){Zn(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new oD(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new oD(t))),!this.state)return;const n=("iframe",Array.prototype.slice.call(document.getElementsByTagName("iframe"),0));for(const e of n)e.classList.add(sD);const o=e.pageX,s=e.pageY,r=e.altKey,a={startX:o,currentX:o,startY:s,currentY:s,altKey:r};this.el.classList.add("active"),this._onDidStart.fire(a);const l=Hn(this.el),c=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":he?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":he?"col-resize":"ew-resize",l.textContent=`* { cursor: ${e} !important; }`},d=new W;c(),i||this.onDidEnablementChange.event(c,null,d),t.onPointerMove((e=>{Zn(e,!1);const t={startX:o,currentX:e.pageX,startY:s,currentY:e.pageY,altKey:r};this._onDidChange.fire(t)}),null,d),t.onPointerUp((e=>{Zn(e,!1),this.el.removeChild(l),this.el.classList.remove("active"),this._onDidEnd.fire(),d.dispose();for(const e of n)e.classList.remove(sD)}),null,d),d.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&&rD.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&rD.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){rD.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){if(e.target&&e.target instanceof HTMLElement)return e.target.classList.contains("orthogonal-drag-handle")?e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}class aD{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(0!==e.getScrollTop()){const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const o=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-o}}return new aD(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){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)}}var lD=i(4310),cD={};cD.styleTagTransform=p(),cD.setAttributes=d(),cD.insert=l().bind(null,"head"),cD.domAPI=r(),cD.insertStyleElement=u(),o()(lD.Z,cD),lD.Z&&lD.Z.locals&&lD.Z.locals;const dD={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:qm.text,TERMINALS:"Terminals"};class hD{constructor(e){this.data=e}update(){}getData(){return this.data}}const uD={CurrentDragAndDropData:void 0};var gD=i(6170),pD={};pD.styleTagTransform=p(),pD.setAttributes=d(),pD.insert=l().bind(null,"head"),pD.domAPI=r(),pD.insertStyleElement=u(),o()(gD.Z,pD),gD.Z&&gD.Z.locals&&gD.Z.locals;class mD extends B{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof To&&this._register(t.onDidChange((e=>{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 Mo)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(hh.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,Ke&&this._register(cn(e,$n.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(dD.TEXT,this._action.label)})))),this._register(cn(t,dh.Tap,(e=>this.onClick(e,!0)))),this._register(cn(t,$n.MOUSE_DOWN,(e=>{i||Zn(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),he&&this._register(cn(t,$n.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register(cn(t,$n.CLICK,(e=>{Zn(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register(cn(t,$n.DBLCLICK,(e=>{Zn(e,!0)}))),[$n.MOUSE_UP,$n.MOUSE_OUT].forEach((e=>{this._register(cn(t,e,(e=>{Zn(e),t.classList.remove("active")})))}))}onClick(e,t=!1){var i;Zn(e,!0);const n=at(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(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class fD extends mD{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),this.element&&(this.label=Xn(this.element,io("a.action-label"))),this.label&&(this._action.id===Ro.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&(Xn(this.element,io("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}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.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=b(0,"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}var _D;class vD extends B{constructor(e,t={}){var i,n,o,s,r,a;let l,c;switch(super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new Pe),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new Pe({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new Pe),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new Pe),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(n=this.options.orientation)&&void 0!==n?n:0,this._triggerKeys={keyDown:null!==(s=null===(o=this.options.triggerKeys)||void 0===o?void 0:o.keyDown)&&void 0!==s&&s,keys:null!==(a=null===(r=this.options.triggerKeys)||void 0===r?void 0:r.keys)&&void 0!==a?a:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new Mo,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._register(this._actionRunner.onBeforeRun((e=>this._onBeforeRun.fire(e)))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:l=[15],c=[17];break;case 1:l=[16],c=[18],this.domNode.className+=" vertical"}this._register(cn(this.domNode,$n.KEY_DOWN,(e=>{const t=new Ot(e);let i=!0;const n="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;l&&(t.equals(l[0])||t.equals(l[1]))?i=this.focusPrevious():c&&(t.equals(c[0])||t.equals(c[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 mD&&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(cn(this.domNode,$n.KEY_UP,(e=>{const t=new Ot(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))&&this.updateFocusedItem()}))),this.focusTracker=this._register(Yn(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{Vn()!==this.domNode&&Pn(Vn(),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0,this.previouslyFocusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role","toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const e=this.viewItems.find((e=>e instanceof mD&&e.isEnabled()));e instanceof mD&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof mD&&e.setFocusable(!1)}))}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;et.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach((t=>t.actionRunner=e)))}getContainer(){return this.domNode}push(e,t={}){const i=Array.isArray(e)?e:[e];let n=it(t.index)?t.index:null;i.forEach((e=>{const i=document.createElement("li");let o;i.className="action-item",i.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(cn(i,$n.CONTEXT_MENU,(e=>{Zn(e,!0)}))),this.options.actionViewItemProvider&&(o=this.options.actionViewItemProvider(e)),o||(o=new fD(this.context,e,t)),o.actionRunner=this._actionRunner,o.setActionContext(this.context),o.render(i),this.focusable&&o instanceof mD&&0===this.viewItems.length&&o.setFocusable(!0),null===n||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(o),this._actionIds.push(e.id)):(this.actionsList.insertBefore(i,this.actionsList.children[n]),this.viewItems.splice(n,0,o),this._actionIds.splice(n,0,e.id),n++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){A(this.viewItems),this.viewItems=[],this._actionIds=[],rn(this.actionsList),this.refreshRole()}length(){return 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());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());return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n;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 o=void 0!==this.focusedItem&&this.viewItems[this.focusedItem];if(o){let n=!0;dt(o.focus)||(n=!1),this.options.focusOnlyEnabledItems&&dt(o.isEnabled)&&!o.isEnabled()&&(n=!1),n?(i||this.previouslyFocusedItem!==this.focusedItem)&&(o.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof mD){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}run(e,t){return function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){yield this._actionRunner.run(e,t)}))}dispose(){A(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}!function(e){e.getDefinition=function(e,t){let i=e.defaults;for(;pr.isThemeIcon(i);){const e=bD.getIcon(i.id);if(!e)return;i=e.defaults}return i}}(_D||(_D={}));const bD=new class{constructor(){this._onDidChange=new Pe,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:b(0,"The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:b(0,"The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${No.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}let s={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=s;let 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(;pr.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`};let 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}|${pr.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const o of n.filter((e=>!pr.isThemeIcon(e.defaults))).sort(e))i.push(`||${o.id}|`);return i.join("\n")}};function CD(e,t,i,n){return bD.registerIcon(e,t,i,n)}function wD(){return bD}dr.add("base.contributions.icons",bD),function(){for(const e of Oo.getAll())bD.registerIcon(e.id,e.definition,e.description)}();const yD="vscode://schemas/icons";let SD=dr.as(bh);SD.registerSchema(yD,bD.getIconSchema());const xD=new ri((()=>SD.notifySchemaChanged(yD)),200);bD.onDidChange((()=>{xD.isScheduled()||xD.schedule()}));const kD=CD("widget-close",Oo.close,b(0,"Icon for the close action in widgets."));CD("goto-previous-location",Oo.arrowUp,b(0,"Icon for goto previous editor location.")),CD("goto-next-location",Oo.arrowDown,b(0,"Icon for goto next editor location.")),pr.modify(Oo.sync,"spin"),pr.modify(Oo.loading,"spin");var DD;class LD{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class ED{constructor(e){this.entries=e}}const ND=CD("diff-review-insert",Oo.add,b(0,"Icon for 'Insert' in diff review.")),ID=CD("diff-review-remove",Oo.remove,b(0,"Icon for 'Remove' in diff review.")),TD=CD("diff-review-close",Oo.close,b(0,"Icon for 'Close' in diff review."));let MD=class e extends B{constructor(e,t){super(),this._languageService=t,this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=rd(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=rd(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new vD(this.actionBarContainer.domNode)),this._actionBar.push(new To("diffreview.close",b(0,"Close"),"close-diff-review "+pr.asClassName(TD),!0,(()=>function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){return this.hide()})))),{label:!1,icon:!0}),this.domNode=rd(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=rd(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new gv(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff((()=>{this._isVisible&&(this._diffs=this._compute(),this._render())}))),this._register(e.getModifiedEditor().onDidChangeCursorPosition((()=>{this._isVisible&&this._render()}))),this._register(hn(this.domNode.domNode,"click",(e=>{e.preventDefault();const t=An(e.target,"diff-review-row");t&&this._goToRow(t)}))),this._register(hn(this.domNode.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())}))),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e0){const t=e[s-1];n=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,o=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let r=t-3+1,a=i-3+1;if(ra){const e=a-m;m+=e,f+=e}if(f>p){const e=p-f;m+=e,f+=e}u[g++]=new LD(n,m,o,f)}n[o++]=new ED(u)}let s=n[0].entries;const r=[];let a=0;for(let e=1,t=n.length;eh)&&(h=n),0!==o&&(0===u||og)&&(g=s)}const p=document.createElement("div");p.className="diff-review-row";const m=document.createElement("div");m.className="diff-review-cell diff-review-summary";const f=h-d+1,_=g-u+1;m.appendChild(document.createTextNode(`${a+1}/${this._diffs.length}: @@ -${d},${f} +${u},${_} @@`)),p.setAttribute("data-line",String(u));const v=e=>0===e?b(0,"no lines changed"):1===e?b(0,"1 line changed"):b(0,"{0} lines changed",e),C=v(f),w=v(_);p.setAttribute("aria-label",b(0,"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",a+1,this._diffs.length,d,C,u,w)),p.appendChild(m),p.setAttribute("role","listitem"),c.appendChild(p);const y=i.get(59);let S=u;for(let a=0,d=l.length;ae}),MD=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,rc)],MD),br(((e,t)=>{const i=e.getColor(Cf);i&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${i}; }`);const n=e.getColor(su);n&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }`)})),Ur(class extends zr{constructor(){super({id:"editor.action.diffReview.next",label:b(0,"Go to Next Difference"),alias:"Go to Next Difference",precondition:Fs.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=RD(e);i&&i.diffReviewNext()}}),Ur(class extends zr{constructor(){super({id:"editor.action.diffReview.prev",label:b(0,"Go to Previous Difference"),alias:"Go to Previous Difference",precondition:Fs.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const i=RD(e);i&&i.diffReviewPrev()}});const PD=xo("editorWorkerService"),AD=xo("contextViewService"),OD=xo("contextMenuService");var FD=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class WD extends B{constructor(e,t,i,n,o,s){super(),this._viewZoneId=e,this._marginDomNode=t,this.editor=i,this.diff=n,this._contextMenuService=o,this._clipboardService=s,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=Oo.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const r=i.getOption(59),a=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${r}px`,this._diffActions.style.lineHeight=`${r}px`,this._marginDomNode.appendChild(this._diffActions);const l=[],c=0===n.modifiedEndLineNumber;l.push(new To("diff.clipboard.copyDeletedContent",c?n.originalEndLineNumber>n.modifiedStartLineNumber?b(0,"Copy deleted lines"):b(0,"Copy deleted line"):n.originalEndLineNumber>n.modifiedStartLineNumber?b(0,"Copy changed lines"):b(0,"Copy changed line"),void 0,!0,(()=>FD(this,void 0,void 0,(function*(){const e=new ia(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),t=n.originalModel.getValueInRange(e);yield this._clipboardService.writeText(t)})))));let d,h=0;n.originalEndLineNumber>n.modifiedStartLineNumber&&(d=new To("diff.clipboard.copyDeletedLineContent",b(0,c?"Copy deleted line ({0})":"Copy changed line ({0})",n.originalStartLineNumber),void 0,!0,(()=>FD(this,void 0,void 0,(function*(){const e=n.originalModel.getLineContent(n.originalStartLineNumber+h);if(""===e){const e=n.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(0===e?"\n":"\r\n")}else yield this._clipboardService.writeText(e)})))),l.push(d)),i.getOption(81)||l.push(new To("diff.inline.revertChange",b(0,"Revert this change"),void 0,!0,(()=>FD(this,void 0,void 0,(function*(){const e=new ia(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),t=n.originalModel.getValueInRange(e);if(0===n.modifiedEndLineNumber){const e=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new ia(n.modifiedStartLineNumber,e,n.modifiedStartLineNumber,e),text:a+t}])}else{const e=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new ia(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,e),text:t}])}})))));const u=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(d&&(d.label=b(0,c?"Copy deleted line ({0})":"Copy changed line ({0})",n.originalStartLineNumber+h)),l),autoSelectFirstItem:!0})};this._register(hn(this._diffActions,"mousedown",(e=>{const{top:t,height:i}=En(this._diffActions),n=Math.floor(r/3);e.preventDefault(),u(e.posx,t+i+n)}))),this._register(i.onMouseMove((e=>{(8===e.target.type||5===e.target.type)&&e.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,r)):this.visibility=!1}))),this._register(i.onMouseDown((e=>{!e.event.rightButton||8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===this._viewZoneId&&(e.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,r),u(e.event.posx,e.event.posy+r))})))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=En(e),o=t-n,s=Math.floor(o/i),r=s*i;if(this._diffActions.style.top=`${r}px`,this.diff.viewLineCounts){let e=0;for(let t=0;t!this._zonesMap[String(e.id)]))}clean(e){this._zones.length>0&&e.changeViewZones((e=>{for(const t of this._zones)e.removeZone(t)})),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,i,n){const o=n?aD.capture(e):null;e.changeViewZones((t=>{var n;for(const e of this._zones)t.removeZone(e);for(const e of this._inlineDiffMargins)e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let o=0,s=i.zones.length;oe});let GD=class e extends B{constructor(t,i,n,o,s,r,a,l,c,d,h,u){super(),this._editorProgressService=u,this._onDidDispose=this._register(new Pe),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new Pe),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new Pe),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=s,this._codeEditorService=l,this._contextKeyService=this._register(r.createScoped(t)),this._instantiationService=a.createChild(new rk([or,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=c,this._notificationService=d,this._id=++KD,this._state=0,this._updatingDiffProgress=null,this._domElement=t,i=i||{},this._options=cL(i,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),void 0!==i.isInEmbeddedEditor?this._contextKeyService.createKey("isInEmbeddedDiffEditor",i.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new ri((()=>this._updateDecorations()),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=rd(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(hn(this._overviewDomElement,"mousedown",(e=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(e)}))),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new qD(h,o),this._modifiedEditorState=new qD(h,o),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new od(this._containerDomElement,i.dimension)),this._register(this._elementSizeObserver.onDidChange((()=>this._onDidContainerSizeChanged()))),i.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(i,n.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(i,n.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=a.createInstance(MD,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new tL(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new nL(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(c.onDidColorThemeChange((t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)})));const g=Yr.getDiffEditorContributions();for(const e of g)try{this._register(a.createInstance(e.ctor,this))}catch(e){w(e)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=fr(e.type),i}_recreateOverviewRulers(){this._options.renderOverviewRuler&&(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(44)&&this._updateDecorationsRunner.schedule(),e.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})));const o=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),n}_createRightHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(44)&&this._updateDecorationsRunner.schedule(),e.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}))),this._register(n.onDidChangeModelOptions((e=>{e.tabSize&&this._updateDecorationsRunner.schedule()})));const o=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),n}_createInnerEditor(e,t,i,n){return e.createInstance(Ok,t,i,n)}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return UC.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(t){const i=cL(t,this._options),n=function(e,t){return{enableSplitViewResizing:e.enableSplitViewResizing!==t.enableSplitViewResizing,renderSideBySide:e.renderSideBySide!==t.renderSideBySide,maxComputationTime:e.maxComputationTime!==t.maxComputationTime,maxFileSize:e.maxFileSize!==t.maxFileSize,ignoreTrimWhitespace:e.ignoreTrimWhitespace!==t.ignoreTrimWhitespace,renderIndicators:e.renderIndicators!==t.renderIndicators,originalEditable:e.originalEditable!==t.originalEditable,diffCodeLens:e.diffCodeLens!==t.diffCodeLens,renderOverviewRuler:e.renderOverviewRuler!==t.renderOverviewRuler,diffWordWrap:e.diffWordWrap!==t.diffWordWrap}}(this._options,i);this._options=i;const o=n.ignoreTrimWhitespace||n.renderIndicators,s=this._isVisible&&(n.maxComputationTime||n.maxFileSize);o?this._beginUpdateDecorations():s&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(t)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(t)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),n.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new tL(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new nL(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),n.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e,t="api"){this._modifiedEditor.setPosition(e,t)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e,t="api"){this._modifiedEditor.setSelection(e,t)}setSelections(e,t="api"){this._modifiedEditor.setSelections(e,t)}revealLines(e,t,i=0){this._modifiedEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){return{original:this._originalEditor.saveViewState(),modified:this._modifiedEditor.saveViewState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,i){this._modifiedEditor.trigger(e,t,i)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler)return;if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:n+e.ONE_OVERVIEW_WIDTH,height:t-i}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:t-i}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout((()=>this._beginUpdateDecorations()),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const t=this._originalEditor.getModel(),i=this._modifiedEditor.getModel();if(!t||!i)return;this._diffComputationToken++;const n=this._diffComputationToken,o=1024*this._options.maxFileSize*1024,s=e=>{const t=e.getValueLength();return 0===o||t<=o};s(t)&&s(i)?(this._setState(1),this._editorWorkerService.computeDiff(t.uri,i.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then((e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=e,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())}),(e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())}))):e._equals(t.uri,this._lastOriginalWarning)&&e._equals(i.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=i.uri,this._notificationService.warn(b(0,"Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?t.wordWrapOverride1=this._options.diffWordWrap:(t.wordWrapOverride1="off",t.wordWrapOverride2="off"),e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._options.originalEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.wordWrapOverride1=this._options.diffWordWrap,i.revealHorizontalRightPadding=zd.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},i),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const t=this._elementSizeObserver.getWidth(),i=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),o=this._strategy.layout();this._originalDomNode.style.width=o+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=t-o+"px",this._modifiedDomNode.style.left=o+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=i-n+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=t-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:o,height:i-n}),this._modifiedEditor.layout({width:t-o-(this._options.renderOverviewRuler?e.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:i-n}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(i-n,t,n),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),o=Math.max(0,n-0),s=i>0?o/i:0;return{height:Math.max(0,Math.floor(e.height*s)),top:Math.floor(t*s)}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===i.length||e=a?n=s+1:(n=s,o=s)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.originalStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,s=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-i;return r<=o?n+Math.min(r,s):n+s-o+r}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.modifiedStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,s=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-n;return r<=s?i+Math.min(r,o):i+o-s+r}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};GD.ONE_OVERVIEW_WIDTH=15,GD.ENTIRE_DIFF_OVERVIEW_WIDTH=30,GD.UPDATE_DIFF_DECORATIONS_DELAY=200,GD=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}([jD(3,BD),jD(4,PD),jD(5,or),jD(6,yo),jD(7,ko),jD(8,ur),jD(9,dk),jD(10,OD),jD(11,HD)],GD);class YD extends B{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=e.getColor(mg)||(e.getColor(cg)||ag).transparent(2),i=e.getColor(fg)||(e.getColor(dg)||lg).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,o){o=o.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber)),n=n.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber));const s=this._getViewZones(e,n,o,i),r=this._getOriginalEditorDecorations(s,e,t,i),a=this._getModifiedEditorDecorations(s,e,t,i);return{original:{decorations:r.decorations,overviewZones:r.overviewZones,zones:s.original},modified:{decorations:a.decorations,overviewZones:a.overviewZones,zones:s.modified}}}}class XD{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._indexe.afterLineNumber-t.afterLineNumber,_=(e,t)=>{if(null===t.domNode&&e.length>0){const i=e[e.length-1];if(i.afterLineNumber===t.afterLineNumber&&null===i.domNode)return void(i.heightInLines+=t.heightInLines)}e.push(t)},v=new XD(this._modifiedForeignVZ),b=new XD(this._originalForeignVZ);let C=1,w=1;for(let i=0,n=this._lineChanges.length;i<=n;i++){const y=i0?-1:0),g=y.modifiedStartLineNumber+(y.modifiedEndLineNumber>0?-1:0),h=y.originalEndLineNumber>0?JD._getViewLineCount(this._originalEditor,y.originalStartLineNumber,y.originalEndLineNumber):0,d=y.modifiedEndLineNumber>0?JD._getViewLineCount(this._modifiedEditor,y.modifiedStartLineNumber,y.modifiedEndLineNumber):0,p=Math.max(y.originalStartLineNumber,y.originalEndLineNumber),m=Math.max(y.modifiedStartLineNumber,y.modifiedEndLineNumber)):(u+=1e7+h,g+=1e7+d,p=u,m=g);let S=[],x=[];if(o){let e;e=y?y.originalEndLineNumber>0?y.originalStartLineNumber-C:y.modifiedStartLineNumber-w:s.getLineCount()-C+1;for(let t=0;to&&x.push({afterLineNumber:i,heightInLines:n-o,domNode:null,marginDomNode:null})}y&&(C=(y.originalEndLineNumber>0?y.originalEndLineNumber:y.originalStartLineNumber)+1,w=(y.modifiedEndLineNumber>0?y.modifiedEndLineNumber:y.modifiedStartLineNumber)+1)}for(;v.current&&v.current.afterLineNumber<=m;){let e;e=v.current.afterLineNumber<=g?u-g+v.current.afterLineNumber:p;let i=null;y&&y.modifiedStartLineNumber<=v.current.afterLineNumber&&v.current.afterLineNumber<=y.modifiedEndLineNumber&&(i=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),S.push({afterLineNumber:e,heightInLines:v.current.height/t,domNode:null,marginDomNode:i}),v.advance()}for(;b.current&&b.current.afterLineNumber<=p;){let t;t=b.current.afterLineNumber<=u?g-u+b.current.afterLineNumber:m,x.push({afterLineNumber:t,heightInLines:b.current.height/e,domNode:null}),b.advance()}if(null!==y&&sL(y)){const e=this._produceOriginalFromDiff(y,h,d);e&&S.push(e)}if(null!==y&&rL(y)){const e=this._produceModifiedFromDiff(y,h,d);e&&x.push(e)}let k=0,D=0;for(S=S.sort(f),x=x.sort(f);k=t.heightInLines?(e.heightInLines-=t.heightInLines,D++):(t.heightInLines-=e.heightInLines,k++)}for(;k(e.domNode||(e.domNode=aL()),e)))}}function QD(e,t,i,n,o){return{range:new ia(e,t,i,n),options:o}}const eL={charDelete:Fx.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:Fx.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:Fx.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:Fx.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:Fx.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:Fx.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+pr.asClassName(UD),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:Fx.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:Fx.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+pr.asClassName($D),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:Fx.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class tL extends YD{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new rD(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart((()=>this._onSashDragStart())),this._sash.onDidChange((e=>this._onSashDrag(e))),this._sash.onDidEnd((()=>this._onSashDragEnd())),this._sash.onDidReset((()=>this._onSashReset()))}setEnableSplitViewResizing(e){const t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?GD.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let i=Math.floor((e||.5)*t);const n=Math.floor(.5*t);return i=this._disableSash?n:i||n,t>2*tL.MINIMUM_EDITOR_WIDTH?(it-tL.MINIMUM_EDITOR_WIDTH&&(i=t-tL.MINIMUM_EDITOR_WIDTH)):i=n,this._sashPosition!==i&&(this._sashPosition=i),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?GD.ENTIRE_DIFF_OVERVIEW_WIDTH:0),i=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=i/t,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor();return new iL(e,t,i,n,o).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const o=this._dataSource.getOriginalEditor(),s=String(this._removeColor),r={decorations:[],overviewZones:[]},a=o.getModel(),l=o._getViewModel();for(const e of t)if(rL(e)){r.decorations.push({range:new ia(e.originalStartLineNumber,1,e.originalEndLineNumber,1073741824),options:n?eL.lineDeleteWithSign:eL.lineDelete}),sL(e)&&e.charChanges||r.decorations.push(QD(e.originalStartLineNumber,1,e.originalEndLineNumber,1073741824,eL.charDeleteWholeLine));const t=lL(a,l,e.originalStartLineNumber,e.originalEndLineNumber);if(r.overviewZones.push(new Ib(t.startLineNumber,t.endLineNumber,0,s)),e.charChanges)for(const t of e.charChanges)if(rL(t))if(i)for(let e=t.originalStartLineNumber;e<=t.originalEndLineNumber;e++){let i,n;i=e===t.originalStartLineNumber?t.originalStartColumn:a.getLineFirstNonWhitespaceColumn(e),n=e===t.originalEndLineNumber?t.originalEndColumn:a.getLineLastNonWhitespaceColumn(e),r.decorations.push(QD(e,i,e,n,eL.charDelete))}else r.decorations.push(QD(t.originalStartLineNumber,t.originalStartColumn,t.originalEndLineNumber,t.originalEndColumn,eL.charDelete))}return r}_getModifiedEditorDecorations(e,t,i,n){const o=this._dataSource.getModifiedEditor(),s=String(this._insertColor),r={decorations:[],overviewZones:[]},a=o.getModel(),l=o._getViewModel();for(const e of t)if(sL(e)){r.decorations.push({range:new ia(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,1073741824),options:n?eL.lineInsertWithSign:eL.lineInsert}),rL(e)&&e.charChanges||r.decorations.push(QD(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,1073741824,eL.charInsertWholeLine));const t=lL(a,l,e.modifiedStartLineNumber,e.modifiedEndLineNumber);if(r.overviewZones.push(new Ib(t.startLineNumber,t.endLineNumber,0,s)),e.charChanges)for(const t of e.charChanges)if(sL(t))if(i)for(let e=t.modifiedStartLineNumber;e<=t.modifiedEndLineNumber;e++){let i,n;i=e===t.modifiedStartLineNumber?t.modifiedStartColumn:a.getLineFirstNonWhitespaceColumn(e),n=e===t.modifiedEndLineNumber?t.modifiedEndColumn:a.getLineLastNonWhitespaceColumn(e),r.decorations.push(QD(e,i,e,n,eL.charInsert))}else r.decorations.push(QD(t.modifiedStartLineNumber,t.modifiedStartColumn,t.modifiedEndLineNumber,t.modifiedEndColumn,eL.charInsert))}return r}}tL.MINIMUM_EDITOR_WIDTH=100;class iL extends JD{constructor(e,t,i,n,o){super(e,t,i,n,o)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class nL extends YD{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange((t=>{this._decorationsLeft!==t.decorationsLeft&&(this._decorationsLeft=t.decorationsLeft,e.relayoutEditors())})))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const o=this._dataSource.getOriginalEditor(),s=this._dataSource.getModifiedEditor();return new oL(e,t,i,o,s,n).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const o=String(this._removeColor),s={decorations:[],overviewZones:[]},r=this._dataSource.getOriginalEditor(),a=r.getModel(),l=r._getViewModel();let c=0;for(const i of t)if(rL(i)){for(s.decorations.push({range:new ia(i.originalStartLineNumber,1,i.originalEndLineNumber,1073741824),options:eL.lineDeleteMargin});c=i.originalStartLineNumber)break;c++}let t=0;if(c0,S=Ol(1e4);let x=0,k=0,D=null;for(let t=_.originalStartLineNumber;t<=_.originalEndLineNumber;t++){const s=t-_.originalStartLineNumber,r=this._originalModel.getLineTokens(t),b=r.getLineContent(),L=m[f++],E=om.filter(w,t,1,b.length+1);if(L){let m=0;for(const e of L.breakOffsets){const t=r.sliceAndInflate(m,e,0),s=b.substring(m,e);x=Math.max(x,this._renderOriginalLine(k++,s,t,om.extractWrapped(E,m,e),y,a,l,n,o,c,d,h,u,g,p,i,S,C)),m=e}for(D||(D=[]);D.lengthe.afterLineNumber-t.afterLineNumber))}_renderOriginalLine(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,f,_){f.appendASCIIString('
');const v=Gv.isBasicASCII(t,s),b=Gv.containsRTL(t,v,r),C=gm(new cm(a.isMonospace&&!l,a.canUseHalfwidthRightwardsArrow,t,!1,v,b,0,i,n,m,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,h,u,g,p!==kd.OFF,null),f);if(f.appendASCIIString("
"),this._renderIndicators){const t=document.createElement("div");t.className=`delete-sign ${pr.asClassName($D)}`,t.setAttribute("style",`position:absolute;top:${e*c}px;width:${d}px;height:${c}px;right:0;`),_.appendChild(t)}return C.characterMapping.getAbsoluteOffset(C.characterMapping.length)}}function sL(e){return e.modifiedEndLineNumber>0}function rL(e){return e.originalEndLineNumber>0}function aL(){const e=document.createElement("div");return e.className="diagonal-fill",e}function lL(e,t,i,n){const o=e.getLineCount();return i=Math.min(o,Math.max(1,i)),n=Math.min(o,Math.max(1,n)),t.coordinatesConverter.convertModelRangeToViewRange(new ia(i,e.getLineMinColumn(i),n,e.getLineMaxColumn(n)))}function cL(e,t){return{enableSplitViewResizing:md(e.enableSplitViewResizing,t.enableSplitViewResizing),renderSideBySide:md(e.renderSideBySide,t.renderSideBySide),maxComputationTime:_d(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:_d(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:md(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:md(e.renderIndicators,t.renderIndicators),originalEditable:md(e.originalEditable,t.originalEditable),diffCodeLens:md(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:md(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(i=e.diffWordWrap,n=t.diffWordWrap,wd(i,n,["off","on","inherit"]))};var i,n}br(((e,t)=>{const i=e.getColor(cg);i&&t.addRule(`.monaco-editor .char-insert, .monaco-diff-editor .char-insert { background-color: ${i}; }`);const n=e.getColor(hg)||i;n&&t.addRule(`.monaco-editor .line-insert, .monaco-diff-editor .line-insert { background-color: ${n}; }`);const o=e.getColor(gg)||n;o&&(t.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${o}; }`),t.addRule(`.monaco-editor .gutter-insert, .monaco-diff-editor .gutter-insert { background-color: ${o}; }`));const s=e.getColor(dg);s&&t.addRule(`.monaco-editor .char-delete, .monaco-diff-editor .char-delete { background-color: ${s}; }`);const r=e.getColor(ug)||s;r&&t.addRule(`.monaco-editor .line-delete, .monaco-diff-editor .line-delete { background-color: ${r}; }`);const a=e.getColor(pg)||r;a&&(t.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${a}; }`),t.addRule(`.monaco-editor .gutter-delete, .monaco-diff-editor .gutter-delete { background-color: ${a}; }`));const l=e.getColor(_g);l&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${l}; }`);const c=e.getColor(vg);c&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${c}; }`);const d=e.getColor(su);d&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${d}; }`);const h=e.getColor(bg);h&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${h}; }`);const u=e.getColor(ru);u&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${u};\n\t\t\t}\n\t\t`);const g=e.getColor(au);g&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${g};\n\t\t\t}\n\t\t`);const p=e.getColor(lu);p&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${p};\n\t\t\t}\n\t\t`);const m=e.getColor(Cg);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${m} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${m} 50%, ${m} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)}));const dL={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class hL extends B{constructor(e,t={}){super(),this._onDidUpdate=this._register(new Pe),this._editor=e,this._options=td(t,dL,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose((()=>this.dispose()))),this._register(this._editor.onDidUpdateDiff((()=>this._onDiffUpdated()))),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e=>{this.ignoreSelectionChange||(this.nextIdx=-1)}))),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel((e=>{this.revealFirst=!0}))),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach((e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((e=>{this.ranges.push({rhs:!0,range:new ia(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):0===e.modifiedEndLineNumber?this.ranges.push({rhs:!0,range:new ia(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new ia(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber+1,1)})})),this.ranges.sort(((e,t)=>ia.compareRangesUsingStarts(e.range,t.range))),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1;const i=this._editor.getPosition();if(i){for(let n=0,o=this.ranges.length;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const e=i.range.getStartPosition();this._editor.setPosition(e),this._editor.revealRangeInCenter(i.range,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}var uL,gL;class pL{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)){return new bL(new _L(e))}static forStrings(){return new bL(new pL)}static forConfigKeys(){return new bL(new mL)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new vL,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 vL,n.left.segment=i.value()),o.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new vL,n.right.segment=i.value()),o.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new vL,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),{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){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())return i.mid?this._entries(i.mid):void 0;t.next(),i=i.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e){e&&(e.left&&(yield*this._entries(e.left)),e.value&&(yield[e.key,e.value]),e.mid&&(yield*this._entries(e.mid)),e.right&&(yield*this._entries(e.right)))}}class CL{constructor(e,t){this.uri=e,this.value=t}}class wL{constructor(e,t){this[uL]="ResourceMap",e instanceof wL?(this.map=new Map(e.map),this.toKey=null!=t?t:wL.defaultToKey):(this.map=new Map,this.toKey=null!=e?e:wL.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),new CL(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(let[t,i]of this.map)e(i.value,i.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(uL=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}}wL.defaultToKey=e=>e.toString();class yL{constructor(){this[gL]="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}[(gL=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 SL extends yL{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))}}function xL(...e){return function(t,i){for(let n=0,o=e.length;n0?[{start:0,end:t.length}]:[]:null}function LL(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function EL(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=EL(e,t,i+1,n+1))?OL({start:n,end:n+1},o):null}return EL(e,t,i,n+1)}function NL(e){return 97<=e&&e<=122}function IL(e){return 65<=e&&e<=90}function TL(e){return 48<=e&&e<=57}function ML(e){return 32===e||9===e||10===e||13===e}const RL=new Set;function PL(e){return ML(e)||RL.has(e)}function AL(e){return NL(e)||IL(e)||TL(e)}function OL(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function FL(e,t){for(let i=t;i0&&!AL(e.charCodeAt(i-1)))return i}return e.length}function WL(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=WL(e,t,i+1,n+1);!o&&(s=FL(t,s))60)return null;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&&PL(e.charCodeAt(i-1)))return i;return e.length}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>RL.add(e.charCodeAt(0))));const zL=xL(kL,BL,LL),jL=xL(kL,BL,(function(e,t){return EL(e.toLowerCase(),t.toLowerCase(),0,0)})),qL=new SL(1e4);function KL(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=qL.get(e);n||(n=new RegExp(e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*"),"i"),qL.set(e,n));const o=n.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:i?jL(e,t):zL(e,t)}function UL(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 ZL=128;function GL(){const e=[],t=[];for(let e=0;e<=ZL;e++)t[e]=0;for(let i=0;i<=ZL;i++)e.push(t.slice(0));return e}function YL(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const XL=YL(256),JL=YL(256),QL=GL(),eE=GL(),tE=GL();function iE(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 40:case 91:return!0;case void 0:return!1;default:return!!Ds(i)}}function nE(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function oE(e,t,i){return t[e]!==i[e]}var sE;function rE(e,t,i,n,o,s,r){const a=e.length>ZL?ZL:e.length,l=n.length>ZL?ZL: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]&&(JL[r]=a,r--),a--}(a,l,i,s,t,o);let c=1,d=1,h=i,u=s;const g=[!1];for(c=1,h=i;hr,v=_?eE[c][d-1]+(QL[c][d-1]>0?-5:0):0,b=u>r+1&&QL[c][d-1]>0,C=b?eE[c][d-2]+(QL[c][d-2]>0?-5:0):0;if(b&&(!_||C>=v)&&(!m||C>=f))eE[c][d]=C,tE[c][d]=3,QL[c][d]=0;else if(_&&(!m||v>=f))eE[c][d]=v,tE[c][d]=2,QL[c][d]=0;else{if(!m)throw new Error("not possible");eE[c][d]=f,tE[c][d]=1,QL[c][d]=QL[c-1][d-1]+1}}}if(!g[0]&&!r)return;c--,d--;const p=[eE[c][d],s];let m=0,f=0;for(;c>=1;){let e=d;do{const t=tE[c][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);m>1&&t[i+c-1]===o[s+d-1]&&!oE(e+s-1,n,o)&&m+1>QL[c][e]&&(e=d),e===d?m++:m=1,f||(f=e),c--,d=e-1,p.push(d)}l===a&&(p[0]+=2);const _=f-a;return p[0]-=_,p}function aE(e,t,i,n,o,s,r,a,l,c,d){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:!oE(r,o,s)||0!==r&&oE(r-1,o,s)?!iE(s,r)||0!==r&&iE(s,r-1)?(iE(s,r-1)||nE(s,r-1))&&(h=5,u=!0):h=5:(h=e[i]===o[r]?7:5,u=!0),h>1&&i===n&&(d[0]=!0),u||(u=oE(r,o,s)||iE(s,r-1)||nE(s,r-1)),i===n?r>l&&(h-=u?3:5):h+=c?u?2:0:u?0:1,r+1===a&&(h-=u?3:5),h}function lE(e,t,i,n,o,s,r){return function(e,t,i,n,o,s,r,a){let l=rE(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 cE(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}!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(sE||(sE={}));const dE="$(",hE=new RegExp(`\\$\\(${No.iconNameExpression}(?:${No.iconModifierExpression})?\\)`,"g"),uE=new RegExp(No.iconNameCharacter),gE=new RegExp(`(\\\\)?${hE.source}`,"g"),pE=new RegExp(`\\\\${hE.source}`,"g"),mE=new RegExp(`(\\s)?(\\\\)?${hE.source}(\\s)?`,"g");function fE(e){return-1===e.indexOf(dE)?e:e.replace(mE,((e,t,i,n)=>i?e:t||n||""))}function _E(e){const t=e.indexOf(dE);return-1===t?{text:e}:function(e,t){const i=[];let n="";function o(e){if(e){n+=e;for(const t of e)i.push(c)}}let s,r,a=-1,l="",c=0,d=t;const h=e.length;for(o(e.substr(0,t));dt?e:`\\${e}`))):e).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```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}}function CE(e){return wE(e)?!e.value:!Array.isArray(e)||e.every(CE)}function wE(e){return e instanceof bE||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function yE(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}var SE=i(8852),xE={};xE.styleTagTransform=p(),xE.setAttributes=d(),xE.insert=l().bind(null,"head"),xE.domAPI=r(),xE.insertStyleElement=u(),o()(SE.Z,xE),SE.Z&&SE.Z.locals&&SE.Z.locals;var kE=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const DE=new nr("selectionAnchorSet",!1);let LE=class e{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=DE.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}static get(t){return t.getContribution(e.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],i=this.editor.deltaDecorations(t,[{range:na.fromPositions(e,e),options:{description:"selection-anchor",stickiness:1,hoverMessage:(new bE).appendText(b(0,"Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=i[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),vo(b(0,"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(na.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};LE.ID="editor.contrib.selectionAnchorController",LE=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,or)],LE),Gr(LE.ID,LE),Ur(class extends zr{constructor(){super({id:"editor.action.setSelectionAnchor",label:b(0,"Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:Rc.editorTextFocus,primary:Et(2089,2080),weight:100}})}run(e,t){var i;return kE(this,void 0,void 0,(function*(){null===(i=LE.get(t))||void 0===i||i.setSelectionAnchor()}))}}),Ur(class extends zr{constructor(){super({id:"editor.action.goToSelectionAnchor",label:b(0,"Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:DE})}run(e,t){var i;return kE(this,void 0,void 0,(function*(){null===(i=LE.get(t))||void 0===i||i.goToSelectionAnchor()}))}}),Ur(class extends zr{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:b(0,"Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:DE,kbOpts:{kbExpr:Rc.editorTextFocus,primary:Et(2089,2089),weight:100}})}run(e,t){var i;return kE(this,void 0,void 0,(function*(){null===(i=LE.get(t))||void 0===i||i.selectFromAnchorToCursor()}))}}),Ur(class extends zr{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:b(0,"Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:DE,kbOpts:{kbExpr:Rc.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return kE(this,void 0,void 0,(function*(){null===(i=LE.get(t))||void 0===i||i.cancelSelectionAnchor()}))}});var EE=i(8070),NE={};NE.styleTagTransform=p(),NE.setAttributes=d(),NE.insert=l().bind(null,"head"),NE.domAPI=r(),NE.insertStyleElement=u(),o()(EE.Z,NE),EE.Z&&EE.Z.locals&&EE.Z.locals;const IE=xh("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},b(0,"Overview ruler marker color for matching brackets."));class TE{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class ME extends B{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new ri((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(64),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._decorations=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(64)&&(this._matchBrackets=this._editor.getOption(64),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))),this._register(e.onDidBlurEditorWidget((()=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidFocusEditorWidget((()=>{this._updateBracketsSoon.schedule()})))}static get(e){return e.getContribution(ME.ID)}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)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)o=t[0].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new na(o.lineNumber,o.column,o.lineNumber,o.column):new na(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(ia.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 na(r.lineNumber,r.column,a.lineNumber,a.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();let e=[],t=0;for(const i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations=this._editor.deltaDecorations(this._decorations,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);let o=[],s=0;for(let t=0,i=e.length;t1&&o.sort(Do.compare);let r=[],a=0,l=0,c=n.length;for(let e=0,i=o.length;e{const i=e.getColor(xf);i&&t.addRule(`.monaco-editor .bracket-match { background-color: ${i}; }`);const n=e.getColor(kf);n&&t.addRule(`.monaco-editor .bracket-match { border: 1px solid ${n}; }`)})),kr.appendMenuItem(Sr.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:b(0,"Go to &&Bracket")},order:2});class RE{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 s=new ia(i,n-1,i,n),r=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new ia(i,o,i,o),r)}else{const s=new ia(i,o,i,o+1),r=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new ia(i,n,i,n),r)}}computeCursorState(e,t){return this._isMovingLeft?new na(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new na(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class PE extends zr{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 RE(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}Ur(class extends PE{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:b(0,"Move Selected Text Left"),alias:"Move Selected Text Left",precondition:Rc.writable})}}),Ur(class extends PE{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:b(0,"Move Selected Text Right"),alias:"Move Selected Text Right",precondition:Rc.writable})}}),Ur(class extends zr{constructor(){super({id:"editor.action.transposeLetters",label:b(0,"Transpose Letters"),alias:"Transpose Letters",precondition:Rc.writable,kbOpts:{kbExpr:Rc.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],o=t.getSelections();for(let e of o){if(!e.isEmpty())continue;let t=e.startLineNumber,o=e.startColumn,s=i.getLineMaxColumn(t);if(1===t&&(1===o||2===o&&2===s))continue;let r=o===s?e.getPosition():La.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),a=La.leftPosition(i,r),l=La.leftPosition(i,a),c=i.getValueInRange(ia.fromPositions(l,a)),d=i.getValueInRange(ia.fromPositions(a,r)),h=ia.fromPositions(l,r);n.push(new Ca(h,d+c))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}});const AE="9_cutcopypaste",OE=ge||document.queryCommandSupported("cut"),FE=ge||document.queryCommandSupported("copy"),WE=void 0!==navigator.clipboard&&!Ke||document.queryCommandSupported("paste");function BE(e){return e.register(),e}const VE=OE?BE(new Br({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:ge?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Sr.MenubarEditMenu,group:"2_ccp",title:b(0,"Cu&&t"),order:1},{menuId:Sr.EditorContext,group:AE,title:b(0,"Cut"),when:Rc.writable,order:1},{menuId:Sr.CommandPalette,group:"",title:b(0,"Cut"),order:1},{menuId:Sr.SimpleEditorContext,group:AE,title:b(0,"Cut"),when:Rc.writable,order:1}]})):void 0,HE=FE?BE(new Br({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:ge?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Sr.MenubarEditMenu,group:"2_ccp",title:b(0,"&&Copy"),order:2},{menuId:Sr.EditorContext,group:AE,title:b(0,"Copy"),order:2},{menuId:Sr.CommandPalette,group:"",title:b(0,"Copy"),order:1},{menuId:Sr.SimpleEditorContext,group:AE,title:b(0,"Copy"),order:2}]})):void 0;kr.appendMenuItem(Sr.MenubarEditMenu,{submenu:Sr.MenubarCopy,title:{value:b(0,"Copy As"),original:"Copy As"},group:"2_ccp",order:3}),kr.appendMenuItem(Sr.EditorContext,{submenu:Sr.EditorContextCopy,title:{value:b(0,"Copy As"),original:"Copy As"},group:AE,order:3});const zE=WE?BE(new Br({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:ge?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Sr.MenubarEditMenu,group:"2_ccp",title:b(0,"&&Paste"),order:4},{menuId:Sr.EditorContext,group:AE,title:b(0,"Paste"),when:Rc.writable,order:4},{menuId:Sr.CommandPalette,group:"",title:b(0,"Paste"),order:1},{menuId:Sr.SimpleEditorContext,group:AE,title:b(0,"Paste"),when:Rc.writable,order:4}]})):void 0;function jE(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(ko).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(32),i=n.getSelection();return i&&i.isEmpty()&&!e||document.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>(document.execCommand(t),!0))))}jE(VE,"cut"),jE(HE,"copy"),zE&&(zE.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(ko),n=e.get(BD),o=i.getFocusedCodeEditor();return!(!o||!o.hasTextFocus())&&(!(!document.execCommand("paste")&&pe)||function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))}(void 0,void 0,void 0,(function*(){const e=yield n.readText();if(""!==e){const t=Gm.INSTANCE.get(e);let i=!1,n=null,s=null;t&&(i=o.getOption(32)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,s=t.mode),o.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:s})}})))})),zE.addImplementation(0,"generic-dom",((e,t)=>(document.execCommand("paste"),!0)))),FE&&Ur(class extends zr{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:b(0,"Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:Rc.textInputFocus,primary:0,weight:100}})}run(e,t){t.hasModel()&&(!t.getOption(32)&&t.getSelection().isEmpty()||(Zm.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),Zm.forceCopyWithSyntaxHighlighting=!1))}});const qE=xo("IWorkspaceEditService");class KE{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(tt(t=e)&&qi.isUri(t.resource)&&tt(t.edit))return new UE(e.resource,e.edit,e.modelVersionId,e.metadata);var t;if(function(e){return tt(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}(e))return new $E(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")}))}}class UE extends KE{constructor(e,t,i,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class $E extends KE{constructor(e,t,i,n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}const ZE=xo("IEditorCancelService"),GE=new nr("cancellableOperation",!1,b(0,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));cc(ZE,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:GE.bindTo(e.get(or)),tokens:new q}))),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()))}},!0);class YE extends Ut{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(ZE).add(e,this)))}dispose(){this._unregister(),super.dispose()}}Kr(new class extends Hr{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:GE})}runEditorCommand(e,t){e.get(ZE).cancel(t)}});class XE{constructor(e,t){if(this.flags=t,0!=(1&this.flags)){const t=e.getModel();this.modelVersionId=t?jo("{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 XE))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 XE(e,this.flags))}}class JE extends YE{constructor(e,t,i,n){super(e,n),this._listener=new W,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&ia.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&ia.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 QE extends Ut{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}class eN{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+eN.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new eN(this.value+eN.sep+e)}}function tN(e,t,i){return!(!t.contains(e)||i&&t.contains(i))}eN.sep=".",eN.None=new eN("@@none@@"),eN.Empty=new eN(""),eN.QuickFix=new eN("quickfix"),eN.Refactor=new eN("refactor"),eN.Source=new eN("source"),eN.SourceOrganizeImports=eN.Source.append("organizeImports"),eN.SourceFixAll=eN.Source.append("fixAll");class iN{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return e&&"object"==typeof e?new iN(iN.getKindFromUser(e,t.kind),iN.getApplyFromUser(e,t.apply),iN.getPreferredUser(e)):new iN(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 eN(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}}var nN=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const oN="editor.action.codeAction",sN="editor.action.refactor",rN="editor.action.sourceAction",aN="editor.action.organizeImports",lN="editor.action.fixAll";class cN{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return nN(this,void 0,void 0,(function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(e){y(e)}t&&(this.action.edit=t.edit)}return this}))}}class dN extends B{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(dN.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:rl(e.diagnostics)?rl(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:rl(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&eN.QuickFix.contains(new eN(e.kind))&&!!e.isPreferred))}}const hN={actions:[],documentation:void 0};function uN(e,t,i,n,o,s){var r;const a=n.filter||{},l={only:null===(r=a.include)||void 0===r?void 0:r.value,trigger:n.type},c=new QE(t,s),d=function(e,t,i){return e.all(t).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>function(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>tN(t,i,e.include)))||!e.includeSourceActions&&eN.Source.contains(t))}(i,new eN(e))))))}(e,t,a),h=new W,u=d.map((e=>nN(this,void 0,void 0,(function*(){try{o.report(e);const n=yield e.provideCodeActions(t,i,l,c.token);if(n&&h.add(n),c.token.isCancellationRequested)return hN;const s=((null==n?void 0:n.actions)||[]).filter((e=>e&&function(e,t){const i=t.kind?new eN(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>tN(i,t,e.include)))||!e.includeSourceActions&&i&&eN.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}(a,e))),r=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new eN(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 eN(e.kind)))return t.command}(e,s,a.include);return{actions:s.map((t=>new cN(t,e))),documentation:r}}catch(e){if(k(e))throw e;return y(e),hN}})))),g=e.onDidChange((()=>{Qa(e.all(t),d)||c.cancel()}));return Promise.all(u).then((e=>{const t=cl(e.map((e=>e.actions))),i=ol(e.map((e=>e.documentation)));return new dN(t,i,h)})).finally((()=>{g.dispose(),c.dispose()}))}Wo.registerCommand("_executeCodeActionProvider",(function(e,t,i,n,o){return nN(this,void 0,void 0,(function*(){if(!(t instanceof qi))throw E();const{codeActionProvider:s}=e.get(Mk),r=e.get(Lo).getModel(t);if(!r)throw E();const a=na.isISelection(i)?na.liftSelection(i):ia.isIRange(i)?r.validateRange(i):void 0;if(!a)throw E();const l="string"==typeof n?new eN(n):void 0,c=yield uN(s,r,a,{type:1,filter:{includeSourceActions:!0,include:l}},VD.None,qt.None),d=[],h=Math.min(c.validActions.length,"number"==typeof o?o:0);for(let e=0;ee.action))}finally{setTimeout((()=>c.dispose()),100)}}))}));var gN=i(3698),pN={};pN.styleTagTransform=p(),pN.setAttributes=d(),pN.insert=l().bind(null,"head"),pN.domAPI=r(),pN.insertStyleElement=u(),o()(gN.Z,pN),gN.Z&&gN.Z.locals&&gN.Z.locals;let mN=class e{constructor(t,i){this._messageWidget=new V,this._messageListeners=new W,this._editor=t,this._visible=e.MESSAGE_VISIBLE.bindTo(i),this._editorListener=this._editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit()))}static get(t){return t.getContribution(e.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;vo(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new fN(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText((()=>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(new oi((()=>this.closeMessage()),3e3)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new ia(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(fN.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(b(0,"Cannot edit in read-only editor"),this._editor.getPosition())}};mN.ID="editor.contrib.messageController",mN.MESSAGE_VISIBLE=new nr("messageVisible",!1,b(0,"Whether the editor is currently showing an inline message")),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}([function(e,t){return function(i,n){t(i,n,e)}}(1,or)],mN),Kr(new(Hr.bindToContribution(mN.get))({id:"leaveEditorMessage",precondition:mN.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class fN{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-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const s=document.createElement("div");s.classList.add("message"),s.textContent=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")}static fadeOut(e){let t;const i=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",i)};return t=setTimeout(i,110),e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}Gr(mN.ID,mN);const _N=xo("keybindingService");var vN=function(e,t){return function(i,n){t(i,n,e)}};class bN extends To{constructor(e,t){super(e.command?e.command.id:e.title,e.title.replace(/\r\n|\r|\n/g," "),void 0,!e.disabled,t),this.action=e}}let CN=class extends B{constructor(e,t,i,n,o){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._languageFeaturesService=o,this._visible=!1,this._showingActions=this._register(new V),this._keybindingResolver=new wN({getKeybindings:()=>n.getKeybindings()})}get isVisible(){return this._visible}show(e,t,i,n){return function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){const o=n.includeDisabledActions?t.allActions:t.validActions;if(!o.length)return void(this._visible=!1);if(!this._editor.getDomNode())throw this._visible=!1,L();this._visible=!0,this._showingActions.value=t;const s=this.getMenuActions(e,o,t.documentation),r=Do.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},a=this._keybindingResolver.getResolver(),l=this._editor.getOption(115);this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>r,getActions:()=>s,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:e=>e instanceof bN?a(e.action):void 0})}))}getMenuActions(e,t,i){var n,o;const s=e=>new bN(e.action,(()=>this._delegate.onSelectCodeAction(e))),r=t.map(s),a=[...i],l=this._editor.getModel();if(l&&r.length)for(const i of this._languageFeaturesService.codeActionProvider.all(l))i._getAdditionalMenuItems&&a.push(...i._getAdditionalMenuItems({trigger:e.type,only:null===(o=null===(n=e.filter)||void 0===n?void 0:n.include)||void 0===o?void 0:o.value},t.map((e=>e.action))));return a.length&&r.push(new Ro,...a.map((e=>s(new cN({title:e.title,command:e},void 0))))),r}_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=En(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}};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}([vN(2,OD),vN(3,_N),vN(4,Mk)],CN);class wN{constructor(e){this._keybindingProvider=e}getResolver(){const e=new Bo((()=>this._keybindingProvider.getKeybindings().filter((e=>wN.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===aN?t={kind:eN.SourceOrganizeImports.value}:e.command===lN&&(t={kind:eN.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},iN.fromUser(t,{kind:eN.None,apply:"never"}))}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new eN(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)}}wN.codeActionCommands=[sN,oN,rN,aN,lN];var yN=i(1199),SN={};SN.styleTagTransform=p(),SN.setAttributes=d(),SN.insert=l().bind(null,"head"),SN.domAPI=r(),SN.insertStyleElement=u(),o()(yN.Z,SN),yN.Z&&yN.Z.locals&&yN.Z.locals;var xN;!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}}}(xN||(xN={}));let kN=class e extends B{constructor(e,t,i,n){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new Pe),this.onClick=this._onClick.event,this._state=xN.Hidden,this._domNode=document.createElement("div"),this._domNode.className=Oo.lightBulb.classNames,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()}))),hh.ignoreTarget(this._domNode),this._register(un(this._domNode,dn((e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=En(this._domNode),n=this._editor.getOption(59);let o=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{if(1!=(1&e.buttons))return;this.hide();const t=new gh;t.startMonitoring(e.target,e.buttons,uh,(()=>{}),(()=>{t.dispose()}))}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(57)&&!this._editor.getOption(57).enabled&&this.hide()}))),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}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(t,i,n){if(t.validActions.length<=0)return this.hide();const o=this._editor.getOptions();if(!o.get(57).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:r,column:a}=s.validatePosition(n),l=s.getOptions().tabSize,c=o.get(44),d=Sv(s.getLineContent(r),l),h=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let u=r;if(!(c.spaceWidth*d>22))if(r>1&&!h(r-1))u-=1;else if(h(r+1)){if(a*c.spaceWidth<22)return this.hide()}else u+=1;this.state=new xN.Showing(t,i,n,{position:{lineNumber:u,column:1},preference:e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=xN.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(1===this.state.type&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...Oo.lightBulb.classNamesArray),this._domNode.classList.add(...Oo.lightbulbAutofix.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(e)return void(this.title=b(0,"Show Code Actions. Preferred Quick Fix Available ({0})",e.getLabel()))}this._domNode.classList.remove(...Oo.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...Oo.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);this.title=e?b(0,"Show Code Actions ({0})",e.getLabel()):b(0,"Show Code Actions")}set title(e){this._domNode.title=e}};kN._posPref=[0],kN=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,_N)],kN),br(((e,t)=>{var i;const n=null===(i=e.getColor(wu))||void 0===i?void 0:i.transparent(.7),o=e.getColor(sg);o&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${Oo.lightBulb.cssSelector} {\n\t\t\tcolor: ${o};\n\t\t\tbackground-color: ${n};\n\t\t}`);const s=e.getColor(rg);s&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${Oo.lightbulbAutofix.cssSelector} {\n\t\t\tcolor: ${s};\n\t\t\tbackground-color: ${n};\n\t\t}`)}));var DN,LN=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let EN=class extends B{constructor(e,t,i,n,o){super(),this._editor=e,this.delegate=n,this._activeCodeActions=this._register(new V),DN.set(this,!1),this._codeActionWidget=new Bo((()=>this._register(o.createInstance(CN,this._editor,{onSelectCodeAction:e=>LN(this,void 0,void 0,(function*(){this.delegate.applyCodeAction(e,!0)}))})))),this._lightBulbWidget=new Bo((()=>{const e=this._register(o.createInstance(kN,this._editor,t,i));return this._register(e.onClick((e=>this.showCodeActionList(e.trigger,e.actions,e,{includeDisabledActions:!1})))),e}))}dispose(){(function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,i):o?o.value=i:t.set(e,i)})(this,DN,!0,"f"),super.dispose()}update(e){var t,i,n,o,s;return LN(this,void 0,void 0,(function*(){if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let r;try{r=yield e.actions}catch(e){return void w(e)}if(!function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}(this,DN,"f"))if(this._lightBulbWidget.getValue().update(r,e.trigger,e.position),1===e.trigger.type){if(null===(i=e.trigger.filter)||void 0===i?void 0:i.include){const t=this.tryGetValidActionToApply(e.trigger,r);if(t){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(t,!1)}finally{r.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,r);if(t&&t.action.disabled)return null===(n=mN.get(this._editor))||void 0===n||n.showMessage(t.action.disabled,e.trigger.context.position),void r.dispose()}}const t=!!(null===(o=e.trigger.filter)||void 0===o?void 0:o.include);if(e.trigger.context&&(!r.allActions.length||!t&&!r.validActions.length))return null===(s=mN.get(this._editor))||void 0===s||s.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=r,void r.dispose();this._activeCodeActions.value=r,this._codeActionWidget.getValue().show(e.trigger,r,e.position,{includeDisabledActions:t})}else this._codeActionWidget.getValue().isVisible?r.dispose():this._activeCodeActions.value=r}))}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}showCodeActionList(e,t,i,n){return LN(this,void 0,void 0,(function*(){this._codeActionWidget.getValue().show(e,t,i,n)}))}};var NN,IN;DN=new WeakMap,EN=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)}}(4,yo)],EN),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(NN||(NN={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=b(0,"Error"),t[e.Warning]=b(0,"Warning"),t[e.Info]=b(0,"Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case lk.Error:return e.Error;case lk.Warning:return e.Warning;case lk.Info:return e.Info;case lk.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return lk.Error;case e.Warning:return lk.Warning;case e.Info:return lk.Info;case e.Hint:return lk.Ignore}}}(NN||(NN={})),function(e){const t="";function i(e,i){let n=[t];return e.source?n.push(e.source.replace("¦","\\¦")):n.push(t),e.code?"string"==typeof e.code?n.push(e.code.replace("¦","\\¦")):n.push(e.code.value.replace("¦","\\¦")):n.push(t),void 0!==e.severity&&null!==e.severity?n.push(NN.toString(e.severity)):n.push(t),e.message&&i?n.push(e.message.replace("¦","\\¦")):n.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?n.push(e.startLineNumber.toString()):n.push(t),void 0!==e.startColumn&&null!==e.startColumn?n.push(e.startColumn.toString()):n.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?n.push(e.endLineNumber.toString()):n.push(t),void 0!==e.endColumn&&null!==e.endColumn?n.push(e.endColumn.toString()):n.push(t),n.push(t),n.join("¦")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(IN||(IN={}));const TN=xo("markerService");var MN,RN=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)};const PN=new nr("supportedCodeAction","");class AN extends B{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new oi),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._onCursorChange())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>zy(e,t.uri)))&&this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(t)for(const i of this._markerService.read({resource:t.uri})){const n=t.validateRange(i);if(ia.intersectRanges(n,e))return ia.lift(n)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&2===e.type){const{lineNumber:e,column:n}=i.getPosition(),o=t.getLineContent(e);if(0===o.length)return;if(1===n){if(/\s/.test(o[0]))return}else if(n===t.getLineMaxColumn(e)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[n-2])&&/\s/.test(o[n-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i)return void this._signalChange(void 0);const n=this._getRangeOfMarker(t),o=n?n.getStartPosition():t.getStartPosition(),s={trigger:e,selection:t,position:o};return this._signalChange(s),s}}var ON;!function(e){e.Empty={type:0},e.Triggered=class{constructor(e,t,i,n){this.trigger=e,this.rangeOrSelection=t,this.position=i,this._cancellablePromise=n,this.type=1,this.actions=n.catch((e=>{if(k(e))return FN;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(ON||(ON={}));const FN={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class WN extends B{constructor(e,t,i,n,o){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=o,this._codeActionOracle=this._register(new V),this._state=ON.Empty,this._onDidChangeState=this._register(new Pe),this.onDidChangeState=this._onDidChangeState.event,MN.set(this,!1),this._supportedCodeActions=PN.bindTo(n),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(this._registry.onDidChange((()=>this._update()))),this._update()}dispose(){RN(this,MN,"f")||(function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,i):o?o.value=i:t.set(e,i)}(this,MN,!0,"f"),super.dispose(),this.setState(ON.Empty,!0))}_update(){if(RN(this,MN,"f"))return;this._codeActionOracle.value=void 0,this.setState(ON.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(81)){const t=[];for(const i of this._registry.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new AN(this._editor,this._markerService,(t=>{var i;if(!t)return void this.setState(ON.Empty);const n=Gt((i=>uN(this._registry,e,t.selection,t.trigger,VD.None,i)));1===t.trigger.type&&(null===(i=this._progressService)||void 0===i||i.showWhile(n,250)),this.setState(new ON.Triggered(t.trigger,t.selection,t.position,n))}),void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||RN(this,MN,"f")||this._onDidChangeState.fire(e))}}MN=new WeakMap;var BN=function(e,t){return function(i,n){t(i,n,e)}},VN=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function HN(e){return Fs.regex(PN.keys()[0],new RegExp("(\\s|^)"+Ko(e.value)+"\\b"))}const zN={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:b(0,"Kind of the code action to run.")},apply:{type:"string",description:b(0,"Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[b(0,"Always apply the first returned code action."),b(0,"Apply the first returned code action if it is the only one."),b(0,"Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:b(0,"Controls if only preferred code actions should be returned.")}}};let jN=class e extends B{constructor(e,t,i,n,o,s){super(),this._instantiationService=o,this._editor=e,this._model=this._register(new WN(this._editor,s.codeActionProvider,t,i,n)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._ui=new Bo((()=>this._register(new EN(e,UN.Id,$N.Id,{applyCodeAction:(e,t)=>VN(this,void 0,void 0,(function*(){try{yield this._applyCodeAction(e)}finally{t&&this._trigger({type:2,filter:{}})}}))},this._instantiationService))))}static get(t){return t.getContribution(e.ID)}update(e){this._ui.getValue().update(e)}showCodeActions(e,t,i){return this._ui.getValue().showCodeActionList(e,t,i,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(e,t,i){var n;if(!this._editor.hasModel())return;null===(n=mN.get(this._editor))||void 0===n||n.closeMessage();const o=this._editor.getPosition();this._trigger({type:1,filter:t,autoApply:i,context:{notAvailableMessage:e,position:o}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e){return this._instantiationService.invokeFunction(qN,e,this._editor)}};function qN(e,t,i){return VN(this,void 0,void 0,(function*(){const n=e.get(qE),o=e.get(Fo),s=e.get(Tr),r=e.get(dk);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred}),yield t.resolve(qt.None),t.action.edit&&(yield n.apply(KE.convert(t.action.edit),{editor:i,label:t.action.title})),t.action.command)try{yield o.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);r.error("string"==typeof t?t:b(0,"An unknown error occurred while applying the code action"))}}))}function KN(e,t,i,n){if(e.hasModel()){const o=jN.get(e);o&&o.manualTriggerAtCurrentPosition(t,i,n)}}jN.ID="editor.contrib.quickFixController",jN=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}([BN(1,TN),BN(2,or),BN(3,HD),BN(4,yo),BN(5,Mk)],jN);class UN extends zr{constructor(){super({id:UN.Id,label:b(0,"Quick Fix..."),alias:"Quick Fix...",precondition:Fs.and(Rc.writable,Rc.hasCodeActionsProvider),kbOpts:{kbExpr:Rc.editorTextFocus,primary:2132,weight:100}})}run(e,t){return KN(t,b(0,"No code actions available"),void 0,void 0)}}UN.Id="editor.action.quickFix";class $N extends zr{constructor(){super({id:$N.Id,label:b(0,"Auto Fix..."),alias:"Auto Fix...",precondition:Fs.and(Rc.writable,HN(eN.QuickFix)),kbOpts:{kbExpr:Rc.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return KN(t,b(0,"No auto fixes available"),{include:eN.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}function ZN(e){return GN(e,0)}function GN(e,t){switch(typeof e){case"object":return null===e?YN(349,t):Array.isArray(e)?(i=e,n=YN(104579,n=t),i.reduce(((e,t)=>GN(t,e)),n)):function(e,t){return t=YN(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=XN(i,t),GN(e[i],t))),t)}(e,t);case"string":return XN(e,t);case"boolean":return function(e,t){return YN(e?433:863,t)}(e,t);case"number":return YN(e,t);case"undefined":return YN(937,t);default:return YN(617,t)}var i,n}function YN(e,t){return(t<<5)-t+e|0}function XN(e,t){t=YN(149417,t);for(let i=0,n=e.length;i>>n)>>>0}function QN(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)}$N.Id="editor.action.autoFix",Gr(jN.ID,jN),Ur(UN),Ur(class extends zr{constructor(){super({id:sN,label:b(0,"Refactor..."),alias:"Refactor...",precondition:Fs.and(Rc.writable,Rc.hasCodeActionsProvider),kbOpts:{kbExpr:Rc.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:Fs.and(Rc.writable,HN(eN.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:zN}]}})}run(e,t,i){const n=iN.fromUser(i,{kind:eN.Refactor,apply:"never"});return KN(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?b(0,"No preferred refactorings for '{0}' available",i.kind):b(0,"No refactorings for '{0}' available",i.kind):n.preferred?b(0,"No preferred refactorings available"):b(0,"No refactorings available"),{include:eN.Refactor.contains(n.kind)?n.kind:eN.None,onlyIncludePreferredActions:n.preferred},n.apply)}}),Ur(class extends zr{constructor(){super({id:rN,label:b(0,"Source Action..."),alias:"Source Action...",precondition:Fs.and(Rc.writable,Rc.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:Fs.and(Rc.writable,HN(eN.Source))},description:{description:"Source Action...",args:[{name:"args",schema:zN}]}})}run(e,t,i){const n=iN.fromUser(i,{kind:eN.Source,apply:"never"});return KN(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?b(0,"No preferred source actions for '{0}' available",i.kind):b(0,"No source actions for '{0}' available",i.kind):n.preferred?b(0,"No preferred source actions available"):b(0,"No source actions available"),{include:eN.Source.contains(n.kind)?n.kind:eN.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}),Ur(class extends zr{constructor(){super({id:aN,label:b(0,"Organize Imports"),alias:"Organize Imports",precondition:Fs.and(Rc.writable,HN(eN.SourceOrganizeImports)),kbOpts:{kbExpr:Rc.editorTextFocus,primary:1581,weight:100}})}run(e,t){return KN(t,b(0,"No organize imports action available"),{include:eN.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}),Ur($N),Ur(class extends zr{constructor(){super({id:lN,label:b(0,"Fix All"),alias:"Fix All",precondition:Fs.and(Rc.writable,HN(eN.SourceFixAll))})}run(e,t){return KN(t,b(0,"No fix all action available"),{include:eN.SourceFixAll,includeSourceActions:!0},"ifSingle")}}),Kr(new class extends Hr{constructor(){super({id:oN,precondition:Fs.and(Rc.writable,Rc.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:zN}]}})}runEditorCommand(e,t,i){const n=iN.fromUser(i,{kind:eN.Empty,apply:"ifSingle"});return KN(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?b(0,"No preferred code actions for '{0}' available",i.kind):b(0,"No code actions for '{0}' available",i.kind):n.preferred?b(0,"No preferred code actions available"):b(0,"No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}});class tI{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 n,o,s=this._buffLen,r=this._leftoverHighSurrogate;for(0!==r?(n=r,o=-1,r=0):(n=e.charCodeAt(0),o=0);;){let a=n;if(hs(n)){if(!(o+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()),eI(this._h0)+eI(this._h1)+eI(this._h2)+eI(this._h3)+eI(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,QN(this._buff,this._buffLen),this._buffLen>56&&(this._step(),QN(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=tI._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,JN(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,l=this._h3,c=this._h4;for(let t=0;t<80;t++)t<20?(i=r&a|~r&l,n=1518500249):t<40?(i=r^a^l,n=1859775393):t<60?(i=r&a|r&l|a&l,n=2400959708):(i=r^a^l,n=3395469782),o=JN(s,5)+i+c+n+e.getUint32(4*t,!1)&4294967295,c=l,l=a,a=JN(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+l&4294967295,this._h4=this._h4+c&4294967295}}tI._bigBlock32=new DataView(new ArrayBuffer(320));var iI=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class nI{constructor(){this.lenses=[],this._disposables=new W}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})}}function oI(e,t,i){return iI(this,void 0,void 0,(function*(){const n=e.ordered(t),o=new Map,s=new nI,r=n.map(((e,n)=>iI(this,void 0,void 0,(function*(){o.set(e,n);try{const n=yield Promise.resolve(e.provideCodeLenses(t,i));n&&s.add(n,e)}catch(e){y(e)}}))));return yield Promise.all(r),s.lenses=s.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:o.get(e.provider)o.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),s}))}Wo.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;lt(qi.isUri(i)),lt("number"==typeof n||!n);const{codeLensProvider:o}=e.get(Mk),s=e.get(Lo).getModel(i);if(!s)throw E();const r=[],a=new W;return oI(o,s,qt.None).then((e=>{a.add(e);let t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?r.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(s,i.symbol,qt.None)).then((e=>r.push(e||i.symbol))));return Promise.all(t)})).then((()=>r)).finally((()=>{setTimeout((()=>a.dispose()),100)}))}));var sI,rI=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(sI||(sI={}));class aI extends B{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new Pe),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=sI.None,this.cache=new Map,this.flushDelayer=new ei(aI.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;null===(t=e.changed)||void 0===t||t.forEach(((e,t)=>this.accept(t,e))),null===(i=e.deleted)||void 0===i||i.forEach((e=>this.accept(e,void 0)))}accept(e,t){if(this.state===sI.Closed)return;let i=!1;at(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire(e)}get(e,t){const i=this.cache.get(e);return at(i)?t:i}getBoolean(e,t){const i=this.get(e);return at(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return at(i)?t:parseInt(i,10)}set(e,t){return rI(this,void 0,void 0,(function*(){if(this.state===sI.Closed)return;if(at(t))return this.delete(e);const i=String(t);return this.cache.get(e)!==i?(this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()):void 0}))}delete(e){return rI(this,void 0,void 0,(function*(){if(this.state!==sI.Closed)return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()):void 0}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return rI(this,void 0,void 0,(function*(){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()}))}))}doFlush(e){return rI(this,void 0,void 0,(function*(){return this.flushDelayer.trigger((()=>this.flushPending()),e)}))}dispose(){this.flushDelayer.dispose(),super.dispose()}}aI.DEFAULT_FLUSH_DELAY=100;class lI{constructor(){this.onDidChangeItemsExternal=Ie.None,this.items=new Map}updateItems(e){return rI(this,void 0,void 0,(function*(){e.insert&&e.insert.forEach(((e,t)=>this.items.set(t,e))),e.delete&&e.delete.forEach((e=>this.items.delete(e)))}))}}const cI="__$__targetStorageMarker",dI=xo("storageService");var hI;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(hI||(hI={}));class uI extends B{constructor(e={flushInterval:uI.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new Ae),this._onDidChangeTarget=this._register(new Ae),this._onWillSaveState=this._register(new Pe),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,t){t===cI?(0===e?this._globalKeyTargets=void 0:1===e&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:e})):this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}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){at(t)?this.remove(e,i):this.withPausedEmitters((()=>{var o;this.updateKeyTarget(e,i,n),null===(o=this.getStorage(i))||void 0===o||o.set(e,t)}))}remove(e,t){this.withPausedEmitters((()=>{var i;this.updateKeyTarget(e,t,void 0),null===(i=this.getStorage(t))||void 0===i||i.delete(e)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i){var n,o;const s=this.getKeyTargets(t);"number"==typeof i?s[e]!==i&&(s[e]=i,null===(n=this.getStorage(t))||void 0===n||n.set(cI,JSON.stringify(s))):"number"==typeof s[e]&&(delete s[e],null===(o=this.getStorage(t))||void 0===o||o.set(cI,JSON.stringify(s)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(e){return 0===e?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(e){const t=this.get(cI,e);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}}uI.DEFAULT_FLUSH_INTERVAL=6e4;const gI=xo("ICodeLensCache");class pI{constructor(e,t){this.lineCount=e,this.data=t}}let mI=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new SL(20,.75),ai((()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),I(e.onWillSaveState)((i=>{i.reason===hI.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 nI;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new pI(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 ia(e,1,e,11)});const o=new nI;o.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new pI(i.lineCount,o))}}catch(e){}}};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,dI)],mI),cc(gI,mI);const fI=new RegExp(`(\\\\)?\\$\\((${No.iconNameExpression}(?:${No.iconModifierExpression})?)\\)`,"g");function _I(e){const t=new Array;let i,n=0,o=0;for(;null!==(i=fI.exec(e));){o=i.index||0,t.push(e.substring(n,o)),n=(i.index||0)+i[0].length;const[,s,r]=i;t.push(s?`$(${r})`:vI({id:r}))}return n{e.symbol.command&&l.push(e.symbol),n.addDecoration({range:e.symbol.range,options:Fx.EMPTY},(e=>this._decorationIds[t]=e)),a=a?ia.plusRange(a,e.symbol.range):ia.lift(e.symbol.range)})),this._viewZone=new wI(a.startLineNumber-1,s,r),this._viewZoneId=o.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new yI(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],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||ia.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:Fx.EMPTY},(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;tGN(RI.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?NI(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 TI(6),this._cache.set(i,n));const o=NI(n.update(t),this._min,this._max);return this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${o}ms`),o}_overall(){const e=new II;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){return NI(0|this._overall()||this._default,this._min,this._max)}}let AI=class{constructor(e){this._logService=e,this._data=new Map}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:Math.pow(r,2),l=null!==(s=null==i?void 0:i.key)&&void 0!==s?s:void 0,c=`${RI.of(e)},${r}${l?","+l:""}`;let d=this._data.get(c);return d||(d=new PI(this._logService,t,e,0|this._overallAverage()||1.5*r,r,a),this._data.set(c,d)),d}_overallAverage(){let e=new II;for(let t of this._data.values())e.update(t.default());return e.value}};AI=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,Mr)],AI),cc(MI,AI,!0);var OI=function(e,t){return function(i,n){t(i,n,e)}};let FI=class{constructor(e,t,i,n,o,s){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=o,this._codeLensCache=s,this._disposables=new W,this._localToDispose=new W,this._lenses=[],this._oldCodeLensModels=new W,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new ri((()=>this._resolveCodeLensesInViewport()),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(44)||e.hasChanged(16)||e.hasChanged(15))&&this._updateLensStyle(),e.hasChanged(14)&&this._onModelChange()}))),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+ZN(this._editor.getId()).toString(16),this._styleElement=Hn(Wn(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){let e,t=this._editor.getOption(16);return!t||t<5?(t=.9*this._editor.getOption(46)|0,e=this._editor.getOption(59)):e=t*Math.max(1.3,this._editor.getOption(59)/this._editor.getOption(46))|0,{codeLensHeight:e,fontSize:t}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(15),n=this._editor.getOption(44),o=`--codelens-font-family${this._styleClassName}`,s=`--codelens-font-features${this._styleClassName}`;let r=`\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(.5*t)}px; font-feature-settings: var(${s}) }\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; }\n\t\t`;i&&(r+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${o}), ${Bd.fontFamily}}`),this._styleElement.textContent=r,this._editor.getContainerDomNode().style.setProperty(o,null!=i?i:"inherit"),this._editor.getContainerDomNode().style.setProperty(s,n.fontFeatureSettings),this._editor.changeViewZones((t=>{for(let 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(14))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e))return void(t&&this._localToDispose.add(ii((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4)));for(const t of this._languageFeaturesService.codeLensProvider.all(e))if("function"==typeof t.onDidChange){let e=t.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new ri((()=>{var t;const n=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=Gt((t=>oI(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 o=this._provideCodeLensDebounce.update(e,Date.now()-n);i.delay=o,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewportSoon()}),w)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(F((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{let i=[],n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));let o=new SI;i.forEach((e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)})),o.commit(e)}))})),i.schedule()}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((()=>{i.schedule()}))),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(F((()=>{if(this._editor.getModel()){const e=aD.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){let 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 SI;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;let t,i=this._editor.getModel().getLineCount(),n=[];for(let o of e.lenses){let e=o.symbol.range.startLineNumber;e<1||e>i||(t&&t[t.length-1].symbol.range.startLineNumber===e?t.push(o):(t=[o],n.push(t)))}const o=aD.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=new SI;let o=0,r=0;for(;rthis._resolveCodeLensesInViewportSoon()))),o++,r++)}for(;othis._resolveCodeLensesInViewportSoon()))),r++;i.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=[],n=[];if(this._lenses.forEach((e=>{const o=e.computeIfNecessary(t);o&&(i.push(o),n.push(e))})),0===i.length)return;const o=Date.now(),s=Gt((e=>{const o=i.map(((i,o)=>{const s=new Array(i.length),r=i.map(((i,n)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(s[n]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then((e=>{s[n]=e}),y)));return Promise.all(r).then((()=>{e.isCancellationRequested||n[o].isDisposed()||n[o].updateCommands(s)}))}));return Promise.all(o)}));this._resolveCodeLensesPromise=s,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDebounce.update(t,Date.now()-o);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{w(e),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}getModel(){return this._currentCodeLensModel}};function WI(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}FI.ID="css.editor.codeLens",FI=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}([OI(1,Mk),OI(2,MI),OI(3,Fo),OI(4,dk),OI(5,gI)],FI),Gr(FI.ID,FI),Ur(class extends zr{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:Rc.hasCodeLensProvider,label:b(0,"Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){if(!t.hasModel())return;const i=e.get(EI),n=e.get(Fo),o=e.get(dk),s=t.getSelection().positionLineNumber,r=t.getContribution(FI.ID);if(!r)return;const a=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 c=yield i.pick(l,{canPickMany:!1});if(c){if(a.isDisposed)return yield n.executeCommand(this.id);try{yield n.executeCommand(c.command.id,...c.command.arguments||[])}catch(e){o.error(e)}}}))}}),Wo.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof qi))throw E();const{colorProvider:n}=e.get(Mk),o=e.get(Lo).getModel(i);if(!o)throw E();const s=[],r=n.ordered(o).reverse().map((e=>Promise.resolve(e.provideDocumentColors(o,qt.None)).then((e=>{if(Array.isArray(e))for(let t of e)s.push({range:t.range,color:[t.color.red,t.color.green,t.color.blue,t.color.alpha]})}))));return Promise.all(r).then((()=>s))})),Wo.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,n]=t,{uri:o,range:s}=n;if(!(o instanceof qi&&Array.isArray(i)&&4===i.length&&ia.isIRange(s)))throw E();const[r,a,l,c]=i,{colorProvider:d}=e.get(Mk),h=e.get(Lo).getModel(o);if(!h)throw E();const u={range:s,color:{red:r,green:a,blue:l,alpha:c}},g=[],p=d.ordered(h).reverse().map((e=>Promise.resolve(e.provideColorPresentations(h,u,qt.None)).then((e=>{Array.isArray(e)&&g.push(...e)}))));return Promise.all(p).then((()=>g))}));var BI=function(e,t){return function(i,n){t(i,n,e)}};const VI=Object.create({});let HI=class e extends B{constructor(t,i,n,o){super(),this._editor=t,this._configurationService=i,this._languageFeaturesService=n,this._localToDispose=this._register(new W),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=new Set,this._ruleFactory=new Kp(this._editor),this._colorDecorationClassRefs=this._register(new W),this._debounceInformation=o.for(n.colorProvider,"Document Colors",{min:e.RECOMPUTE_TIME}),this._register(t.onDidChangeModel((()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()}))),this._register(t.onDidChangeModelLanguage((()=>this.onModelChanged()))),this._register(n.colorProvider.onDidChange((()=>this.onModelChanged()))),this._register(t.onDidChangeConfiguration((()=>{let e=this._isEnabled;this._isEnabled=this.isEnabled(),e!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}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(17)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const e=this._editor.getModel();e&&this._languageFeaturesService.colorProvider.has(e)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new oi,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),this._debounceInformation.get(e)))}))),this.beginCompute())}beginCompute(){this._computePromise=Gt((e=>function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){const t=this._editor.getModel();if(!t)return Promise.resolve([]);const i=new Ne(!1),n=yield function(e,t,i){const n=[],o=e.ordered(t).reverse().map((e=>Promise.resolve(e.provideDocumentColors(t,i)).then((t=>{if(Array.isArray(t))for(let i of t)n.push({colorInfo:i,provider:e})}))));return Promise.all(o).then((()=>n))}(this._languageFeaturesService.colorProvider,t,e);return this._debounceInformation.update(t,i.elapsed()),n})))),this._computePromise.then((e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}),w)}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:Fx.EMPTY})));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[];for(let i=0;ithis._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecorationId(e){return this._colorDecoratorIds.has(e)}};HI.ID="editor.contrib.colorDetector",HI.RECOMPUTE_TIME=1e3,HI=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}([BI(1,ec),BI(2,Mk),BI(3,MI)],HI),Gr(HI.ID,HI);class zI{constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new Pe,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new Pe,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new Pe,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}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)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let e=0;e{this.backgroundColor=e.getColor(Zu)||vh.white}))),this._register(cn(this.pickedColorNode,$n.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(cn(o,$n.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=vh.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)}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=vh.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(KI(".codicon.codicon-color-mode"))}}class $I extends B{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this.domNode=KI(".colorpicker-body"),Xn(e,this.domNode),this.saturationBox=new ZI(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 YI(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new XI(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new vh(new _h(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new vh(new _h(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new vh(new _h(360===i?0:i,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class ZI extends B{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new Pe,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Pe,this.onColorFlushed=this._onColorFlushed.event,this.domNode=KI(".saturation-wrap"),Xn(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",Xn(this.domNode,this.canvas),this.selection=KI(".saturation-selection"),Xn(this.domNode,this.selection),this.layout(),this._register(un(this.domNode,(e=>this.onMouseDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(e){this.monitor=this._register(new gh);const t=En(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,uh,(e=>this.onDidChangePosition(e.posx-t.left,e.posy-t.top)),(()=>null));const i=gn(document,(()=>{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 vh(new _h(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=vh.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(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class GI extends B{constructor(e,t){super(),this.model=t,this._onDidChange=new Pe,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Pe,this.onColorFlushed=this._onColorFlushed.event,this.domNode=Xn(e,KI(".strip")),this.overlay=Xn(this.domNode,KI(".overlay")),this.slider=Xn(this.domNode,KI(".slider")),this.slider.style.top="0px",this._register(un(this.domNode,(e=>this.onMouseDown(e)))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onMouseDown(e){const t=this._register(new gh),i=En(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.buttons,uh,(e=>this.onDidChangeTop(e.posy-i.top)),(()=>null));const n=gn(document,(()=>{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 YI extends GI{constructor(e,t){super(e,t),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:n}=e.rgba,o=new vh(new mh(t,i,n,1)),s=new vh(new mh(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}}class XI extends GI{constructor(e,t){super(e,t),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class JI extends Z_{constructor(e,t,i,n){super(),this.model=t,this.pixelRatio=i,this._register(ze.onDidChange((()=>this.layout())));const o=KI(".colorpicker-widget");e.appendChild(o);const s=new UI(o,this.model,n);this.body=new $I(o,this.model,this.pixelRatio),this._register(s),this._register(this.body)}layout(){this.body.layout()}}var QI=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class eT{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 tT=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=1}computeSync(e,t){return[]}computeAsync(e,t,i){return hi.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return QI(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return[];const e=HI.get(this._editor);if(!e)return[];for(const i of t){if(!e.isColorDecorationId(i.id))continue;const t=e.getColorData(i.range.getStartPosition());if(t)return[yield this._createColorHover(this._editor.getModel(),t.colorInfo,t.provider)]}return[]}))}_createColorHover(e,t,i){return QI(this,void 0,void 0,(function*(){const n=e.getValueInRange(t.range),{red:o,green:s,blue:r,alpha:a}=t.color,l=new mh(Math.round(255*o),Math.round(255*s),Math.round(255*r),a),c=new vh(l),d=yield WI(e,t,i,qt.None),h=new zI(c,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(c,n),new eT(this,ia.lift(t.range),h,i)}))}renderHoverParts(e,t){if(0===t.length||!this._editor.hasModel())return B.None;const i=new W,n=t[0],o=this._editor.getModel(),s=n.model,r=i.add(new JI(e.fragment,s,this._editor.getOption(129),this._themeService));e.setColorPicker(r);let a=new ia(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn);const l=()=>{let t,i;if(s.presentation.textEdit){t=[s.presentation.textEdit],i=new ia(s.presentation.textEdit.range.startLineNumber,s.presentation.textEdit.range.startColumn,s.presentation.textEdit.range.endLineNumber,s.presentation.textEdit.range.endColumn);const e=this._editor.getModel()._setTrackedRange(null,i,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",t),i=this._editor.getModel()._getTrackedRange(e)||i}else t=[{range:a,text:s.presentation.label,forceMoveMarkers:!1}],i=a.setEndPosition(a.endLineNumber,a.startColumn+s.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",t);s.presentation.additionalTextEdits&&(t=[...s.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",t),e.hide()),this._editor.pushUndoStop(),a=i},c=e=>WI(o,{range:a,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},n.provider,qt.None).then((e=>{s.colorPresentations=e||[]}));return i.add(s.onColorFlushed((e=>{c(e).then(l)}))),i.add(s.onDidChangeColor(c)),i}};tT=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,ur)],tT);var iT=i(5626),nT={};function oT(e,t){return!!e[t]}nT.styleTagTransform=p(),nT.setAttributes=d(),nT.insert=l().bind(null,"head"),nT.domAPI=r(),nT.insertStyleElement=u(),o()(iT.Z,nT),iT.Z&&iT.Z.locals&&iT.Z.locals;class sT{constructor(e,t){this.target=e.target,this.hasTriggerModifier=oT(e.event,t.triggerModifier),this.hasSideBySideModifier=oT(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class rT{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=oT(e,t.triggerModifier)}}class aT{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 lT(e){return"altKey"===e?he?new aT(57,"metaKey",6,"altKey"):new aT(5,"ctrlKey",6,"altKey"):he?new aT(6,"altKey",57,"metaKey"):new aT(6,"altKey",5,"ctrlKey")}class cT extends B{constructor(e){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new Pe),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new Pe),this.onExecute=this._onExecute.event,this._onCancel=this._register(new Pe),this.onCancel=this._onCancel.event,this._editor=e,this._opts=lT(this._editor.getOption(70)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(70)){const e=lT(this._editor.getOption(70));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 sT(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new sT(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new sT(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new rT(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new rT(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=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;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()}}var dT=i(1799),hT={};hT.styleTagTransform=p(),hT.setAttributes=d(),hT.insert=l().bind(null,"head"),hT.domAPI=r(),hT.insertStyleElement=u(),o()(dT.Z,hT),dT.Z&&dT.Z.locals&&dT.Z.locals;var uT=function(e,t){return function(i,n){t(i,n,e)}};let gT=class extends Ok{constructor(e,t,i,n,o,s,r,a,l,c,d,h){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,o,s,r,a,l,c,d,h),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){td(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};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}([uT(3,yo),uT(4,ko),uT(5,Fo),uT(6,or),uT(7,ur),uT(8,dk),uT(9,th),uT(10,gc),uT(11,Mk)],gT);class pT{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const mT=new pT("id#");var fT=i(8209),_T={};_T.styleTagTransform=p(),_T.setAttributes=d(),_T.insert=l().bind(null,"head"),_T.domAPI=r(),_T.insertStyleElement=u(),o()(fT.Z,_T),fT.Z&&fT.Z.locals&&fT.Z.locals;const vT=new vh(new mh(0,122,204)),bT={showArrow:!0,showFrame:!0,className:"",frameColor:vT,arrowColor:vT,keepEditorSelection:!1};class CT{constructor(e,t,i,n,o,s){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class wT{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class yT{constructor(e){this._editor=e,this._ruleName=yT._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),Kn(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(){Kn(this._ruleName),qn(`.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=this._editor.deltaDecorations(this._decorations,[{range:ia.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}yT._IdGenerator=new pT(".arrow-decoration-");var ST=i(5398),xT={};xT.styleTagTransform=p(),xT.setAttributes=d(),xT.insert=l().bind(null,"head"),xT.domAPI=r(),xT.insertStyleElement=u(),o()(ST.Z,xT),ST.Z&&ST.Z.locals&&ST.Z.locals;class kT extends Mo{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new Pe),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=Xn(e,io(".monaco-dropdown")),this._label=Xn(this._element,io(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const e of[$n.CLICK,$n.MOUSE_DOWN,dh.Tap])this._register(cn(this.element,e,(e=>Zn(e,!0))));for(const e of[$n.MOUSE_DOWN,dh.Tap])this._register(cn(this._label,e,(e=>{e instanceof MouseEvent&&e.detail>1||(this.visible?this.hide():this.show())})));this._register(cn(this._label,$n.KEY_UP,(e=>{const t=new Ot(e);(t.equals(3)||t.equals(10))&&(Zn(e,!0),this.visible?this.hide():this.show())})));const n=i(this._label);n&&this._register(n),this._register(hh.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 DT extends kT{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class LT extends mD{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new Pe),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=Xn(e,io("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.element.title=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new DT(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=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;const i=!this.getAction().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)}}class ET{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=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=function(e,t){return function(i,n){t(i,n,e)}},FT=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let WT=class extends fD{constructor(e,t,i,n,o){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:null==t?void 0:t.draggable}),this._keybindingService=i,this._notificationService=n,this._contextKeyService=o,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new V),this._altKey=co.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return FT(this,void 0,void 0,(function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}}))}render(e){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,i=this._altKey.keyStatus.altKey||(de||ue)&&this._altKey.keyStatus.shiftKey;const n=()=>{const e=t&&i;e!==this._wantsAltCommand&&(this._wantsAltCommand=e,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event((e=>{i=e.altKey||(de||ue)&&e.shiftKey,n()}))),this._register(cn(e,"mouseleave",(e=>{t=!1,n()}))),this._register(cn(e,"mouseenter",(e=>{t=!0,n()})))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let n=t?b(0,"{0} ({1})",i,t):i;if(!this._wantsAltCommand&&this._menuItemAction.alt){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),i=t&&t.getLabel(),o=i?b(0,"{0} ({1})",e,i):e;n+=`\n[${NT.modifierLabels[Ce].altKey}] ${o}`}this.label.title=n}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:n}=this;if(!i||!n)return;const o=this._commandAction.checked&&(null===(t=e.toggled)||void 0===t?void 0:t.icon)?e.toggled.icon:e.icon;if(o)if(pr.isThemeIcon(o)){const e=pr.asClassNameArray(o);n.classList.add(...e),this._itemClassDispose.value=F((()=>{n.classList.remove(...e)}))}else o.light&&n.style.setProperty("--menu-entry-icon-light",ao(o.light)),o.dark&&n.style.setProperty("--menu-entry-icon-dark",ao(o.dark)),n.classList.add("icon"),this._itemClassDispose.value=F((()=>{n.classList.remove("icon"),n.style.removeProperty("--menu-entry-icon-light"),n.style.removeProperty("--menu-entry-icon-dark")}))}};WT=AT([OT(2,_N),OT(3,dk),OT(4,or)],WT);let BT=class extends LT{constructor(e,t,i){var n,o;const s=Object.assign({},null!=t?t:Object.create(null),{menuAsChild:null!==(n=null==t?void 0:t.menuAsChild)&&void 0!==n&&n,classNames:null!==(o=null==t?void 0:t.classNames)&&void 0!==o?o:pr.isThemeIcon(e.item.icon)?pr.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,s)}render(e){if(super.render(e),this.element){e.classList.add("menu-entry");const{icon:t}=this._action.item;t&&!pr.isThemeIcon(t)&&(this.element.classList.add("icon"),t.light&&this.element.style.setProperty("--menu-entry-icon-light",ao(t.light)),t.dark&&this.element.style.setProperty("--menu-entry-icon-dark",ao(t.dark)))}}};BT=AT([OT(2,OD)],BT);let VT=class extends mD{constructor(e,t,i,n,o,s,r,a){var l,c,d;let h;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=o,this._menuService=s,this._instaService=r,this._storageService=a,this._container=null,this._storageKey=`${e.item.submenu._debugName}_lastActionId`;let u=a.get(this._storageKey,1);u&&(h=e.actions.find((e=>u===e.id))),h||(h=e.actions[0]),this._defaultAction=this._instaService.createInstance(WT,h,void 0);const g=Object.assign({},null!=t?t:Object.create(null),{menuAsChild:null===(l=null==t?void 0:t.menuAsChild)||void 0===l||l,classNames:null!==(c=null==t?void 0:t.classNames)&&void 0!==c?c:["codicon","codicon-chevron-down"],actionRunner:null!==(d=null==t?void 0:t.actionRunner)&&void 0!==d?d:new Mo});this._dropdown=new LT(e,e.actions,this._contextMenuService,g),this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof Lr&&this.update(e.action)}))}update(e){var t,i;this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(WT,e,void 0),this._defaultAction.actionRunner=new class extends Mo{runAction(e,t){return FT(this,void 0,void 0,(function*(){yield e.run(void 0)}))}},this._container&&this._defaultAction.render((t=this._container,i=io(".action-container"),t.insertBefore(i,t.firstChild),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=io(".action-container");this._defaultAction.render(Xn(this._container,t)),this._register(cn(t,$n.KEY_DOWN,(e=>{const t=new Ot(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=io(".dropdown-action-container");this._dropdown.render(Xn(this._container,i)),this._register(cn(i,$n.KEY_DOWN,(e=>{var t;const i=new Ot(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()}};function HT(e,t,i){return t instanceof Lr?e.createInstance(WT,t,void 0):t instanceof Dr?t.item.rememberDefaultAction?e.createInstance(VT,t,i):e.createInstance(BT,t,i):void 0}VT=AT([OT(2,_N),OT(3,dk),OT(4,OD),OT(5,xr),OT(6,yo),OT(7,dI)],VT);var zT=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},jT=function(e,t){return function(i,n){t(i,n,e)}};const qT=xo("IPeekViewService");var KT;cc(qT,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))}))})}}),function(e){e.inPeekEditor=new nr("inReferenceSearchEditor",!0,b(0,"Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(KT||(KT={}));let UT=class{constructor(e,t){e instanceof gT&&KT.inPeekEditor.bindTo(t)}dispose(){}};UT.ID="editor.contrib.referenceController",UT=zT([jT(1,or)],UT),Gr(UT.ID,UT);const $T={headerBackgroundColor:vh.white,primaryHeadingColor:vh.fromHex("#333333"),secondaryHeadingColor:vh.fromHex("#6c6c6cb3")};let ZT=class extends class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new W,this.container=null,this._isShowing=!1,this.editor=e,this.options=Xc(t),td(this.options,bT,!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.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],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 yT(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){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let 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){if(this.domNode.style.height=`${e}px`,this.container){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash&&this._resizeSash.layout()}get position(){const[e]=this._positionMarkerId;if(!e)return;const t=this.editor.getModel();if(!t)return;const i=t.getDecorationRange(e);return i?i.getStartPosition():void 0}show(e,t){const i=ia.isIRange(e)?ia.lift(e):ia.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:i,options:Fx.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let e=this.editor.getOption(59),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(59),a=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,a);let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(r/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(c=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 CT(s,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e))),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new wT("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:c;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}let d=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden"),this._doLayout(d,o),this.options.keepEditorSelection||this.editor.setSelection(e);const h=this.editor.getModel();if(h){const t=e.endLineNumber+1;t<=h.getLineCount()?this.revealLine(t,!1):this.revealLine(h.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(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 rD(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){let i=(t.currentY-e.startY)/this.editor.getOption(59),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}}{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new Pe,this.onDidClose=this._onDidClose.event,td(this.options,$T,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let 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();let 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=io(".head"),this._bodyElement=io(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const i=io(".peekview-title");this.options.supportOnTitleClick&&(i.classList.add("clickable"),hn(i,"click",(e=>this._onTitleClick(e)))),Xn(this._headElement,i),this._fillTitleIcon(i),this._primaryHeading=io("span.filename"),this._secondaryHeading=io("span.dirname"),this._metaHeading=io("span.meta"),Xn(i,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=io(".peekview-actions");Xn(this._headElement,n);const o=this._getActionBarOptions();this._actionbarWidget=new vD(n,o),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new To("peekview.close",b(0,"Close"),Oo.close.classNames,!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:HT.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:rn(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,no(this._metaHeading)):oo(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(59)),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`)}};ZT=zT([jT(2,yo)],ZT);const GT=xh("peekViewTitle.background",{dark:Ep(_u,.1),light:Ep(_u,.1),hc:null},b(0,"Background color of the peek view title area.")),YT=xh("peekViewTitleLabel.foreground",{dark:vh.white,light:vh.black,hc:vh.white},b(0,"Color of the peek view title.")),XT=xh("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hc:"#FFFFFF99"},b(0,"Color of the peek view title info.")),JT=xh("peekView.border",{dark:_u,light:_u,hc:Nh},b(0,"Color of the peek view borders and arrow.")),QT=xh("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:vh.black},b(0,"Background color of the peek view result list.")),eM=(xh("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:vh.white},b(0,"Foreground color for line nodes in the peek view result list.")),xh("peekViewResult.fileForeground",{dark:vh.white,light:"#1E1E1E",hc:vh.white},b(0,"Foreground color for file nodes in the peek view result list.")),xh("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},b(0,"Background color of the selected entry in the peek view result list.")),xh("peekViewResult.selectionForeground",{dark:vh.white,light:"#6C6C6C",hc:vh.white},b(0,"Foreground color of the selected entry in the peek view result list.")),xh("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:vh.black},b(0,"Background color of the peek view editor.")));function tM(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===UC.ICodeEditor}function iM(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===UC.IDiffEditor}function nM(e){return tM(e)?e:iM(e)?e.getModifiedEditor():null}xh("peekViewEditorGutter.background",{dark:eM,light:eM,hc:eM},b(0,"Background color of the gutter in the peek view editor.")),xh("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},b(0,"Match highlight color in the peek view result list.")),xh("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},b(0,"Match highlight color in the peek view editor.")),xh("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:Ih},b(0,"Match highlight border in the peek view editor."));var oM,sM=i(2431),rM={};rM.styleTagTransform=p(),rM.setAttributes=d(),rM.insert=l().bind(null,"head"),rM.domAPI=r(),rM.insertStyleElement=u(),o()(sM.Z,rM),sM.Z&&sM.Z.locals&&sM.Z.locals;class aM{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}class lM extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function cM(e,t){const i=[];for(let n of t){if(e.start>=n.range.end)continue;if(e.end=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}}(oM||(oM={}));class hM{constructor(){this.groups=[],this._size=0}splice(e,t,i=[]){const n=i.length-t,o=cM({start:0,end:e},this.groups),s=cM({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map((e=>({range:dM(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(let 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.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;let t=0,i=0;for(let n of this.groups){const o=n.range.end-n.range.start,s=i+o*n.size;if(e{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null})),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var gM=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 pM={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class mM{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class fM{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class _M{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 bM{constructor(e,t,i,n=pM){if(this.virtualDelegate=t,this.domId="list_id_"+ ++bM.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Qt(50),this.splicing=!1,this.dragOverAnimationStopDisposable=B.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=B.None,this.onDragLeaveTimeout=B.None,this.disposables=new W,this._onDidChangeContentHeight=new Pe,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=new hM;for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new uM(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=nd(n,(e=>e.horizontalScrolling),pM.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=void 0===n.additionalScrollHeight?0:n.additionalScrollHeight,this.accessibilityProvider=new vM(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";const o=nd(n,(e=>e.transformOptimization),pM.transformOptimization);o&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(hh.addTarget(this.rowsContainer)),this.scrollable=new iv({forceIntegerValues:!0,smoothScrollDuration:nd(n,(e=>e.smoothScrolling),!1)?125:0,scheduleAtNextAnimationFrame:e=>_n(e)}),this.scrollableElement=this.disposables.add(new uv(this.rowsContainer,{alwaysConsumeMouseWheel:nd(n,(e=>e.alwaysConsumeMouseWheel),pM.alwaysConsumeMouseWheel),horizontal:1,vertical:nd(n,(e=>e.verticalScrollMode),pM.verticalScrollMode),useShadows:nd(n,(e=>e.useShadows),pM.useShadows),mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(cn(this.rowsContainer,dh.Change,(e=>this.onTouchChange(e)))),this.disposables.add(cn(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add(cn(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add(cn(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add(cn(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add(cn(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=nd(n,(e=>e.setRowLineHeight),pM.setRowLineHeight),this.setRowHeight=nd(n,(e=>e.setRowHeight),pM.setRowHeight),this.supportDynamicHeights=nd(n,(e=>e.supportDynamicHeights),pM.supportDynamicHeights),this.dnd=nd(n,(e=>e.dnd),pM.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}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:Tn(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=""}}updateOptions(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight,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.mouseWheelScrollSensitivity&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&this.scrollableElement.updateOptions({fastScrollSensitivity:e.fastScrollSensitivity})}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=oM.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.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}const a={start:e+t,end:this.items.length},l=oM.intersect(a,n),c=oM.relativeComplement(a,n),d=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:B.None,checkedDisposable:B.None})));let h;0===e&&t>=this.items.length?(this.rangeMap=new hM,this.rangeMap.splice(0,0,d),h=this.items,this.items=d):(this.rangeMap.splice(e,t,d),h=this.items.splice(e,t,...d));const u=i.length-t,g=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),p=dM(l,u),m=oM.intersect(g,p);for(let e=m.start;edM(e,u))),v=[{start:e,end:e+i.length},..._].map((e=>oM.intersect(g,e))),b=this.getNextToLastElement(v);for(const e of v)for(let t=e.start;te.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=_n((()=>{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})}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}element(e){return this.items[e].element}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){let i={height:"number"==typeof e?e:Mn(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:Tn(this.domNode)})}render(e,t,i,n,o,s=!1){const r=this.getRenderRange(t,i),a=oM.relativeComplement(r,e),l=oM.relativeComplement(e,r),c=this.getNextToLastElement(a);if(s){const t=oM.intersect(e,r);for(let e=t.start;en.row.domNode.setAttribute("aria-checked",String(!!e));e(s.value),n.checkedDisposable=s.onDidChange(e)}n.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),this.updateItemInDOM(n,e);const r=this.renderers.get(n.templateId);if(!r)throw new Error(`No renderer found for template id ${n.templateId}`);r&&r.renderElement(n.element,e,n.row.templateData,n.size);const a=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!a,a&&(n.dragStartDisposable=cn(n.row.domNode,"dragstart",(e=>this.onDragStart(n.element,a,e)))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=Ke?"-moz-fit-content":"fit-content",e.width=Tn(e.row.domNode);const t=window.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.additionalScrollHeight}get onMouseClick(){return Ie.map(this.disposables.add(new Zk(this.domNode,"click")).event,(e=>this.toMouseEvent(e)))}get onMouseDblClick(){return Ie.map(this.disposables.add(new Zk(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)))}get onMouseMiddleClick(){return Ie.filter(Ie.map(this.disposables.add(new Zk(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e))),(e=>1===e.browserEvent.button))}get onMouseDown(){return Ie.map(this.disposables.add(new Zk(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)))}get onContextMenu(){return Ie.any(Ie.map(this.disposables.add(new Zk(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e))),Ie.map(this.disposables.add(new Zk(this.domNode,dh.Contextmenu)).event,(e=>this.toGestureEvent(e))))}get onTouchStart(){return Ie.map(this.disposables.add(new Zk(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)))}get onTap(){return Ie.map(this.disposables.add(new Zk(this.rowsContainer,dh.Tap)).event,(e=>this.toGestureEvent(e)))}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}}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){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(dD.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(n,i)),void 0===e&&(e=String(n.length));const t=io(".monaco-drag-image");t.textContent=e,document.body.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>document.body.removeChild(t)),0)}this.currentDragData=new mM(n),uD.CurrentDragAndDropData=new fM(n),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),uD.CurrentDragAndDropData&&"vscode-ui"===uD.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(uD.CurrentDragAndDropData)this.currentDragData=uD.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new _M}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof t&&0===t.effect?"copy":"move",i="boolean"!=typeof t&&t.feedback?t.feedback:void 0===e.index?[-1]:[e.index],i=al(i).filter((e=>e>=-1&&ee-t)),i=-1===i[0]?[-1]:i,n=this.currentDragFeedback,o=i,Array.isArray(n)&&Array.isArray(o)?Qa(n,o):n===o)return!0;var n,o;if(this.currentDragFeedback=i,this.currentDragFeedbackDisposable.dispose(),-1===i[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=F((()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")}));else{for(const e of i){const t=this.items[e];t.dropTarget=!0,t.row&&t.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=F((()=>{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row&&t.row.domNode.classList.remove("drop-target")}}))}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=ii((()=>this.clearDragOverFeedback()),100),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.currentDragData=void 0,uD.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,uD.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=B.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=Ln(this.domNode).top;this.dragOverAnimationDisposable=function(e){const t=()=>{e(),i=_n(t)};let i=_n(t);return F((()=>i.dispose()))}(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=ii((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3),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)}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=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},yM=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class SM{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 xM{constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new Pe,this.onChange=this._onChange.event}get name(){return this._trait}get renderer(){return new SM(this)}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const o=i.length-t,s=e+t,r=[...this.sortedIndexes.filter((t=>tt?i+e:-1)).filter((e=>-1!==e)),...this.sortedIndexes.filter((e=>e>=s)).map((e=>e+o))],a=this.length+o;if(this.sortedIndexes.length>0&&0===r.length&&a>0){const t=null!==(n=this.sortedIndexes.find((t=>t>=e)))&&void 0!==n?n:a-1;r.push(Math.min(t,a-1))}this.renderer.splice(e,t,i.length),this._set(r,r),this.length=a}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(HM),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const s=VM(o,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return el(this.sortedIndexes,e,HM)>=0}dispose(){A(this._onChange)}}wM([ch],xM.prototype,"renderer",null);class kM extends xM{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 DM{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,i.map((()=>!1)));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString())),o=i.map((e=>n.indexOf(this.identityProvider.getId(e).toString())>-1));this.trait.splice(e,t,o)}}function LM(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function EM(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&!!e.parentElement&&EM(e.parentElement)}class NM{constructor(e,t,i){this.list=e,this.view=t,this.disposables=new W,this.multipleSelectionDisposables=new W,this.onKeyDown.filter((e=>3===e.keyCode)).on(this.onEnter,this,this.disposables),this.onKeyDown.filter((e=>16===e.keyCode)).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter((e=>18===e.keyCode)).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter((e=>11===e.keyCode)).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter((e=>12===e.keyCode)).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter((e=>9===e.keyCode)).on(this.onEscape,this,this.disposables),!1!==i.multipleSelectionSupport&&this.onKeyDown.filter((e=>(he?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return Ie.chain(this.disposables.add(new Zk(this.view.domNode,"keydown")).event).filter((e=>!LM(e.target))).map((e=>new Ot(e)))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter((e=>(he?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables))}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(dl(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()}}wM([ch],NM.prototype,"onKeyDown",null),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(CM||(CM={}));const IM=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>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class TM{constructor(e,t,i,n){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.delegate=n,this.enabled=!1,this.state=CM.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new W,this.disposables=new W,this.updateOptions(e.options)}updateOptions(e){void 0===e.enableKeyboardNavigation||e.enableKeyboardNavigation?this.enable():this.disable(),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=Ie.chain(this.enabledDisposables.add(new Zk(this.view.domNode,"keydown")).event).filter((e=>!LM(e.target))).filter((()=>this.automaticKeyboardNavigation||this.triggered)).map((e=>new Ot(e))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>e.preventDefault())).map((e=>e.browserEvent.key)).event,t=Ie.debounce(e,(()=>null),800),i=Ie.reduce(Ie.any(e,t),((e,t)=>null===t?null:(e||"")+t));i(this.onInput,this,this.enabledDisposables),t(this.onClear,this,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&&vo(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=CM.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===CM.Idle?1:0;this.state=CM.Typing;for(let t=0;t!LM(e.target))).map((e=>new Ot(e))).filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))).on(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 n=i.querySelector("[tabIndex]");if(!(n&&n instanceof HTMLElement&&-1!==n.tabIndex))return;const o=window.getComputedStyle(n);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function RM(e){return he?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function PM(e){return e.browserEvent.shiftKey}const AM={isSelectionSingleChangeEvent:RM,isSelectionRangeChangeEvent:PM};class OM{constructor(e){this.list=e,this.disposables=new W,this._onPointer=new Pe,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||AM),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(hh.addTarget(e.getHTMLElement()))),Ie.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||AM))}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){EM(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(EM(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(LM(e.browserEvent.target)||EM(e.browserEvent.target))return;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.isSelectionRangeChangeEvent(e)||this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),function(e){return e instanceof MouseEvent&&2===e.button}(e.browserEvent)||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e))}onDoubleClick(e){if(LM(e.browserEvent.target)||EM(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;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=dl(Math.min(i,t),Math.max(i,t)+1),o=this.list.getSelection(),s=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 FM{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&(e.listBackground.isOpaque()?i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):he||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}: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${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&i.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.listFilterWidgetBackground&&i.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&i.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&i.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&i.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),e.tableColumnsBorder&&i.push(`\n\t\t\t\t.monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t}`),e.tableOddRowsBackgroundColor&&i.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=i.join("\n")}}const WM={listFocusBackground:vh.fromHex("#7FB0D0"),listActiveSelectionBackground:vh.fromHex("#0E639C"),listActiveSelectionForeground:vh.fromHex("#FFFFFF"),listActiveSelectionIconForeground:vh.fromHex("#FFFFFF"),listFocusAndSelectionBackground:vh.fromHex("#094771"),listFocusAndSelectionForeground:vh.fromHex("#FFFFFF"),listInactiveSelectionBackground:vh.fromHex("#3F3F46"),listInactiveSelectionIconForeground:vh.fromHex("#FFFFFF"),listHoverBackground:vh.fromHex("#2A2D2E"),listDropBackground:vh.fromHex("#383B3D"),treeIndentGuidesStroke:vh.fromHex("#a9a9a9"),tableColumnsBorder:vh.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:vh.fromHex("#cccccc").transparent(.04)},BM={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}}};function VM(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 zM{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){let o=0;for(const s of this.renderers)s.disposeElement&&s.disposeElement(e,t,i[o],n),o+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class jM{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 qM{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}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){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class KM{constructor(e,t,i,n,o=BM){var s;this.user=e,this._options=o,this.focus=new xM("focused"),this.anchor=new xM("anchor"),this.eventBufferer=new Fe,this._ariaLabel="",this.disposables=new W,this._onDidDispose=new Pe,this.onDidDispose=this._onDidDispose.event;const r=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(s=this._options.accessibilityProvider)||void 0===s?void 0:s.getWidgetRole():"list";this.selection=new kM("listbox"!==r),td(o,WM,!1);const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(a.push(new jM(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map((e=>new zM(e.templateId,[...a,e])));const l=Object.assign(Object.assign({},o),{dnd:o.dnd&&new qM(this,o.dnd)});if(this.view=new bM(t,i,n,l),this.view.domNode.setAttribute("role",r),o.styleController)this.styleController=o.styleController(this.view.domId);else{const e=Hn(this.view.domNode);this.styleController=new FM(e,this.view.domId)}if(this.spliceable=new aM([new DM(this.focus,this.view,o.identityProvider),new DM(this.selection,this.view,o.identityProvider),new DM(this.anchor,this.view,o.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 MM(this,this.view)),("boolean"!=typeof o.keyboardSupport||o.keyboardSupport)&&(this.keyboardController=new NM(this,this.view,o),this.disposables.add(this.keyboardController)),o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||IM;this.typeLabelController=new TM(this,this.view,o.keyboardNavigationLabelProvider,e),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(o),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")}get onDidChangeFocus(){return Ie.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)))}get onDidChangeSelection(){return Ie.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)))}get domId(){return this.view.domId}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 onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=Ie.chain(this.disposables.add(new Zk(this.view.domNode,"keydown")).event).map((e=>new Ot(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map(Gk).filter((()=>!1)).event,i=Ie.chain(this.disposables.add(new Zk(this.view.domNode,"keyup")).event).forEach((()=>e=!1)).map((e=>new Ot(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map(Gk).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}})).event,n=Ie.chain(this.view.onContextMenu).filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:{x:i.pageX+1,y:i.pageY},browserEvent:i}))).event;return Ie.any(t,i,n)}get onKeyDown(){return this.disposables.add(new Zk(this.view.domNode,"keydown")).event}get onDidFocus(){return Ie.signal(this.disposables.add(new Zk(this.view.domNode,"focus",!0)).event)}createMouseController(e){return new OM(this)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.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===(t=this.keyboardController)||void 0===t||t.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new lM(this.user,`Invalid start index: ${e}`);if(t<0)throw new lM(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)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}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 lM(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 lM(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return ll(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 lM(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)}focusNextPage(e,t){return yM(this,void 0,void 0,(function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.view.element(i),o=this.getFocusedElements()[0];if(o!==n){const n=this.findPreviousIndex(i,!1,t);n>-1&&o!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const n=this.view.getScrollTop();this.view.setScrollTop(n+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==n&&(this.setFocus([]),yield ti(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return yM(this,void 0,void 0,(function*(){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);const o=this.view.element(i),s=this.getFocusedElements()[0];if(s!==o){const n=this.findNextIndex(i,!1,t);n>-1&&s!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&(this.setFocus([]),yield ti(0),yield this.focusPreviousPage(e,t))}}))}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){if(e<0||e>=this.length)throw new lM(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if(it(t)){const e=o-this.view.renderHeight;this.view.setScrollTop(e*NI(t,0,1)+n)}else{const e=n+o,t=i+this.view.renderHeight;n=t||(n=t&&o>=this.view.renderHeight?this.view.setScrollTop(n):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new lM(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(it+this.view.renderHeight)return null;const o=n-this.view.renderHeight;return Math.abs((t-i)/o)}getHTMLElement(){return this.view.domNode}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()}}wM([ch],KM.prototype,"onDidChangeFocus",null),wM([ch],KM.prototype,"onDidChangeSelection",null),wM([ch],KM.prototype,"onContextMenu",null),wM([ch],KM.prototype,"onKeyDown",null),wM([ch],KM.prototype,"onDidFocus",null);class UM{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:B.None}}renderElement(e,t,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,i.data,n);const s=new Ut,r=o.resolve(e,s.token);i.disposable={dispose:()=>s.cancel()},this.renderer.renderPlaceholder(e,i.data),r.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 $M{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}}var ZM=i(2672),GM={};GM.styleTagTransform=p(),GM.setAttributes=d(),GM.insert=l().bind(null,"head"),GM.domAPI=r(),GM.insertStyleElement=u(),o()(ZM.Z,GM),ZM.Z&&ZM.Z.locals&&ZM.Z.locals;const YM={separatorBorder:vh.transparent};class XM{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)}set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){e!==this.visible&&(e?(this.size=NI(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),this.view.setVisible&&this.view.setVisible(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 snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class JM extends XM{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class QM extends XM{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var eR,tR;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(eR||(eR={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(tR||(tR={}));class iR extends B{constructor(e,t={}){var i,n,o,s,r;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=eR.Idle,this._onDidSashChange=this._register(new Pe),this._onDidSashReset=this._register(new Pe),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!==(n=t.inverseAltBehavior)&&void 0!==n&&n,this.proportionalLayout=null===(o=t.proportionalLayout)||void 0===o||o,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=Xn(this.el,io(".sash-container")),this.viewContainer=io(".split-view-container"),this.scrollable=new iv({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:_n}),this.scrollableElement=this._register(new uv(this.viewContainer,{vertical:0===this.orientation?null!==(s=t.scrollbarVisibility)&&void 0!==s?s:1:2,horizontal:1===this.orientation?null!==(r=t.scrollbarVisibility)&&void 0!==r?r:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{this.viewContainer.scrollTop=e.scrollTop,this.viewContainer.scrollLeft=e.scrollLeft}))),Xn(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||YM),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=st(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())}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())}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)for(let t=0;t1===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.size/this.contentSize)))}onSashStart({sash:e,start:t,alt:i}){for(const e of this.viewItems)e.enabled=!1;const n=this.sashItems.findIndex((t=>t.sash===e)),o=O(cn(document.body,"keydown",(e=>s(this.sashDragState.current,e.altKey))),cn(document.body,"keyup",(()=>s(this.sashDragState.current,!1)))),s=(e,t)=>{const i=this.viewItems.map((e=>e.size));let s,r,a=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t)if(n===this.sashItems.length-1){const e=this.viewItems[n];a=(e.minimumSize-e.size)/2,l=(e.maximumSize-e.size)/2}else{const e=this.viewItems[n+1];a=(e.size-e.maximumSize)/2,l=(e.size-e.minimumSize)/2}if(!t){const e=dl(n,-1),t=dl(n+1,this.viewItems.length),o=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),a=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),l=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),d=Math.max(o,c),h=Math.min(l,a),u=this.findFirstSnapIndex(e),g=this.findFirstSnapIndex(t);if("number"==typeof u){const e=this.viewItems[u],t=Math.floor(e.viewMinimumSize/2);s={index:u,limitDelta:e.visible?d-t:d+t,size:e.size}}if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);r={index:g,limitDelta:e.visible?h+t:h-t,size:e.size}}}this.sashDragState={start:e,current:e,index:n,sizes:i,minDelta:a,maxDelta:l,alt:t,snapBefore:s,snapAfter:r,disposable:o}};s(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 c=e-i,d=this.resize(t,c,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,-d,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=NI(t="number"==typeof t?t:e.size,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(this.state!==eR.Idle)throw new Error("Cant modify splitview");if(this.state=eR.Busy,e<0||e>=this.viewItems.length)return;const i=dl(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=NI(t=Math.round(t),s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(n,o),this.state=eR.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=NI(i,t.minimumSize,t.maximumSize);const n=dl(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,n){if(this.state!==eR.Idle)throw new Error("Cant modify splitview");this.state=eR.Busy;const o=io(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(o):this.viewContainer.insertBefore(o,this.viewContainer.children.item(i));const s=e.onDidChange((e=>this.onViewChange(l,e))),r=O(s,F((()=>this.viewContainer.removeChild(o))));let a;a="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const l=0===this.orientation?new JM(o,e,a,r):new QM(o,e,a,r);if(this.viewItems.splice(i,0,l),this.viewItems.length>1){let e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const t=0===this.orientation?new rD(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new rD(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},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=Ie.map(t.onDidStart,n)(this.onSashStart,this),s=Ie.map(t.onDidChange,n)(this.onSashChange,this),r=Ie.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),a=r(this.onSashEnd,this),l=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=dl(e,-1),n=dl(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)})),c=O(o,s,a,l,t),d={sash:t,disposable:c};this.sashItems.splice(i-1,0,d)}let c;o.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(c=[t.index]),n||this.relayout([i],c),this.state=eR.Idle,n||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}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,a,l){if(e<0||e>=this.viewItems.length)return 0;const c=dl(e,-1),d=dl(e+1,this.viewItems.length);if(o)for(const e of o)ul(c,e),ul(d,e);if(n)for(const e of n)gl(c,e),gl(d,e);const h=c.map((e=>this.viewItems[e])),u=c.map((e=>i[e])),g=d.map((e=>this.viewItems[e])),p=d.map((e=>i[e])),m=c.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),f=c.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),_=0===d.length?Number.POSITIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),v=0===d.length?Number.NEGATIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),b=Math.max(m,v,s),C=Math.min(_,f,r);let w=!1;if(a){const e=this.viewItems[a.index],i=t>=a.limitDelta;w=i!==e.visible,e.setVisible(i,a.size)}if(!w&&l){const e=this.viewItems[l.index],i=te+t.size),0);let i=this.size-t;const n=dl(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)ul(n,e);for(const e of o)gl(n,e);"number"==typeof e&&gl(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:d&&t[e]&&(r0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),A(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[]}}var nR,oR=i(9237),sR={};sR.styleTagTransform=p(),sR.setAttributes=d(),sR.insert=l().bind(null,"head"),sR.domAPI=r(),sR.insertStyleElement=u(),o()(oR.Z,sR),oR.Z&&oR.Z.locals&&oR.Z.locals;class rR{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=rR.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=Xn(e,io(".monaco-table-tr")),i=[],n=[];for(let e=0;enew aR(e,t))),a={size:r.reduce(((e,t)=>e+t.column.weight),0),views:r.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new iR(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:a})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const l=new rR(n,o,(e=>this.splitview.getViewSize(e)));var c;this.list=this.disposables.add(new KM(e,this.domNode,(c=i,{getHeight:e=>c.getHeight(e),getTemplateId:()=>rR.TemplateId}),[l],s)),Ie.any(...r.map((e=>e.onDidLayout)))((([e,t])=>l.layoutColumn(e,t)),null,this.disposables),this.splitview.onDidSashReset((e=>{const t=n.reduce(((e,t)=>e+t.weight),0),i=n[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)}),null,this.disposables),this.styleElement=Hn(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}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()}}lR.InstanceCount=0,function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element"}(nR||(nR={}));class cR extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class dR{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}}class hR{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}}class uR{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 hR(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 _R{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,o,s]=_R._getElements(e),[r,a,l]=_R._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(_R._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i=e&&n>=i&&this.ElementsAreEqual(t,n);)t--,n--;if(e>t||i>n){let o;return i<=n?(pR.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new hR(e,0,i,n-i+1)]):e<=t?(pR.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),o=[new hR(e,t-e+1,i,0)]):(pR.Assert(e===t+1,"originalStart should only be one more than originalEnd"),pR.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o}const s=[0],r=[0],a=this.ComputeRecursionPoint(e,t,i,n,s,r,o),l=s[0],c=r[0];if(null!==a)return a;if(!o[0]){const s=this.ComputeDiffRecursive(e,l,i,c,o);let r=[];return r=o[0]?[new hR(l+1,t-(l+1)+1,c+1,n-(c+1)+1)]:this.ComputeDiffRecursive(l+1,t,c+1,n,o),this.ConcatenateChanges(s,r)}return[new hR(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,f,_){let v=null,b=null,C=new fR,w=t,y=i,S=u[0]-m[0]-n,x=-1073741824,k=this.m_forwardHistory.length-1;do{const t=S+e;t===w||t=0&&(e=(l=this.m_forwardHistory[k])[0],w=1,y=l.length-1)}while(--k>=-1);if(v=C.getReverseChanges(),_[0]){let e=u[0]+1,t=m[0]+1;if(null!==v&&v.length>0){const i=v[v.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}b=[new hR(e,h-e+1,t,p-t+1)]}else{C=new fR,w=s,y=r,S=u[0]-m[0]-a,x=1073741824,k=f?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=S+o;e===w||e=c[e+1]?(g=(d=c[e+1]-1)-S-a,d>x&&C.MarkNextChange(),x=d+1,C.AddOriginalElement(d+1,g+1),S=e+1-o):(g=(d=c[e-1])-S-a,d>x&&C.MarkNextChange(),x=d,C.AddModifiedElement(d+1,g+1),S=e-1-o),k>=0&&(o=(c=this.m_reverseHistory[k])[0],w=1,y=c.length-1)}while(--k>=-1);b=C.getChanges()}return this.ConcatenateChanges(v,b)}ComputeRecursionPoint(e,t,i,n,o,s,r){let a=0,l=0,c=0,d=0,h=0,u=0;e--,i--,o[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=t-e+(n-i),p=g+1,m=new Int32Array(p),f=new Int32Array(p),_=n-i,v=t-e,b=e-i,C=t-n,w=(v-_)%2==0;m[_]=e,f[v]=t,r[0]=!1;for(let y=1;y<=g/2+1;y++){let g=0,S=0;c=this.ClipDiagonalBound(_-y,y,_,p),d=this.ClipDiagonalBound(_+y,y,_,p);for(let e=c;e<=d;e+=2){a=e===c||eg+S&&(g=a,S=l),!w&&Math.abs(e-v)<=y-1&&a>=f[e])return o[0]=a,s[0]=l,i<=f[e]&&y<=1448?this.WALKTRACE(_,c,d,b,v,h,u,C,m,f,a,t,o,l,n,s,w,r):null}const x=(g-e+(S-i)-y)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(g,x))return r[0]=!0,o[0]=g,s[0]=S,x>0&&y<=1448?this.WALKTRACE(_,c,d,b,v,h,u,C,m,f,a,t,o,l,n,s,w,r):(e++,i++,[new hR(e,t-e+1,i,n-i+1)]);h=this.ClipDiagonalBound(v-y,y,v,p),u=this.ClipDiagonalBound(v+y,y,v,p);for(let g=h;g<=u;g+=2){a=g===h||g=f[g+1]?f[g+1]-1:f[g-1],l=a-(g-v)-C;const p=a;for(;a>e&&l>i&&this.ElementsAreEqual(a,l);)a--,l--;if(f[g]=a,w&&Math.abs(g-_)<=y&&a<=m[g])return o[0]=a,s[0]=l,p>=m[g]&&y<=1448?this.WALKTRACE(_,c,d,b,v,h,u,C,m,f,a,t,o,l,n,s,w,r):null}if(y<=1447){let e=new Int32Array(d-c+2);e[0]=_-c+1,mR.Copy2(m,c,e,1,d-c+1),this.m_forwardHistory.push(e),e=new Int32Array(u-h+2),e[0]=v-h+1,mR.Copy2(f,h,e,1,u-h+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(_,c,d,b,v,h,u,C,m,f,a,t,o,l,n,s,w,r)}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,c=i.modifiedStart-e;if(tl&&(l=d,a=e)}i.originalStart-=a,i.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t0&&i>a&&(a=i,l=t,c=e)}return a>0?[l,c]: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){let 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 mR.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],mR.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return mR.Copy(e,0,i,0,e.length),mR.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(pR.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),pR.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 n=e.originalStart;let o=e.originalLength;const s=e.modifiedStart;let r=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(r=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new hR(n,o,s,r),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&ea.lastDiffIds},{getElements:()=>[...a.children.slice(0,c),...l,...a.children.slice(c+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(d.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-c,this.spliceSimple([...h,g],e.originalLength,T.slice(l,p,p+e.modifiedLength),o);u(g,p,g)}spliceSimple(e,t,i=T.empty(),{onDidCreateNode:n,onDidDeleteNode:o,diffIdentityProvider:s}){const{parentNode:r,listIndex:a,revealed:l,visible:c}=this.getParentNodeWithListIndex(e),d=[],h=T.map(i,(e=>this.createTreeNode(e,r,r.visible?1:0,l,d,n))),u=e[e.length-1],g=r.children.length>0;let p=0;for(let e=u;e>=0&&es.getId(e.element).toString()))):r.lastDiffIds=r.children.map((e=>s.getId(e.element).toString())):r.lastDiffIds=void 0;let b=0;for(const e of v)e.visible&&b++;if(0!==b)for(let e=u+m.length;ee+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(r,_-e),this.list.splice(a,e,d)}if(v.length>0&&o){const e=t=>{o(t),t.children.forEach(e)};v.forEach(e)}this._onDidSplice.fire({insertedNodes:m,deletedNodes:v});const C=r.children.length>0;g!==C&&this.setCollapsible(e.slice(0,-1),C);let w=r;for(;w;){if(2===w.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}w=w.parent}}rerender(e){if(0===e.length)throw new cR(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&&!CR(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:(CR(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})),!CR(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||T.empty(),c=n&&0!==a&&!r.collapsed,d=T.map(l,(e=>this.createTreeNode(e,r,a,c,o,s)));let h=0,u=1;for(const e of d)r.children.push(e),u+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=h++);return r.collapsible=r.collapsible||r.children.length>0,r.visibleChildrenCount=h,r.visible=2===a?h>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=u):(r.renderNodeCount=0,n&&o.pop()),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):vR(i)?(e.filterData=i.data,bR(i.visibility)):(e.filterData=void 0,bR(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 cR(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 cR(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 cR(this.user,"Invalid tree location");for(let e=0;ee.element))),this.data=e}}function DR(e){return e instanceof mM?new kR(e):e}class LR{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=B.None}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){this.dnd.onDragStart&&this.dnd.onDragStart(DR(e),t)}onDragOver(e,t,i,n,o=!0){const s=this.dnd.onDragOver(DR(e),t&&t.element,i,n),r=this.autoExpandNode!==t;if(r&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return s;if(r&&"boolean"!=typeof s&&s.autoExpand&&(this.autoExpandDisposable=ii((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500)),"boolean"==typeof s||!s.accept||void 0===s.bubble||s.feedback)return o?s:{accept:"boolean"==typeof s?s:s.accept,effect:"boolean"==typeof s?void 0:s.effect,feedback:[i]};if(1===s.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),s=i.getParentNodeLocation(o),r=i.getNode(s),a=s&&i.getListIndex(s);return this.onDragOver(e,r,a,n,!1)}const a=this.modelProvider(),l=a.getNodeLocation(t),c=a.getListIndex(l),d=a.getListRenderCount(l);return Object.assign(Object.assign({},s),{feedback:dl(c,c+d)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(DR(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}class ER{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(yR||(yR={}));class NR{constructor(e,t=[]){this._elements=t,this.onDidChange=Ie.forEach(e,(e=>this._elements=e))}get elements(){return this._elements}}class IR{constructor(e,t,i,n,o={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=IR.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new Qd,this.activeIndentNodes=new Set,this.indentGuidesDisposable=B.None,this.disposables=new W,this.templateId=e.templateId,this.updateOptions(o),Ie.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent&&(this.indent=NI(e.indent,0,40)),void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==yR.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const e=new W;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=Xn(e,io(".monaco-tl-row")),i=Xn(t,io(".monaco-tl-indent")),n=Xn(t,io(".monaco-tl-twistie")),o=Xn(t,io(".monaco-tl-contents")),s=this.renderer.renderTemplate(o);return{container:e,indent:i,twistie:n,indentGuidesDisposable:B.None,templateData:s}}renderElement(e,t,i,n){"number"==typeof n&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));const o=IR.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${o}px`,i.indent.style.width=o+this.indent-16+"px",this.renderTwistie(e,i),"number"==typeof n&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(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.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...Oo.treeItemExpanded.classNamesArray);let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...Oo.treeItemExpanded.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if(rn(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new W,n=this.modelProvider();let o=e;for(;;){const e=n.getNodeLocation(o),s=n.getParentNodeLocation(e);if(!s)break;const r=n.getNode(s),a=io(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(r)&&a.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(r,a),i.add(F((()=>this.renderedIndentGuides.delete(r,a)))),o=r}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(),A(this.disposables)}}IR.DefaultIndent=8;class TR{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 W,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const i=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return i;let n;if(n="boolean"==typeof i?i?1:0:vR(i)?bR(i.visibility):i,0===n)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:sE.Default,visibility:!0};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),n=Array.isArray(i)?i:[i];for(const e of n){const t=e&&e.toString();if(void 0===t)return{data:sE.Default,visibility:!0};const i=rE(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,!0);if(i)return this._matchCount++,1===n.length?{data:i,visibility:!0}:{data:{label:t,score:i},visibility:!0}}return this.tree.options.filterOnType?2:{data:sE.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){A(this.disposables)}}class MR{constructor(e,t,i,n,o){this.tree=e,this.view=i,this.filter=n,this.keyboardNavigationDelegate=o,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new Pe,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new Pe,this.enabledDisposables=new W,this.disposables=new W,this.domNode=io(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add(cn(this.domNode,"dragstart",(()=>this.onDragStart()))),this.messageDomNode=Xn(i.getHTMLElement(),io(".monaco-list-type-filter-message")),this.labelDomNode=Xn(this.domNode,io("span.label"));const s=Xn(this.domNode,io(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=Xn(s,io("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add(cn(this.filterOnTypeDomNode,"input",(()=>this.onDidChangeFilterOnType()))),this.clearDomNode=Xn(s,io("button.clear"+Oo.treeFilterClear.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=b(0,"Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),void 0!==e.filterOnType&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=this.enabledDisposables.add(new Zk(this.view.getHTMLElement(),"keydown")),t=Ie.chain(e.event).filter((e=>!LM(e.target)||e.target===this.filterOnTypeDomNode)).filter((e=>"Dead"!==e.key&&!/^Media/.test(e.key))).map((e=>new Ot(e))).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter((()=>this.automaticKeyboardNavigation||this.triggered)).filter((e=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(e)&&!(18===e.keyCode||16===e.keyCode||15===e.keyCode||17===e.keyCode)||(this.pattern.length>0||this.triggered)&&(9===e.keyCode||1===e.keyCode)&&!e.altKey&&!e.ctrlKey&&!e.metaKey||1===e.keyCode&&(he?e.altKey&&!e.metaKey:e.ctrlKey)&&!e.shiftKey)).forEach((e=>{e.stopPropagation(),e.preventDefault()})).event,i=this.enabledDisposables.add(new Zk(this.clearDomNode,"click"));Ie.chain(Ie.any(t,i.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){"string"==typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(he?e.altKey:e.ctrlKey)?this.onInput(""):1===e.keyCode?this.onInput(0===this.pattern.length?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,(e=>!sE.isDefault(e.filterData)));const i=this.tree.getFocus();if(i.length>0){const e=i[0];null===this.tree.getRelativeTop(e)&&this.tree.reveal(e,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=En(e),i=e.clientWidth,n=i/2,o=this.domNode.clientWidth,s=new W;let r=this.positionClassName;const a=()=>{switch(r){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=i-o-6+"px"}},l=()=>{this.positionClassName=r,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",A(s)};a(),this.domNode.classList.remove(r),this.domNode.classList.add("dragging"),s.add(F((()=>this.domNode.classList.remove("dragging")))),s.add(cn(document,"dragover",(e=>(e=>{e.preventDefault();const i=e.clientX-t;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),r=il()))),uD.CurrentDragAndDropData=new hD("vscode-ui"),s.add(F((()=>uD.CurrentDragAndDropData=void 0)))}onDidSpliceModel(){this._enabled&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...Oo.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.classList.add(...Oo.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.title=b(0,"Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...Oo.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.classList.add(...Oo.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.title=b(0,"Enable Filter on Type"))}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=b(0,"No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",e),this.domNode.title=b(0,"Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||this.filter.totalCount>0&&this.filter.matchCount<=1||!sE.isDefault(e.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),A(this.disposables)}}function RR(e){let t=nR.Unknown;return On(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=nR.Twistie:On(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=nR.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function PR(e,t){t(e),e.children.forEach((e=>PR(e,t)))}class AR{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new Pe,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){!(null==t?void 0:t.__forceEvent)&&Qa(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=>PR(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>PR(e,n)));const o=new Map,s=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>PR(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&&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 OR extends OM{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(LM(e.browserEvent.target)||EM(e.browserEvent.target))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;let o=!1;if(o="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,o&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){const i=this.tree.model,s=i.getNodeLocation(t),r=e.browserEvent.altKey;if(this.tree.setFocus([s]),i.setCollapsed(s,void 0,r),o&&n)return}super.onViewPointer(e)}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&super.onDoubleClick(e)}}class FR extends KM{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 OR(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],o=[];let s;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&o.push(e+i),this.anchorTrait.has(t)&&(s=e+i)})),n.length>0&&super.setFocus(al([...super.getFocus(),...n])),o.length>0&&super.setSelection(al([...super.getSelection(),...o])),"number"==typeof s&&super.setAnchor(s)}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 WR{constructor(e,t,i,n,o={}){this._user=e,this._options=o,this.eventBufferer=new Fe,this.disposables=new W,this._onWillRefilter=new Pe,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new Pe;const s=new ER(i),r=new We,a=new We,l=new NR(a.event);this.renderers=n.map((e=>new IR(e,(()=>this.model),r.event,l,o)));for(let e of this.renderers)this.disposables.add(e);let c;o.keyboardNavigationLabelProvider&&(c=new TR(this,o.keyboardNavigationLabelProvider,o.filter),o=Object.assign(Object.assign({},o),{filter:c}),this.disposables.add(c)),this.focus=new AR((()=>this.view.getFocusedElements()[0]),o.identityProvider),this.selection=new AR((()=>this.view.getSelectedElements()[0]),o.identityProvider),this.anchor=new AR((()=>this.view.getAnchorElement()),o.identityProvider),this.view=new FR(e,t,s,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},function(e,t){return t&&Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:e=>t.identityProvider.getId(e.element)},dnd:t.dnd&&new LR(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>t.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>t.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:t.accessibilityProvider&&Object.assign(Object.assign({},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&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}),enableKeyboardNavigation:t.simpleKeyboardNavigation})}((()=>this.model),o)),{tree:this})),this.model=this.createModel(e,this.view,o),r.input=this.model.onDidChangeCollapseState;const d=Ie.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}));if(d((()=>null),null,this.disposables),a.input=Ie.chain(Ie.any(d,this.focus.onDidChange,this.selection.onDidChange)).debounce((()=>null),0).map((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]})).event,!1!==o.keyboardSupport){const e=Ie.chain(this.view.onKeyDown).filter((e=>!LM(e.target))).map((e=>new Ot(e)));e.filter((e=>15===e.keyCode)).on(this.onLeftArrow,this,this.disposables),e.filter((e=>17===e.keyCode)).on(this.onRightArrow,this,this.disposables),e.filter((e=>10===e.keyCode)).on(this.onSpace,this,this.disposables)}if(o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||IM;this.typeFilterController=new MR(this,this.model,this.view,c,e),this.focusNavigationFilter=e=>this.typeFilterController.shouldAllowFocus(e),this.disposables.add(this.typeFilterController)}this.styleElement=Hn(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===yR.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Ie.map(this.view.onMouseDblClick,RR)}get onPointer(){return Ie.map(this.view.onPointer,RR)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return Ie.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}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}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(Object.assign(Object.assign({},this._options),{enableKeyboardNavigation:this._options.simpleKeyboardNavigation})),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===yR.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,t)}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.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)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,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){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){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)}focusNext(e=1,t=!1,i,n=this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(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(){A(this.disposables),this.view.dispose()}}class BR{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new wR(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=T.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=T.empty(),i){const n=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},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=T.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),T.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)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible,n=void 0!==e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},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 cR(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new cR(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new cR(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 cR(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function VR(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:T.map(T.from(e.children),VR),collapsible:e.collapsible,collapsed:e.collapsed}}function HR(e){const t=[e.element],i=e.incompressible||!1;let n,o;for(;[o,n]=T.consume(T.from(e.children),2),1===o.length&&!o[0].incompressible;)e=o[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:T.map(T.concat(o,n),HR),collapsible:e.collapsible,collapsed:e.collapsed}}function zR(e,t=0){let i;return i=tzR(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 jR(e){return zR(e,0)}function qR(e,t,i){return e.element===t?Object.assign(Object.assign({},e),{children:i}):Object.assign(Object.assign({},e),{children:T.map(T.from(e.children),(e=>qR(e,t,i)))})}class KR{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new BR(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=T.empty(),i){const n=i.diffIdentityProvider&&(o=i.diffIdentityProvider,{getId:e=>e.elements.map((e=>o.getId(e).toString())).join("\0")});var o;if(null===e){const e=T.map(t,this.enabled?HR:VR);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const s=this.nodes.get(e);if(!s)throw new Error("Unknown compressed tree node");const r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),c=qR(jR(r),e,t),d=(this.enabled?HR:VR)(c),h=l.children.map((e=>e===r?d:e));this._setChildren(l.element,h,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=T.map(t,jR),n=T.map(i,e?HR:VR);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,Object.assign(Object.assign({},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 cR(this.user,`Tree element not found: ${e}`);return t}}const UR=e=>e[e.length-1];class $R{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new $R(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}}class ZR{constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||UR;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new dR((e=>new $R(n,e))),this.model=new KR(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 Object.assign(Object.assign({},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))}get onDidSplice(){return Ie.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 Ie.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return Ie.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}setChildren(e,t=T.empty(),i={}){this.model.setChildren(e,t,i)}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)}}class GR extends WR{constructor(e,t,i,n,o={}){super(e,t,i,n,o),this.user=e}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=T.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 BR(e,t,i)}}class YR{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const 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){i.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement&&this.renderer.disposeElement(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)}([ch],YR.prototype,"compressedTreeNodeProvider",null);class XR extends GR{constructor(e,t,i,n,o={}){const s=()=>this,r=n.map((e=>new YR(s,e)));super(e,t,i,r,function(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}(s,o))}setChildren(e,t=T.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new ZR(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 JR=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function QR(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function eP(e,t){return!!t.parent&&(t.parent===e||eP(e,t.parent))}class tP{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new tP(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}}class iP{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(...Oo.treeItemLoading.classNamesArray),!0):(t.classList.remove(...Oo.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function nP(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function oP(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class sP extends mM{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function rP(e){return e instanceof mM?new sP(e):e}class aP{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){this.dnd.onDragStart&&this.dnd.onDragStart(rP(e),t)}onDragOver(e,t,i,n,o=!0){return this.dnd.onDragOver(rP(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(rP(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function lP(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new aP(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},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&&Object.assign(Object.assign({},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),additionalScrollHeight:e.additionalScrollHeight})}function cP(e,t){t(e),e.children.forEach((e=>cP(e,t)))}class dP{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 Pe,this._onDidChangeNodeSlowState=new Pe,this.nodeMapper=new dR((e=>new tP(e))),this.disposables=new W,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=void 0!==s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.collapseByDefault=s.collapseByDefault,this.tree=this.createTree(e,t,i,n,s),this.root=QR({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return Ie.map(this.tree.onDidChangeFocus,nP)}get onDidChangeSelection(){return Ie.map(this.tree.onDidChangeSelection,nP)}get onMouseDblClick(){return Ie.map(this.tree.onMouseDblClick,oP)}get onPointer(){return Ie.map(this.tree.onPointer,oP)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,o){const s=new ER(i),r=n.map((e=>new iP(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=lP(o)||{};return new GR(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}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return JR(this,void 0,void 0,(function*(){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield 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)}))}_updateChildren(e=this.root.element,t=!0,i=!1,n,o){return JR(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new cR(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield Ie.toPromise(this._onDidRender.event));const s=this.getDataNode(e);if(yield 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)}expand(e,t=!1){return JR(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new cR(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield Ie.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(yield this.root.refreshPromise,yield Ie.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&&(yield this.root.refreshPromise,yield Ie.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 cR(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return JR(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)}))}refreshNode(e,t,i){return JR(this,void 0,void 0,(function*(){let n;return this.subTreeRefreshPromises.forEach(((o,s)=>{!n&&function(e,t){return e===t||eP(e,t)||eP(t,e)}(s,e)&&(n=o.then((()=>this.refreshNode(e,t,i))))})),n||this.doRefreshSubTree(e,t,i)}))}doRefreshSubTree(e,t,i){return JR(this,void 0,void 0,(function*(){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 o=yield this.doRefreshNode(e,t,i);e.stale=!1,yield di.settled(o.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}))}doRefreshNode(e,t,i){return JR(this,void 0,void 0,(function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=this.doGetChildren(e);if(nt(t))n=Promise.resolve(t);else{const i=ti(800);i.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=t.finally((()=>i.cancel()))}}else n=Promise.resolve(T.empty());try{const o=yield n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),k(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 nt(i)?this.processChildren(i):(t=Gt((()=>JR(this,void 0,void 0,(function*(){return this.processChildren(yield 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(w))}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)if(s.set(t.element,t),this.identityProvider){const e=this.tree.isCollapsed(t);r.set(t.id,{node:t,collapsed:e})}const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=QR({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}const l=this.identityProvider.getId(t).toString(),c=r.get(l);if(c){const e=c.node;return s.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?c.collapsed?(e.children.forEach((e=>cP(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const d=QR({element:t,parent:e,id:l,hasChildren:o});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(d),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(d),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(d):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(d.collapsedByDefault=!1,a.push(d)),d}));for(const e of s.values())cP(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].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),o=i&&Object.assign(Object.assign({},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 i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?T.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()}}class hP{constructor(e){this.node=e}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 hP(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}}class uP{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(...Oo.treeItemLoading.classNamesArray),!0):(t.classList.remove(...Oo.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=A(this.disposables)}}class gP extends dP{constructor(e,t,i,n,o,s,r={}){super(e,t,i,o,s,r),this.compressionDelegate=n,this.compressibleNodeMapper=new dR((e=>new hP(e))),this.filter=r.filter}createTree(e,t,i,n,o){const s=new ER(i),r=n.map((e=>new uP(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&lP(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))})})}(o)||{};return new XR(e,t,s,r,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=e=>this.identityProvider.getId(e).toString(),n=e=>{const t=new Set;for(const n of e){const e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(const n of e.element.elements)t.add(i(n.element))}return t},o=n(this.tree.getSelection()),s=n(this.tree.getFocus());super.render(e,t);const r=this.getSelection();let a=!1;const l=this.getFocus();let c=!1;const d=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:vR(i)?bR(i.visibility):bR(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 pP extends WR{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 BR(e,t,i)}}new nr("isMac",he,b(0,"Whether the operating system is macOS")),new nr("isLinux",ue,b(0,"Whether the operating system is Linux"));const mP=new nr("isWindows",de,b(0,"Whether the operating system is Windows")),fP=(new nr("isWeb",pe,b(0,"Whether the platform is a web browser")),new nr("isMacNative",he&&!pe,b(0,"Whether the operating system is macOS on a non-browser platform")),new nr("isIOS",fe,b(0,"Whether the operating system is iOS")),new nr("isDevelopment",!1,!0),"inputFocus");function _P(e,t){const i=Object.create(null);for(let n in t){const o=t[n];o&&(i[n]=Tp(o,e))}return i}function vP(e,t,i){function n(){const n=_P(e.getColorTheme(),t);"function"==typeof i?i(n):i.style(n)}return n(),e.onDidColorThemeChange(n)}function bP(e,t,i){return vP(t,Object.assign(Object.assign({},CP),i||{}),e)}new nr(fP,!1,b(0,"Whether keyboard focus is inside an input box"));const CP={listFocusBackground:wg,listFocusForeground:yg,listFocusOutline:Sg,listActiveSelectionBackground:xg,listActiveSelectionForeground:kg,listActiveSelectionIconForeground:Dg,listFocusAndSelectionBackground:xg,listFocusAndSelectionForeground:kg,listInactiveSelectionBackground:Lg,listInactiveSelectionIconForeground:Ng,listInactiveSelectionForeground:Eg,listInactiveFocusBackground:Ig,listInactiveFocusOutline:Tg,listHoverBackground:Mg,listHoverForeground:Rg,listDropBackground:Pg,listSelectionOutline:Ih,listHoverOutline:Ih,listFilterWidgetBackground:Bg,listFilterWidgetOutline:Vg,listFilterWidgetNoMatchesOutline:Hg,listMatchesShadow:Ph,treeIndentGuidesStroke:zg,tableColumnsBorder:jg,tableOddRowsBackgroundColor:qg},wP={shadowColor:Ph,borderColor:Gg,foregroundColor:Yg,backgroundColor:Xg,selectionForegroundColor:Jg,selectionBackgroundColor:Qg,selectionBorderColor:ep,separatorColor:tp,scrollbarShadow:su,scrollbarSliderBackground:ru,scrollbarSliderHoverBackground:au,scrollbarSliderActiveBackground:lu};var yP=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},SP=function(e,t){return function(i,n){t(i,n,e)}};const xP=xo("listService");let kP=class{constructor(e){this._themeService=e,this.disposables=new W,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}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;const e=new FM(Hn(),"");this.disposables.add(bP(e,this._themeService))}if(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),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),O(e.onDidFocus((()=>this.setLastFocusedList(e))),F((()=>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()}};kP=yP([SP(0,ur)],kP);const DP=new nr("listFocus",!0),LP=new nr("listSupportsMultiselect",!0),EP=Fs.and(DP,Fs.not(fP)),NP=new nr("listHasSelectionOrFocus",!1),IP=new nr("listDoubleSelection",!1),TP=new nr("listMultiSelection",!1),MP=new nr("listSelectionNavigation",!1),RP=new nr("treeElementCanCollapse",!1),PP=new nr("treeElementHasParent",!1),AP=new nr("treeElementCanExpand",!1),OP=new nr("treeElementHasChild",!1),FP="listAutomaticKeyboardNavigation";function WP(e,t){const i=e.createScoped(t.getHTMLElement());return DP.bindTo(i),i}const BP="workbench.list.multiSelectModifier",VP="workbench.list.openMode",HP="workbench.list.horizontalScrolling",zP="workbench.list.keyboardNavigation",jP="workbench.list.automaticKeyboardNavigation",qP="workbench.tree.indent",KP="workbench.tree.renderIndentGuides",UP="workbench.list.smoothScrolling",$P="workbench.list.mouseWheelScrollSensitivity",ZP="workbench.list.fastScrollSensitivity",GP="workbench.tree.expandMode";function YP(e){return"alt"===e.getValue(BP)}class XP extends B{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=YP(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(BP)&&(this.useAltAsMultipleSelectionModifier=YP(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:RM(e)}isSelectionRangeChangeEvent(e){return PM(e)}}function JP(e,t,i){var n;const o=new W;return[Object.assign(Object.assign({},e),{keyboardNavigationDelegate:{mightProducePrintableCharacter:e=>i.mightProducePrintableCharacter(e)},smoothScrolling:Boolean(t.getValue(UP)),mouseWheelScrollSensitivity:t.getValue($P),fastScrollSensitivity:t.getValue(ZP),multipleSelectionController:null!==(n=e.multipleSelectionController)&&void 0!==n?n:o.add(new XP(t))}),o]}let QP=class extends KM{constructor(e,t,i,n,o,s,r,a,l,c){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(HP)),[h,u]=JP(o,l,c);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},_P(a.getColorTheme(),CP)),h),{horizontalScrolling:d})),this.disposables.add(u),this.contextKeyService=WP(s,this),this.themeService=a,this.listSupportsMultiSelect=LP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),MP.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=NP.bindTo(this.contextKeyService),this.listDoubleSelection=IP.bindTo(this.contextKeyService),this.listMultiSelection=TP.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=YP(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),o.overrideStyles&&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(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(BP)&&(this._useAltAsMultipleSelectionModifier=YP(l));let t={};if(e.affectsConfiguration(HP)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(HP));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(UP)){const e=Boolean(l.getValue(UP));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration($P)){const e=l.getValue($P);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(ZP)){const e=l.getValue(ZP);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new nA(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=bP(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),super.dispose()}};QP=yP([SP(5,or),SP(6,xP),SP(7,ur),SP(8,ec),SP(9,_N)],QP);let eA=class extends class{constructor(e,t,i,n,o={}){const s=()=>this.model,r=n.map((e=>new UM(e,s)));this.list=new KM(e,t,i,r,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new $M(e,t.accessibilityProvider)})}(s,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return Ie.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 Ie.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 Ie.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,dl(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()}}{constructor(e,t,i,n,o,s,r,a,l,c){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(HP)),[h,u]=JP(o,l,c);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},_P(a.getColorTheme(),CP)),h),{horizontalScrolling:d})),this.disposables=new W,this.disposables.add(u),this.contextKeyService=WP(s,this),this.themeService=a,this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=LP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),MP.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this._useAltAsMultipleSelectionModifier=YP(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),o.overrideStyles&&this.disposables.add(bP(this,a,o.overrideStyles)),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(BP)&&(this._useAltAsMultipleSelectionModifier=YP(l));let t={};if(e.affectsConfiguration(HP)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(HP));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(UP)){const e=Boolean(l.getValue(UP));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration($P)){const e=l.getValue($P);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(ZP)){const e=l.getValue(ZP);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new nA(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=bP(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};eA=yP([SP(5,or),SP(6,xP),SP(7,ur),SP(8,ec),SP(9,_N)],eA);let tA=class extends lR{constructor(e,t,i,n,o,s,r,a,l,c,d){const h=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(c.getValue(HP)),[u,g]=JP(s,c,d);super(e,t,i,n,o,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},_P(l.getColorTheme(),CP)),u),{horizontalScrolling:h})),this.disposables.add(g),this.contextKeyService=WP(r,this),this.themeService=l,this.listSupportsMultiSelect=LP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport),MP.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=NP.bindTo(this.contextKeyService),this.listDoubleSelection=IP.bindTo(this.contextKeyService),this.listMultiSelection=TP.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=YP(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&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(c.onDidChangeConfiguration((e=>{e.affectsConfiguration(BP)&&(this._useAltAsMultipleSelectionModifier=YP(c));let t={};if(e.affectsConfiguration(HP)&&void 0===this.horizontalScrolling){const e=Boolean(c.getValue(HP));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(UP)){const e=Boolean(c.getValue(UP));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration($P)){const e=c.getValue($P);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(ZP)){const e=c.getValue(ZP);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new oA(this,Object.assign({configurationService:c},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=bP(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};tA=yP([SP(6,or),SP(7,xP),SP(8,ur),SP(9,ec),SP(10,_N)],tA);class iA extends B{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new Pe),this.onDidOpen=this._onDidOpen.event,this._register(Ie.filter(this.widget.onDidChangeSelection,(e=>e.browserEvent instanceof KeyboardEvent))((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(VP)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((()=>{this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(VP))})))):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 nA extends iA{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class oA extends iA{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class sA extends iA{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function rA(e,t){let i=!1;return n=>{if(n.toKeybinding().isModifierKey())return!1;if(i)return i=!1,!1;const o=t.softDispatch(n,e);return o&&o.enterChord?(i=!0,!1):(i=!1,!0)}}let aA=class extends GR{constructor(e,t,i,n,o,s,r,a,l,c,d){const{options:h,getAutomaticKeyboardNavigation:u,disposable:g}=uA(t,o,s,l,c,d);super(e,t,i,n,h),this.disposables.add(g),this.internals=new gA(this,o,u,o.overrideStyles,s,r,a,l,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};aA=yP([SP(5,or),SP(6,xP),SP(7,ur),SP(8,ec),SP(9,_N),SP(10,th)],aA);let lA=class extends XR{constructor(e,t,i,n,o,s,r,a,l,c,d){const{options:h,getAutomaticKeyboardNavigation:u,disposable:g}=uA(t,o,s,l,c,d);super(e,t,i,n,h),this.disposables.add(g),this.internals=new gA(this,o,u,o.overrideStyles,s,r,a,l,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};lA=yP([SP(5,or),SP(6,xP),SP(7,ur),SP(8,ec),SP(9,_N),SP(10,th)],lA);let cA=class extends pP{constructor(e,t,i,n,o,s,r,a,l,c,d,h){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=uA(t,s,r,c,d,h);super(e,t,i,n,o,u),this.disposables.add(p),this.internals=new gA(this,s,g,s.overrideStyles,r,a,l,c,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};cA=yP([SP(6,or),SP(7,xP),SP(8,ur),SP(9,ec),SP(10,_N),SP(11,th)],cA);let dA=class extends dP{constructor(e,t,i,n,o,s,r,a,l,c,d,h){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=uA(t,s,r,c,d,h);super(e,t,i,n,o,u),this.disposables.add(p),this.internals=new gA(this,s,g,s.overrideStyles,r,a,l,c,h),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};dA=yP([SP(6,or),SP(7,xP),SP(8,ur),SP(9,ec),SP(10,_N),SP(11,th)],dA);let hA=class extends gP{constructor(e,t,i,n,o,s,r,a,l,c,d,h,u){const{options:g,getAutomaticKeyboardNavigation:p,disposable:m}=uA(t,r,a,d,h,u);super(e,t,i,n,o,s,g),this.disposables.add(m),this.internals=new gA(this,r,p,r.overrideStyles,a,l,c,d,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function uA(e,t,i,n,o,s){var r;const a=()=>{let e=Boolean(i.getContextKeyValue(FP));return e&&(e=Boolean(n.getValue(jP))),e},l=s.isScreenReaderOptimized(),c=t.simpleKeyboardNavigation||l?"simple":n.getValue(zP),d=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(n.getValue(HP)),[h,u]=JP(t,n,o),g=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:u,options:Object.assign(Object.assign({keyboardSupport:!1},h),{indent:"number"==typeof n.getValue(qP)?n.getValue(qP):void 0,renderIndentGuides:n.getValue(KP),smoothScrolling:Boolean(n.getValue(UP)),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:"simple"===c,filterOnType:"filter"===c,horizontalScrolling:d,keyboardNavigationEventFilter:rA(e,o),additionalScrollHeight:g,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(r=t.expandOnlyOnTwistieClick)&&void 0!==r?r:"doubleClick"===n.getValue(GP)})}}hA=yP([SP(7,or),SP(8,xP),SP(9,ur),SP(10,ec),SP(11,_N),SP(12,th)],hA);let gA=class{constructor(e,t,i,n,o,s,r,a,l){this.tree=e,this.themeService=r,this.disposables=[],this.contextKeyService=WP(o,e),this.listSupportsMultiSelect=LP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport),MP.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.hasSelectionOrFocus=NP.bindTo(this.contextKeyService),this.hasDoubleSelection=IP.bindTo(this.contextKeyService),this.hasMultiSelection=TP.bindTo(this.contextKeyService),this.treeElementCanCollapse=RP.bindTo(this.contextKeyService),this.treeElementHasParent=PP.bindTo(this.contextKeyService),this.treeElementCanExpand=AP.bindTo(this.contextKeyService),this.treeElementHasChild=OP.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=YP(a);const c=new Set;c.add(FP);const d=()=>{const t=l.isScreenReaderOptimized()?"simple":a.getValue(zP);e.updateOptions({simpleKeyboardNavigation:"simple"===t,filterOnType:"filter"===t})};this.updateStyleOverrides(n);const h=()=>{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))};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),h()})),e.onDidChangeCollapseState(h),e.onDidChangeModel(h),a.onDidChangeConfiguration((n=>{let o={};if(n.affectsConfiguration(BP)&&(this._useAltAsMultipleSelectionModifier=YP(a)),n.affectsConfiguration(qP)){const e=a.getValue(qP);o=Object.assign(Object.assign({},o),{indent:e})}if(n.affectsConfiguration(KP)){const e=a.getValue(KP);o=Object.assign(Object.assign({},o),{renderIndentGuides:e})}if(n.affectsConfiguration(UP)){const e=Boolean(a.getValue(UP));o=Object.assign(Object.assign({},o),{smoothScrolling:e})}if(n.affectsConfiguration(zP)&&d(),n.affectsConfiguration(jP)&&(o=Object.assign(Object.assign({},o),{automaticKeyboardNavigation:i()})),n.affectsConfiguration(HP)&&void 0===t.horizontalScrolling){const e=Boolean(a.getValue(HP));o=Object.assign(Object.assign({},o),{horizontalScrolling:e})}if(n.affectsConfiguration(GP)&&void 0===t.expandOnlyOnTwistieClick&&(o=Object.assign(Object.assign({},o),{expandOnlyOnTwistieClick:"doubleClick"===a.getValue(GP)})),n.affectsConfiguration($P)){const e=a.getValue($P);o=Object.assign(Object.assign({},o),{mouseWheelScrollSensitivity:e})}if(n.affectsConfiguration(ZP)){const e=a.getValue(ZP);o=Object.assign(Object.assign({},o),{fastScrollSensitivity:e})}Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(c)&&e.updateOptions({automaticKeyboardNavigation:i()})})),l.onDidChangeScreenReaderOptimized((()=>d()))),this.navigator=new sA(e,Object.assign({configurationService:a},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){A(this.styler),this.styler=e?bP(this.tree,this.themeService,e):B.None}dispose(){this.disposables=A(this.disposables),A(this.styler),this.styler=void 0}};gA=yP([SP(4,or),SP(5,xP),SP(6,ur),SP(7,ec),SP(8,th)],gA),dr.as($C).registerConfiguration({id:"workbench",order:7,title:b(0,"Workbench"),type:"object",properties:{[BP]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[b(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),b(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:b(0,"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.")},[VP]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:b(0,"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.")},[HP]:{type:"boolean",default:!1,description:b(0,"Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[qP]:{type:"number",default:8,minimum:4,maximum:40,description:b(0,"Controls tree indentation in pixels.")},[KP]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:b(0,"Controls whether the tree should render indent guides.")},[UP]:{type:"boolean",default:!1,description:b(0,"Controls whether lists and trees have smooth scrolling.")},[$P]:{type:"number",default:1,description:b(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[ZP]:{type:"number",default:5,description:b(0,"Scrolling speed multiplier when pressing `Alt`.")},[zP]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[b(0,"Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),b(0,"Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),b(0,"Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:b(0,"Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[jP]:{type:"boolean",default:!0,markdownDescription:b(0,"Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[GP]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:b(0,"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.")}}});class pA{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=mT.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?b(0,"symbol in {0} on line {1} at column {2}, {3}",qy(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):b(0,"symbol in {0} on line {1} at column {2}",qy(this.uri),this.range.startLineNumber,this.range.startColumn)}}class mA{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 ia(n,a.startColumn,n,o),c=new ia(s,r,s,1073741824),d=i.getValueInRange(l).replace(/^\s+/,""),h=i.getValueInRange(e);return{value:d+h+i.getValueInRange(c).replace(/\s+$/,""),highlight:{start:d.length,end:d.length+h.length}}}}class fA{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new wL}dispose(){A(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?b(0,"1 symbol in {0}, full path {1}",qy(this.uri),this.uri.fsPath):b(0,"{0} symbols in {1}, full path {2}",e,qy(this.uri),this.uri.fsPath)}resolve(e){return function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){if(0!==this._previews.size)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new mA(i))}catch(e){w(e)}return this}))}}class _A{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new Pe,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(_A._compareReferences);for(let t of e)if(n&&Hy.isEqual(n.uri,t.uri,!0)||(n=new fA(this,t.uri),this.groups.push(n)),0===n.children.length||0!==_A._compareReferences(t,n.children[n.children.length-1])){const e=new pA(i===t,n,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){A(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new _A(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?b(0,"No results found"):1===this.references.length?b(0,"Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?b(0,"Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):b(0,"Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:i}=e,n=i.children.indexOf(e),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:cs(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()&&ia.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 Hy.compare(e.uri,t.uri)||ia.compareRangesUsingStarts(e.range,t.range)}}var vA=i(6941),bA={};bA.styleTagTransform=p(),bA.setAttributes=d(),bA.insert=l().bind(null,"head"),bA.domAPI=r(),bA.insertStyleElement=u(),o()(vA.Z,bA),vA.Z&&vA.Z.locals&&vA.Z.locals;var CA=i(9907),wA={};wA.styleTagTransform=p(),wA.setAttributes=d(),wA.insert=l().bind(null,"head"),wA.domAPI=r(),wA.insertStyleElement=u(),o()(CA.Z,wA),CA.Z&&CA.Z.locals&&CA.Z.locals;const yA={badgeBackground:vh.fromHex("#4D4D4D"),badgeForeground:vh.fromHex("#FFFFFF")};class SA{constructor(e,t){this.count=0,this.options=t||Object.create(null),td(this.options,yA,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=Xn(e,io(".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(){this.element.textContent=jo(this.countFormat,this.count),this.element.title=jo(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}class xA{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=Xn(e,io("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=xA.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&id(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,"⏎"}))}}var kA=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class DA{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t){var i;return kA(this,void 0,void 0,(function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(void 0===e||et(e)||e instanceof HTMLElement)n=e;else if(dt(e.markdown)){this._hoverWidget||this.show(b(0,"Loading..."),t),this._cancellationTokenSource=new Ut;const i=this._cancellationTokenSource.token;if(n=yield e.markdown(i),void 0===n&&(n=e.markdownNotSupportedFallback),this.isDisposed||i.isCancellationRequested)return}else n=null!==(i=e.markdown)&&void 0!==i?i:e.markdownNotSupportedFallback;this.show(n,t)}))}show(e,t){const i=this._hoverWidget;if(this.hasContent(e)){const n={content:e,target:this.target,showPointer:"element"===this.hoverDelegate.placement,hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!i};this._hoverWidget=this.hoverDelegate.showHover(n,t)}null==i||i.dispose()}hasContent(e){return!(!e||wE(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}}var LA=i(4306),EA={};EA.styleTagTransform=p(),EA.setAttributes=d(),EA.insert=l().bind(null,"head"),EA.domAPI=r(),EA.insertStyleElement=u(),o()(LA.Z,EA),LA.Z&&LA.Z.locals&&LA.Z.locals;class NA{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 IA extends B{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new NA(Xn(e,io(".monaco-icon-label")))),this.labelContainer=Xn(this.domNode.element,io(".monaco-icon-label-container"));const i=Xn(this.labelContainer,io("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new NA(Xn(this.labelContainer,io("span.monaco-icon-description-container")))),(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new MA(i,!!t.supportIcons):this.nameNode=new TA(i),(null==t?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new xA(Xn(this.descriptionContainer.element,io("span.label-description")),{supportIcons:!!t.supportIcons}):this.descriptionNodeFactory=()=>this._register(new NA(Xn(this.descriptionContainer.element,io("span.label-description")))),this.hoverDelegate=null==t?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.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)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof xA?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,null==i?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(null==i?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate){const i=function(e,t,i){let n,o;const s=(t,i)=>{var s;t&&(null==o||o.dispose(),o=void 0),i&&(null==n||n.dispose(),n=void 0),null===(s=e.onDidHideHover)||void 0===s||s.call(e)},r=(n,s,r)=>new oi((()=>kA(this,void 0,void 0,(function*(){o&&!o.isDisposed||(o=new DA(e,r||t,n>0),yield o.update(i,s))}))),n),a=cn(t,$n.MOUSE_OVER,(()=>{if(n)return;const i=new W;i.add(cn(t,$n.MOUSE_LEAVE,(e=>s(!1,e.fromElement===t)),!0)),i.add(cn(t,$n.MOUSE_DOWN,(()=>s(!0,!0)),!0));const o={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>o.x=e.x+10;i.add(cn(t,$n.MOUSE_MOVE,e,!0))}i.add(r(e.delay,!1,o)),n=i}),!0);return{show:e=>{s(!1,!0),r(0,e)},hide:()=>{s(!0,!0)},update:e=>kA(this,void 0,void 0,(function*(){i=e,yield null==o?void 0:o.update(i)})),dispose:()=>{a.dispose(),s(!0,!0)}}}(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}else!function(e,t){et(t)?e.title=fE(t):(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}(e,t);else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class TA{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!id(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=Xn(this.container,io("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=>oM.intersect(o,e))).filter((e=>!oM.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;o3)&&Wy(t)&&(2===e.length||92===t.charCodeAt(2)):t===Ni.sep}(t)?PA(t):t}function PA(e,t){return Wy(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}Object.create(null);const AA=xo("labelService");var OA=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},FA=function(e,t){return function(i,n){t(i,n,e)}};let WA=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof _A||e instanceof fA}getChildren(e){if(e instanceof _A)return e.groups;if(e instanceof fA)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};WA=OA([FA(0,Eo)],WA);class BA{getHeight(){return 23}getTemplateId(e){return e instanceof fA?jA.id:KA.id}}let VA=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof pA){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return qy(e.uri)}};VA=OA([FA(0,_N)],VA);class HA{getId(e){return e instanceof pA?e.id:e.uri}}let zA=class extends B{constructor(e,t,i){super(),this._uriLabel=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new IA(n,{supportHighlights:!0})),this.badge=new SA(Xn(n,io(".count"))),this._register(function(e,t,i){return vP(t,{badgeBackground:nu,badgeForeground:ou,badgeBorder:Nh},e)}(this.badge,i)),e.appendChild(n)}set(e,t){let i=Uy(e.uri);this.file.setLabel(RA(e.uri),this._uriLabel.getUriLabel(i,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(b(0,"{0} references",n)):this.badge.setTitleFormat(b(0,"{0} reference",n))}};zA=OA([FA(1,AA),FA(2,ur)],zA);let jA=class e{constructor(t){this._instantiationService=t,this.templateId=e.id}renderTemplate(e){return this._instantiationService.createInstance(zA,e)}renderElement(e,t,i){i.set(e.element,$L(e.filterData))}disposeTemplate(e){e.dispose()}};jA.id="FileReferencesRenderer",jA=OA([FA(0,yo)],jA);class qA{constructor(e){this.label=new xA(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&&!sE.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,$L(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${qy(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class KA{constructor(){this.templateId=KA.id}renderTemplate(e){return new qA(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}KA.id="OneReferenceRenderer";class UA{getWidgetAriaLabel(){return b(0,"References")}getAriaLabel(e){return e.ariaMessage}}var $A=function(e,t){return function(i,n){t(i,n,e)}},ZA=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class GA{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new W,this._callOnModelChange=new W,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(let 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{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(YA,"ReferencesWidget",this._treeContainer,new BA,[this._instantiationService.createInstance(jA),this._instantiationService.createInstance(KA)],this._instantiationService.createInstance(WA),t),this._splitView.addView({onDidChange:Ie.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},tR.Distribute),this._splitView.addView({onDidChange:Ie.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)}},tR.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));let i=(e,t)=>{e instanceof pA&&("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")})),oo(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Dn(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=b(0,"No results"),no(this._messageContainer),Promise.resolve(void 0)):(oo(this._messageContainer),this._decorationsManager=new GA(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"),no(this._treeContainer),no(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 pA?e:e instanceof fA&&e.children.length>0?e.children[0]:void 0}revealReference(e){return ZA(this,void 0,void 0,(function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}))}_revealReference(e,t){return ZA(this,void 0,void 0,(function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==tn.inMemory?this.setTitle(jy(e.uri),this._uriLabel.getUriLabel(Uy(e.uri))):this.setTitle(b(0,"References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent)),this._tree.reveal(e);const n=yield i;if(!this._model)return void n.dispose();A(this._previewModelReference);const o=n.object;if(o){const t=this._preview.getModel()===o.textEditorModel?0:1,i=ia.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()}))}};XA=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}([$A(3,ur),$A(4,Eo),$A(5,yo),$A(6,qT),$A(7,AA),$A(8,bx),$A(9,_N),$A(10,rc),$A(11,gc)],XA);var JA=function(e,t){return function(i,n){t(i,n,e)}},QA=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const eO=new nr("referenceSearchVisible",!1,b(0,"Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let tO=class e{constructor(e,t,i,n,o,s,r,a){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=r,this._configurationService=a,this._disposables=new W,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=eO.bindTo(i)}static get(t){return t.getContribution(e.ID)}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=class{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,i;try{const n=JSON.parse(e);t=n.ratio,i=n.heightInLines}catch(e){}return{ratio:t||.7,heightInLines:i||18}}}.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(XA,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(b(0,"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=>{let{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):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(b(0,"{0} ({1})",this._model.title,this._model.references.length));let t=this._editor.getModel().uri,i=new Do(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(77)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return QA(this,void 0,void 0,(function*(){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();yield this._widget.setSelection(n),yield this._gotoReference(n),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}))}revealReference(e){return QA(this,void 0,void 0,(function*(){this._editor.hasModel()&&this._model&&this._widget&&(yield 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(t){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const i=ia.lift(t.range).collapseToStart();return this._editorService.openCodeEditor({resource:t.uri,options:{selection:i,selectionSource:"code.jump"}},this._editor).then((t=>{var n;if(this._ignoreModelChangeEvent=!1,t&&this._widget)if(this._editor===t)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=e.get(t),s=this._model.clone();this.closeWidget(),t.focus(),null==o||o.toggleWidget(i,Gt((e=>Promise.resolve(s))),null!==(n=this._peekMode)&&void 0!==n&&n)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,w(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 iO(e,t){const i=function(e){let t=e.get(ko).getFocusedCodeEditor();return t instanceof gT?t.getParentEditor():t}(e);if(!i)return;const n=tO.get(i);n&&t(n)}tO.ID="editor.contrib.referencesController",tO=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}([JA(2,or),JA(3,ko),JA(4,dk),JA(5,yo),JA(6,dI),JA(7,ec)],tO),Nr.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Et(2089,60),when:Fs.or(eO,KT.inPeekEditor),handler(e){iO(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),Nr.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:Fs.or(eO,KT.inPeekEditor),handler(e){iO(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),Nr.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:Fs.or(eO,KT.inPeekEditor),handler(e){iO(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),Wo.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),Wo.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),Wo.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),Wo.registerCommand("closeReferenceSearch",(e=>iO(e,(e=>e.closeWidget())))),Nr.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:Fs.and(KT.inPeekEditor,Fs.not("config.editor.stablePeek"))}),Nr.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:Fs.and(eO,Fs.not("config.editor.stablePeek"))}),Nr.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:Fs.and(eO,EP,RP.negate(),AP.negate()),handler(e){var t;const i=null===(t=e.get(xP).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof pA&&iO(e,(e=>e.revealReference(i[0])))}}),Nr.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:Fs.and(eO,EP,RP.negate(),AP.negate()),handler(e){var t;const i=null===(t=e.get(xP).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof pA&&iO(e,(e=>e.openReference(i[0],!0,!0)))}}),Wo.registerCommand("openReference",(e=>{var t;const i=null===(t=e.get(xP).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof pA&&iO(e,(e=>e.openReference(i[0],!1,!0)))}));var nO=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},oO=function(e,t){return function(i,n){t(i,n,e)}};const sO=new nr("hasSymbols",!1,b(0,"Whether there are symbol locations that can be navigated via keyboard-only.")),rO=xo("ISymbolNavigationService");let aO=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=sO.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 lO(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(zy(e.uri,n.uri))s=!0,r=r||ia.containsPosition(e.range,o);else if(s)break;s&&r||this.reset()}));this._currentState=O(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:ia.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?b(0,"Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):b(0,"Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};aO=nO([oO(0,or),oO(1,ko),oO(2,dk),oO(3,_N)],aO),cc(rO,aO,!0),Kr(new class extends Hr{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:sO,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(rO).revealNext(t)}}),Nr.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:sO,primary:9,handler(e){e.get(rO).reset()}});let lO=class{constructor(e){this._listener=new Map,this._disposables=new W,this._onDidChange=new Pe,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),A(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,O(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)}};lO=nO([oO(0,ko)],lO);var cO=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function dO(e,t,i,n){const o=i.ordered(e).map((i=>Promise.resolve(n(i,e,t)).then(void 0,(e=>{y(e)}))));return Promise.all(o).then((e=>{const t=[];for(let i of e)Array.isArray(i)?t.push(...i):i&&t.push(i);return t}))}function hO(e,t,i,n){return dO(t,i,e,((e,t,i)=>e.provideDefinition(t,i,n)))}function uO(e,t,i,n){return dO(t,i,e,((e,t,i)=>e.provideDeclaration(t,i,n)))}function gO(e,t,i,n){return dO(t,i,e,((e,t,i)=>e.provideImplementation(t,i,n)))}function pO(e,t,i,n){return dO(t,i,e,((e,t,i)=>e.provideTypeDefinition(t,i,n)))}function mO(e,t,i,n,o){return dO(t,i,e,((e,t,i)=>cO(this,void 0,void 0,(function*(){const s=yield e.provideReferences(t,i,{includeDeclaration:!0},o);if(!n||!s||2!==s.length)return s;const r=yield e.provideReferences(t,i,{includeDeclaration:!1},o);return r&&1===r.length?r:s}))))}function fO(e){return cO(this,void 0,void 0,(function*(){const t=yield e(),i=new _A(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}))}qr("_executeDefinitionProvider",((e,t,i)=>{const n=hO(e.get(Mk).definitionProvider,t,i,qt.None);return fO((()=>n))})),qr("_executeTypeDefinitionProvider",((e,t,i)=>{const n=pO(e.get(Mk).typeDefinitionProvider,t,i,qt.None);return fO((()=>n))})),qr("_executeDeclarationProvider",((e,t,i)=>{const n=uO(e.get(Mk).declarationProvider,t,i,qt.None);return fO((()=>n))})),qr("_executeReferenceProvider",((e,t,i)=>{const n=mO(e.get(Mk).referenceProvider,t,i,!1,qt.None);return fO((()=>n))})),qr("_executeImplementationProvider",((e,t,i)=>{const n=gO(e.get(Mk).implementationProvider,t,i,qt.None);return fO((()=>n))}));var _O,vO,bO,CO,wO,yO,SO,xO,kO=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};kr.appendMenuItem(Sr.EditorContext,{submenu:Sr.EditorContextPeek,title:b(0,"Peek"),group:"navigation",order:100});const DO=new Set;function LO(e){const t=new e;return Zr(t),DO.add(t.id),t}class EO{constructor(e,t){this.model=e,this.position=t}static is(e){return!(!e||"object"!=typeof e)&&(e instanceof EO||!(!Do.isIPosition(e.position)||!e.model))}}class NO extends zr{constructor(e,t){super(t),this.configuration=e}run(e,t,i){if(!t.hasModel())return Promise.resolve(void 0);const n=e.get(dk),o=e.get(ko),s=e.get(HD),r=e.get(rO),a=e.get(Mk),l=t.getModel(),c=t.getPosition(),d=EO.is(i)?i:new EO(l,c),h=new JE(t,5),u=Yt(this._getLocationModel(a,d.model,d.position,h.token),h.token).then((e=>kO(this,void 0,void 0,(function*(){var i;if(!e||h.token.isCancellationRequested)return;let n;if(vo(e.ariaMessage),e.referenceAt(l.uri,c)){const e=this._getAlternativeCommand(t);e!==this.id&&DO.has(e)&&(n=t.getAction(e))}const s=e.references.length;if(0===s){if(!this.configuration.muteMessage){const e=l.getWordAtPosition(c);null===(i=mN.get(t))||void 0===i||i.showMessage(this._getNoResultFoundMessage(e),c)}}else{if(1!==s||!n)return this._onResult(o,r,t,e);n.run()}}))),(e=>{n.error(e)})).finally((()=>{h.dispose()}));return s.showWhile(u,250),u}_onResult(e,t,i,n){return kO(this,void 0,void 0,(function*(){const o=this._getGoToPreference(i);if(i instanceof gT||!(this.configuration.openInPeek||"peek"===o&&n.references.length>1)){const s=n.firstReference(),r=n.references.length>1&&"gotoAndPeek"===o,a=yield this._openReference(i,e,s,this.configuration.openToSide,!r);r&&a?this._openInPeek(a,n):n.dispose(),"goto"===o&&t.put(s)}else this._openInPeek(i,n)}))}_openReference(e,t,i,n,o){return kO(this,void 0,void 0,(function*(){let s;var r;if((r=i)&&qi.isUri(r.uri)&&ia.isIRange(r.range)&&(ia.isIRange(r.originSelectionRange)||ia.isIRange(r.targetSelectionRange))&&(s=i.targetSelectionRange),s||(s=i.range),!s)return;const a=yield t.openCodeEditor({resource:i.uri,options:{selection:ia.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(a){if(o){const e=a.getModel(),t=a.deltaDecorations([],[{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{a.getModel()===e&&a.deltaDecorations(t,[])}),350)}return a}}))}_openInPeek(e,t){const i=tO.get(e);i&&e.hasModel()?i.toggleWidget(e.getSelection(),Gt((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}class IO extends NO{_getLocationModel(e,t,i,n){return kO(this,void 0,void 0,(function*(){return new _A(yield hO(e.definitionProvider,t,i,n),b(0,"Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?b(0,"No definition found for '{0}'",e.word):b(0,"No definition found")}_getAlternativeCommand(e){return e.getOption(51).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(51).multipleDefinitions}}const TO=pe&&!Je?2118:70;LO(((_O=class e extends IO{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:b(0,"Go to Definition"),alias:"Go to Definition",precondition:Fs.and(Rc.hasDefinitionProvider,Rc.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:Rc.editorTextFocus,primary:TO,weight:100},contextMenuOpts:{group:"navigation",order:1.1}}),Wo.registerCommandAlias("editor.action.goToDeclaration",e.id)}}).id="editor.action.revealDefinition",_O)),LO(((vO=class e extends IO{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,label:b(0,"Open Definition to the Side"),alias:"Open Definition to the Side",precondition:Fs.and(Rc.hasDefinitionProvider,Rc.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:Rc.editorTextFocus,primary:Et(2089,TO),weight:100}}),Wo.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}).id="editor.action.revealDefinitionAside",vO)),LO(((bO=class e extends IO{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,label:b(0,"Peek Definition"),alias:"Peek Definition",precondition:Fs.and(Rc.hasDefinitionProvider,KT.notInPeekEditor,Rc.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:Rc.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:Sr.EditorContextPeek,group:"peek",order:2}}),Wo.registerCommandAlias("editor.action.previewDeclaration",e.id)}}).id="editor.action.peekDefinition",bO));class MO extends NO{_getLocationModel(e,t,i,n){return kO(this,void 0,void 0,(function*(){return new _A(yield uO(e.declarationProvider,t,i,n),b(0,"Declarations"))}))}_getNoResultFoundMessage(e){return e&&e.word?b(0,"No declaration found for '{0}'",e.word):b(0,"No declaration found")}_getAlternativeCommand(e){return e.getOption(51).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(51).multipleDeclarations}}LO(((CO=class e extends MO{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:b(0,"Go to Declaration"),alias:"Go to Declaration",precondition:Fs.and(Rc.hasDeclarationProvider,Rc.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(e){return e&&e.word?b(0,"No declaration found for '{0}'",e.word):b(0,"No declaration found")}}).id="editor.action.revealDeclaration",CO)),LO(class extends MO{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:b(0,"Peek Declaration"),alias:"Peek Declaration",precondition:Fs.and(Rc.hasDeclarationProvider,KT.notInPeekEditor,Rc.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Sr.EditorContextPeek,group:"peek",order:3}})}});class RO extends NO{_getLocationModel(e,t,i,n){return kO(this,void 0,void 0,(function*(){return new _A(yield pO(e.typeDefinitionProvider,t,i,n),b(0,"Type Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?b(0,"No type definition found for '{0}'",e.word):b(0,"No type definition found")}_getAlternativeCommand(e){return e.getOption(51).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(51).multipleTypeDefinitions}}LO(((wO=class e extends RO{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:b(0,"Go to Type Definition"),alias:"Go to Type Definition",precondition:Fs.and(Rc.hasTypeDefinitionProvider,Rc.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:Rc.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}}).ID="editor.action.goToTypeDefinition",wO)),LO(((yO=class e extends RO{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:b(0,"Peek Type Definition"),alias:"Peek Type Definition",precondition:Fs.and(Rc.hasTypeDefinitionProvider,KT.notInPeekEditor,Rc.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Sr.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",yO));class PO extends NO{_getLocationModel(e,t,i,n){return kO(this,void 0,void 0,(function*(){return new _A(yield gO(e.implementationProvider,t,i,n),b(0,"Implementations"))}))}_getNoResultFoundMessage(e){return e&&e.word?b(0,"No implementation found for '{0}'",e.word):b(0,"No implementation found")}_getAlternativeCommand(e){return e.getOption(51).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(51).multipleImplementations}}LO(((SO=class e extends PO{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:b(0,"Go to Implementations"),alias:"Go to Implementations",precondition:Fs.and(Rc.hasImplementationProvider,Rc.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:Rc.editorTextFocus,primary:2118,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}}).ID="editor.action.goToImplementation",SO)),LO(((xO=class e extends PO{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:b(0,"Peek Implementations"),alias:"Peek Implementations",precondition:Fs.and(Rc.hasImplementationProvider,KT.notInPeekEditor,Rc.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:Rc.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:Sr.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",xO));class AO extends NO{_getNoResultFoundMessage(e){return e?b(0,"No references found for '{0}'",e.word):b(0,"No references found")}_getAlternativeCommand(e){return e.getOption(51).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(51).multipleReferences}}LO(class extends AO{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:b(0,"Go to References"),alias:"Go to References",precondition:Fs.and(Rc.hasReferenceProvider,KT.notInPeekEditor,Rc.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:Rc.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(e,t,i,n){return kO(this,void 0,void 0,(function*(){return new _A(yield mO(e.referenceProvider,t,i,!0,n),b(0,"References"))}))}}),LO(class extends AO{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:b(0,"Peek References"),alias:"Peek References",precondition:Fs.and(Rc.hasReferenceProvider,KT.notInPeekEditor,Rc.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Sr.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,n){return kO(this,void 0,void 0,(function*(){return new _A(yield mO(e.referenceProvider,t,i,!1,n),b(0,"References"))}))}});class OO extends NO{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",label:b(0,"Go to Any Symbol"),alias:"Go to Any Symbol",precondition:Fs.and(KT.notInPeekEditor,Rc.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,n){return kO(this,void 0,void 0,(function*(){return new _A(this._references,b(0,"Locations"))}))}_getNoResultFoundMessage(e){return e&&b(0,"No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(51).multipleReferences}_getAlternativeCommand(){return""}}Wo.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:qi},{name:"position",description:"The position at which to start",constraint:Do.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:(e,t,i,n,o,s,r)=>kO(void 0,void 0,void 0,(function*(){lt(qi.isUri(t)),lt(Do.isIPosition(i)),lt(Array.isArray(n)),lt(void 0===o||"string"==typeof o),lt(void 0===r||"boolean"==typeof r);const a=e.get(ko),l=yield a.openCodeEditor({resource:t},a.getFocusedCodeEditor());if(tM(l))return l.setPosition(i),l.revealPositionInCenterIfOutsideViewport(i,0),l.invokeWithinContext((e=>{const t=new class extends OO{_getNoResultFoundMessage(e){return s||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(s),openInPeek:Boolean(r),openToSide:!1},n,o);e.get(yo).invokeFunction(t.run.bind(t),l)}))}))}),Wo.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:qi},{name:"position",description:"The position at which to start",constraint:Do.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:(e,t,i,n,o)=>kO(void 0,void 0,void 0,(function*(){e.get(Fo).executeCommand("editor.action.goToLocations",t,i,n,o,void 0,!0)}))}),Wo.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{lt(qi.isUri(t)),lt(Do.isIPosition(i));const n=e.get(Mk),o=e.get(ko);return o.openCodeEditor({resource:t},o.getFocusedCodeEditor()).then((e=>{if(!tM(e)||!e.hasModel())return;const t=tO.get(e);if(!t)return;const o=Gt((t=>mO(n.referenceProvider,e.getModel(),Do.lift(i),!1,t).then((e=>new _A(e,b(0,"References")))))),s=new ia(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(s,o,!1))}))}}),Wo.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations"),kr.appendMenuItems([{id:Sr.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:b(0,"Go to &&Definition")},group:"4_symbol_nav",order:2}},{id:Sr.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:b(0,"Go to &&Declaration")},group:"4_symbol_nav",order:3}},{id:Sr.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:b(0,"Go to &&Type Definition")},group:"4_symbol_nav",order:3}},{id:Sr.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:b(0,"Go to &&Implementations")},group:"4_symbol_nav",order:4}},{id:Sr.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:b(0,"Go to &&References")},group:"4_symbol_nav",order:5}}]);var FO=function(e,t){return function(i,n){t(i,n,e)}};let WO=class e{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new W,this.toUnhookForKeyboard=new W,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e;let o=new cT(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,gt(t))}))),this.toUnhook.add(o.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).then((()=>{this.removeLinkDecorations()}),(e=>{this.removeLinkDecorations(),w(e)}))}))),this.toUnhook.add(o.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(t){return t.getContribution(e.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then((()=>{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)}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,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return Promise.resolve(0);this.currentWordAtPosition=i;let n=new XE(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Gt((t=>this.findDefinition(e,t))),this.previousPromise.then((t=>{if(t&&t.length&&n.validate(this.editor))if(t.length>1)this.addDecoration(new ia(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),(new bE).appendText(b(0,"Click to show {0} definitions.",t.length)));else{let n=t[0];if(!n.uri)return;this.textModelResolverService.createModelReference(n.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:o}}=t,{startLineNumber:s}=n.range;if(s<1||s>o.getLineCount())return void t.dispose();const r=this.getPreviewValue(o,s,n);let a;a=n.originSelectionRange?ia.lift(n.originSelectionRange):new ia(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);const l=this.languageService.guessLanguageIdByFilepathOrFirstLine(o.uri);this.addDecoration(a,(new bE).appendCodeblock(l||"",r)),t.dispose()}))}else this.removeLinkDecorations()})).then(void 0,w)}getPreviewValue(t,i,n){let o=n.targetSelectionRange?n.range:this.getPreviewRangeBasedOnBrackets(t,i);return o.endLineNumber-o.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(o=this.getPreviewRangeBasedOnIndentation(t,i)),this.stripIndentationFromPreviewRange(t,i,o)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;on)return new ia(i,1,n+1,1);r=t.bracketPairs.findNextBracket(new Do(a,l))}return new ia(i,1,n+1,1)}addDecoration(e,t){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[i])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&6===e.target.type&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?hO(this.languageFeaturesService.definitionProvider,i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext((e=>{const i=!t&&this.editor.getOption(78)&&!this.isInPeekEditor(e);return new IO({openToSide:t,openInPeek:i,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,this.editor)}))}isInPeekEditor(e){const t=e.get(or);return KT.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};WO.ID="editor.contrib.gotodefinitionatposition",WO.MAX_SOURCE_PREVIEW_LINES=8,WO=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}([FO(1,Eo),FO(2,rc),FO(3,Mk)],WO),Gr(WO.ID,WO),br(((e,t)=>{const i=e.getColor(Ju);i&&t.addRule(`.monaco-editor .goto-definition-link { color: ${i} !important; }`)}));var BO=i(7907),VO={};VO.styleTagTransform=p(),VO.setAttributes=d(),VO.insert=l().bind(null,"head"),VO.domAPI=r(),VO.insertStyleElement=u(),o()(BO.Z,VO),BO.Z&&BO.Z.locals&&BO.Z.locals;const HO=io;class zO extends B{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 gv(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class jO extends B{constructor(e,t,i){super(),this.actionContainer=Xn(e,HO("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=Xn(this.actionContainer,HO("a.action")),this.action.setAttribute("role","button"),t.iconClass&&Xn(this.action,HO(`span.icon.${t.iconClass}`)),Xn(this.action,HO("span")).textContent=i?`${t.label} (${i})`:t.label,this._register(cn(this.actionContainer,$n.CLICK,(e=>{e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer)}))),this._register(cn(this.actionContainer,$n.KEY_UP,(e=>{new Ot(e).equals(3)&&(e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer))}))),this.setEnabled(!0)}static render(e,t,i){return new jO(e,t,i)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}class qO{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class KO extends B{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new Pe),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new ri((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new ri((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new ri((()=>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(53).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=function(e){const t=new Ut,i=e(t.token);return new ui(t,(e=>$t(this,void 0,void 0,(function*(){var n,o;const s=t.token.onCancellationRequested((()=>{s.dispose(),t.dispose(),e.reject(new D)}));try{try{for(var r,a=Zt(i);!(r=yield a.next()).done;){const i=r.value;if(t.token.isCancellationRequested)return;e.emitOne(i)}}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=a.return)&&(yield o.call(a))}finally{if(n)throw n.error}}s.dispose(),t.dispose()}catch(i){s.dispose(),t.dispose(),e.reject(i)}}))))}((e=>this._computer.computeAsync(e))),(()=>{!function(e,t,i,n){new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){var e,t;try{try{for(var i,n=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,o,(t=e[i](t)).done,t.value)}))}}}(this._asyncIterable);!(i=yield n.next()).done;){const e=i.value;e&&(this._result.push(e),this._fireResult())}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&(yield t.call(n))}finally{if(e)throw e.error}}this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(e){w(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 qO(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)}}class UO{constructor(e,t){this.priority=e,this.range=t,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){this.priority=e,this.owner=t,this.range=i,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 ZO=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class GO{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};let e,t=this.pos,i=0,n=this.value.charCodeAt(t);if(e=GO._table[n],"number"==typeof e)return this.pos+=1,{type:e,pos:t,len:1};if(GO.isDigitCharacter(n)){e=8;do{i+=1,n=this.value.charCodeAt(t+i)}while(GO.isDigitCharacter(n));return this.pos+=i,{type:e,pos:t,len:i}}if(GO.isVariableCharacter(n)){e=9;do{n=this.value.charCodeAt(t+ ++i)}while(GO.isVariableCharacter(n)||GO.isDigitCharacter(n));return this.pos+=i,{type:e,pos:t,len:i}}e=10;do{i+=1,n=this.value.charCodeAt(t+i)}while(!isNaN(n)&&void 0===GO._table[n]&&!GO.isDigitCharacter(n)&&!GO.isVariableCharacter(n));return this.pos+=i,{type:e,pos:t,len:i}}}GO._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class YO{constructor(){this._children=[]}appendChild(e){return e instanceof XO&&this._children[this._children.length-1]instanceof XO?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 snippet(){let e=this;for(;;){if(!e)return;if(e instanceof sF)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class XO extends YO{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new XO(this.value)}}class JO extends YO{}class QO extends JO{constructor(e){super(),this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof eF?this._children[0]:void 0}clone(){let e=new QO(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class eF extends YO{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof XO&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new eF;return this.options.forEach(e.appendChild,e),e}}class tF extends YO{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 iF&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof iF){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){let e=new tF;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 iF extends YO{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).toLowerCase())).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.substr(1).toLowerCase())).join(""):e}clone(){return new iF(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class nF extends JO{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 XO(t)],!0)}clone(){const e=new nF(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function oF(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}class sF extends YO{get placeholderInfo(){if(!this._placeholders){let e,t=[];this.walk((function(i){return i instanceof QO&&(t.push(i),e=!e||e.indexn===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return oF([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){let t=[],{parent:i}=e;for(;i;)i instanceof QO&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof nF&&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(){let e=new sF;return this._children=this.children.map((e=>e.clone())),e}walk(e){oF(this.children,e)}}class rF{constructor(){this._scanner=new GO,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){this._scanner.text(e),this._token=this._scanner.next();const n=new sF;for(;this._parse(n););const o=new Map,s=[];let r=0;n.walk((e=>(e instanceof QO&&(r+=1,e.isFinalTabstop?o.set(0,void 0):!o.has(e.index)&&e.children.length>0?o.set(e.index,e.children):s.push(e)),!0)));for(const e of s){const t=o.get(e.index);if(t){const i=new QO(e.index);i.transform=e.transform;for(const e of t)i.appendChild(e.clone());n.replace(e,[i])}}return i||(i=r>0&&t),!o.has(0)&&i&&n.appendChild(new QO(0)),n}_accept(e,t){if(void 0===e||this._token.type===e){let 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 XO(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 QO(Number(t)):new nF(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 QO(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new XO("${"+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 eF;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 XO(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 nF(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 XO("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){let t=new tF,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 XO(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);let n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new iF(Number(n))),!0;if(this._accept(4))return e.appendChild(new iF(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){let i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new iF(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){let t=this._until(4);if(t)return e.appendChild(new iF(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){let t=this._until(4);if(t)return e.appendChild(new iF(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){let t=this._until(1);if(t){let i=this._until(4);if(i)return e.appendChild(new iF(Number(n),void 0,t,i)),!0}}else{let t=this._until(4);if(t)return e.appendChild(new iF(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new XO(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}var aF=i(4163),lF={};lF.styleTagTransform=p(),lF.setAttributes=d(),lF.insert=l().bind(null,"head"),lF.domAPI=r(),lF.insertStyleElement=u(),o()(aF.Z,lF),aF.Z&&aF.Z.locals&&aF.Z.locals;const cF={inputActiveOptionBorder:vh.fromHex("#007ACC00"),inputActiveOptionForeground:vh.fromHex("#FFFFFF"),inputActiveOptionBackground:vh.fromHex("#0E639C50")};class dF extends Z_{constructor(e){super(),this._onChange=this._register(new Pe),this.onChange=this._onChange.event,this._onKeyDown=this._register(new Pe),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},cF),e),this._checked=this._opts.isChecked;const t=["monaco-custom-checkbox"];this._opts.icon&&t.push(...No.asClassNameArray(this._opts.icon)),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=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.ignoreGesture(this.domNode),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),void e.preventDefault();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}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const hF=b(0,"Match Case"),uF=b(0,"Match Whole Word"),gF=b(0,"Use Regular Expression");class pF extends dF{constructor(e){super({icon:Oo.caseSensitive,title:hF+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class mF extends dF{constructor(e){super({icon:Oo.wholeWord,title:uF+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class fF extends dF{constructor(e){super({icon:Oo.regex,title:gF+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}function _F(e,t={}){const i=vF(t);return CF(i,function(e,t){const i={type:1,children:[]};let n=0,o=i;const s=[],r=new bF(e);for(;!r.eos();){let e=r.next();const i="\\"===e&&0!==wF(r.peek(),t);if(i&&(e=r.next()),i||0===wF(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=wF(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 vF(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class bF{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 CF(e,t,i,n){let o;if(2===t.type)o=document.createTextNode(t.content||"");else if(3===t.type)o=document.createElement("b");else if(4===t.type)o=document.createElement("i");else if(7===t.type&&n)o=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(hn(e,"click",(e=>{i.callback(String(t.index),e)}))),o=e}else 8===t.type?o=document.createElement("br"):1===t.type&&(o=e);o&&e!==o&&e.appendChild(o),o&&Array.isArray(t.children)&&t.children.forEach((e=>{CF(o,e,i,n)}))}function wF(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}class yF{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 SF{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._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new yF(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 xF=i(6004),kF={};kF.styleTagTransform=p(),kF.setAttributes=d(),kF.insert=l().bind(null,"head"),kF.domAPI=r(),kF.insertStyleElement=u(),o()(xF.Z,kF),xF.Z&&xF.Z.locals&&xF.Z.locals;const DF=io,LF={inputBackground:vh.fromHex("#3C3C3C"),inputForeground:vh.fromHex("#CCCCCC"),inputValidationInfoBorder:vh.fromHex("#55AAFF"),inputValidationInfoBackground:vh.fromHex("#063B49"),inputValidationWarningBorder:vh.fromHex("#B89500"),inputValidationWarningBackground:vh.fromHex("#352A05"),inputValidationErrorBorder:vh.fromHex("#BE1100"),inputValidationErrorBackground:vh.fromHex("#5A1D1D")};class EF extends Z_{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new Pe),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new Pe),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),td(this.options,LF,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(n=this.options.tooltip)&&void 0!==n?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=Xn(e,DF(".monaco-inputbox.idle"));let o=this.options.flexibleHeight?"textarea":"input",s=Xn(this.element,DF(".ibwrapper"));if(this.input=Xn(s,DF(o+".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=Xn(s,DF("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new hv(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),Xn(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new Zk(document,"selectionchange")),i=Ie.filter(t.event,(()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===s}));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.ignoreGesture(this.input),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new vD(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}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}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:Rn(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===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()}get width(){return In(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;this.mirror&&(t=(parseFloat(this.mirror.style.paddingLeft||"")||0)+(parseFloat(this.mirror.style.paddingRight||"")||0)),this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}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){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=i.border?`1px solid ${i.border}`:"",(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){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.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,t,i=()=>e.style.width=In(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{if(!this.message)return null;e=Xn(t,DF(".monaco-inputbox-container")),i();const n={inline:!0,className:"monaco-inputbox-message"},o=this.message.formatContent?_F(this.message.content,n):function(e,t={}){const i=vF(t);return i.textContent=e,i}(this.message.content,n);o.classList.add(this.classForType(this.message.type));const s=this.stylesForType(this.message.type);return o.style.backgroundColor=s.background?s.background.toString():"",o.style.color=s.foreground?s.foreground.toString():"",o.style.border=s.border?`1px solid ${s.border}`:"",Xn(e,o),null},onHide:()=>{this.state="closed"},layout:i}),t=3===this.message.type?b(0,"Error: {0}",this.message.content):2===this.message.type?b(0,"Warning: {0}",this.message.content):b(0,"Info: {0}",this.message.content),vo(t),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()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=Rn(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(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class NF extends EF{constructor(e,t,i){const n=b(0,"for history"),o=` or ⇅ ${n}`,s=` (⇅ ${n})`;super(e,t,i),this.history=new SF(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&&document.activeElement!==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(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,bo(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,bo(this.value))}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()||this.history.last()}}var IF=i(2529),TF={};TF.styleTagTransform=p(),TF.setAttributes=d(),TF.insert=l().bind(null,"head"),TF.domAPI=r(),TF.insertStyleElement=u(),o()(IF.Z,TF),IF.Z&&IF.Z.locals&&IF.Z.locals;const MF=b(0,"input");class RF extends Z_{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this._onDidOptionChange=this._register(new Pe),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Pe),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Pe),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new Pe),this._onKeyUp=this._register(new Pe),this._onCaseSensitiveKeyDown=this._register(new Pe),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new Pe),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||MF,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const o=n.appendCaseSensitiveLabel||"",s=n.appendWholeWordsLabel||"",r=n.appendRegexLabel||"",a=n.history||[],l=!!n.flexibleHeight,c=!!n.flexibleWidth,d=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new NF(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:a,showHistoryHint:n.showHistoryHint,flexibleHeight:l,flexibleWidth:c,flexibleMaxHeight:d})),this.regex=this._register(new fF({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),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 mF({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new pF({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),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)}))),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let h=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=h.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%h.length:e.equals(15)&&(i=0===t?h.length-1:t-1),e.equals(9)?(h[t].blur(),this.inputBox.focus()):i>=0&&h[i].focus(),Zn(e,!0)}}})),this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this._showOptionButtons?"block":"none",this.controls.appendChild(this.caseSensitive.domNode),this.controls.appendChild(this.wholeWords.domNode),this.controls.appendChild(this.regex.domNode),this.domNode.appendChild(this.controls),e&&e.appendChild(this.domNode),this._register(cn(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(cn(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)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){this.regex.checked=e,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}clearMessage(){this.inputBox.hideMessage()}}const PF=b(0,"input"),AF=b(0,"Preserve Case");class OF extends dF{constructor(e){super({icon:Oo.preserveCase,title:AF+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class FF extends Z_{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new Pe),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Pe),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Pe),this._onInput=this._register(new Pe),this._onKeyUp=this._register(new Pe),this._onPreserveCaseKeyDown=this._register(new Pe),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||PF,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const o=n.appendPreserveCaseLabel||"",s=n.history||[],r=!!n.flexibleHeight,a=!!n.flexibleWidth,l=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new NF(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:s,showHistoryHint:n.showHistoryHint,flexibleHeight:r,flexibleWidth:a,flexibleMaxHeight:l})),this.preserveCase=this._register(new OF({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),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;let c=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=c.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%c.length:e.equals(15)&&(i=0===t?c.length-1:t-1),e.equals(9)?(c[t].blur(),this.inputBox.focus()):i>=0&&c[i].focus(),Zn(e,!0)}}}));let d=document.createElement("div");d.className="controls",d.style.display=this._showOptionButtons?"block":"none",d.appendChild(this.preserveCase.domNode),this.domNode.appendChild(d),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()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var WF=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},BF=function(e,t){return function(i,n){t(i,n,e)}};const VF=new nr("suggestWidgetVisible",!1,b(0,"Whether suggestion are visible")),HF="historyNavigationWidget",zF="historyNavigationForwardsEnabled",jF="historyNavigationBackwardsEnabled";function qF(e,t){return e.getContext(document.activeElement).getValue(t)}function KF(e,t){const i=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,i){new nr("historyNavigationWidget",t).bindTo(e)}(i,t),{scopedContextKeyService:i,historyNavigationForwardsEnablement:new nr(zF,!0).bindTo(i),historyNavigationBackwardsEnablement:new nr(jF,!0).bindTo(i)}}let UF=class extends RF{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register(KF(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};UF=WF([BF(3,or)],UF);let $F=class extends FF{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register(KF(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};$F=WF([BF(3,or)],$F),Nr.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:Fs.and(Fs.has(HF),Fs.equals(jF,!0),VF.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{const t=qF(e.get(or),HF);t&&t.historyNavigator.showPreviousValue()}}),Nr.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:Fs.and(Fs.has(HF),Fs.equals(zF,!0),VF.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{const t=qF(e.get(or),HF);t&&t.historyNavigator.showNextValue()}});var ZF=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const GF={Visible:VF,DetailsVisible:new nr("suggestWidgetDetailsVisible",!1,b(0,"Whether suggestion details are visible")),MultipleSuggestions:new nr("suggestWidgetMultipleSuggestions",!1,b(0,"Whether there are multiple suggestions to pick from")),MakesTextEdit:new nr("suggestionMakesTextEdit",!0,b(0,"Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new nr("acceptSuggestionOnEnter",!0,b(0,"Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new nr("suggestionHasInsertAndReplaceRange",!1,b(0,"Whether the current suggestion has insert and replace behaviour")),InsertMode:new nr("suggestionInsertMode",void 0,{type:"string",description:b(0,"Whether the default behaviour is to insert or replace")}),CanResolve:new nr("suggestionCanResolve",!1,b(0,"Whether the current suggestion supports to resolve further details"))},YF=new Sr("suggestWidgetStatusBar");class XF{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=sE.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:t.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),ia.isIRange(t.range)?(this.editStart=new Do(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new Do(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new Do(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||ia.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new Do(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new Do(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new Do(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||ia.spansMultipleLines(t.range.insert)||ia.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._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return ZF(this,void 0,void 0,(function*(){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._isResolved=!1}));this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._isResolved=!0,t.dispose()}),(e=>{k(e)&&(this._resolveCache=void 0,this._isResolved=!1)}))}return this._resolveCache}))}}class JF{constructor(e=2,t=new Set,i=new Set,n=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.showDeprecated=n}}JF.default=new JF;class QF{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function eW(e,t,i,n=JF.default,o={triggerKind:0},s=qt.None){return ZF(this,void 0,void 0,(function*(){const r=new Ne(!0);i=i.clone();const a=t.getWordAtPosition(i),l=a?new ia(i.lineNumber,a.startColumn,i.lineNumber,a.endColumn):ia.fromPositions(i),c={replace:l,insert:l.setEndPosition(i.lineNumber,i.column)},d=[],h=new W,u=[];let g=!1;const p=(e,t,o)=>{var s,r,a;let l=!1;if(!t)return l;for(let o of t.suggestions)if(!n.kindFilter.has(o.kind)){if(!n.showDeprecated&&(null===(s=null==o?void 0:o.tags)||void 0===s?void 0:s.includes(1)))continue;o.range||(o.range=c),o.sortText||(o.sortText="string"==typeof o.label?o.label:o.label.label),!g&&o.insertTextRules&&4&o.insertTextRules&&(g=rF.guessNeedsClipboard(o.insertText)),d.push(new XF(i,o,t,e)),l=!0}return P(t)&&h.add(t),u.push({providerName:null!==(r=e._debugDisplayName)&&void 0!==r?r:"unknown_provider",elapsedProvider:null!==(a=t.duration)&&void 0!==a?a:-1,elapsedOverall:o.elapsed()}),l},m=(()=>ZF(this,void 0,void 0,(function*(){})))();for(let r of e.orderedGroups(t)){let e=!1;if(yield Promise.all(r.map((r=>ZF(this,void 0,void 0,(function*(){if(!(n.providerFilter.size>0)||n.providerFilter.has(r))try{const n=new Ne(!0),a=yield r.provideCompletionItems(t,i,o,s);e=p(r,a,n)||e}catch(e){y(e)}}))))),e||s.isCancellationRequested)break}return yield m,s.isCancellationRequested?(h.dispose(),Promise.reject(L())):new QF(d.sort(nW(n.snippetSortOrder)),g,{entries:u,elapsed:r.elapsed()},h)}))}function tW(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.completion.labelt.completion.label?1:e.completion.kind-t.completion.kind}const iW=new Map;function nW(e){return iW.get(e)}let oW;iW.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 tW(e,t)})),iW.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 tW(e,t)})),iW.set(1,tW),Wo.registerCommand("_executeCompletionItemProvider",((e,...t)=>ZF(void 0,void 0,void 0,(function*(){const[i,n,o,s]=t;lt(qi.isUri(i)),lt(Do.isIPosition(n)),lt("string"==typeof o||!o),lt("number"==typeof s||!s);const{completionProvider:r}=e.get(Mk),a=yield e.get(Eo).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=yield eW(r,a.object.textEditorModel,Do.lift(n),void 0,{triggerCharacter:o,triggerKind:o?1:0});for(const n of i.items)t.length<(null!=s?s:0)&&t.push(n.resolve(qt.None)),e.incomplete=e.incomplete||n.container.incomplete,e.suggestions.push(n.completion);try{return yield Promise.all(t),e}finally{setTimeout((()=>i.disposable.dispose()),100)}}finally{a.dispose()}}))));let sW=[];function rW(e,t,i){const{completionProvider:n}=e.get(Mk);oW||(oW=new class{provideCompletionItems(){let e={suggestions:sW.slice(0)};return sW.length=0,e}},n.register("*",oW)),setTimeout((()=>{var e;sW.push(...i),null===(e=t.getContribution("editor.contrib.suggestController"))||void 0===e||e.triggerSuggest((new Set).add(oW))}),0)}var aW=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},lW=function(e,t){return function(i,n){t(i,n,e)}};const cW=io;let dW=class e extends B{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._widget=this._register(this._instantiationService.createInstance(gW,this._editor)),this._decorationsChangerListener=this._register(new hW(this._editor)),this._messages=[],this._messagesAreComplete=!1,this._participants=[];for(const e of ZO.getAll())this._participants.push(this._instantiationService.createInstance(e,this._editor));this._participants.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._computer=new mW(this._editor,this._participants),this._hoverOperation=this._register(new KO(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value,e.isComplete,e.hasLoadingMessage)}))),this._register(this._decorationsChangerListener.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(hn(this._widget.getDomNode(),"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(y_.onDidChange((()=>{this._widget.position&&this._computer.anchor&&this._messages.length>0&&(this._widget.clear(),this._renderMessages(this._computer.anchor,this._messages))})))}_onModelDecorationsChanged(){this._widget.position&&(this._hoverOperation.cancel(),this._widget.isColorPickerVisible||this._hoverOperation.start(0))}maybeShowAt(e){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 UO(0,i.range)),7===i.type){const e=this._editor.getOption(44).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&"number"==typeof i.detail.horizontalDistanceToText&&i.detail.horizontalDistanceToTextt.priority-e.priority)),this._startShowingAt(t[0],0,!1),!0)}startShowingAtRange(e,t,i){this._startShowingAt(new UO(0,e),t,i)}_startShowingAt(e,t,i){if(!this._computer.anchor||!this._computer.anchor.equals(e)){if(this._hoverOperation.cancel(),this._widget.position)if(this._computer.anchor&&e.canAdoptVisibleHover(this._computer.anchor,this._widget.position)){const t=this._messages.filter((t=>t.isValidForHoverAnchor(e)));if(0===t.length)this.hide();else{if(t.length===this._messages.length&&this._messagesAreComplete)return;this._renderMessages(e,t)}}else this.hide();this._computer.anchor=e,this._computer.shouldFocus=i,this._hoverOperation.start(t)}}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._widget.hide()}isColorPickerVisible(){return this._widget.isColorPickerVisible}_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,t,i){this._messages=i?this._addLoadingMessage(e):e,this._messagesAreComplete=t,this._computer.anchor&&this._messages.length>0?this._renderMessages(this._computer.anchor,this._messages):t&&this.hide()}_renderMessages(t,i){let n=1073741824,o=i[0].range,s=null;for(const e of i)n=Math.min(n,e.range.startColumn),o=ia.plusRange(o,e.range),e.forceShowAtRange&&(s=e.range);const r=new W,a=r.add(new pW(this._keybindingService)),l=document.createDocumentFragment();let c=null;const d={fragment:l,statusBar:a,setColorPicker:e=>c=e,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const e of this._participants){const t=i.filter((t=>t.owner===e));t.length>0&&r.add(e.renderHoverParts(d,t))}if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(o){const t=this._decorationsChangerListener.deltaDecorations([],[{range:o,options:e._DECORATION_OPTIONS}]);r.add(F((()=>{this._decorationsChangerListener.deltaDecorations(t,[])})))}this._widget.showAt(l,new uW(c,s?s.getStartPosition():new Do(t.range.startLineNumber,n),s||o,this._editor.getOption(53).above,this._computer.shouldFocus,r))}else r.dispose()}};dW._DECORATION_OPTIONS=Fx.register({description:"content-hover-highlight",className:"hoverHighlight"}),dW=aW([lW(1,yo),lW(2,_N)],dW);class hW extends B{constructor(e){super(),this._editor=e,this._onDidChangeModelDecorations=this._register(new Pe),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._isChangingDecorations=!1,this._register(this._editor.onDidChangeModelDecorations((e=>{this._isChangingDecorations||this._onDidChangeModelDecorations.fire(e)})))}deltaDecorations(e,t){try{return this._isChangingDecorations=!0,this._editor.deltaDecorations(e,t)}finally{this._isChangingDecorations=!1}}}class uW{constructor(e,t,i,n,o,s){this.colorPicker=e,this.showAtPosition=t,this.showAtRange=i,this.preferAbove=n,this.stoleFocus=o,this.disposables=s}}let gW=class e extends B{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=Rc.hoverVisible.bindTo(this._contextKeyService),this._hover=this._register(new zO),this._visibleData=null,this._register(this._editor.onDidLayoutChange((()=>this._layout()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(44)&&this._updateFont()}))),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this)}get position(){var e,t;return null!==(t=null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition)&&void 0!==t?t:null}get isColorPickerVisible(){var e;return Boolean(null===(e=this._visibleData)||void 0===e?void 0:e.colorPicker)}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return e.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;return!e&&this._contextKeyService.getContextKeyValue(GF.Visible.key)&&(e=!0),{position:this._visibleData.showAtPosition,range:this._visibleData.showAtRange,preference:e?[1,2]:[2,1]}}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(44);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=""+i/t,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(.66*this._editor.getLayoutInfo().width,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}showAt(e,t){this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this._editor.layoutContentWidget(this),this.onContentsChanged(),this._editor.render(),this._editor.layoutContentWidget(this),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),t.colorPicker&&t.colorPicker.layout()}hide(){if(this._visibleData){const e=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._hover.onContentsChanged();const e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){const e=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==e&&(this._hover.contentsDomNode.style.paddingBottom=e,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}};gW.ID="editor.contrib.contentHoverWidget",gW=aW([lW(1,or)],gW);let pW=class extends B{constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=cW("div.hover-row.status-bar"),this.actionsElement=Xn(this.hoverElement,cW("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(jO.render(this.actionsElement,e,i))}append(e){const t=Xn(this.actionsElement,e);return this._hasContent=!0,t}};pW=aW([lW(0,_N)],pW);class mW{constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1}get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}static _getLineDecorations(e,t){if(1!==t.type)return[];const i=e.getModel(),n=t.range.startLineNumber,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 hi.EMPTY;const i=mW._getLineDecorations(this._editor,t);return hi.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):hi.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=mW._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return ol(t)}}var fW=Object.hasOwnProperty,_W=Object.setPrototypeOf,vW=Object.isFrozen,bW=Object.getPrototypeOf,CW=Object.getOwnPropertyDescriptor,wW=Object.freeze,yW=Object.seal,SW=Object.create,xW="undefined"!=typeof Reflect&&Reflect,kW=xW.apply,DW=xW.construct;kW||(kW=function(e,t,i){return e.apply(t,i)}),wW||(wW=function(e){return e}),yW||(yW=function(e){return e}),DW||(DW=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t1?i-1:0),o=1;o/gm),tB=yW(/^data-[\-\w.\u00B7-\uFFFF]/),iB=yW(/^aria-[\-\w]+$/),nB=yW(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),oB=yW(/^(?:\w+script|data):/i),sB=yW(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),rB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function aB(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:lB(),i=function(t){return e(t)};if(i.version="2.3.1",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;var n=t.document,o=t.document,s=t.DocumentFragment,r=t.HTMLTemplateElement,a=t.Node,l=t.Element,c=t.NodeFilter,d=t.NamedNodeMap,h=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,u=t.Text,g=t.Comment,p=t.DOMParser,m=t.trustedTypes,f=l.prototype,_=HW(f,"cloneNode"),v=HW(f,"nextSibling"),b=HW(f,"childNodes"),C=HW(f,"parentNode");if("function"==typeof r){var w=o.createElement("template");w.content&&w.content.ownerDocument&&(o=w.content.ownerDocument)}var y=cB(m,n),S=y&&te?y.createHTML(""):"",x=o,k=x.implementation,D=x.createNodeIterator,L=x.createDocumentFragment,E=x.getElementsByTagName,N=n.importNode,I={};try{I=VW(o).documentMode?o.documentMode:{}}catch(e){}var T={};i.isSupported="function"==typeof C&&k&&void 0!==k.createHTMLDocument&&9!==I;var M=QW,R=eB,P=tB,A=iB,O=oB,F=sB,W=nB,B=null,V=BW({},[].concat(aB(zW),aB(jW),aB(qW),aB(UW),aB(ZW))),H=null,z=BW({},[].concat(aB(GW),aB(YW),aB(XW),aB(JW))),j=null,q=null,K=!0,U=!0,$=!1,Z=!1,G=!1,Y=!1,X=!1,J=!1,Q=!1,ee=!0,te=!1,ie=!0,ne=!0,oe=!1,se={},re=null,ae=BW({},["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"]),le=null,ce=BW({},["audio","video","img","source","image","track"]),de=null,he=BW({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ue="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",me=pe,fe=!1,_e=null,ve=o.createElement("form"),be=function(e){_e&&_e===e||(e&&"object"===(void 0===e?"undefined":rB(e))||(e={}),e=VW(e),B="ALLOWED_TAGS"in e?BW({},e.ALLOWED_TAGS):V,H="ALLOWED_ATTR"in e?BW({},e.ALLOWED_ATTR):z,de="ADD_URI_SAFE_ATTR"in e?BW(VW(he),e.ADD_URI_SAFE_ATTR):he,le="ADD_DATA_URI_TAGS"in e?BW(VW(ce),e.ADD_DATA_URI_TAGS):ce,re="FORBID_CONTENTS"in e?BW({},e.FORBID_CONTENTS):ae,j="FORBID_TAGS"in e?BW({},e.FORBID_TAGS):{},q="FORBID_ATTR"in e?BW({},e.FORBID_ATTR):{},se="USE_PROFILES"in e&&e.USE_PROFILES,K=!1!==e.ALLOW_ARIA_ATTR,U=!1!==e.ALLOW_DATA_ATTR,$=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=e.SAFE_FOR_TEMPLATES||!1,G=e.WHOLE_DOCUMENT||!1,J=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,ee=!1!==e.RETURN_DOM_IMPORT,te=e.RETURN_TRUSTED_TYPE||!1,X=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,ne=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,W=e.ALLOWED_URI_REGEXP||W,me=e.NAMESPACE||pe,Z&&(U=!1),Q&&(J=!0),se&&(B=BW({},[].concat(aB(ZW))),H=[],!0===se.html&&(BW(B,zW),BW(H,GW)),!0===se.svg&&(BW(B,jW),BW(H,YW),BW(H,JW)),!0===se.svgFilters&&(BW(B,qW),BW(H,YW),BW(H,JW)),!0===se.mathMl&&(BW(B,UW),BW(H,XW),BW(H,JW))),e.ADD_TAGS&&(B===V&&(B=VW(B)),BW(B,e.ADD_TAGS)),e.ADD_ATTR&&(H===z&&(H=VW(H)),BW(H,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&BW(de,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(re===ae&&(re=VW(re)),BW(re,e.FORBID_CONTENTS)),ne&&(B["#text"]=!0),G&&BW(B,["html","head","body"]),B.table&&(BW(B,["tbody"]),delete j.tbody),wW&&wW(e),_e=e)},Ce=BW({},["mi","mo","mn","ms","mtext"]),we=BW({},["foreignobject","desc","title","annotation-xml"]),ye=BW({},jW);BW(ye,qW),BW(ye,KW);var Se=BW({},UW);BW(Se,$W);var xe=function(e){var t=C(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});var i=TW(e.tagName),n=TW(t.tagName);if(e.namespaceURI===ge)return t.namespaceURI===pe?"svg"===i:t.namespaceURI===ue?"svg"===i&&("annotation-xml"===n||Ce[n]):Boolean(ye[i]);if(e.namespaceURI===ue)return t.namespaceURI===pe?"math"===i:t.namespaceURI===ge?"math"===i&&we[n]:Boolean(Se[i]);if(e.namespaceURI===pe){if(t.namespaceURI===ge&&!we[n])return!1;if(t.namespaceURI===ue&&!Ce[n])return!1;var o=BW({},["title","style","font","a","script"]);return!Se[i]&&(o[i]||!ye[i])}return!1},ke=function(e){IW(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=S}catch(t){e.remove()}}},De=function(e,t){try{IW(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){IW(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!H[e])if(J||Q)try{ke(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Le=function(e){var t=void 0,i=void 0;if(X)e=""+e;else{var n=MW(e,/^[\r\n\t ]+/);i=n&&n[0]}var s=y?y.createHTML(e):e;if(me===pe)try{t=(new p).parseFromString(s,"text/html")}catch(e){}if(!t||!t.documentElement){t=k.createDocument(me,"template",null);try{t.documentElement.innerHTML=fe?"":s}catch(e){}}var r=t.body||t.documentElement;return e&&i&&r.insertBefore(o.createTextNode(i),r.childNodes[0]||null),me===pe?E.call(t,G?"html":"body")[0]:G?t.documentElement:r},Ee=function(e){return D.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},Ne=function(e){return!(e instanceof u||e instanceof g||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof h&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},Ie=function(e){return"object"===(void 0===a?"undefined":rB(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":rB(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Te=function(e,t,n){T[e]&&EW(T[e],(function(e){e.call(i,t,n,_e)}))},Me=function(e){var t=void 0;if(Te("beforeSanitizeElements",e,null),Ne(e))return ke(e),!0;if(MW(e.nodeName,/[\u0080-\uFFFF]/))return ke(e),!0;var n=TW(e.nodeName);if(Te("uponSanitizeElement",e,{tagName:n,allowedTags:B}),!Ie(e.firstElementChild)&&(!Ie(e.content)||!Ie(e.content.firstElementChild))&&OW(/<[/\w]/g,e.innerHTML)&&OW(/<[/\w]/g,e.textContent))return ke(e),!0;if("select"===n&&OW(/