Files
zfile/src/main/resources/static/js/chunk-1f0cfb2a.05b8606a.js
2020-02-29 15:46:56 +08:00

6 lines
1.4 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1f0cfb2a"],{"0876":function(e,t,n){},"0baa":function(e,t,n){},"0d30":function(e,t,n){},"1fa1":function(e,t,n){"use strict";n.r(t);var i=n("fa12");Object(i["a"])({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:function(){return n.e("chunk-2d0e57ec").then(n.bind(null,"9571"))}})},"27e6":function(e,t,n){},"2ab7":function(e,t,n){},"30db":function(e,t,n){"use strict";(function(e,i){n.d(t,"h",(function(){return v})),n.d(t,"e",(function(){return _})),n.d(t,"d",(function(){return y})),n.d(t,"f",(function(){return b})),n.d(t,"g",(function(){return C})),n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return L})),n.d(t,"i",(function(){return N})),n.d(t,"a",(function(){return D}));var o="en",r=!1,s=!1,a=!1,u=!1,l=!1,c=!1,h=void 0,d=void 0,f="undefined"!==typeof e&&"undefined"!==typeof e.versions&&"undefined"!==typeof e.versions.electron&&"renderer"===e.type;if("object"!==typeof navigator||f){if("object"===typeof e){r="win32"===e.platform,s="darwin"===e.platform,a="linux"===e.platform,h=o,o;var p=Object({NODE_ENV:"production",BASE_URL:"/"})["VSCODE_NLS_CONFIG"];if(p)try{var g=JSON.parse(p),m=g.availableLanguages["*"];h=g.locale,m||o,g._translationsConfigFile}catch(E){}u=!0}}else d=navigator.userAgent,r=d.indexOf("Windows")>=0,s=d.indexOf("Macintosh")>=0,c=d.indexOf("Macintosh")>=0&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,a=d.indexOf("Linux")>=0,l=!0,h=navigator.language,h;var v=r,_=s,y=a,b=u,C=l,w=c,S="object"===typeof self?self:"object"===typeof i?i:{},L=S,N=function(){if(L.setImmediate)return L.setImmediate.bind(L);if("function"===typeof L.postMessage&&!L.importScripts){var t=[];L.addEventListener("message",(function(e){if(e.data&&e.data.vscodeSetImmediateId)for(var n=0,i=t.length;n<i;n++){var o=t[n];if(o.id===e.data.vscodeSetImmediateId)return t.splice(n,1),void o.callback()}}));var n=0;return function(e){var i=++n;t.push({id:i,callback:e}),L.postMessage({vscodeSetImmediateId:i},"*")}}if("undefined"!==typeof e&&"function"===typeof e.nextTick)return e.nextTick.bind(e);var i=Promise.resolve();return function(e){return i.then(e)}}(),D=s?2:r?1:3}).call(this,n("f28c"),n("c8ba"))},"33f9":function(e,t,n){self["MonacoEnvironment"]=function(e){function t(e){return e.replace(/\/$/,"")}return{getWorkerUrl:function(i,o){var r=n.p,s=(r?t(r)+"/":"")+e[o];if(/^(http:)|(https:)|(file:)/.test(s)){var a=String(window.location),u=a.substr(0,a.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(s.substring(0,u.length)!==u){var l="/*"+o+'*/importScripts("'+s+'");';return"data:text/javascript;charset=utf-8,"+encodeURIComponent(l)}}return s}}}({editorWorkerService:"editor.worker.js"}),e.exports=n("f33e"),n("93b9"),n("1fa1")},"38a2":function(e,t,n){},"3f22":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"content",attrs:{"element-loading-text":"拼命加载中"}},["md"!==e.getFileSuffix(e.file.name)?n("div",{staticClass:"editor",attrs:{id:"container"}}):e._e(),"md"===e.getFileSuffix(e.file.name)?n("div",{staticClass:"dialog-scroll markdown-body",domProps:{innerHTML:e._s(e.markdownHtml)}}):e._e()])},o=[],r=(n("a481"),n("b54a"),n("7f7f"),n("33f9")),s=n("0e54"),a=n.n(s),u=n("a70e");n("e4cb");u["registerLanguage"]("markdown",n("04b0"));var l={name:"TextPreview",components:{},data:function(){return{text:"",loading:!0,editor:""}},props:{file:Object},methods:{getFileSuffix:function(e){var t=e.substr(e.lastIndexOf(".")+1).toLocaleLowerCase();return"js"===t?"javascript":t},init:function(){var e=this,t=this.file;this.$http.get("common/content",{params:{url:t.url}}).then((function(t){e.loading=!1,e.text=t.data.data,e.initMonaco()})).catch((function(){e.$http.get(t.url).then((function(t){e.loading=!1,e.text=t.data,e.initMonaco()}))}))},initMonaco:function(){r["editor"].create(document.getElementById("container"),{value:this.text,language:this.getFileSuffix(this.file.name),theme:"vs"})}},computed:{markdownHtml:function(){var e=new a.a.Renderer;return e.link=function(){var e=a.a.Renderer.prototype.link.apply(this,arguments);return e.replace("<a","<a target='_blank'")},a.a.setOptions({renderer:e}),a()(this.text,{highlight:function(e){return u["highlightAuto"](e).value}})}}},c=l,h=(n("af56"),n("2877")),d=Object(h["a"])(c,i,o,!1,null,"0f46f00c",null);t["default"]=d.exports},"4d3d":function(e,t,n){},5029:function(e,t,n){},5110:function(e,t,n){(function(e){
/*!
Copyright (c) 2014 Taylor Hakes
Copyright (c) 2014 Forbes Lindesay
*/
(function(e,t){t()})(0,(function(){"use strict";function t(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}var n=setTimeout;function i(){}function o(e,t){return function(){e.apply(t,arguments)}}function r(e){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(e,this)}function s(e,t){while(3===e._state)e=e._value;0!==e._state?(e._handled=!0,r._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var i;try{i=n(e._value)}catch(o){return void u(t.promise,o)}a(t.promise,i)}else(1===e._state?a:u)(t.promise,e._value)}))):e._deferreds.push(t)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===typeof t||"function"===typeof t)){var n=t.then;if(t instanceof r)return e._state=3,e._value=t,void l(e);if("function"===typeof n)return void h(o(n,t),e)}e._state=1,e._value=t,l(e)}catch(i){u(e,i)}}function u(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&r._immediateFn((function(){e._handled||r._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)s(e,e._deferreds[t]);e._deferreds=null}function c(e,t,n){this.onFulfilled="function"===typeof e?e:null,this.onRejected="function"===typeof t?t:null,this.promise=n}function h(e,t){var n=!1;try{e((function(e){n||(n=!0,a(t,e))}),(function(e){n||(n=!0,u(t,e))}))}catch(i){if(n)return;n=!0,u(t,i)}}r.prototype["catch"]=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var n=new this.constructor(i);return s(this,new c(e,t,n)),n},r.prototype["finally"]=t,r.all=function(e){return new r((function(t,n){if(!e||"undefined"===typeof e.length)throw new TypeError("Promise.all accepts an array");var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);var o=i.length;function r(e,s){try{if(s&&("object"===typeof s||"function"===typeof s)){var a=s.then;if("function"===typeof a)return void a.call(s,(function(t){r(e,t)}),n)}i[e]=s,0===--o&&t(i)}catch(u){n(u)}}for(var s=0;s<i.length;s++)r(s,i[s])}))},r.resolve=function(e){return e&&"object"===typeof e&&e.constructor===r?e:new r((function(t){t(e)}))},r.reject=function(e){return new r((function(t,n){n(e)}))},r.race=function(e){return new r((function(t,n){for(var i=0,o=e.length;i<o;i++)e[i].then(t,n)}))},r._immediateFn="function"===typeof setImmediate&&function(e){setImmediate(e)}||function(e){n(e,0)},r._unhandledRejectionFn=function(e){"undefined"!==typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var d=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw new Error("unable to locate global object")}();"Promise"in d?d.Promise.prototype["finally"]||(d.Promise.prototype["finally"]=t):d["Promise"]=r}))}).call(this,n("c8ba"))},"56dc":function(e,t,n){},"56f3":function(e,t,n){},"5d70":function(e,t,n){},"725e":function(e,t,n){},"782d":function(e,t,n){},"7a2c":function(e,t,n){},"7aad":function(e,t,n){},8478:function(e,t,n){},"876f":function(e,t,n){},"930f":function(e,t,n){},"93b9":function(e,t,n){"use strict";n.r(t);var i=n("fa12");Object(i["a"])({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:function(){return n.e("chunk-2d0a43df").then(n.bind(null,"0636"))}})},"94a7":function(e,t,n){},"96b9":function(e,t,n){},af56:function(e,t,n){"use strict";var i=n("876f"),o=n.n(i);o.a},b223:function(e,t,n){},ba77:function(e,t,n){},c317:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return a}));var i=n("30db"),o="undefined"===typeof e?{cwd:function(){return"/"},env:Object.create(null),get platform(){return i["h"]?"win32":i["e"]?"darwin":"linux"},nextTick:function(e){return Object(i["i"])(e)}}:e,r=o.cwd,s=o.env,a=o.platform}).call(this,n("f28c"))},c84a:function(e,t,n){},d8c3:function(e,t,n){},d93b:function(e,t,n){},d95f:function(e,t,n){},e2b8:function(e,t,n){},ef37:function(e,t,n){},f20b:function(e,t,n){},f33e:function(e,t,n){"use strict";n.r(t);var i={};function o(e,t){var n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,n){var i=n[0];return"undefined"!==typeof t[i]?t[i]:e})),n}function r(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return o(t,n)}n.r(i),n.d(i,"win32",(function(){return vs})),n.d(i,"posix",(function(){return _s})),n.d(i,"normalize",(function(){return ys})),n.d(i,"join",(function(){return bs})),n.d(i,"relative",(function(){return Cs})),n.d(i,"dirname",(function(){return ws})),n.d(i,"basename",(function(){return Ss})),n.d(i,"extname",(function(){return Ls})),n.d(i,"sep",(function(){return Ns}));var s=n("30db"),a="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function u(e){void 0===e&&(e="");for(var t="(-?\\d*\\.\\d\\w*)|([^",n=0,i=a;n<i.length;n++){var o=i[n];e.indexOf(o)>=0||(t+="\\"+o)}return t+="\\s]+)",new RegExp(t,"g")}var l=u();function c(e){var t=l;if(e&&e instanceof RegExp)if(e.global)t=e;else{var n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}function h(e,t,n,i){var o,r=e-1-i,s=n.lastIndexOf(" ",r-1)+1;t.lastIndex=s;while(o=t.exec(n)){var a=o.index||0;if(a<=r&&t.lastIndex>=r)return{word:o[0],startColumn:i+1+a,endColumn:i+1+t.lastIndex}}return null}function d(e,t,n,i){var o,r=e-1-i;t.lastIndex=0;while(o=t.exec(n)){var s=o.index||0;if(s>r)return null;if(t.lastIndex>=r)return{word:o[0],startColumn:i+1+s,endColumn:i+1+t.lastIndex}}return null}function f(e,t,n,i){t.lastIndex=0;var o=t.exec(n);if(!o)return null;var r=o[0].indexOf(" ")>=0?d(e,t,n,i):h(e,t,n,i);return t.lastIndex=0,r}var p=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),g=function(){return g=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)},m=8,v=function(){function e(e){this._values=e}return e.prototype.hasChanged=function(e){return this._values[e]},e}(),_=function(){function e(){this._values=[]}return e.prototype._read=function(e){return this._values[e]},e.prototype.get=function(e){return this._values[e]},e.prototype._write=function(e,t){this._values[e]=t},e}(),y=function(){function e(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}return e.prototype.compute=function(e,t,n){return n},e}(),b=function(){function e(e,t){void 0===t&&(t=null),this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}return e.prototype.validate=function(e){return this.defaultValue},e}(),C=function(){function e(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}return e.prototype.validate=function(e){return"undefined"===typeof e?this.defaultValue:e},e.prototype.compute=function(e,t,n){return n},e}(),w=function(e){function t(t,n,i,o){void 0===o&&(o=void 0);var r=this;return"undefined"!==typeof o&&(o.type="boolean",o.default=i),r=e.call(this,t,n,i,o)||this,r}return p(t,e),t.boolean=function(e,t){return"undefined"===typeof e?t:"false"!==e&&Boolean(e)},t.prototype.validate=function(e){return t.boolean(e,this.defaultValue)},t}(C),S=function(e){function t(t,n,i,o,r,s){void 0===s&&(s=void 0);var a=this;return"undefined"!==typeof s&&(s.type="integer",s.default=i,s.minimum=o,s.maximum=r),a=e.call(this,t,n,i,s)||this,a.minimum=o,a.maximum=r,a}return p(t,e),t.clampedInt=function(e,t,n,i){var o;return"undefined"===typeof e?o=t:(o=parseInt(e,10),isNaN(o)&&(o=t)),o=Math.max(n,o),o=Math.min(i,o),0|o},t.prototype.validate=function(e){return t.clampedInt(e,this.defaultValue,this.minimum,this.maximum)},t}(C),L=function(e){function t(t,n,i,o,r){var s=this;return"undefined"!==typeof r&&(r.type="number",r.default=i),s=e.call(this,t,n,i,r)||this,s.validationFn=o,s}return p(t,e),t.clamp=function(e,t,n){return e<t?t:e>n?n:e},t.float=function(e,t){if("number"===typeof e)return e;if("undefined"===typeof e)return t;var n=parseFloat(e);return isNaN(n)?t:n},t.prototype.validate=function(e){return this.validationFn(t.float(e,this.defaultValue))},t}(C),N=function(e){function t(t,n,i,o){void 0===o&&(o=void 0);var r=this;return"undefined"!==typeof o&&(o.type="string",o.default=i),r=e.call(this,t,n,i,o)||this,r}return p(t,e),t.string=function(e,t){return"string"!==typeof e?t:e},t.prototype.validate=function(e){return t.string(e,this.defaultValue)},t}(C),D=function(e){function t(t,n,i,o,r){void 0===r&&(r=void 0);var s=this;return"undefined"!==typeof r&&(r.type="string",r.enum=o,r.default=i),s=e.call(this,t,n,i,r)||this,s._allowedValues=o,s}return p(t,e),t.stringSet=function(e,t,n){return"string"!==typeof e?t:-1===n.indexOf(e)?t:e},t.prototype.validate=function(e){return t.stringSet(e,this.defaultValue,this._allowedValues)},t}(C),E=function(e){function t(t,n,i,o,r,s,a){void 0===a&&(a=void 0);var u=this;return"undefined"!==typeof a&&(a.type="string",a.enum=r,a.default=o),u=e.call(this,t,n,i,a)||this,u._allowedValues=r,u._convert=s,u}return p(t,e),t.prototype.validate=function(e){return"string"!==typeof e?this.defaultValue:-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)},t}(y);function x(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}var k,O=function(e){function t(){return e.call(this,2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[r("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),r("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),r("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:r("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")})||this}return p(t,e),t.prototype.validate=function(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue},t.prototype.compute=function(e,t,n){return 0===n?e.accessibilitySupport:n},t}(y),T=function(e){function t(){var t=this,n={insertSpace:!0};return t=e.call(this,13,"comments",n,{"editor.comments.insertSpace":{type:"boolean",default:n.insertSpace,description:r("comments.insertSpace","Controls whether a space character is inserted when commenting.")}})||this,t}return p(t,e),t.prototype.validate=function(e){if("object"!==typeof e)return this.defaultValue;var t=e;return{insertSpace:w.boolean(t.insertSpace,this.defaultValue.insertSpace)}},t}(y);function M(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}function I(e){switch(e){case"line":return k.Line;case"block":return k.Block;case"underline":return k.Underline;case"line-thin":return k.LineThin;case"block-outline":return k.BlockOutline;case"underline-thin":return k.UnderlineThin}}(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"})(k||(k={}));var A=function(e){function t(){return e.call(this,104,[55,26])||this}return p(t,e),t.prototype.compute=function(e,t,n){var i="monaco-editor";return t.get(26)&&(i+=" "+t.get(26)),e.extraEditorClassName&&(i+=" "+e.extraEditorClassName),"default"===t.get(55)?i+=" mouse-default":"copy"===t.get(55)&&(i+=" mouse-copy"),t.get(85)&&(i+=" showUnused"),i},t}(b),P=function(e){function t(){return e.call(this,25,"emptySelectionClipboard",!0,{description:r("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})||this}return p(t,e),t.prototype.compute=function(e,t,n){return n&&e.emptySelectionClipboard},t}(w),R=function(e){function t(){var t=this,n={seedSearchStringFromSelection:!0,autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0};return t=e.call(this,28,"find",n,{"editor.find.seedSearchStringFromSelection":{type:"boolean",default:n.seedSearchStringFromSelection,description:r("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:n.autoFindInSelection,enumDescriptions:[r("editor.find.autoFindInSelection.never","Never turn on Find in selection automatically (default)"),r("editor.find.autoFindInSelection.always","Always turn on Find in selection automatically"),r("editor.find.autoFindInSelection.multiline","Turn on Find in selection automatically when multiple lines of content are selected.")],description:r("find.autoFindInSelection","Controls whether the find operation is carried out on selected text or the entire file in the editor.")},"editor.find.globalFindClipboard":{type:"boolean",default:n.globalFindClipboard,description:r("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:s["e"]},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:n.addExtraSpaceOnTop,description:r("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")}})||this,t}return p(t,e),t.prototype.validate=function(e){if("object"!==typeof e)return this.defaultValue;var t=e;return{seedSearchStringFromSelection:w.boolean(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection),autoFindInSelection:"boolean"===typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":D.stringSet(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:w.boolean(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:w.boolean(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop)}},t}(y),F=function(e){function t(){return e.call(this,35,"fontLigatures",t.OFF,{anyOf:[{type:"boolean",description:r("fontLigatures","Enables/Disables font ligatures.")},{type:"string",description:r("fontFeatureSettings","Explicit font-feature-settings.")}],description:r("fontLigaturesGeneral","Configures font ligatures."),default:!1})||this}return p(t,e),t.prototype.validate=function(e){return"undefined"===typeof e?this.defaultValue:"string"===typeof e?"false"===e?t.OFF:"true"===e?t.ON:e:Boolean(e)?t.ON:t.OFF},t.OFF='"liga" off, "calt" off',t.ON='"liga" on, "calt" on',t}(y),W=function(e){function t(){return e.call(this,34)||this}return p(t,e),t.prototype.compute=function(e,t,n){return e.fontInfo},t}(b),V=function(e){function t(){return e.call(this,36,"fontSize",ue.fontSize,{type:"number",minimum:6,maximum:100,default:ue.fontSize,description:r("fontSize","Controls the font size in pixels.")})||this}return p(t,e),t.prototype.validate=function(e){var t=L.float(e,this.defaultValue);return 0===t?ue.fontSize:L.clamp(t,6,100)},t.prototype.compute=function(e,t,n){return e.fontInfo.fontSize},t}(C),B=function(e){function t(){var t=this,n={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:""},i={type:"string",enum:["peek","gotoAndPeek","goto"],default:n.multiple,enumDescriptions:[r("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),r("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),r("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]};return t=e.call(this,41,"gotoLocation",n,{"editor.gotoLocation.multiple":{deprecationMessage:r("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":g({description:r("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},i),"editor.gotoLocation.multipleTypeDefinitions":g({description:r("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},i),"editor.gotoLocation.multipleDeclarations":g({description:r("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},i),"editor.gotoLocation.multipleImplementations":g({description:r("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},i),"editor.gotoLocation.multipleReferences":g({description:r("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},i),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:n.alternativeDefinitionCommand,description:r("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:n.alternativeTypeDefinitionCommand,description:r("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:n.alternativeDeclarationCommand,description:r("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:n.alternativeImplementationCommand,description:r("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:n.alternativeReferenceCommand,description:r("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})||this,t}return p(t,e),t.prototype.validate=function(e){var t,n,i,o,r;if("object"!==typeof e)return this.defaultValue;var s=e;return{multiple:D.stringSet(s.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=s.multipleDefinitions)&&void 0!==t?t:D.stringSet(s.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(n=s.multipleTypeDefinitions)&&void 0!==n?n:D.stringSet(s.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(i=s.multipleDeclarations)&&void 0!==i?i:D.stringSet(s.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=s.multipleImplementations)&&void 0!==o?o:D.stringSet(s.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(r=s.multipleReferences)&&void 0!==r?r:D.stringSet(s.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:N.string(s.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:N.string(s.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:N.string(s.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:N.string(s.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:N.string(s.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}},t}(y),H=function(e){function t(){var t=this,n={enabled:!0,delay:300,sticky:!0};return t=e.call(this,44,"hover",n,{"editor.hover.enabled":{type:"boolean",default:n.enabled,description:r("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:n.delay,description:r("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:n.sticky,description:r("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")}})||this,t}return p(t,e),t.prototype.validate=function(e){if("object"!==typeof e)return this.defaultValue;var t=e;return{enabled:w.boolean(t.enabled,this.defaultValue.enabled),delay:S.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:w.boolean(t.sticky,this.defaultValue.sticky)}},t}(y),z=function(e){function t(){return e.call(this,107,[40,48,30,54,78,50])||this}return p(t,e),t.prototype.compute=function(e,n,i){return t.computeLayout(n,{outerWidth:e.outerWidth,outerHeight:e.outerHeight,lineHeight:e.fontInfo.lineHeight,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})},t.computeLayout=function(e,t){var n,i=0|t.outerWidth,o=0|t.outerHeight,r=0|t.lineHeight,s=0|t.lineNumbersDigitCount,a=t.typicalHalfwidthCharacterWidth,u=t.maxDigitWidth,l=t.pixelRatio,c=e.get(40),h=0!==e.get(50).renderType,d=0|e.get(51),f=e.get(54),p=f.enabled,g=f.side,v=f.renderCharacters,_=l>=2?Math.round(2*f.scale):f.scale,y=0|f.maxColumn,b=e.get(78),C=0|b.verticalScrollbarSize,w=b.verticalHasArrows,L=0|b.arrowSize,N=0|b.horizontalScrollbarSize,D=e.get(48),E=e.get(30);if("string"===typeof D&&/^\d+(\.\d+)?ch$/.test(D)){var x=parseFloat(D.substr(0,D.length-2));n=S.clampedInt(x*a,0,0,1e3)}else n=S.clampedInt(D,0,0,1e3);E&&(n+=16);var k=0;if(h){var O=Math.max(s,d);k=Math.round(O*u)}var T=0;c&&(T=r);var M,I,A,P,R=0,F=R+T,W=F+k,V=W+n,B=i-T-k-n;if(p){var H=_/l;M=v?1:2,A=Math.max(0,Math.floor((B-C-2)*H/(a+H)))+m;var z=A/H;z>y&&(A=Math.floor(y*H)),P=B-A,"left"===g?(I=0,R+=A,F+=A,W+=A,V+=A):I=i-A-C}else I=0,A=0,M=0,P=B;var j=Math.max(1,Math.floor((P-C-2)/a)),U=w?L:0;return{width:i,height:o,glyphMarginLeft:R,glyphMarginWidth:T,lineNumbersLeft:F,lineNumbersWidth:k,decorationsLeft:W,decorationsWidth:n,contentLeft:V,contentWidth:P,renderMinimap:M,minimapLeft:I,minimapWidth:A,viewportColumn:j,verticalScrollbarWidth:C,horizontalScrollbarHeight:N,overviewRuler:{top:U,width:C,height:o-2*U,right:0}}},t}(b),j=function(e){function t(){var t=this,n={enabled:!0};return t=e.call(this,47,"lightbulb",n,{"editor.lightbulb.enabled":{type:"boolean",default:n.enabled,description:r("codeActions","Enables the code action lightbulb in the editor.")}})||this,t}return p(t,e),t.prototype.validate=function(e){if("object"!==typeof e)return this.defaultValue;var t=e;return{enabled:w.boolean(t.enabled,this.defaultValue.enabled)}},t}(y),U=function(e){function t(){return e.call(this,49,"lineHeight",ue.lineHeight,0,150,{description:r("lineHeight","Controls the line height. Use 0 to compute the line height from the font size.")})||this}return p(t,e),t.prototype.compute=function(e,t,n){return e.fontInfo.lineHeight},t}(S),K=function(e){function t(){var t=this,n={enabled:!0,side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};return t=e.call(this,54,"minimap",n,{"editor.minimap.enabled":{type:"boolean",default:n.enabled,description:r("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:n.side,description:r("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:n.showSlider,description:r("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:n.scale,minimum:1,maximum:3,description:r("minimap.scale","Scale of content drawn in the minimap.")},"editor.minimap.renderCharacters":{type:"boolean",default:n.renderCharacters,description:r("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:n.maxColumn,description:r("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})||this,t}return p(t,e),t.prototype.validate=function(e){if("object"!==typeof e)return this.defaultValue;var t=e;return{enabled:w.boolean(t.enabled,this.defaultValue.enabled),side:D.stringSet(t.side,this.defaultValue.side,["right","left"]),showSlider:D.stringSet(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:w.boolean(t.renderCharacters,this.defaultValue.renderCharacters),scale:S.clampedInt(t.scale,1,1,3),maxColumn:S.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}},t}(y);function q(e){return"ctrlCmd"===e?s["e"]?"metaKey":"ctrlKey":"altKey"}var G=function(e){function t(){var t=this,n={enabled:!0,cycle:!1};return t=e.call(this,64,"parameterHints",n,{"editor.parameterHints.enabled":{type:"boolean",default:n.enabled,description:r("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:n.cycle,description:r("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})||this,t}return p(t,e),t.prototype.validate=function(e){if("object"!==typeof e)return this.defaultValue;var t=e;return{enabled:w.boolean(t.enabled,this.defaultValue.enabled),cycle:w.boolean(t.cycle,this.defaultValue.cycle)}},t}(y),Y=function(e){function t(){return e.call(this,105)||this}return p(t,e),t.prototype.compute=function(e,t,n){return e.pixelRatio},t}(b),Z=function(e){function t(){var t=this,n={other:!0,comments:!1,strings:!1};return t=e.call(this,66,"quickSuggestions",n,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:n.strings,description:r("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:n.comments,description:r("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:n.other,description:r("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:n,description:r("quickSuggestions","Controls whether suggestions should automatically show up while typing.")})||this,t.defaultValue=n,t}return p(t,e),t.prototype.validate=function(e){if("boolean"===typeof e)return e;if("object"===typeof e){var t=e,n={other:w.boolean(t.other,this.defaultValue.other),comments:w.boolean(t.comments,this.defaultValue.comments),strings:w.boolean(t.strings,this.defaultValue.strings)};return!!(n.other&&n.comments&&n.strings)||!!(n.other||n.comments||n.strings)&&n}return this.defaultValue},t}(y),X=function(e){function t(){return e.call(this,50,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[r("lineNumbers.off","Line numbers are not rendered."),r("lineNumbers.on","Line numbers are rendered as absolute number."),r("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),r("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:r("lineNumbers","Controls the display of line numbers.")})||this}return p(t,e),t.prototype.validate=function(e){var t=this.defaultValue.renderType,n=this.defaultValue.renderFn;return"undefined"!==typeof e&&("function"===typeof e?(t=4,n=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:n}},t}(y);function $(e){var t=e.get(73);return"editable"===t?e.get(68):"on"!==t}var Q=function(e){function t(){var t=this,n=[];return t=e.call(this,77,"rulers",n,{type:"array",items:{type:"number"},default:n,description:r("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})||this,t}return p(t,e),t.prototype.validate=function(e){if(Array.isArray(e)){for(var t=[],n=0,i=e;n<i.length;n++){var o=i[n];t.push(S.clampedInt(o,0,0,1e4))}return t.sort((function(e,t){return e-t})),t}return this.defaultValue},t}(C);function J(e,t){if("string"!==typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}var ee=function(e){function t(){return e.call(this,78,"scrollbar",{vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:10,horizontalSliderSize:10,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0})||this}return p(t,e),t.prototype.validate=function(e){if("object"!==typeof e)return this.defaultValue;var t=e,n=S.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),i=S.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:S.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:J(t.vertical,this.defaultValue.vertical),horizontal:J(t.horizontal,this.defaultValue.horizontal),useShadows:w.boolean(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:w.boolean(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:w.boolean(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:w.boolean(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:w.boolean(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:S.clampedInt(t.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:i,verticalSliderSize:S.clampedInt(t.verticalSliderSize,i,0,1e3)}},t}(y),te=function(e){function t(){var t=this,n={insertMode:"insert",insertHighlight:!1,filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,maxVisibleSuggestions:12,showMethods:!0,showFunctions:!0,showConstructors:!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,hideStatusBar:!0};return t=e.call(this,89,"suggest",n,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[r("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),r("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:n.insertMode,description:r("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.insertHighlight":{type:"boolean",default:n.insertHighlight,description:r("suggest.insertHighlight","Controls whether unexpected text modifications while accepting completions should be highlighted, e.g `insertMode` is `replace` but the completion only supports `insert`.")},"editor.suggest.filterGraceful":{type:"boolean",default:n.filterGraceful,description:r("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:n.localityBonus,description:r("suggest.localityBonus","Controls whether sorting favours words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:n.shareSuggestSelections,markdownDescription:r("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:n.snippetsPreventQuickSuggestions,description:r("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:n.showIcons,description:r("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.maxVisibleSuggestions":{type:"number",default:n.maxVisibleSuggestions,minimum:1,maximum:15,description:r("suggest.maxVisibleSuggestions","Controls how many suggestions IntelliSense will show before showing a scrollbar (maximum 15).")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:r("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.hideStatusBar":{type:"boolean",default:!0,markdownDescription:r("editor.suggest.hideStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")}})||this,t}return p(t,e),t.prototype.validate=function(e){if("object"!==typeof e)return this.defaultValue;var t=e;return{insertMode:D.stringSet(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),insertHighlight:w.boolean(t.insertHighlight,this.defaultValue.insertHighlight),filterGraceful:w.boolean(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:w.boolean(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:w.boolean(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:w.boolean(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:w.boolean(t.showIcons,this.defaultValue.showIcons),maxVisibleSuggestions:S.clampedInt(t.maxVisibleSuggestions,this.defaultValue.maxVisibleSuggestions,1,15),showMethods:w.boolean(t.showMethods,this.defaultValue.showMethods),showFunctions:w.boolean(t.showFunctions,this.defaultValue.showFunctions),showConstructors:w.boolean(t.showConstructors,this.defaultValue.showConstructors),showFields:w.boolean(t.showFields,this.defaultValue.showFields),showVariables:w.boolean(t.showVariables,this.defaultValue.showVariables),showClasses:w.boolean(t.showClasses,this.defaultValue.showClasses),showStructs:w.boolean(t.showStructs,this.defaultValue.showStructs),showInterfaces:w.boolean(t.showInterfaces,this.defaultValue.showInterfaces),showModules:w.boolean(t.showModules,this.defaultValue.showModules),showProperties:w.boolean(t.showProperties,this.defaultValue.showProperties),showEvents:w.boolean(t.showEvents,this.defaultValue.showEvents),showOperators:w.boolean(t.showOperators,this.defaultValue.showOperators),showUnits:w.boolean(t.showUnits,this.defaultValue.showUnits),showValues:w.boolean(t.showValues,this.defaultValue.showValues),showConstants:w.boolean(t.showConstants,this.defaultValue.showConstants),showEnums:w.boolean(t.showEnums,this.defaultValue.showEnums),showEnumMembers:w.boolean(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:w.boolean(t.showKeywords,this.defaultValue.showKeywords),showWords:w.boolean(t.showWords,this.defaultValue.showWords),showColors:w.boolean(t.showColors,this.defaultValue.showColors),showFiles:w.boolean(t.showFiles,this.defaultValue.showFiles),showReferences:w.boolean(t.showReferences,this.defaultValue.showReferences),showFolders:w.boolean(t.showFolders,this.defaultValue.showFolders),showTypeParameters:w.boolean(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:w.boolean(t.showSnippets,this.defaultValue.showSnippets),hideStatusBar:w.boolean(t.hideStatusBar,this.defaultValue.hideStatusBar)}},t}(y),ne=function(e){function t(){return e.call(this,106,[68])||this}return p(t,e),t.prototype.compute=function(e,t,n){var i=t.get(68);return!!i||e.tabFocusMode},t}(b);function ie(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}var oe=function(e){function t(){return e.call(this,108,[97,100,101,107,2])||this}return p(t,e),t.prototype.compute=function(e,t,n){var i=t.get(97),o=t.get(100),r=t.get(101),s=t.get(107),a=t.get(2),u=null;return u=2===a?{isWordWrapMinified:!1,isViewportWrapping:!1,wrappingColumn:-1}:r&&e.isDominatedByLongLines?{isWordWrapMinified:!0,isViewportWrapping:!0,wrappingColumn:Math.max(1,s.viewportColumn)}:"on"===i?{isWordWrapMinified:!1,isViewportWrapping:!0,wrappingColumn:Math.max(1,s.viewportColumn)}:"bounded"===i?{isWordWrapMinified:!1,isViewportWrapping:!0,wrappingColumn:Math.min(Math.max(1,s.viewportColumn),o)}:"wordWrapColumn"===i?{isWordWrapMinified:!1,isViewportWrapping:!1,wrappingColumn:o}:{isWordWrapMinified:!1,isViewportWrapping:!1,wrappingColumn:-1},{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:u.isWordWrapMinified,isViewportWrapping:u.isViewportWrapping,wrappingColumn:u.wrappingColumn}},t}(b),re="Consolas, 'Courier New', monospace",se="Menlo, Monaco, 'Courier New', monospace",ae="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",ue={fontFamily:s["e"]?se:s["d"]?ae:re,fontWeight:"normal",fontSize:s["e"]?12:14,lineHeight:0,letterSpacing:0},le={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},ce=[];function he(e){return ce[e.id]=e,e}var de={acceptSuggestionOnCommitCharacter:he(new w(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:r("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:he(new D(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",r("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:r("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:he(new O),accessibilityPageSize:he(new S(3,"accessibilityPageSize",10,1,1073741824,{description:r("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:he(new N(4,"ariaLabel",r("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:he(new D(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",r("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),r("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:r("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingOvertype:he(new D(6,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",r("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:r("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:he(new D(7,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",r("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),r("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:r("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:he(new E(8,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],x,{enumDescriptions:[r("editor.autoIndent.none","The editor will not insert indentation automatically."),r("editor.autoIndent.keep","The editor will keep the current line's indentation."),r("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),r("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),r("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:r("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:he(new w(9,"automaticLayout",!1)),autoSurround:he(new D(10,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[r("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),r("editor.autoSurround.quotes","Surround with quotes but not brackets."),r("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:r("autoSurround","Controls whether the editor should automatically surround selections.")})),codeLens:he(new w(11,"codeLens",!0,{description:r("codeLens","Controls whether the editor shows CodeLens.")})),colorDecorators:he(new w(12,"colorDecorators",!0,{description:r("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),comments:he(new T),contextmenu:he(new w(14,"contextmenu",!0)),copyWithSyntaxHighlighting:he(new w(15,"copyWithSyntaxHighlighting",!0,{description:r("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:he(new E(16,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],M,{description:r("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:he(new w(17,"cursorSmoothCaretAnimation",!1,{description:r("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:he(new E(18,"cursorStyle",k.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],I,{description:r("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:he(new S(19,"cursorSurroundingLines",0,0,1073741824,{description:r("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or `scrollOffset` in some other editors.")})),cursorSurroundingLinesStyle:he(new D(20,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[r("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),r("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:r("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:he(new S(21,"cursorWidth",0,0,1073741824,{markdownDescription:r("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:he(new w(22,"disableLayerHinting",!1)),disableMonospaceOptimizations:he(new w(23,"disableMonospaceOptimizations",!1)),dragAndDrop:he(new w(24,"dragAndDrop",!0,{description:r("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:he(new P),extraEditorClassName:he(new N(26,"extraEditorClassName","")),fastScrollSensitivity:he(new L(27,"fastScrollSensitivity",5,(function(e){return e<=0?5:e}),{markdownDescription:r("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:he(new R),fixedOverflowWidgets:he(new w(29,"fixedOverflowWidgets",!1)),folding:he(new w(30,"folding",!0,{description:r("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:he(new D(31,"foldingStrategy","auto",["auto","indentation"],{markdownDescription:r("foldingStrategy","Controls the strategy for computing folding ranges. `auto` uses a language specific folding strategy, if available. `indentation` uses the indentation based folding strategy.")})),foldingHighlight:he(new w(32,"foldingHighlight",!0,{description:r("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),fontFamily:he(new N(33,"fontFamily",ue.fontFamily,{description:r("fontFamily","Controls the font family.")})),fontInfo:he(new W),fontLigatures2:he(new F),fontSize:he(new V),fontWeight:he(new N(37,"fontWeight",ue.fontWeight,{enum:["normal","bold","100","200","300","400","500","600","700","800","900"],description:r("fontWeight","Controls the font weight.")})),formatOnPaste:he(new w(38,"formatOnPaste",!1,{description:r("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:he(new w(39,"formatOnType",!1,{description:r("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:he(new w(40,"glyphMargin",!0,{description:r("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:he(new B),hideCursorInOverviewRuler:he(new w(42,"hideCursorInOverviewRuler",!1,{description:r("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),highlightActiveIndentGuide:he(new w(43,"highlightActiveIndentGuide",!0,{description:r("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")})),hover:he(new H),inDiffEditor:he(new w(45,"inDiffEditor",!1)),letterSpacing:he(new L(46,"letterSpacing",ue.letterSpacing,(function(e){return L.clamp(e,-5,20)}),{description:r("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:he(new j),lineDecorationsWidth:he(new C(48,"lineDecorationsWidth",10)),lineHeight:he(new U),lineNumbers:he(new X),lineNumbersMinChars:he(new S(51,"lineNumbersMinChars",5,1,300)),links:he(new w(52,"links",!0,{description:r("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:he(new D(53,"matchBrackets","always",["always","near","never"],{description:r("matchBrackets","Highlight matching brackets.")})),minimap:he(new K),mouseStyle:he(new D(55,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:he(new L(56,"mouseWheelScrollSensitivity",1,(function(e){return 0===e?1:e}),{markdownDescription:r("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:he(new w(57,"mouseWheelZoom",!1,{markdownDescription:r("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:he(new w(58,"multiCursorMergeOverlapping",!0,{description:r("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:he(new E(59,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],q,{markdownEnumDescriptions:[r("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),r("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:r({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:he(new D(60,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[r("multiCursorPaste.spread","Each cursor pastes a single line of the text."),r("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:r("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:he(new w(61,"occurrencesHighlight",!0,{description:r("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:he(new w(62,"overviewRulerBorder",!0,{description:r("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:he(new S(63,"overviewRulerLanes",3,0,3)),parameterHints:he(new G),peekWidgetDefaultFocus:he(new D(65,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[r("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),r("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:r("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),quickSuggestions:he(new Z),quickSuggestionsDelay:he(new S(67,"quickSuggestionsDelay",10,0,1073741824,{description:r("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:he(new w(68,"readOnly",!1)),renderControlCharacters:he(new w(69,"renderControlCharacters",!1,{description:r("renderControlCharacters","Controls whether the editor should render control characters.")})),renderIndentGuides:he(new w(70,"renderIndentGuides",!0,{description:r("renderIndentGuides","Controls whether the editor should render indent guides.")})),renderFinalNewline:he(new w(71,"renderFinalNewline",!0,{description:r("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:he(new D(72,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",r("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:r("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderValidationDecorations:he(new D(73,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:he(new D(74,"renderWhitespace","none",["none","boundary","selection","all"],{enumDescriptions:["",r("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),r("renderWhitespace.selection","Render whitespace characters only on selected text."),""],description:r("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:he(new S(75,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:he(new w(76,"roundedSelection",!0,{description:r("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:he(new Q),scrollbar:he(new ee),scrollBeyondLastColumn:he(new S(79,"scrollBeyondLastColumn",5,0,1073741824,{description:r("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:he(new w(80,"scrollBeyondLastLine",!0,{description:r("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),selectionClipboard:he(new w(81,"selectionClipboard",!0,{description:r("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:s["d"]})),selectionHighlight:he(new w(82,"selectionHighlight",!0,{description:r("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:he(new w(83,"selectOnLineNumbers",!0)),showFoldingControls:he(new D(84,"showFoldingControls","mouseover",["always","mouseover"],{description:r("showFoldingControls","Controls whether the fold controls on the gutter are automatically hidden.")})),showUnused:he(new w(85,"showUnused",!0,{description:r("showUnused","Controls fading out of unused code.")})),snippetSuggestions:he(new D(86,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[r("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),r("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),r("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),r("snippetSuggestions.none","Do not show snippet suggestions.")],description:r("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smoothScrolling:he(new w(87,"smoothScrolling",!1,{description:r("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:he(new S(88,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:he(new te),suggestFontSize:he(new S(90,"suggestFontSize",0,0,1e3,{markdownDescription:r("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:he(new S(91,"suggestLineHeight",0,0,1e3,{markdownDescription:r("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used.")})),suggestOnTriggerCharacters:he(new w(92,"suggestOnTriggerCharacters",!0,{description:r("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:he(new D(93,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[r("suggestSelection.first","Always select the first suggestion."),r("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),r("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:r("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:he(new D(94,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[r("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),r("tabCompletion.off","Disable tab completions."),r("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:r("tabCompletion","Enables tab completions.")})),useTabStops:he(new w(95,"useTabStops",!0,{description:r("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:he(new N(96,"wordSeparators",a,{description:r("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:he(new D(97,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[r("wordWrap.off","Lines will never wrap."),r("wordWrap.on","Lines will wrap at the viewport width."),r({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),r({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:r({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:he(new N(98,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:he(new N(99,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥+")),wordWrapColumn:he(new S(100,"wordWrapColumn",80,1,1073741824,{markdownDescription:r({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapMinified:he(new w(101,"wordWrapMinified",!0)),wrappingIndent:he(new E(102,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],ie,{enumDescriptions:[r("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),r("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),r("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),r("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:r("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:he(new D(103,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[r("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),r("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:r("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:he(new A),pixelRatio:he(new Y),tabFocusMode:he(new ne),layoutInfo:he(new z),wrappingInfo:he(new oe)},fe=(n("5110"),function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}return e.prototype.emit=function(e){this.listeners.forEach((function(t){t(e)}))},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},e}()),pe=new fe;function ge(e){_e(e)||pe.onUnexpectedError(e)}function me(e){if(e instanceof Error){var t=e.name,n=e.message,i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:i}}return e}var ve="Canceled";function _e(e){return e instanceof Error&&e.name===ve&&e.message===ve}function ye(){var e=new Error(ve);return e.name=e.message,e}function be(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")}function Ce(e){return e?new Error("Illegal state: "+e):new Error("Illegal state")}function we(e){var t,n=this,i=!1;return function(){return i?t:(i=!0,t=e.apply(n,arguments),t)}}var Se=!1,Le="__is_disposable_tracked__";function Ne(e){if(Se&&e&&e!==Me.None)try{e[Le]=!0}catch(t){}}function De(e){if(!Se)return e;var t=new Error("Potentially leaked disposable").stack;return setTimeout((function(){e[Le]||console.log(t)}),3e3),e}function Ee(e){return Array.isArray(e)?(e.forEach((function(e){e&&(Ne(e),e.dispose())})),[]):e?(Ne(e),e.dispose(),e):void 0}function xe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.forEach(Ne),De({dispose:function(){return Ee(e)}})}function ke(e){var t=De({dispose:function(){Ne(t),e()}});return t}var Oe,Te=function(){function e(){this._toDispose=new Set,this._isDisposed=!1}return e.prototype.dispose=function(){this._isDisposed||(Ne(this),this._isDisposed=!0,this.clear())},e.prototype.clear=function(){this._toDispose.forEach((function(e){return e.dispose()})),this._toDispose.clear()},e.prototype.add=function(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return Ne(e),this._isDisposed?console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e},e}(),Me=function(){function e(){this._store=new Te,De(this)}return e.prototype.dispose=function(){Ne(this),this._store.dispose()},e.prototype._register=function(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)},e.None=Object.freeze({dispose:function(){}}),e}(),Ie=(function(){function e(){this._isDisposed=!1,De(this)}Object.defineProperty(e.prototype,"value",{get:function(){return this._isDisposed?void 0:this._value},set:function(e){this._isDisposed||e===this._value||(this._value&&this._value.dispose(),e&&Ne(e),this._value=e)},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.value=void 0},e.prototype.dispose=function(){this._isDisposed=!0,Ne(this),this._value&&this._value.dispose(),this._value=void 0}}(),function(){function e(e){this.object=e}return e.prototype.dispose=function(){},e}()),Ae=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Pe={done:!0,value:void 0};(function(e){var t={next:function(){return Pe}};function n(){return t}function i(e){var t=!1;return{next:function(){return t?Pe:(t=!0,{done:!1,value:e})}}}function o(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=e.length),{next:function(){return t>=n?Pe:{done:!1,value:e[t++]}}}}function r(e){return{next:function(){var t=e.next();return t.done?Pe:{done:!1,value:t.value}}}}function s(t){return t?Array.isArray(t)?e.fromArray(t):t:e.empty()}function a(e,t){return{next:function(){var n=e.next();return n.done?Pe:{done:!1,value:t(n.value)}}}}function u(e,t){return{next:function(){while(1){var n=e.next();if(n.done)return Pe;if(t(n.value))return{done:!1,value:n.value}}}}}function l(e,t){for(var n=e.next();!n.done;n=e.next())t(n.value)}function c(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY);var n=[];if(0===t)return n;for(var i=0,o=e.next();!o.done;o=e.next())if(n.push(o.value),++i>=t)break;return n}function h(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=0;return{next:function(){if(n>=e.length)return Pe;var t=e[n],i=t.next();return i.done?(n++,this.next()):i}}}function d(e){return new Re(e)}e.empty=n,e.single=i,e.fromArray=o,e.fromNativeIterator=r,e.from=s,e.map=a,e.filter=u,e.forEach=l,e.collect=c,e.concat=h,e.chain=d})(Oe||(Oe={}));var Re=function(){function e(e){this.it=e}return e.prototype.next=function(){return this.it.next()},e}();function Fe(e){return Array.isArray(e)?Oe.fromArray(e):e||Oe.empty()}var We,Ve=function(){function e(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=e.length),void 0===i&&(i=t-1),this.items=e,this.start=t,this.end=n,this.index=i}return e.prototype.first=function(){return this.index=this.start,this.current()},e.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},e.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},e}(),Be=(function(e){function t(t,n,i,o){return void 0===n&&(n=0),void 0===i&&(i=t.length),void 0===o&&(o=n-1),e.call(this,t,n,i,o)||this}Ae(t,e),t.prototype.current=function(){return e.prototype.current.call(this)},t.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},t.prototype.first=function(){return this.index=this.start,this.current()},t.prototype.last=function(){return this.index=this.end-1,this.current()},t.prototype.parent=function(){return null}}(Ve),function(){function e(e,t){this.iterator=e,this.fn=t}e.prototype.next=function(){return this.fn(this.iterator.next())}}(),function(){function e(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}return e.Undefined=new e(void 0),e}()),He=function(){function e(){this._first=Be.Undefined,this._last=Be.Undefined,this._size=0}return Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.isEmpty=function(){return this._first===Be.Undefined},e.prototype.clear=function(){this._first=Be.Undefined,this._last=Be.Undefined,this._size=0},e.prototype.unshift=function(e){return this._insert(e,!1)},e.prototype.push=function(e){return this._insert(e,!0)},e.prototype._insert=function(e,t){var n=this,i=new Be(e);if(this._first===Be.Undefined)this._first=i,this._last=i;else if(t){var o=this._last;this._last=i,i.prev=o,o.next=i}else{var r=this._first;this._first=i,i.next=r,r.prev=i}this._size+=1;var s=!1;return function(){s||(s=!0,n._remove(i))}},e.prototype.shift=function(){if(this._first!==Be.Undefined){var e=this._first.element;return this._remove(this._first),e}},e.prototype.pop=function(){if(this._last!==Be.Undefined){var e=this._last.element;return this._remove(this._last),e}},e.prototype._remove=function(e){if(e.prev!==Be.Undefined&&e.next!==Be.Undefined){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Be.Undefined&&e.next===Be.Undefined?(this._first=Be.Undefined,this._last=Be.Undefined):e.next===Be.Undefined?(this._last=this._last.prev,this._last.next=Be.Undefined):e.prev===Be.Undefined&&(this._first=this._first.next,this._first.prev=Be.Undefined);this._size-=1},e.prototype.iterator=function(){var e,t=this._first;return{next:function(){return t===Be.Undefined?Pe:(e?e.value=t.element:e={done:!1,value:t.element},t=t.next,e)}}},e.prototype.toArray=function(){for(var e=[],t=this._first;t!==Be.Undefined;t=t.next)e.push(t.element);return e},e}(),ze=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();(function(e){function t(e){return function(t,n,i){void 0===n&&(n=null);var o,r=!1;return o=e((function(e){if(!r)return o?o.dispose():r=!0,t.call(n,e)}),null,i),r&&o.dispose(),o}}function n(e,t){return u((function(n,i,o){return void 0===i&&(i=null),e((function(e){return n.call(i,t(e))}),null,o)}))}function i(e,t){return u((function(n,i,o){return void 0===i&&(i=null),e((function(e){t(e),n.call(i,e)}),null,o)}))}function o(e,t){return u((function(n,i,o){return void 0===i&&(i=null),e((function(e){return t(e)&&n.call(i,e)}),null,o)}))}function r(e){return e}function s(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n,i){return void 0===n&&(n=null),xe.apply(void 0,e.map((function(e){return e((function(e){return t.call(n,e)}),null,i)})))}}function a(e,t,i){var o=i;return n(e,(function(e){return o=t(o,e),o}))}function u(e){var t,n=new qe({onFirstListenerAdd:function(){t=e(n.fire,n)},onLastListenerRemove:function(){t.dispose()}});return n.event}function l(e,t,n,i,o){var r;void 0===n&&(n=100),void 0===i&&(i=!1);var s=void 0,a=void 0,u=0,l=new qe({leakWarningThreshold:o,onFirstListenerAdd:function(){r=e((function(e){u++,s=t(s,e),i&&!a&&(l.fire(s),s=void 0),clearTimeout(a),a=setTimeout((function(){var e=s;s=void 0,a=void 0,(!i||u>1)&&l.fire(e),u=0}),n)}))},onLastListenerRemove:function(){r.dispose()}});return l.event}function c(e){var i=(new Date).getTime();return n(t(e),(function(e){return(new Date).getTime()-i}))}function h(e){var t,n=!0;return o(e,(function(e){var i=n||e!==t;return n=!1,t=e,i}))}function d(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]);var i=n.slice(),o=e((function(e){i?i.push(e):s.fire(e)})),r=function(){i&&i.forEach((function(e){return s.fire(e)})),i=null},s=new qe({onFirstListenerAdd:function(){o||(o=e((function(e){return s.fire(e)})))},onFirstListenerDidAdd:function(){i&&(t?setTimeout(r):r())},onLastListenerRemove:function(){o&&o.dispose(),o=null}});return s.event}e.None=function(){return Me.None},e.once=t,e.map=n,e.forEach=i,e.filter=o,e.signal=r,e.any=s,e.reduce=a,e.snapshot=u,e.debounce=l,e.stopwatch=c,e.latch=h,e.buffer=d;var f=function(){function e(e){this.event=e}return e.prototype.map=function(t){return new e(n(this.event,t))},e.prototype.forEach=function(t){return new e(i(this.event,t))},e.prototype.filter=function(t){return new e(o(this.event,t))},e.prototype.reduce=function(t,n){return new e(a(this.event,t,n))},e.prototype.latch=function(){return new e(h(this.event))},e.prototype.debounce=function(t,n,i,o){return void 0===n&&(n=100),void 0===i&&(i=!1),new e(l(this.event,t,n,i,o))},e.prototype.on=function(e,t,n){return this.event(e,t,n)},e.prototype.once=function(e,n,i){return t(this.event)(e,n,i)},e}();function p(e){return new f(e)}function g(e,t,n){void 0===n&&(n=function(e){return e});var i=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.fire(n.apply(void 0,e))},o=function(){return e.on(t,i)},r=function(){return e.removeListener(t,i)},s=new qe({onFirstListenerAdd:o,onLastListenerRemove:r});return s.event}function m(e,t,n){void 0===n&&(n=function(e){return e});var i=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.fire(n.apply(void 0,e))},o=function(){return e.addEventListener(t,i)},r=function(){return e.removeEventListener(t,i)},s=new qe({onFirstListenerAdd:o,onLastListenerRemove:r});return s.event}function v(e){var t=new qe,n=!1;return e.then(void 0,(function(){return null})).then((function(){n?t.fire(void 0):setTimeout((function(){return t.fire(void 0)}),0)})),n=!0,t.event}function _(e){return new Promise((function(n){return t(e)(n)}))}e.chain=p,e.fromNodeEventEmitter=g,e.fromDOMEventEmitter=m,e.fromPromise=v,e.toPromise=_})(We||(We={}));var je,Ue=-1,Ke=function(){function e(e,t){void 0===t&&(t=Math.random().toString(18).slice(2,5)),this.customThreshold=e,this.name=t,this._warnCountdown=0}return e.prototype.dispose=function(){this._stacks&&this._stacks.clear()},e.prototype.check=function(e){var t=this,n=Ue;if("number"===typeof this.customThreshold&&(n=this.customThreshold),!(n<=0||e<n)){this._stacks||(this._stacks=new Map);var i=(new Error).stack.split("\n").slice(3).join("\n"),o=this._stacks.get(i)||0;if(this._stacks.set(i,o+1),this._warnCountdown-=1,this._warnCountdown<=0){var r;this._warnCountdown=.5*n;var s=0;this._stacks.forEach((function(e,t){(!r||s<e)&&(r=t,s=e)})),console.warn("["+this.name+"] potential listener LEAK detected, having "+e+" listeners already. MOST frequent listener ("+s+"):"),console.warn(r)}return function(){var e=t._stacks.get(i)||0;t._stacks.set(i,e-1)}}},e}(),qe=function(){function e(e){this._disposed=!1,this._options=e,this._leakageMon=Ue>0?new Ke(this._options&&this._options.leakWarningThreshold):void 0}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,i,o){t._listeners||(t._listeners=new He);var r=t._listeners.isEmpty();r&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var s,a,u=t._listeners.push(i?[n,i]:n);return r&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,i),t._leakageMon&&(s=t._leakageMon.check(t._listeners.size)),a={dispose:function(){if(s&&s(),a.dispose=e._noop,!t._disposed&&(u(),t._options&&t._options.onLastListenerRemove)){var n=t._listeners&&!t._listeners.isEmpty();n||t._options.onLastListenerRemove(t)}}},o instanceof Te?o.add(a):Array.isArray(o)&&o.push(a),a}),this._event},enumerable:!0,configurable:!0}),e.prototype.fire=function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new He);for(var t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())this._deliveryQueue.push([n.value,e]);while(this._deliveryQueue.size>0){var i=this._deliveryQueue.shift(),o=i[0],r=i[1];try{"function"===typeof o?o.call(void 0,r):o[0].call(o[1],r)}catch(n){ge(n)}}}},e.prototype.dispose=function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0},e._noop=function(){},e}(),Ge=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaused=0,n._eventQueue=new He,n._mergeFn=t&&t.merge,n}return ze(t,e),t.prototype.pause=function(){this._isPaused++},t.prototype.resume=function(){if(0!==this._isPaused&&0===--this._isPaused)if(this._mergeFn){var t=this._eventQueue.toArray();this._eventQueue.clear(),e.prototype.fire.call(this,this._mergeFn(t))}else while(!this._isPaused&&0!==this._eventQueue.size)e.prototype.fire.call(this,this._eventQueue.shift())},t.prototype.fire=function(t){this._listeners&&(0!==this._isPaused?this._eventQueue.push(t):e.prototype.fire.call(this,t))},t}(qe),Ye=(function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new qe({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);var i=function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)};return ke(we(i))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach((function(t){return e.hook(t)}))},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach((function(t){return e.unhook(t)}))},e.prototype.hook=function(e){var t=this;e.listener=e.event((function(e){return t.emitter.fire(e)}))},e.prototype.unhook=function(e){e.listener&&e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()}}(),function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,i,o){return e((function(e){var o=t.buffers[t.buffers.length-1];o?o.push((function(){return n.call(i,e)})):n.call(i,e)}),void 0,o)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t);var n=e();return this.buffers.pop(),t.forEach((function(e){return e()})),n},e}()),Ze=function(){function e(){var e=this;this.listening=!1,this.inputEvent=We.None,this.inputEventListener=Me.None,this.emitter=new qe({onFirstListenerDidAdd:function(){e.listening=!0,e.inputEventListener=e.inputEvent(e.emitter.fire,e.emitter)},onLastListenerRemove:function(){e.listening=!1,e.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object.defineProperty(e.prototype,"input",{set:function(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()},e}(),Xe=Object.freeze((function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}}));(function(e){function t(t){return t===e.None||t===e.Cancelled||(t instanceof Qe||!(!t||"object"!==typeof t)&&("boolean"===typeof t.isCancellationRequested&&"function"===typeof t.onCancellationRequested))}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:We.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Xe})})(je||(je={}));var $e,Qe=function(){function e(){this._isCancelled=!1,this._emitter=null}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?Xe:(this._emitter||(this._emitter=new qe),this._emitter.event)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._emitter&&(this._emitter.dispose(),this._emitter=null)},e}(),Je=function(){function e(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new Qe),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token instanceof Qe&&this._token.cancel():this._token=je.Cancelled},e.prototype.dispose=function(e){void 0===e&&(e=!1),e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Qe&&this._token.dispose():this._token=je.None},e}(),et=function(){function e(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}return e.prototype.define=function(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e},e.prototype.keyCodeToStr=function(e){return this._keyCodeToStr[e]},e.prototype.strToKeyCode=function(e){return this._strToKeyCode[e.toLowerCase()]||0},e}(),tt=new et,nt=new et,it=new et;function ot(e,t){var n=(65535&t)<<16>>>0;return(e|n)>>>0}function rt(e,t){if(0===e)return null;var n=(65535&e)>>>0,i=(4294901760&e)>>>16;return new lt(0!==i?[st(n,t),st(i,t)]:[st(n,t)])}function st(e,t){var n=!!(2048&e),i=!!(256&e),o=2===t?i:n,r=!!(1024&e),s=!!(512&e),a=2===t?n:i,u=255&e;return new ut(o,r,s,a,u)}(function(){function e(e,t,n,i){void 0===n&&(n=t),void 0===i&&(i=n),tt.define(e,t),nt.define(e,n),it.define(e,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})(),function(e){function t(e){return tt.keyCodeToStr(e)}function n(e){return tt.strToKeyCode(e)}function i(e){return nt.keyCodeToStr(e)}function o(e){return it.keyCodeToStr(e)}function r(e){return nt.strToKeyCode(e)||it.strToKeyCode(e)}e.toString=t,e.fromString=n,e.toUserSettingsUS=i,e.toUserSettingsGeneral=o,e.fromUserSettings=r}($e||($e={}));var at,ut=function(){function e(e,t,n,i,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyCode=o}return e.prototype.equals=function(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode},e.prototype.isModifierKey=function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode},e.prototype.toChord=function(){return new lt([this])},e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode},e}(),lt=function(){function e(e){if(0===e.length)throw be("parts");this.parts=e}return e.prototype.equals=function(e){if(null===e)return!1;if(this.parts.length!==e.parts.length)return!1;for(var t=0;t<this.parts.length;t++)if(!this.parts[t].equals(e.parts[t]))return!1;return!0},e}(),ct=function(){function e(e,t,n,i,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyLabel=o,this.keyAriaLabel=r}return e}(),ht=function(){function e(){}return e}(),dt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ft=/^\w[\w\d+.-]*$/,pt=/^\//,gt=/^\/\//;function mt(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&&!ft.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!pt.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(gt.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 ("//")')}function vt(e,t){return e||t?e:"file"}function _t(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==bt&&(t=bt+t):t=bt;break}return t}var yt="",bt="/",Ct=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,wt=function(){function e(e,t,n,i,o,r){void 0===r&&(r=!1),"object"===typeof e?(this.scheme=e.scheme||yt,this.authority=e.authority||yt,this.path=e.path||yt,this.query=e.query||yt,this.fragment=e.fragment||yt):(this.scheme=vt(e,r),this.authority=t||yt,this.path=_t(this.scheme,n||yt),this.query=i||yt,this.fragment=o||yt,mt(this,r))}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&&"function"===typeof t.fsPath&&"function"===typeof t.with&&"function"===typeof t.toString)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return xt(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,o=e.query,r=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=yt),void 0===n?n=this.authority:null===n&&(n=yt),void 0===i?i=this.path:null===i&&(i=yt),void 0===o?o=this.query:null===o&&(o=yt),void 0===r?r=this.fragment:null===r&&(r=yt),t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&r===this.fragment?this:new Lt(t,n,i,o,r)},e.parse=function(e,t){void 0===t&&(t=!1);var n=Ct.exec(e);return n?new Lt(n[2]||yt,Mt(n[4]||yt),Mt(n[5]||yt),Mt(n[7]||yt),Mt(n[9]||yt),t):new Lt(yt,yt,yt,yt,yt)},e.file=function(e){var t=yt;if(s["h"]&&(e=e.replace(/\\/g,bt)),e[0]===bt&&e[1]===bt){var n=e.indexOf(bt,2);-1===n?(t=e.substring(2),e=bt):(t=e.substring(2,n),e=e.substring(n)||bt)}return new Lt("file",t,e,yt,yt)},e.from=function(e){return new Lt(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),kt(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new Lt(t);return n._formatted=t.external,n._fsPath=t._sep===St?t.fsPath:null,n}return t},e}(),St=s["h"]?1:void 0,Lt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return dt(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=xt(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?kt(this,!0):(this._formatted||(this._formatted=kt(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=St),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}(wt),Nt=(at={},at[58]="%3A",at[47]="%2F",at[63]="%3F",at[35]="%23",at[91]="%5B",at[93]="%5D",at[64]="%40",at[33]="%21",at[36]="%24",at[38]="%26",at[39]="%27",at[40]="%28",at[41]="%29",at[42]="%2A",at[43]="%2B",at[44]="%2C",at[59]="%3B",at[61]="%3D",at[32]="%20",at);function Dt(e,t){for(var n=void 0,i=-1,o=0;o<e.length;o++){var r=e.charCodeAt(o);if(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));var s=Nt[r];void 0!==s?(-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=s):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function Et(e){for(var t=void 0,n=0;n<e.length;n++){var i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=Nt[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function xt(e){var t;return t=e.authority&&e.path.length>1&&"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)?e.path[1].toLowerCase()+e.path.substr(2):e.path,s["h"]&&(t=t.replace(/\//g,"\\")),t}function kt(e,t){var n=t?Et:Dt,i="",o=e.scheme,r=e.authority,s=e.path,a=e.query,u=e.fragment;if(o&&(i+=o,i+=":"),(r||"file"===o)&&(i+=bt,i+=bt),r){var l=r.indexOf("@");if(-1!==l){var c=r.substr(0,l);r=r.substr(l+1),l=c.indexOf(":"),-1===l?i+=n(c,!1):(i+=n(c.substr(0,l),!1),i+=":",i+=n(c.substr(l+1),!1)),i+="@"}r=r.toLowerCase(),l=r.indexOf(":"),-1===l?i+=n(r,!1):(i+=n(r.substr(0,l),!1),i+=r.substr(l))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){var h=s.charCodeAt(1);h>=65&&h<=90&&(s="/"+String.fromCharCode(h+32)+":"+s.substr(3))}else if(s.length>=2&&58===s.charCodeAt(1)){h=s.charCodeAt(0);h>=65&&h<=90&&(s=String.fromCharCode(h+32)+":"+s.substr(2))}i+=n(s,!0)}return a&&(i+="?",i+=n(a,!1)),u&&(i+="#",i+=t?u:Dt(u,!1)),i}function Ot(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+Ot(e.substr(3)):e}}var Tt=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Mt(e){return e.match(Tt)?e.replace(Tt,(function(e){return Ot(e)})):e}var It,At,Pt,Rt,Ft,Wt,Vt,Bt,Ht,zt,jt,Ut,Kt,qt,Gt,Yt,Zt,Xt,$t,Qt,Jt,en,tn,nn,on,rn,sn,an,un,ln,cn,hn,dn,fn=function(){function e(e,t){this.lineNumber=e,this.column=t}return e.prototype.with=function(t,n){return void 0===t&&(t=this.lineNumber),void 0===n&&(n=this.column),t===this.lineNumber&&n===this.column?this:new e(t,n)},e.prototype.delta=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=0),this.with(this.lineNumber+e,this.column+t)},e.prototype.equals=function(t){return e.equals(this,t)},e.equals=function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column},e.prototype.isBefore=function(t){return e.isBefore(this,t)},e.isBefore=function(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column},e.prototype.isBeforeOrEqual=function(t){return e.isBeforeOrEqual(this,t)},e.isBeforeOrEqual=function(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column},e.compare=function(e,t){var n=0|e.lineNumber,i=0|t.lineNumber;if(n===i){var o=0|e.column,r=0|t.column;return o-r}return n-i},e.prototype.clone=function(){return new e(this.lineNumber,this.column)},e.prototype.toString=function(){return"("+this.lineNumber+","+this.column+")"},e.lift=function(t){return new e(t.lineNumber,t.column)},e.isIPosition=function(e){return e&&"number"===typeof e.lineNumber&&"number"===typeof e.column},e}(),pn=function(){function e(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>e.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber)&&(!(t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)))},e.prototype.strictContainsRange=function(t){return e.strictContainsRange(this,t)},e.strictContainsRange=function(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber)&&(!(t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var i,o,r,s;return n.startLineNumber<t.startLineNumber?(i=n.startLineNumber,o=n.startColumn):n.startLineNumber===t.startLineNumber?(i=n.startLineNumber,o=Math.min(n.startColumn,t.startColumn)):(i=t.startLineNumber,o=t.startColumn),n.endLineNumber>t.endLineNumber?(r=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(r=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(r=t.endLineNumber,s=t.endColumn),new e(i,o,r,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){var i=t.startLineNumber,o=t.startColumn,r=t.endLineNumber,s=t.endColumn,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn;return i<a?(i=a,o=u):i===a&&(o=Math.max(o,u)),r>l?(r=l,s=c):r===l&&(s=Math.min(s,c)),i>r?null:i===r&&o>s?null:new e(i,o,r,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return new fn(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new fn(this.startLineNumber,this.startColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)},e.areIntersecting=function(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)},e.compareRangesUsingStarts=function(e,t){if(e&&t){var n=0|e.startLineNumber,i=0|t.startLineNumber;if(n===i){var o=0|e.startColumn,r=0|t.startColumn;if(o===r){var s=0|e.endLineNumber,a=0|t.endLineNumber;if(s===a){var u=0|e.endColumn,l=0|t.endColumn;return u-l}return s-a}return o-r}return n-i}var c=e?1:0,h=t?1:0;return c-h},e.compareRangesUsingEnds=function(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber},e.spansMultipleLines=function(e){return e.endLineNumber>e.startLineNumber},e}(),gn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),mn=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i,o)||this;return r.selectionStartLineNumber=t,r.selectionStartColumn=n,r.positionLineNumber=i,r.positionColumn=o,r}return gn(t,e),t.prototype.toString=function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1},t.prototype.setEndPosition=function(e,n){return 0===this.getDirection()?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new fn(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return 0===this.getDirection()?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column)},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n++)if(!this.selectionsEqual(e[n],t[n]))return!1;return!0},t.isISelection=function(e){return e&&"number"===typeof e.selectionStartLineNumber&&"number"===typeof e.selectionStartColumn&&"number"===typeof e.positionLineNumber&&"number"===typeof e.positionColumn},t.createWithDirection=function(e,n,i,o,r){return 0===r?new t(e,n,i,o):new t(i,o,e,n)},t}(pn),vn=function(){function e(e,t,n){this.offset=0|e,this.type=t,this.language=n}return e.prototype.toString=function(){return"("+this.offset+", "+this.type+")"},e}(),_n=function(){function e(e,t){this.tokens=e,this.endState=t}return e}(),yn=function(){function e(e,t){this.tokens=e,this.endState=t}return e}();(function(e){e[e["Unknown"]=0]="Unknown",e[e["Disabled"]=1]="Disabled",e[e["Enabled"]=2]="Enabled"})(It||(It={})),function(e){e[e["KeepWhitespace"]=1]="KeepWhitespace",e[e["InsertAsSnippet"]=4]="InsertAsSnippet"}(At||(At={})),function(e){e[e["Method"]=0]="Method",e[e["Function"]=1]="Function",e[e["Constructor"]=2]="Constructor",e[e["Field"]=3]="Field",e[e["Variable"]=4]="Variable",e[e["Class"]=5]="Class",e[e["Struct"]=6]="Struct",e[e["Interface"]=7]="Interface",e[e["Module"]=8]="Module",e[e["Property"]=9]="Property",e[e["Event"]=10]="Event",e[e["Operator"]=11]="Operator",e[e["Unit"]=12]="Unit",e[e["Value"]=13]="Value",e[e["Constant"]=14]="Constant",e[e["Enum"]=15]="Enum",e[e["EnumMember"]=16]="EnumMember",e[e["Keyword"]=17]="Keyword",e[e["Text"]=18]="Text",e[e["Color"]=19]="Color",e[e["File"]=20]="File",e[e["Reference"]=21]="Reference",e[e["Customcolor"]=22]="Customcolor",e[e["Folder"]=23]="Folder",e[e["TypeParameter"]=24]="TypeParameter",e[e["Snippet"]=25]="Snippet"}(Pt||(Pt={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(Rt||(Rt={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["TriggerCharacter"]=1]="TriggerCharacter",e[e["TriggerForIncompleteCompletions"]=2]="TriggerForIncompleteCompletions"}(Ft||(Ft={})),function(e){e[e["EXACT"]=0]="EXACT",e[e["ABOVE"]=1]="ABOVE",e[e["BELOW"]=2]="BELOW"}(Wt||(Wt={})),function(e){e[e["NotSet"]=0]="NotSet",e[e["ContentFlush"]=1]="ContentFlush",e[e["RecoverFromMarkers"]=2]="RecoverFromMarkers",e[e["Explicit"]=3]="Explicit",e[e["Paste"]=4]="Paste",e[e["Undo"]=5]="Undo",e[e["Redo"]=6]="Redo"}(Vt||(Vt={})),function(e){e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(Bt||(Bt={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(Ht||(Ht={})),function(e){e[e["None"]=0]="None",e[e["Keep"]=1]="Keep",e[e["Brackets"]=2]="Brackets",e[e["Advanced"]=3]="Advanced",e[e["Full"]=4]="Full"}(zt||(zt={})),function(e){e[e["acceptSuggestionOnCommitCharacter"]=0]="acceptSuggestionOnCommitCharacter",e[e["acceptSuggestionOnEnter"]=1]="acceptSuggestionOnEnter",e[e["accessibilitySupport"]=2]="accessibilitySupport",e[e["accessibilityPageSize"]=3]="accessibilityPageSize",e[e["ariaLabel"]=4]="ariaLabel",e[e["autoClosingBrackets"]=5]="autoClosingBrackets",e[e["autoClosingOvertype"]=6]="autoClosingOvertype",e[e["autoClosingQuotes"]=7]="autoClosingQuotes",e[e["autoIndent"]=8]="autoIndent",e[e["automaticLayout"]=9]="automaticLayout",e[e["autoSurround"]=10]="autoSurround",e[e["codeLens"]=11]="codeLens",e[e["colorDecorators"]=12]="colorDecorators",e[e["comments"]=13]="comments",e[e["contextmenu"]=14]="contextmenu",e[e["copyWithSyntaxHighlighting"]=15]="copyWithSyntaxHighlighting",e[e["cursorBlinking"]=16]="cursorBlinking",e[e["cursorSmoothCaretAnimation"]=17]="cursorSmoothCaretAnimation",e[e["cursorStyle"]=18]="cursorStyle",e[e["cursorSurroundingLines"]=19]="cursorSurroundingLines",e[e["cursorSurroundingLinesStyle"]=20]="cursorSurroundingLinesStyle",e[e["cursorWidth"]=21]="cursorWidth",e[e["disableLayerHinting"]=22]="disableLayerHinting",e[e["disableMonospaceOptimizations"]=23]="disableMonospaceOptimizations",e[e["dragAndDrop"]=24]="dragAndDrop",e[e["emptySelectionClipboard"]=25]="emptySelectionClipboard",e[e["extraEditorClassName"]=26]="extraEditorClassName",e[e["fastScrollSensitivity"]=27]="fastScrollSensitivity",e[e["find"]=28]="find",e[e["fixedOverflowWidgets"]=29]="fixedOverflowWidgets",e[e["folding"]=30]="folding",e[e["foldingStrategy"]=31]="foldingStrategy",e[e["foldingHighlight"]=32]="foldingHighlight",e[e["fontFamily"]=33]="fontFamily",e[e["fontInfo"]=34]="fontInfo",e[e["fontLigatures"]=35]="fontLigatures",e[e["fontSize"]=36]="fontSize",e[e["fontWeight"]=37]="fontWeight",e[e["formatOnPaste"]=38]="formatOnPaste",e[e["formatOnType"]=39]="formatOnType",e[e["glyphMargin"]=40]="glyphMargin",e[e["gotoLocation"]=41]="gotoLocation",e[e["hideCursorInOverviewRuler"]=42]="hideCursorInOverviewRuler",e[e["highlightActiveIndentGuide"]=43]="highlightActiveIndentGuide",e[e["hover"]=44]="hover",e[e["inDiffEditor"]=45]="inDiffEditor",e[e["letterSpacing"]=46]="letterSpacing",e[e["lightbulb"]=47]="lightbulb",e[e["lineDecorationsWidth"]=48]="lineDecorationsWidth",e[e["lineHeight"]=49]="lineHeight",e[e["lineNumbers"]=50]="lineNumbers",e[e["lineNumbersMinChars"]=51]="lineNumbersMinChars",e[e["links"]=52]="links",e[e["matchBrackets"]=53]="matchBrackets",e[e["minimap"]=54]="minimap",e[e["mouseStyle"]=55]="mouseStyle",e[e["mouseWheelScrollSensitivity"]=56]="mouseWheelScrollSensitivity",e[e["mouseWheelZoom"]=57]="mouseWheelZoom",e[e["multiCursorMergeOverlapping"]=58]="multiCursorMergeOverlapping",e[e["multiCursorModifier"]=59]="multiCursorModifier",e[e["multiCursorPaste"]=60]="multiCursorPaste",e[e["occurrencesHighlight"]=61]="occurrencesHighlight",e[e["overviewRulerBorder"]=62]="overviewRulerBorder",e[e["overviewRulerLanes"]=63]="overviewRulerLanes",e[e["parameterHints"]=64]="parameterHints",e[e["peekWidgetDefaultFocus"]=65]="peekWidgetDefaultFocus",e[e["quickSuggestions"]=66]="quickSuggestions",e[e["quickSuggestionsDelay"]=67]="quickSuggestionsDelay",e[e["readOnly"]=68]="readOnly",e[e["renderControlCharacters"]=69]="renderControlCharacters",e[e["renderIndentGuides"]=70]="renderIndentGuides",e[e["renderFinalNewline"]=71]="renderFinalNewline",e[e["renderLineHighlight"]=72]="renderLineHighlight",e[e["renderValidationDecorations"]=73]="renderValidationDecorations",e[e["renderWhitespace"]=74]="renderWhitespace",e[e["revealHorizontalRightPadding"]=75]="revealHorizontalRightPadding",e[e["roundedSelection"]=76]="roundedSelection",e[e["rulers"]=77]="rulers",e[e["scrollbar"]=78]="scrollbar",e[e["scrollBeyondLastColumn"]=79]="scrollBeyondLastColumn",e[e["scrollBeyondLastLine"]=80]="scrollBeyondLastLine",e[e["selectionClipboard"]=81]="selectionClipboard",e[e["selectionHighlight"]=82]="selectionHighlight",e[e["selectOnLineNumbers"]=83]="selectOnLineNumbers",e[e["showFoldingControls"]=84]="showFoldingControls",e[e["showUnused"]=85]="showUnused",e[e["snippetSuggestions"]=86]="snippetSuggestions",e[e["smoothScrolling"]=87]="smoothScrolling",e[e["stopRenderingLineAfter"]=88]="stopRenderingLineAfter",e[e["suggest"]=89]="suggest",e[e["suggestFontSize"]=90]="suggestFontSize",e[e["suggestLineHeight"]=91]="suggestLineHeight",e[e["suggestOnTriggerCharacters"]=92]="suggestOnTriggerCharacters",e[e["suggestSelection"]=93]="suggestSelection",e[e["tabCompletion"]=94]="tabCompletion",e[e["useTabStops"]=95]="useTabStops",e[e["wordSeparators"]=96]="wordSeparators",e[e["wordWrap"]=97]="wordWrap",e[e["wordWrapBreakAfterCharacters"]=98]="wordWrapBreakAfterCharacters",e[e["wordWrapBreakBeforeCharacters"]=99]="wordWrapBreakBeforeCharacters",e[e["wordWrapColumn"]=100]="wordWrapColumn",e[e["wordWrapMinified"]=101]="wordWrapMinified",e[e["wrappingIndent"]=102]="wrappingIndent",e[e["wrappingStrategy"]=103]="wrappingStrategy",e[e["editorClassName"]=104]="editorClassName",e[e["pixelRatio"]=105]="pixelRatio",e[e["tabFocusMode"]=106]="tabFocusMode",e[e["layoutInfo"]=107]="layoutInfo",e[e["wrappingInfo"]=108]="wrappingInfo"}(jt||(jt={})),function(e){e[e["TextDefined"]=0]="TextDefined",e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(Ut||(Ut={})),function(e){e[e["LF"]=0]="LF",e[e["CRLF"]=1]="CRLF"}(Kt||(Kt={})),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(qt||(qt={})),function(e){e[e["Unknown"]=0]="Unknown",e[e["Backspace"]=1]="Backspace",e[e["Tab"]=2]="Tab",e[e["Enter"]=3]="Enter",e[e["Shift"]=4]="Shift",e[e["Ctrl"]=5]="Ctrl",e[e["Alt"]=6]="Alt",e[e["PauseBreak"]=7]="PauseBreak",e[e["CapsLock"]=8]="CapsLock",e[e["Escape"]=9]="Escape",e[e["Space"]=10]="Space",e[e["PageUp"]=11]="PageUp",e[e["PageDown"]=12]="PageDown",e[e["End"]=13]="End",e[e["Home"]=14]="Home",e[e["LeftArrow"]=15]="LeftArrow",e[e["UpArrow"]=16]="UpArrow",e[e["RightArrow"]=17]="RightArrow",e[e["DownArrow"]=18]="DownArrow",e[e["Insert"]=19]="Insert",e[e["Delete"]=20]="Delete",e[e["KEY_0"]=21]="KEY_0",e[e["KEY_1"]=22]="KEY_1",e[e["KEY_2"]=23]="KEY_2",e[e["KEY_3"]=24]="KEY_3",e[e["KEY_4"]=25]="KEY_4",e[e["KEY_5"]=26]="KEY_5",e[e["KEY_6"]=27]="KEY_6",e[e["KEY_7"]=28]="KEY_7",e[e["KEY_8"]=29]="KEY_8",e[e["KEY_9"]=30]="KEY_9",e[e["KEY_A"]=31]="KEY_A",e[e["KEY_B"]=32]="KEY_B",e[e["KEY_C"]=33]="KEY_C",e[e["KEY_D"]=34]="KEY_D",e[e["KEY_E"]=35]="KEY_E",e[e["KEY_F"]=36]="KEY_F",e[e["KEY_G"]=37]="KEY_G",e[e["KEY_H"]=38]="KEY_H",e[e["KEY_I"]=39]="KEY_I",e[e["KEY_J"]=40]="KEY_J",e[e["KEY_K"]=41]="KEY_K",e[e["KEY_L"]=42]="KEY_L",e[e["KEY_M"]=43]="KEY_M",e[e["KEY_N"]=44]="KEY_N",e[e["KEY_O"]=45]="KEY_O",e[e["KEY_P"]=46]="KEY_P",e[e["KEY_Q"]=47]="KEY_Q",e[e["KEY_R"]=48]="KEY_R",e[e["KEY_S"]=49]="KEY_S",e[e["KEY_T"]=50]="KEY_T",e[e["KEY_U"]=51]="KEY_U",e[e["KEY_V"]=52]="KEY_V",e[e["KEY_W"]=53]="KEY_W",e[e["KEY_X"]=54]="KEY_X",e[e["KEY_Y"]=55]="KEY_Y",e[e["KEY_Z"]=56]="KEY_Z",e[e["Meta"]=57]="Meta",e[e["ContextMenu"]=58]="ContextMenu",e[e["F1"]=59]="F1",e[e["F2"]=60]="F2",e[e["F3"]=61]="F3",e[e["F4"]=62]="F4",e[e["F5"]=63]="F5",e[e["F6"]=64]="F6",e[e["F7"]=65]="F7",e[e["F8"]=66]="F8",e[e["F9"]=67]="F9",e[e["F10"]=68]="F10",e[e["F11"]=69]="F11",e[e["F12"]=70]="F12",e[e["F13"]=71]="F13",e[e["F14"]=72]="F14",e[e["F15"]=73]="F15",e[e["F16"]=74]="F16",e[e["F17"]=75]="F17",e[e["F18"]=76]="F18",e[e["F19"]=77]="F19",e[e["NumLock"]=78]="NumLock",e[e["ScrollLock"]=79]="ScrollLock",e[e["US_SEMICOLON"]=80]="US_SEMICOLON",e[e["US_EQUAL"]=81]="US_EQUAL",e[e["US_COMMA"]=82]="US_COMMA",e[e["US_MINUS"]=83]="US_MINUS",e[e["US_DOT"]=84]="US_DOT",e[e["US_SLASH"]=85]="US_SLASH",e[e["US_BACKTICK"]=86]="US_BACKTICK",e[e["US_OPEN_SQUARE_BRACKET"]=87]="US_OPEN_SQUARE_BRACKET",e[e["US_BACKSLASH"]=88]="US_BACKSLASH",e[e["US_CLOSE_SQUARE_BRACKET"]=89]="US_CLOSE_SQUARE_BRACKET",e[e["US_QUOTE"]=90]="US_QUOTE",e[e["OEM_8"]=91]="OEM_8",e[e["OEM_102"]=92]="OEM_102",e[e["NUMPAD_0"]=93]="NUMPAD_0",e[e["NUMPAD_1"]=94]="NUMPAD_1",e[e["NUMPAD_2"]=95]="NUMPAD_2",e[e["NUMPAD_3"]=96]="NUMPAD_3",e[e["NUMPAD_4"]=97]="NUMPAD_4",e[e["NUMPAD_5"]=98]="NUMPAD_5",e[e["NUMPAD_6"]=99]="NUMPAD_6",e[e["NUMPAD_7"]=100]="NUMPAD_7",e[e["NUMPAD_8"]=101]="NUMPAD_8",e[e["NUMPAD_9"]=102]="NUMPAD_9",e[e["NUMPAD_MULTIPLY"]=103]="NUMPAD_MULTIPLY",e[e["NUMPAD_ADD"]=104]="NUMPAD_ADD",e[e["NUMPAD_SEPARATOR"]=105]="NUMPAD_SEPARATOR",e[e["NUMPAD_SUBTRACT"]=106]="NUMPAD_SUBTRACT",e[e["NUMPAD_DECIMAL"]=107]="NUMPAD_DECIMAL",e[e["NUMPAD_DIVIDE"]=108]="NUMPAD_DIVIDE",e[e["KEY_IN_COMPOSITION"]=109]="KEY_IN_COMPOSITION",e[e["ABNT_C1"]=110]="ABNT_C1",e[e["ABNT_C2"]=111]="ABNT_C2",e[e["MAX_VALUE"]=112]="MAX_VALUE"}(Gt||(Gt={})),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(Yt||(Yt={})),function(e){e[e["Unnecessary"]=1]="Unnecessary",e[e["Deprecated"]=2]="Deprecated"}(Zt||(Zt={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(Xt||(Xt={})),function(e){e[e["UNKNOWN"]=0]="UNKNOWN",e[e["TEXTAREA"]=1]="TEXTAREA",e[e["GUTTER_GLYPH_MARGIN"]=2]="GUTTER_GLYPH_MARGIN",e[e["GUTTER_LINE_NUMBERS"]=3]="GUTTER_LINE_NUMBERS",e[e["GUTTER_LINE_DECORATIONS"]=4]="GUTTER_LINE_DECORATIONS",e[e["GUTTER_VIEW_ZONE"]=5]="GUTTER_VIEW_ZONE",e[e["CONTENT_TEXT"]=6]="CONTENT_TEXT",e[e["CONTENT_EMPTY"]=7]="CONTENT_EMPTY",e[e["CONTENT_VIEW_ZONE"]=8]="CONTENT_VIEW_ZONE",e[e["CONTENT_WIDGET"]=9]="CONTENT_WIDGET",e[e["OVERVIEW_RULER"]=10]="OVERVIEW_RULER",e[e["SCROLLBAR"]=11]="SCROLLBAR",e[e["OVERLAY_WIDGET"]=12]="OVERLAY_WIDGET",e[e["OUTSIDE_EDITOR"]=13]="OUTSIDE_EDITOR"}($t||($t={})),function(e){e[e["TOP_RIGHT_CORNER"]=0]="TOP_RIGHT_CORNER",e[e["BOTTOM_RIGHT_CORNER"]=1]="BOTTOM_RIGHT_CORNER",e[e["TOP_CENTER"]=2]="TOP_CENTER"}(Qt||(Qt={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"}(Jt||(Jt={})),function(e){e[e["Off"]=0]="Off",e[e["On"]=1]="On",e[e["Relative"]=2]="Relative",e[e["Interval"]=3]="Interval",e[e["Custom"]=4]="Custom"}(en||(en={})),function(e){e[e["None"]=0]="None",e[e["Text"]=1]="Text",e[e["Blocks"]=2]="Blocks"}(tn||(tn={})),function(e){e[e["Smooth"]=0]="Smooth",e[e["Immediate"]=1]="Immediate"}(nn||(nn={})),function(e){e[e["Auto"]=1]="Auto",e[e["Hidden"]=2]="Hidden",e[e["Visible"]=3]="Visible"}(on||(on={})),function(e){e[e["LTR"]=0]="LTR",e[e["RTL"]=1]="RTL"}(rn||(rn={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(sn||(sn={})),function(e){e[e["File"]=0]="File",e[e["Module"]=1]="Module",e[e["Namespace"]=2]="Namespace",e[e["Package"]=3]="Package",e[e["Class"]=4]="Class",e[e["Method"]=5]="Method",e[e["Property"]=6]="Property",e[e["Field"]=7]="Field",e[e["Constructor"]=8]="Constructor",e[e["Enum"]=9]="Enum",e[e["Interface"]=10]="Interface",e[e["Function"]=11]="Function",e[e["Variable"]=12]="Variable",e[e["Constant"]=13]="Constant",e[e["String"]=14]="String",e[e["Number"]=15]="Number",e[e["Boolean"]=16]="Boolean",e[e["Array"]=17]="Array",e[e["Object"]=18]="Object",e[e["Key"]=19]="Key",e[e["Null"]=20]="Null",e[e["EnumMember"]=21]="EnumMember",e[e["Struct"]=22]="Struct",e[e["Event"]=23]="Event",e[e["Operator"]=24]="Operator",e[e["TypeParameter"]=25]="TypeParameter"}(an||(an={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(un||(un={})),function(e){e[e["Hidden"]=0]="Hidden",e[e["Blink"]=1]="Blink",e[e["Smooth"]=2]="Smooth",e[e["Phase"]=3]="Phase",e[e["Expand"]=4]="Expand",e[e["Solid"]=5]="Solid"}(ln||(ln={})),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"}(cn||(cn={})),function(e){e[e["AlwaysGrowsWhenTypingAtEdges"]=0]="AlwaysGrowsWhenTypingAtEdges",e[e["NeverGrowsWhenTypingAtEdges"]=1]="NeverGrowsWhenTypingAtEdges",e[e["GrowsOnlyWhenTypingBefore"]=2]="GrowsOnlyWhenTypingBefore",e[e["GrowsOnlyWhenTypingAfter"]=3]="GrowsOnlyWhenTypingAfter"}(hn||(hn={})),function(e){e[e["None"]=0]="None",e[e["Same"]=1]="Same",e[e["Indent"]=2]="Indent",e[e["DeepIndent"]=3]="DeepIndent"}(dn||(dn={}));var bn=function(){function e(){}return e.chord=function(e,t){return ot(e,t)},e.CtrlCmd=2048,e.Shift=1024,e.Alt=512,e.WinCtrl=256,e}();function Cn(){return{editor:void 0,languages:void 0,CancellationTokenSource:Je,Emitter:qe,KeyCode:Gt,KeyMod:bn,Position:fn,Range:pn,Selection:mn,SelectionDirection:rn,MarkerSeverity:Yt,MarkerTag:Zt,Uri:wt,Token:vn}}var wn;n("b223");(function(e){function t(t){return t[e.DI_DEPENDENCIES]||[]}e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=t})(wn||(wn={}));var Sn=Nn("instantiationService");function Ln(e,t,n,i){t[wn.DI_TARGET]===t?t[wn.DI_DEPENDENCIES].push({id:e,index:n,optional:i}):(t[wn.DI_DEPENDENCIES]=[{id:e,index:n,optional:i}],t[wn.DI_TARGET]=t)}function Nn(e){if(wn.serviceIds.has(e))return wn.serviceIds.get(e);var t=function(e,n,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Ln(t,e,i,!1)};return t.toString=function(){return e},wn.serviceIds.set(e,t),t}function Dn(e){return function(t,n,i){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");Ln(e,t,i,!0)}}var En=Nn("codeEditorService"),xn=function(){function e(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new qe,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.getTimeSinceLastZoomLevelChanged=function(){return Date.now()-this._lastZoomLevelChangeTime},e.prototype.getPixelRatio=function(){var e=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n},e.INSTANCE=new e,e}();function kn(){return xn.INSTANCE.getZoomLevel()}function On(){return xn.INSTANCE.getTimeSinceLastZoomLevelChanged()}function Tn(e){return xn.INSTANCE.onDidChangeZoomLevel(e)}function Mn(){return xn.INSTANCE.getPixelRatio()}var In=navigator.userAgent,An=In.indexOf("Trident")>=0,Pn=In.indexOf("Edge/")>=0,Rn=An||Pn,Fn=In.indexOf("Firefox")>=0,Wn=In.indexOf("AppleWebKit")>=0,Vn=In.indexOf("Chrome")>=0,Bn=!Vn&&In.indexOf("Safari")>=0,Hn=!Vn&&!Bn&&Wn,zn=In.indexOf("iPad")>=0||Bn&&navigator.maxTouchPoints>0,jn=Pn&&In.indexOf("WebView/")>=0,Un=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches,Kn=function(e,t,n){var i=function(e){return o.fire(e)},o=new qe({onFirstListenerAdd:function(){e.addEventListener(t,i,n)},onLastListenerRemove:function(){e.removeEventListener(t,i,n)}});return o.event};var qn=new Array(230),Gn=new Array(112);function Yn(e){if(e.charCode){var t=String.fromCharCode(e.charCode).toUpperCase();return $e.fromString(t)}return qn[e.keyCode]||0}(function(){for(var e=0;e<Gn.length;e++)Gn[e]=-1;function t(e,t){qn[e]=t,Gn[t]=e}t(3,7),t(8,1),t(9,2),t(13,3),t(16,4),t(17,5),t(18,6),t(19,7),t(20,8),t(27,9),t(32,10),t(33,11),t(34,12),t(35,13),t(36,14),t(37,15),t(38,16),t(39,17),t(40,18),t(45,19),t(46,20),t(48,21),t(49,22),t(50,23),t(51,24),t(52,25),t(53,26),t(54,27),t(55,28),t(56,29),t(57,30),t(65,31),t(66,32),t(67,33),t(68,34),t(69,35),t(70,36),t(71,37),t(72,38),t(73,39),t(74,40),t(75,41),t(76,42),t(77,43),t(78,44),t(79,45),t(80,46),t(81,47),t(82,48),t(83,49),t(84,50),t(85,51),t(86,52),t(87,53),t(88,54),t(89,55),t(90,56),t(93,58),t(96,93),t(97,94),t(98,95),t(99,96),t(100,97),t(101,98),t(102,99),t(103,100),t(104,101),t(105,102),t(106,103),t(107,104),t(108,105),t(109,106),t(110,107),t(111,108),t(112,59),t(113,60),t(114,61),t(115,62),t(116,63),t(117,64),t(118,65),t(119,66),t(120,67),t(121,68),t(122,69),t(123,70),t(124,71),t(125,72),t(126,73),t(127,74),t(128,75),t(129,76),t(130,77),t(144,78),t(145,79),t(186,80),t(187,81),t(188,82),t(189,83),t(190,84),t(191,85),t(192,86),t(193,110),t(194,111),t(219,87),t(220,88),t(221,89),t(222,90),t(223,91),t(226,92),t(229,109),An?t(91,57):Fn?(t(59,80),t(107,81),t(109,83),s["e"]&&t(224,57)):Wn&&(t(91,57),s["e"]?t(93,57):t(92,57))})();var Zn=s["e"]?256:2048,Xn=512,$n=1024,Qn=s["e"]?2048:256,Jn=function(){function e(e){this._standardKeyboardEventBrand=!0;var 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=Yn(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()}return e.prototype.preventDefault=function(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e.prototype.toKeybinding=function(){return this._asRuntimeKeybinding},e.prototype.equals=function(e){return this._asKeybinding===e},e.prototype._computeKeybinding=function(){var e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);var t=0;return this.ctrlKey&&(t|=Zn),this.altKey&&(t|=Xn),this.shiftKey&&(t|=$n),this.metaKey&&(t|=Qn),t|=e,t},e.prototype._computeRuntimeKeybinding=function(){var e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new ut(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)},e}(),ei=!1,ti=null;function ni(e){if(!e.parent||e.parent===e)return null;try{var t=e.location,n=e.parent.location;if(t.protocol!==n.protocol||t.hostname!==n.hostname||t.port!==n.port)return ei=!0,null}catch(i){return ei=!0,null}return e.parent}function ii(e,t){for(var n,i=e.document.getElementsByTagName("iframe"),o=0,r=i.length;o<r;o++)if(n=i[o],n.contentWindow===t)return n;return null}var oi=function(){function e(){}return e.getSameOriginWindowChain=function(){if(!ti){ti=[];var e,t=window;do{e=ni(t),e?ti.push({window:t,iframeElement:ii(e,t)}):ti.push({window:t,iframeElement:null}),t=e}while(t)}return ti.slice(0)},e.hasDifferentOriginAncestor=function(){return ti||this.getSameOriginWindowChain(),ei},e.getPositionOfChildWindowRelativeToAncestorWindow=function(e,t){if(!t||e===t)return{top:0,left:0};for(var n=0,i=0,o=this.getSameOriginWindowChain(),r=0,s=o;r<s.length;r++){var a=s[r];if(a.window===t)break;if(!a.iframeElement)break;var u=a.iframeElement.getBoundingClientRect();n+=u.top,i+=u.left}return{top:n,left:i}},e}(),ri=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),si=function(){function e(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);var t=oi.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}return e.prototype.preventDefault=function(){this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}(),ai=(function(e){function t(t){var n=e.call(this,t)||this;return n.dataTransfer=t.dataTransfer,n}ri(t,e)}(si),function(){function e(e,t,n){if(void 0===t&&(t=0),void 0===n&&(n=0),this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t,e){var i=e,o=e;if("undefined"!==typeof i.wheelDeltaY)this.deltaY=i.wheelDeltaY/120;else if("undefined"!==typeof o.VERTICAL_AXIS&&o.axis===o.VERTICAL_AXIS)this.deltaY=-o.detail/3;else if("wheel"===e.type){var r=e;r.deltaMode===r.DOM_DELTA_LINE?this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if("undefined"!==typeof i.wheelDeltaX)Bn&&s["h"]?this.deltaX=-i.wheelDeltaX/120:this.deltaX=i.wheelDeltaX/120;else if("undefined"!==typeof o.HORIZONTAL_AXIS&&o.axis===o.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){r=e;r.deltaMode===r.DOM_DELTA_LINE?this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}return e.prototype.preventDefault=function(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}());function ui(e){return e&&"function"===typeof e.then}function li(e){var t=new Je,n=e(t.token),i=new Promise((function(e,i){t.token.onCancellationRequested((function(){i(ye())})),Promise.resolve(n).then((function(n){t.dispose(),e(n)}),(function(e){t.dispose(),i(e)}))}));return new(function(){function e(){}return e.prototype.cancel=function(){t.cancel()},e.prototype.then=function(e,t){return i.then(e,t)},e.prototype.catch=function(e){return this.then(void 0,e)},e.prototype.finally=function(e){return i.finally(e)},e}())}var ci=function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((function(e,t){n.doResolve=e,n.doReject=t})).then((function(){if(n.completionPromise=null,n.doResolve=null,n.task){var e=n.task;return n.task=null,e()}}))),this.timeout=setTimeout((function(){n.timeout=null,n.doResolve&&n.doResolve(null)}),t),this.completionPromise},e.prototype.isTriggered=function(){return null!==this.timeout},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(ye()),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e.prototype.dispose=function(){this.cancelTimeout()},e}();function hi(e,t){return t?new Promise((function(n,i){var o=setTimeout(n,e);t.onCancellationRequested((function(){clearTimeout(o),i(ye())}))})):li((function(t){return hi(e,t)}))}function di(e,t){void 0===t&&(t=0);var n=setTimeout(e,t);return ke((function(){return clearTimeout(n)}))}var fi,pi=function(){function e(e,t){this._token=-1,"function"===typeof e&&"number"===typeof t&&this.setIfNotSet(e,t)}return e.prototype.dispose=function(){this.cancel()},e.prototype.cancel=function(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)},e.prototype.cancelAndSet=function(e,t){var n=this;this.cancel(),this._token=setTimeout((function(){n._token=-1,e()}),t)},e.prototype.setIfNotSet=function(e,t){var n=this;-1===this._token&&(this._token=setTimeout((function(){n._token=-1,e()}),t))},e}(),gi=function(){function e(){this._token=-1}return e.prototype.dispose=function(){this.cancel()},e.prototype.cancel=function(){-1!==this._token&&(clearInterval(this._token),this._token=-1)},e.prototype.cancelAndSet=function(e,t){this.cancel(),this._token=setInterval((function(){e()}),t)},e}(),mi=function(){function e(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}return e.prototype.dispose=function(){this.cancel(),this.runner=null},e.prototype.cancel=function(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)},e.prototype.schedule=function(e){void 0===e&&(e=this.timeout),this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)},e.prototype.isScheduled=function(){return-1!==this.timeoutToken},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.doRun()},e.prototype.doRun=function(){this.runner&&this.runner()},e}();(function(){if("function"!==typeof requestIdleCallback||"function"!==typeof cancelIdleCallback){var e=Object.freeze({didTimeout:!0,timeRemaining:function(){return 15}});fi=function(t){var n=setTimeout((function(){return t(e)})),i=!1;return{dispose:function(){i||(i=!0,clearTimeout(n))}}}}else fi=function(e,t){var n=requestIdleCallback(e,"number"===typeof t?{timeout:t}:void 0),i=!1;return{dispose:function(){i||(i=!0,cancelIdleCallback(n))}}}})();var vi,_i=function(){function e(e){var t=this;this._didRun=!1,this._executor=function(){try{t._value=e()}catch(n){t._error=n}finally{t._didRun=!0}},this._handle=fi((function(){return t._executor()}))}return e.prototype.dispose=function(){this._handle.dispose()},e.prototype.getValue=function(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value},e}();function yi(e,t){return void 0===t&&(t=0),e[e.length-(1+t)]}function bi(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function Ci(e,t,n){if(void 0===n&&(n=function(e,t){return e===t}),e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var i=0,o=e.length;i<o;i++)if(!n(e[i],t[i]))return!1;return!0}function wi(e,t,n){var i=0,o=e.length-1;while(i<=o){var r=(i+o)/2|0,s=n(e[r],t);if(s<0)i=r+1;else{if(!(s>0))return r;o=r-1}}return-(i+1)}function Si(e,t){return Ni(e,t,0,e.length-1,[]),e}function Li(e,t,n,i,o,r){for(var s=n,a=i+1,u=n;u<=o;u++)r[u]=e[u];for(u=n;u<=o;u++)s>i?e[u]=r[a++]:a>o?e[u]=r[s++]:t(r[a],r[s])<0?e[u]=r[a++]:e[u]=r[s++]}function Ni(e,t,n,i,o){if(!(i<=n)){var r=n+(i-n)/2|0;Ni(e,t,n,r,o),Ni(e,t,r+1,i,o),t(e[r],e[r+1])<=0||Li(e,t,n,r,i,o)}}function Di(e){return e.filter((function(e){return!!e}))}function Ei(e){return!Array.isArray(e)||0===e.length}function xi(e){return Array.isArray(e)&&e.length>0}function ki(e,t){if(!t)return e.filter((function(t,n){return e.indexOf(t)===n}));var n=Object.create(null);return e.filter((function(e){var i=t(e);return!n[i]&&(n[i]=!0,!0)}))}function Oi(e){var t=new Set;return e.filter((function(e){return!t.has(e)&&(t.add(e),!0)}))}function Ti(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}function Mi(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(t(i))return n}return-1}function Ii(e,t,n){void 0===n&&(n=void 0);var i=Mi(e,t);return i<0?n:e[i]}function Ai(e,t){return e.length>0?e[0]:t}function Pi(e){var t;return(t=[]).concat.apply(t,e)}function Ri(e,t){var n="number"===typeof t?e:0;"number"===typeof t?n=e:(n=0,t=e);var i=[];if(n<=t)for(var o=n;o<t;o++)i.push(o);else for(o=n;o>t;o--)i.push(o);return i}function Fi(e,t,n){var i=e.slice(0,t),o=e.slice(t);return i.concat(n,o)}(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"})(vi||(vi={}));var Wi=function(){function e(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}return e.prototype.setPreferredWebSchema=function(e){this._preferredWebSchema=e},e.prototype.rewrite=function(e){if(this._delegate)return this._delegate(e);var t=e.authority,n=this._hosts[t];n&&-1!==n.indexOf(":")&&(n="["+n+"]");var i=this._ports[t],o=this._connectionTokens[t],r="path="+encodeURIComponent(e.path);return"string"===typeof o&&(r+="&tkn="+encodeURIComponent(o)),wt.from({scheme:s["g"]?this._preferredWebSchema:vi.vscodeRemoteResource,authority:n+":"+i,path:"/vscode-remote-resource",query:r})},e}(),Vi=new Wi,Bi={clipboard:{writeText:s["f"]||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:s["f"]||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText),richText:function(){if(An)return!1;if(Pn){var e=navigator.userAgent.indexOf("Edge/"),t=parseInt(navigator.userAgent.substring(e+5,navigator.userAgent.indexOf(".",e)),10);if(!t||t>=12&&t<=16)return!1}return!0}()},keyboard:function(){return s["f"]||Un?0:navigator.keyboard||Bn?1:2}(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0)},Hi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),zi=function(){return zi=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zi.apply(this,arguments)},ji=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i};function Ui(e){while(e.firstChild)e.removeChild(e.firstChild)}function Ki(e){e.parentNode&&e.parentNode.removeChild(e)}function qi(e){while(e){if(e===document.body)return!0;e=e.parentNode||e.host}return!1}var Gi=new(function(){function e(){this._lastStart=-1,this._lastEnd=-1}return e.prototype._findClassName=function(e,t){var n=e.className;if(n){t=t.trim();var i=n.length,o=t.length;if(0!==o)if(i<o)this._lastStart=-1;else{if(n===t)return this._lastStart=0,void(this._lastEnd=i);var r,s=-1;while((s=n.indexOf(t,s+1))>=0){if(r=s+o,(0===s||32===n.charCodeAt(s-1))&&32===n.charCodeAt(r))return this._lastStart=s,void(this._lastEnd=r+1);if(s>0&&32===n.charCodeAt(s-1)&&r===i)return this._lastStart=s-1,void(this._lastEnd=r);if(0===s&&r===i)return this._lastStart=0,void(this._lastEnd=r)}this._lastStart=-1}else this._lastStart=-1}else this._lastStart=-1},e.prototype.hasClass=function(e,t){return this._findClassName(e,t),-1!==this._lastStart},e.prototype.addClasses=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];n.forEach((function(n){return n.split(" ").forEach((function(n){return t.addClass(e,n)}))}))},e.prototype.addClass=function(e,t){e.className?(this._findClassName(e,t),-1===this._lastStart&&(e.className=e.className+" "+t)):e.className=t},e.prototype.removeClass=function(e,t){this._findClassName(e,t),-1!==this._lastStart&&(e.className=e.className.substring(0,this._lastStart)+e.className.substring(this._lastEnd))},e.prototype.removeClasses=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];n.forEach((function(n){return n.split(" ").forEach((function(n){return t.removeClass(e,n)}))}))},e.prototype.toggleClass=function(e,t,n){this._findClassName(e,t),-1===this._lastStart||void 0!==n&&n||this.removeClass(e,t),-1!==this._lastStart||void 0!==n&&!n||this.addClass(e,t)},e}()),Yi=new(function(){function e(){}return e.prototype.hasClass=function(e,t){return Boolean(t)&&e.classList&&e.classList.contains(t)},e.prototype.addClasses=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];n.forEach((function(n){return n.split(" ").forEach((function(n){return t.addClass(e,n)}))}))},e.prototype.addClass=function(e,t){t&&e.classList&&e.classList.add(t)},e.prototype.removeClass=function(e,t){t&&e.classList&&e.classList.remove(t)},e.prototype.removeClasses=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];n.forEach((function(n){return n.split(" ").forEach((function(n){return t.removeClass(e,n)}))}))},e.prototype.toggleClass=function(e,t,n){e.classList&&e.classList.toggle(t,n)},e}()),Zi=An?Gi:Yi,Xi=Zi.hasClass.bind(Zi),$i=Zi.addClass.bind(Zi),Qi=Zi.addClasses.bind(Zi),Ji=Zi.removeClass.bind(Zi),eo=Zi.removeClasses.bind(Zi),to=Zi.toggleClass.bind(Zi),no=function(){function e(e,t,n,i){this._node=e,this._type=t,this._handler=n,this._options=i||!1,this._node.addEventListener(this._type,this._handler,this._options)}return e.prototype.dispose=function(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)},e}();function io(e,t,n,i){return new no(e,t,n,i)}function oo(e){return function(t){return e(new si(t))}}function ro(e){return function(t){return e(new Jn(t))}}var so=function(e,t,n,i){var o=n;return"click"===t||"mousedown"===t?o=oo(n):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=ro(n)),io(e,t,o,i)};function ao(e,t){return io(e,"mouseout",(function(n){var i=n.relatedTarget;while(i&&i!==e)i=i.parentNode;i!==e&&t(n)}))}function uo(e,t){return io(e,"pointerout",(function(n){var i=n.relatedTarget;while(i&&i!==e)i=i.parentNode;i!==e&&t(n)}))}var lo,co,ho=null;function fo(e){if(!ho){var t=function(e){return setTimeout((function(){return e((new Date).getTime())}),0)};ho=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||t}return ho.call(self,e)}var po=function(){function e(e,t){void 0===t&&(t=0),this._runner=e,this.priority=t,this._canceled=!1}return e.prototype.dispose=function(){this._canceled=!0},e.prototype.execute=function(){if(!this._canceled)try{this._runner()}catch(e){ge(e)}},e.sort=function(e,t){return t.priority-e.priority},e}();(function(){var e=[],t=null,n=!1,i=!1,o=function(){n=!1,t=e,e=[],i=!0;while(t.length>0){t.sort(po.sort);var o=t.shift();o.execute()}i=!1};co=function(t,i){void 0===i&&(i=0);var r=new po(t,i);return e.push(r),n||(n=!0,fo(o)),r},lo=function(e,n){if(i){var o=new po(e,n);return t.push(o),o}return co(e,n)}})();var go=16,mo=function(e,t){return t},vo=function(e){function t(t,n,i,o,r){void 0===o&&(o=mo),void 0===r&&(r=go);var s=e.call(this)||this,a=null,u=0,l=s._register(new pi),c=function(){u=(new Date).getTime(),i(a),a=null};return s._register(io(t,n,(function(e){a=o(a,e);var t=(new Date).getTime()-u;t>=r?(l.cancel(),c()):l.setIfNotSet(c,r-t)}))),s}return Hi(t,e),t}(Me);function _o(e,t,n,i,o){return new vo(e,t,n,i,o)}function yo(e){return document.defaultView.getComputedStyle(e,null)}function bo(e){if(e!==document.body)return new wo(e.clientWidth,e.clientHeight);if(s["c"]&&window.visualViewport){var t=window.visualViewport.width,n=window.visualViewport.height-(Un?24:0);return new wo(t,n)}if(window.innerWidth&&window.innerHeight)return new wo(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new wo(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new wo(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}var Co=function(){function e(){}return e.convertToPixels=function(e,t){return parseFloat(t)||0},e.getDimension=function(t,n,i){var o=yo(t),r="0";return o&&(r=o.getPropertyValue?o.getPropertyValue(n):o.getAttribute(i)),e.convertToPixels(t,r)},e.getBorderLeftWidth=function(t){return e.getDimension(t,"border-left-width","borderLeftWidth")},e.getBorderRightWidth=function(t){return e.getDimension(t,"border-right-width","borderRightWidth")},e.getBorderTopWidth=function(t){return e.getDimension(t,"border-top-width","borderTopWidth")},e.getBorderBottomWidth=function(t){return e.getDimension(t,"border-bottom-width","borderBottomWidth")},e.getPaddingLeft=function(t){return e.getDimension(t,"padding-left","paddingLeft")},e.getPaddingRight=function(t){return e.getDimension(t,"padding-right","paddingRight")},e.getPaddingTop=function(t){return e.getDimension(t,"padding-top","paddingTop")},e.getPaddingBottom=function(t){return e.getDimension(t,"padding-bottom","paddingBottom")},e.getMarginLeft=function(t){return e.getDimension(t,"margin-left","marginLeft")},e.getMarginTop=function(t){return e.getDimension(t,"margin-top","marginTop")},e.getMarginRight=function(t){return e.getDimension(t,"margin-right","marginRight")},e.getMarginBottom=function(t){return e.getDimension(t,"margin-bottom","marginBottom")},e}(),wo=function(){function e(e,t){this.width=e,this.height=t}return e}();function So(e){var t=e.offsetParent,n=e.offsetTop,i=e.offsetLeft;while(null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement){n-=e.scrollTop;var o=Mo(e)?null:yo(e);o&&(i-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(i+=Co.getBorderLeftWidth(e),n+=Co.getBorderTopWidth(e),n+=e.offsetTop,i+=e.offsetLeft,t=e.offsetParent)}return{left:i,top:n}}function Lo(e){var t=e.getBoundingClientRect();return{left:t.left+No.scrollX,top:t.top+No.scrollY,width:t.width,height:t.height}}var No=new(function(){function e(){}return Object.defineProperty(e.prototype,"scrollX",{get:function(){return"number"===typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollY",{get:function(){return"number"===typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop},enumerable:!0,configurable:!0}),e}());function Do(e){var t=Co.getMarginLeft(e)+Co.getMarginRight(e);return e.offsetWidth+t}function Eo(e){var t=Co.getBorderLeftWidth(e)+Co.getBorderRightWidth(e),n=Co.getPaddingLeft(e)+Co.getPaddingRight(e);return e.offsetWidth-t-n}function xo(e){var t=Co.getBorderTopWidth(e)+Co.getBorderBottomWidth(e),n=Co.getPaddingTop(e)+Co.getPaddingBottom(e);return e.offsetHeight-t-n}function ko(e){var t=Co.getMarginTop(e)+Co.getMarginBottom(e);return e.offsetHeight+t}function Oo(e,t){while(e){if(e===t)return!0;e=e.parentNode}return!1}function To(e,t,n){while(e&&e.nodeType===e.ELEMENT_NODE){if(Xi(e,t))return e;if(n)if("string"===typeof n){if(Xi(e,n))return null}else if(e===n)return null;e=e.parentNode}return null}function Mo(e){return e&&!!e.host&&!!e.mode}function Io(e){return!!Ao(e)}function Ao(e){while(e.parentNode){if(e===document.body)return null;e=e.parentNode}return Mo(e)?e:null}function Po(e){void 0===e&&(e=document.getElementsByTagName("head")[0]);var t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}var Ro=null;function Fo(){return Ro||(Ro=Po()),Ro}function Wo(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}function Vo(e,t){if(void 0===t&&(t=Fo()),t){for(var n=Wo(t),i=[],o=0;o<n.length;o++){var r=n[o];-1!==r.selectorText.indexOf(e)&&i.push(o)}for(o=i.length-1;o>=0;o--)t.sheet.deleteRule(i[o])}}function Bo(e){return"object"===typeof HTMLElement?e instanceof HTMLElement:e&&"object"===typeof e&&1===e.nodeType&&"string"===typeof e.nodeName}var Ho={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",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",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:Wn?"webkitAnimationStart":"animationstart",ANIMATION_END:Wn?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:Wn?"webkitAnimationIteration":"animationiteration"},zo={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}};function jo(e){for(var t=[],n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t}function Uo(e,t){for(var n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode}var Ko=function(e){function t(t){var n=e.call(this)||this;n._onDidFocus=n._register(new qe),n.onDidFocus=n._onDidFocus.event,n._onDidBlur=n._register(new qe),n.onDidBlur=n._onDidBlur.event;var i=Oo(document.activeElement,t),o=!1,r=function(){o=!1,i||(i=!0,n._onDidFocus.fire())},s=function(){i&&(o=!0,window.setTimeout((function(){o&&(o=!1,i=!1,n._onDidBlur.fire())}),0))};return n._refreshStateHandler=function(){var e=Oo(document.activeElement,t);e!==i&&(i?s():r())},n._register(Kn(t,Ho.FOCUS,!0)(r)),n._register(Kn(t,Ho.BLUR,!0)(s)),n}return Hi(t,e),t}(Me);function qo(e){return new Ko(e)}function Go(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t){return e.appendChild(t)})),t[t.length-1]}var Yo,Zo=/([\w\-]+)?(#([\w\-]+))?((.([\w\-]+))*)/;function Xo(e,t,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var r=Zo.exec(t);if(!r)throw new Error("Bad use of emmet");n=zi({},n||{});var s,a=r[1]||"div";return s=e!==Yo.HTML?document.createElementNS(e,a):document.createElement(a),r[3]&&(s.id=r[3]),r[4]&&(s.className=r[4].replace(/\./g," ").trim()),Object.keys(n).forEach((function(e){var t=n[e];"undefined"!==typeof t&&(/^on\w+$/.test(e)?s[e]=t:"selected"===e?t&&s.setAttribute(e,"true"):s.setAttribute(e,t))})),Di(i).forEach((function(e){e instanceof Node?s.appendChild(e):s.appendChild(document.createTextNode(e))})),s}function $o(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return Xo.apply(void 0,ji([Yo.HTML,e,t],n))}function Qo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,i=e;n<i.length;n++){var o=i[n];o.style.display="",o.removeAttribute("aria-hidden")}}function Jo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,i=e;n<i.length;n++){var o=i[n];o.style.display="none",o.setAttribute("aria-hidden","true")}}function er(e,t){while(e&&e.nodeType===e.ELEMENT_NODE){if(e instanceof HTMLElement&&e.hasAttribute(t))return e;e=e.parentNode}return null}function tr(e){if(e&&e.hasAttribute("tabIndex")){if(document.activeElement===e){var t=er(e.parentElement,"tabIndex");t&&t.focus()}e.removeAttribute("tabindex")}}function nr(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)}function ir(e){var t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function or(e){if(s["f"]||jn)window.open(e);else{var t=window.open();t&&(t.opener=null,t.location.href=e)}}function rr(e){var t=function(){e(),n=co(t)},n=co(t);return ke((function(){return n.dispose()}))}function sr(e){return e&&vi.vscodeRemote===e.scheme?Vi.rewrite(e):e}function ar(e){return e?"url('"+sr(e).toString(!0).replace(/'/g,"%27")+"')":"url('')"}function ur(e){var t=JSON.parse(e);return t=lr(t),t}function lr(e,t){if(void 0===t&&(t=0),!e||t>200)return e;if("object"===typeof e){switch(e.$mid){case 1:return wt.revive(e);case 2:return new RegExp(e.source,e.flags)}for(var n in e)Object.hasOwnProperty.call(e,n)&&(e[n]=lr(e[n],t+1))}return e}function cr(e){return!e||"string"!==typeof e||0===e.trim().length}(function(e){e["HTML"]="http://www.w3.org/1999/xhtml",e["SVG"]="http://www.w3.org/2000/svg"})(Yo||(Yo={})),$o.SVG=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return Xo.apply(void 0,ji([Yo.SVG,e,t],n))},Vi.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");var hr=/{(\d+)}/g;function dr(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return 0===t.length?e:e.replace(hr,(function(e,n){var i=parseInt(n,10);return isNaN(i)||i<0||i>=t.length?e:t[i]}))}function fr(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}}))}function pr(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function gr(e,t){if(e.length<t.length)return!1;if(e===t)return!0;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function mr(e,t){var n=e.length-t.length;return n>0?e.indexOf(t,n)===n:0===n&&e===t}function vr(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("Cannot create regex from empty string");t||(e=pr(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),n.unicode&&(i+="u"),new RegExp(e,i)}function _r(e){if("^"===e.source||"^$"===e.source||"$"===e.source||"^\\s*$"===e.source)return!1;var t=e.exec("");return!(!t||0!==e.lastIndex)}function yr(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function br(e){for(var t=0,n=e.length;t<n;t++){var i=e.charCodeAt(t);if(32!==i&&9!==i)return t}return-1}function Cr(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.length);for(var i=t;i<n;i++){var o=e.charCodeAt(i);if(32!==o&&9!==o)return e.substring(t,i)}return e.substring(t,n)}function wr(e,t){void 0===t&&(t=e.length-1);for(var n=t;n>=0;n--){var i=e.charCodeAt(n);if(32!==i&&9!==i)return n}return-1}function Sr(e){return e>=97&&e<=122}function Lr(e){return e>=65&&e<=90}function Nr(e){return Sr(e)||Lr(e)}function Dr(e,t){return e.length===t.length&&Er(e,t)}function Er(e,t,n){void 0===n&&(n=e.length);for(var i=0;i<n;i++){var o=e.charCodeAt(i),r=t.charCodeAt(i);if(o!==r)if(Nr(o)&&Nr(r)){var s=Math.abs(o-r);if(0!==s&&32!==s)return!1}else if(String.fromCharCode(o).toLowerCase()!==String.fromCharCode(r).toLowerCase())return!1}return!0}function xr(e,t){var n=t.length;return!(t.length>e.length)&&Er(e,t,n)}function kr(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n<i;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return i}function Or(e,t){var n,i=Math.min(e.length,t.length),o=e.length-1,r=t.length-1;for(n=0;n<i;n++)if(e.charCodeAt(o-n)!==t.charCodeAt(r-n))return n;return i}function Tr(e){return 55296<=e&&e<=56319}function Mr(e){return 56320<=e&&e<=57343}function Ir(e,t,n){var i=e.charCodeAt(n);if(Tr(i)&&n+1<t){var o=e.charCodeAt(n+1);if(Mr(o))return o-56320+(i-55296<<10)+65536}return i}function Ar(e,t){var n=e.charCodeAt(t-1);if(Mr(n)&&t>1){var i=e.charCodeAt(t-2);if(Tr(i))return n-56320+(i-55296<<10)+65536}return n}function Pr(e,t){var n=$r.getInstance(),i=t,o=e.length,r=Ir(e,o,t);t+=r>=65536?2:1;var s=n.getGraphemeBreakType(r);while(t<o){var a=Ir(e,o,t),u=n.getGraphemeBreakType(a);if(Xr(s,u))break;t+=a>=65536?2:1,s=u}return t-i}function Rr(e,t){var n=$r.getInstance(),i=t,o=Ar(e,t);t-=o>=65536?2:1;var r=n.getGraphemeBreakType(o);while(t>0){var s=Ar(e,t),a=n.getGraphemeBreakType(s);if(Xr(a,r))break;t-=s>=65536?2:1,r=a}return i-t}var Fr=/(?:[\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-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function Wr(e){return Fr.test(e)}var Vr=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;function Br(e){return Vr.test(e)}var Hr=/^[\t\n\r\x20-\x7E]*$/;function zr(e){return Hr.test(e)}function jr(e){for(var t=0,n=e.length;t<n;t++)if(Ur(e.charCodeAt(t)))return!0;return!1}function Ur(e){return e=+e,e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function Kr(e){return e>=127462&&e<=127487||e>=9728&&e<=10175||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129003||e>=129280&&e<=129535||e>=129648&&e<=129651||e>=129656&&e<=129666||e>=129680&&e<=129685}var qr=String.fromCharCode(65279);function Gr(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function Yr(e){var t=26;return e%=2*t,e<t?String.fromCharCode(97+e):String.fromCharCode(65+e-t)}function Zr(e){var t=$r.getInstance();return t.getGraphemeBreakType(e)}function Xr(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)))))))))}var $r=function(){function e(){this._data=Qr()}return e.getInstance=function(){return e._INSTANCE||(e._INSTANCE=new e),e._INSTANCE},e.prototype.getGraphemeBreakType=function(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;var t=this._data,n=t.length/3,i=1;while(i<=n)if(e<t[3*i])i*=2;else{if(!(e>t[3*i+1]))return t[3*i+2];i=2*i+1}return 0},e._INSTANCE=null,e}();function Qr(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,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,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,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,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,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,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,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,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,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,2259,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,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,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,6848,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,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,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,9776,9783,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,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,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,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,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}var Jr=n("c317"),es=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ts=65,ns=97,is=90,os=122,rs=46,ss=47,as=92,us=58,ls=63,cs=function(e){function t(t,n,i){var o,r=this;"string"===typeof n&&0===n.indexOf("not ")?(o="must not be",n=n.replace(/^not /,"")):o="must be";var s=-1!==t.indexOf(".")?"property":"argument",a='The "'+t+'" '+s+" "+o+" of type "+n;return a+=". Received type "+typeof i,r=e.call(this,a)||this,r.code="ERR_INVALID_ARG_TYPE",r}return es(t,e),t}(Error);function hs(e,t){if("string"!==typeof e)throw new cs(t,"string",e)}function ds(e){return e===ss||e===as}function fs(e){return e===ss}function ps(e){return e>=ts&&e<=is||e>=ns&&e<=os}function gs(e,t,n,i){for(var o,r="",s=0,a=-1,u=0,l=0;l<=e.length;++l){if(l<e.length)o=e.charCodeAt(l);else{if(i(o))break;o=ss}if(i(o)){if(a===l-1||1===u);else if(a!==l-1&&2===u){if(r.length<2||2!==s||r.charCodeAt(r.length-1)!==rs||r.charCodeAt(r.length-2)!==rs){if(r.length>2){var c=r.lastIndexOf(n);-1===c?(r="",s=0):(r=r.slice(0,c),s=r.length-1-r.lastIndexOf(n)),a=l,u=0;continue}if(2===r.length||1===r.length){r="",s=0,a=l,u=0;continue}}t&&(r.length>0?r+=n+"..":r="..",s=2)}else r.length>0?r+=n+e.slice(a+1,l):r=e.slice(a+1,l),s=l-a-1;a=l,u=0}else o===rs&&-1!==u?++u:u=-1}return r}function ms(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+e+i:i}var vs={resolve:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n="",i="",o=!1,r=e.length-1;r>=-1;r--){var s=void 0;if(r>=0?s=e[r]:n?(s=Jr["b"]["="+n]||Jr["a"](),void 0!==s&&s.slice(0,3).toLowerCase()===n.toLowerCase()+"\\"||(s=n+"\\")):s=Jr["a"](),hs(s,"path"),0!==s.length){var a=s.length,u=0,l="",c=!1,h=s.charCodeAt(0);if(a>1)if(ds(h))if(c=!0,ds(s.charCodeAt(1))){for(var d=2,f=d;d<a;++d)if(ds(s.charCodeAt(d)))break;if(d<a&&d!==f){var p=s.slice(f,d);for(f=d;d<a;++d)if(!ds(s.charCodeAt(d)))break;if(d<a&&d!==f){for(f=d;d<a;++d)if(ds(s.charCodeAt(d)))break;d===a?(l="\\\\"+p+"\\"+s.slice(f),u=d):d!==f&&(l="\\\\"+p+"\\"+s.slice(f,d),u=d)}}}else u=1;else ps(h)&&s.charCodeAt(1)===us&&(l=s.slice(0,2),u=2,a>2&&ds(s.charCodeAt(2))&&(c=!0,u=3));else ds(h)&&(u=1,c=!0);if(!(l.length>0&&n.length>0&&l.toLowerCase()!==n.toLowerCase())&&(0===n.length&&l.length>0&&(n=l),o||(i=s.slice(u)+"\\"+i,o=c),n.length>0&&o))break}}return i=gs(i,!o,"\\",ds),n+(o?"\\":"")+i||"."},normalize:function(e){hs(e,"path");var t=e.length;if(0===t)return".";var n,i,o=0,r=!1,s=e.charCodeAt(0);if(t>1)if(ds(s))if(r=!0,ds(e.charCodeAt(1))){for(var a=2,u=a;a<t;++a)if(ds(e.charCodeAt(a)))break;if(a<t&&a!==u){var l=e.slice(u,a);for(u=a;a<t;++a)if(!ds(e.charCodeAt(a)))break;if(a<t&&a!==u){for(u=a;a<t;++a)if(ds(e.charCodeAt(a)))break;if(a===t)return"\\\\"+l+"\\"+e.slice(u)+"\\";a!==u&&(n="\\\\"+l+"\\"+e.slice(u,a),o=a)}}}else o=1;else ps(s)&&e.charCodeAt(1)===us&&(n=e.slice(0,2),o=2,t>2&&ds(e.charCodeAt(2))&&(r=!0,o=3));else if(ds(s))return"\\";return i=o<t?gs(e.slice(o),!r,"\\",ds):"",0!==i.length||r||(i="."),i.length>0&&ds(e.charCodeAt(t-1))&&(i+="\\"),void 0===n?r?i.length>0?"\\"+i:"\\":i.length>0?i:"":r?i.length>0?n+"\\"+i:n+"\\":i.length>0?n+i:n},isAbsolute:function(e){hs(e,"path");var t=e.length;if(0===t)return!1;var n=e.charCodeAt(0);return!!ds(n)||!!(ps(n)&&t>2&&e.charCodeAt(1)===us&&ds(e.charCodeAt(2)))},join:function(){for(var e,t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(0===n.length)return".";for(var o=0;o<n.length;++o){var r=n[o];hs(r,"path"),r.length>0&&(void 0===e?e=t=r:e+="\\"+r)}if(void 0===e)return".";var s=!0,a=0;if("string"===typeof t&&ds(t.charCodeAt(0))){++a;var u=t.length;u>1&&ds(t.charCodeAt(1))&&(++a,u>2&&(ds(t.charCodeAt(2))?++a:s=!1))}if(s){for(;a<e.length;++a)if(!ds(e.charCodeAt(a)))break;a>=2&&(e="\\"+e.slice(a))}return vs.normalize(e)},relative:function(e,t){if(hs(e,"from"),hs(t,"to"),e===t)return"";var n=vs.resolve(e),i=vs.resolve(t);if(n===i)return"";if(e=n.toLowerCase(),t=i.toLowerCase(),e===t)return"";for(var o=0;o<e.length;++o)if(e.charCodeAt(o)!==as)break;for(var r=e.length;r-1>o;--r)if(e.charCodeAt(r-1)!==as)break;for(var s=r-o,a=0;a<t.length;++a)if(t.charCodeAt(a)!==as)break;for(var u=t.length;u-1>a;--u)if(t.charCodeAt(u-1)!==as)break;for(var l=u-a,c=s<l?s:l,h=-1,d=0;d<=c;++d){if(d===c){if(l>c){if(t.charCodeAt(a+d)===as)return i.slice(a+d+1);if(2===d)return i.slice(a+d)}s>c&&(e.charCodeAt(o+d)===as?h=d:2===d&&(h=3));break}var f=e.charCodeAt(o+d),p=t.charCodeAt(a+d);if(f!==p)break;f===as&&(h=d)}if(d!==c&&-1===h)return i;var g="";for(-1===h&&(h=0),d=o+h+1;d<=r;++d)d!==r&&e.charCodeAt(d)!==as||(0===g.length?g+="..":g+="\\..");return g.length>0?g+i.slice(a+h,u):(a+=h,i.charCodeAt(a)===as&&++a,i.slice(a,u))},toNamespacedPath:function(e){if("string"!==typeof e)return e;if(0===e.length)return"";var t=vs.resolve(e);if(t.length>=3)if(t.charCodeAt(0)===as){if(t.charCodeAt(1)===as){var n=t.charCodeAt(2);if(n!==ls&&n!==rs)return"\\\\?\\UNC\\"+t.slice(2)}}else if(ps(t.charCodeAt(0))&&t.charCodeAt(1)===us&&t.charCodeAt(2)===as)return"\\\\?\\"+t;return e},dirname:function(e){hs(e,"path");var t=e.length;if(0===t)return".";var n=-1,i=-1,o=!0,r=0,s=e.charCodeAt(0);if(t>1)if(ds(s)){if(n=r=1,ds(e.charCodeAt(1))){for(var a=2,u=a;a<t;++a)if(ds(e.charCodeAt(a)))break;if(a<t&&a!==u){for(u=a;a<t;++a)if(!ds(e.charCodeAt(a)))break;if(a<t&&a!==u){for(u=a;a<t;++a)if(ds(e.charCodeAt(a)))break;if(a===t)return e;a!==u&&(n=r=a+1)}}}}else ps(s)&&e.charCodeAt(1)===us&&(n=r=2,t>2&&ds(e.charCodeAt(2))&&(n=r=3));else if(ds(s))return e;for(var l=t-1;l>=r;--l)if(ds(e.charCodeAt(l))){if(!o){i=l;break}}else o=!1;if(-1===i){if(-1===n)return".";i=n}return e.slice(0,i)},basename:function(e,t){void 0!==t&&hs(t,"ext"),hs(e,"path");var n,i=0,o=-1,r=!0;if(e.length>=2){var s=e.charCodeAt(0);ps(s)&&e.charCodeAt(1)===us&&(i=2)}if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,u=-1;for(n=e.length-1;n>=i;--n){var l=e.charCodeAt(n);if(ds(l)){if(!r){i=n+1;break}}else-1===u&&(r=!1,u=n+1),a>=0&&(l===t.charCodeAt(a)?-1===--a&&(o=n):(a=-1,o=u))}return i===o?o=u:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=i;--n)if(ds(e.charCodeAt(n))){if(!r){i=n+1;break}}else-1===o&&(r=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname:function(e){hs(e,"path");var t=0,n=-1,i=0,o=-1,r=!0,s=0;e.length>=2&&e.charCodeAt(1)===us&&ps(e.charCodeAt(0))&&(t=i=2);for(var a=e.length-1;a>=t;--a){var u=e.charCodeAt(a);if(ds(u)){if(!r){i=a+1;break}}else-1===o&&(r=!1,o=a+1),u===rs?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1)}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===i+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!==typeof e)throw new cs("pathObject","Object",e);return ms("\\",e)},parse:function(e){hs(e,"path");var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n=e.length,i=0,o=e.charCodeAt(0);if(n>1){if(ds(o)){if(i=1,ds(e.charCodeAt(1))){for(var r=2,s=r;r<n;++r)if(ds(e.charCodeAt(r)))break;if(r<n&&r!==s){for(s=r;r<n;++r)if(!ds(e.charCodeAt(r)))break;if(r<n&&r!==s){for(s=r;r<n;++r)if(ds(e.charCodeAt(r)))break;r===n?i=r:r!==s&&(i=r+1)}}}}else if(ps(o)&&e.charCodeAt(1)===us){if(i=2,!(n>2))return t.root=t.dir=e,t;if(ds(e.charCodeAt(2))){if(3===n)return t.root=t.dir=e,t;i=3}}}else if(ds(o))return t.root=t.dir=e,t;i>0&&(t.root=e.slice(0,i));for(var a=-1,u=i,l=-1,c=!0,h=e.length-1,d=0;h>=i;--h)if(o=e.charCodeAt(h),ds(o)){if(!c){u=h+1;break}}else-1===l&&(c=!1,l=h+1),o===rs?-1===a?a=h:1!==d&&(d=1):-1!==a&&(d=-1);return-1===a||-1===l||0===d||1===d&&a===l-1&&a===u+1?-1!==l&&(t.base=t.name=e.slice(u,l)):(t.name=e.slice(u,a),t.base=e.slice(u,l),t.ext=e.slice(a,l)),t.dir=u>0&&u!==i?e.slice(0,u-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},_s={resolve:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n="",i=!1,o=e.length-1;o>=-1&&!i;o--){var r=void 0;r=o>=0?e[o]:Jr["a"](),hs(r,"path"),0!==r.length&&(n=r+"/"+n,i=r.charCodeAt(0)===ss)}return n=gs(n,!i,"/",fs),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(hs(e,"path"),0===e.length)return".";var t=e.charCodeAt(0)===ss,n=e.charCodeAt(e.length-1)===ss;return e=gs(e,!t,"/",fs),0!==e.length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return hs(e,"path"),e.length>0&&e.charCodeAt(0)===ss},join:function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)return".";for(var i=0;i<t.length;++i){var o=arguments[i];hs(o,"path"),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":_s.normalize(e)},relative:function(e,t){if(hs(e,"from"),hs(t,"to"),e===t)return"";if(e=_s.resolve(e),t=_s.resolve(t),e===t)return"";for(var n=1;n<e.length;++n)if(e.charCodeAt(n)!==ss)break;for(var i=e.length,o=i-n,r=1;r<t.length;++r)if(t.charCodeAt(r)!==ss)break;for(var s=t.length,a=s-r,u=o<a?o:a,l=-1,c=0;c<=u;++c){if(c===u){if(a>u){if(t.charCodeAt(r+c)===ss)return t.slice(r+c+1);if(0===c)return t.slice(r+c)}else o>u&&(e.charCodeAt(n+c)===ss?l=c:0===c&&(l=0));break}var h=e.charCodeAt(n+c),d=t.charCodeAt(r+c);if(h!==d)break;h===ss&&(l=c)}var f="";for(c=n+l+1;c<=i;++c)c!==i&&e.charCodeAt(c)!==ss||(0===f.length?f+="..":f+="/..");return f.length>0?f+t.slice(r+l):(r+=l,t.charCodeAt(r)===ss&&++r,t.slice(r))},toNamespacedPath:function(e){return e},dirname:function(e){if(hs(e,"path"),0===e.length)return".";for(var t=e.charCodeAt(0)===ss,n=-1,i=!0,o=e.length-1;o>=1;--o)if(e.charCodeAt(o)===ss){if(!i){n=o;break}}else i=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename:function(e,t){void 0!==t&&hs(t,"ext"),hs(e,"path");var n,i=0,o=-1,r=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(u===ss){if(!r){i=n+1;break}}else-1===a&&(r=!1,a=n+1),s>=0&&(u===t.charCodeAt(s)?-1===--s&&(o=n):(s=-1,o=a))}return i===o?o=a:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===ss){if(!r){i=n+1;break}}else-1===o&&(r=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname:function(e){hs(e,"path");for(var t=-1,n=0,i=-1,o=!0,r=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(a!==ss)-1===i&&(o=!1,i=s+1),a===rs?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!o){n=s+1;break}}return-1===t||-1===i||0===r||1===r&&t===i-1&&t===n+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!==typeof e)throw new cs("pathObject","Object",e);return ms("/",e)},parse:function(e){hs(e,"path");var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,i=e.charCodeAt(0)===ss;i?(t.root="/",n=1):n=0;for(var o=-1,r=0,s=-1,a=!0,u=e.length-1,l=0;u>=n;--u){var c=e.charCodeAt(u);if(c!==ss)-1===s&&(a=!1,s=u+1),c===rs?-1===o?o=u:1!==l&&(l=1):-1!==o&&(l=-1);else if(!a){r=u+1;break}}return-1===o||-1===s||0===l||1===l&&o===s-1&&o===r+1?-1!==s&&(t.base=t.name=0===r&&i?e.slice(1,s):e.slice(r,s)):(0===r&&i?(t.name=e.slice(1,o),t.base=e.slice(1,s)):(t.name=e.slice(r,o),t.base=e.slice(r,s)),t.ext=e.slice(o,s)),r>0?t.dir=e.slice(0,r-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};_s.win32=vs.win32=vs,_s.posix=vs.posix=_s;var ys="win32"===Jr["c"]?vs.normalize:_s.normalize,bs="win32"===Jr["c"]?vs.join:_s.join,Cs="win32"===Jr["c"]?vs.relative:_s.relative,ws="win32"===Jr["c"]?vs.dirname:_s.dirname,Ss="win32"===Jr["c"]?vs.basename:_s.basename,Ls="win32"===Jr["c"]?vs.extname:_s.extname,Ns="win32"===Jr["c"]?vs.sep:_s.sep;function Ds(e,t,n,i){if(void 0===i&&(i=Ns),e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(n){var o=xr(e,t);if(!o)return!1;if(t.length===e.length)return!0;var r=t.length;return t.charAt(t.length-1)===i&&r--,e.charAt(r)===i}return t.charAt(t.length-1)!==i&&(t+=i),0===e.indexOf(t)}function Es(e){return e>=65&&e<=90||e>=97&&e<=122}var xs,ks=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i};function Os(e){for(var t,n,o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return n=e.scheme===vi.file?wt.file(bs.apply(i,ks([Ms(e)],o))).path:(t=_s).join.apply(t,ks([e.path||"/"],o)),e.with({path:n})}function Ts(e){return e.path.length?(t=e.scheme===vi.file?wt.file(ys(Ms(e))).path:_s.normalize(e.path),e.with({path:t})):e;var t}function Ms(e){var t,n=e.path;return t=e.authority&&n.length>1&&e.scheme===vi.file?"//"+e.authority+n:s["h"]&&47===n.charCodeAt(0)&&Es(n.charCodeAt(1))&&58===n.charCodeAt(2)?n.substr(1):n,s["h"]&&(t=t.replace(/\//g,"\\")),t}(function(e){function t(t){var n=new Map,i=t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";"));i.split(";").forEach((function(e){var t=e.split(":"),i=t[0],o=t[1];i&&o&&n.set(i,o)}));var o=t.path.substring(0,t.path.indexOf(";"));return o&&n.set(e.META_DATA_MIME,o),n}e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=t})(xs||(xs={}));var Is={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function As(e){return typeof e===Is.string||e instanceof String}function Ps(e){return typeof e===Is.object&&null!==e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function Rs(e){return(typeof e===Is.number||e instanceof Number)&&!isNaN(e)}function Fs(e){return!0===e||!1===e}function Ws(e){return typeof e===Is.undefined}function Vs(e){return Ws(e)||null===e}var Bs=Object.prototype.hasOwnProperty;function Hs(e){if(!Ps(e))return!1;for(var t in e)if(Bs.call(e,t))return!1;return!0}function zs(e){return typeof e===Is.function}function js(e,t){for(var n=Math.min(e.length,t.length),i=0;i<n;i++)Us(e[i],t[i])}function Us(e,t){if(As(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(zs(t)){try{if(e instanceof t)return}catch(n){}if(!Vs(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 Ks(e){var t=[],n=Object.getPrototypeOf(e);while(Object.prototype!==n)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}function qs(e){for(var t=[],n=0,i=Ks(e);n<i.length;n++){var o=i[n];"function"===typeof e[o]&&t.push(o)}return t}function Gs(e,t){for(var n=function(e){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}},i={},o=0,r=e;o<r.length;o++){var s=r[o];i[s]=n(s)}return i}function Ys(e){return null===e?void 0:e}function Zs(e){return"undefined"===typeof e?null:e}var Xs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function $s(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}function Qs(e){var t=[];return e.forEach((function(e,n){return t.push(n)})),t}var Js,ea=function(){function e(){this._value="",this._pos=0}return e.prototype.reset=function(e){return this._value=e,this._pos=0,this},e.prototype.next=function(){return this._pos+=1,this},e.prototype.hasNext=function(){return this._pos<this._value.length-1},e.prototype.cmp=function(e){var t=e.charCodeAt(0),n=this._value.charCodeAt(this._pos);return t-n},e.prototype.value=function(){return this._value[this._pos]},e}(),ta=function(){function e(e){void 0===e&&(e=!0),this._splitOnBackslash=e}return e.prototype.reset=function(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()},e.prototype.hasNext=function(){return this._to<this._value.length},e.prototype.next=function(){this._from=this._to;for(var e=!0;this._to<this._value.length;this._to++){var t=this._value.charCodeAt(this._to);if(47===t||this._splitOnBackslash&&92===t){if(!e)break;this._from++}else e=!1}return this},e.prototype.cmp=function(e){var t=0,n=e.length,i=this._from;while(t<n&&i<this._to){var o=e.charCodeAt(t)-this._value.charCodeAt(i);if(0!==o)return o;t+=1,i+=1}return n===this._to-this._from?0:t<n?-1:1},e.prototype.value=function(){return this._value.substring(this._from,this._to)},e}(),na=function(){function e(){}return e}(),ia=function(){function e(e){this._iter=e}return e.forPaths=function(){return new e(new ta)},e.forStrings=function(){return new e(new ea)},e.prototype.clear=function(){this._root=void 0},e.prototype.set=function(e,t){var n,i=this._iter.reset(e);this._root||(this._root=new na,this._root.segment=i.value()),n=this._root;while(1){var o=i.cmp(n.segment);if(o>0)n.left||(n.left=new na,n.left.segment=i.value()),n=n.left;else if(o<0)n.right||(n.right=new na,n.right.segment=i.value()),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new na,n.mid.segment=i.value()),n=n.mid}}var r=n.value;return n.value=t,n.key=e,r},e.prototype.get=function(e){var t=this._iter.reset(e),n=this._root;while(n){var i=t.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.value:void 0},e.prototype.findSubstr=function(e){var t=this._iter.reset(e),n=this._root,i=void 0;while(n){var o=t.cmp(n.segment);if(o>0)n=n.left;else if(o<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i},e.prototype.forEach=function(e){this._forEach(this._root,e)},e.prototype._forEach=function(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t))},e}(),oa=function(){function e(){this.map=new Map,this.ignoreCase=!1}return e.prototype.set=function(e,t){this.map.set(this.toKey(e),t)},e.prototype.get=function(e){return this.map.get(this.toKey(e))},e.prototype.toKey=function(e){var t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t},e}(),ra=function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.get=function(e,t){void 0===t&&(t=0);var n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value},e.prototype.set=function(e,t,n){void 0===n&&(n=0);var i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}},e.prototype.delete=function(e){return!!this.remove(e)},e.prototype.remove=function(e){var t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value},e.prototype.forEach=function(e,t){var n=this._head;while(n)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.trimOld=function(e){if(!(e>=this.size))if(0!==e){var t=this._head,n=this.size;while(t&&n>e)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0)}else this.clear()},e.prototype.addItemFirst=function(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},e.prototype.addItemLast=function(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},e.prototype.removeItem=function(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{var t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0},e.prototype.touch=function(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;var n=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(2===t){if(e===this._tail)return;n=e.next,i=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e.prototype.toJSON=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),e},e}(),sa=function(e){function t(t,n){void 0===n&&(n=1);var i=e.call(this)||this;return i._limit=t,i._ratio=Math.min(Math.max(0,n),1),i}return Xs(t,e),t.prototype.get=function(t){return e.prototype.get.call(this,t,2)},t.prototype.peek=function(t){return e.prototype.get.call(this,t,0)},t.prototype.set=function(t,n){e.prototype.set.call(this,t,n,2),this.checkTrim()},t.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},t}(ra),aa=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i},ua=Nn("commandService"),la=new(function(){function e(){this._commands=new Map,this._onDidRegisterCommand=new qe,this.onDidRegisterCommand=this._onDidRegisterCommand.event}return e.prototype.registerCommand=function(e,t){var n=this;if(!e)throw new Error("invalid command");if("string"===typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){for(var i=[],o=0,r=e.description.args;o<r.length;o++){var s=r[o];i.push(s.constraint)}var a=e.handler;e.handler=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return js(t,i),a.apply(void 0,aa([e],t))}}var u=e.id,l=this._commands.get(u);l||(l=new He,this._commands.set(u,l));var c=l.unshift(e),h=ke((function(){c();var e=n._commands.get(u);(null===e||void 0===e?void 0:e.isEmpty())&&n._commands.delete(u)}));return this._onDidRegisterCommand.fire(u),h},e.prototype.registerCommandAlias=function(e,t){return la.registerCommand(e,(function(e){for(var n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return(n=e.get(ua)).executeCommand.apply(n,aa([t],i))}))},e.prototype.getCommand=function(e){var t=this._commands.get(e);if(t&&!t.isEmpty())return t.iterator().next().value},e.prototype.getCommands=function(){for(var e=new Map,t=0,n=Qs(this._commands);t<n.length;t++){var i=n[t],o=this.getCommand(i);o&&e.set(i,o)}return e},e}()),ca=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{u(i.next(e))}catch(t){r(t)}}function a(e){try{u(i["throw"](e))}catch(t){r(t)}}function u(e){e.done?n(e.value):o(e.value).then(s,a)}u((i=i.apply(e,t||[])).next())}))},ha=function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return u([e,t])}}function u(r){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(o=2&r[0]?i["return"]:r[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(a){r=[6,a],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}},da=Nn("openerService");Object.freeze({_serviceBrand:void 0,registerOpener:function(){return Me.None},registerValidator:function(){return Me.None},registerExternalUriResolver:function(){return Me.None},setExternalOpener:function(){},open:function(){return ca(this,void 0,void 0,(function(){return ha(this,(function(e){return[2,!1]}))}))},resolveExternalUri:function(e){return ca(this,void 0,void 0,(function(){return ha(this,(function(t){return[2,{resolved:e,dispose:function(){}}]}))}))}});function fa(e,t){return wt.isUri(e)?Dr(e.scheme,t):xr(e,t+":")}(function(e){e[e["API"]=0]="API",e[e["USER"]=1]="USER"})(Js||(Js={}));var pa=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},ga=function(e,t){return function(n,i){t(n,i,e)}},ma=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{u(i.next(e))}catch(t){r(t)}}function a(e){try{u(i["throw"](e))}catch(t){r(t)}}function u(e){e.done?n(e.value):o(e.value).then(s,a)}u((i=i.apply(e,t||[])).next())}))},va=function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return u([e,t])}}function u(r){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(o=2&r[0]?i["return"]:r[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(a){r=[6,a],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}},_a=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i},ya=function(){function e(e){this._commandService=e}return e.prototype.open=function(e){return ma(this,void 0,void 0,(function(){var t,n;return va(this,(function(i){switch(i.label){case 0:if(!fa(e,vi.command))return[2,!1];if("string"===typeof e&&(e=wt.parse(e)),!la.getCommand(e.path))throw new Error("command '"+e.path+"' NOT known");t=[];try{t=ur(decodeURIComponent(e.query))}catch(o){try{t=ur(e.query)}catch(r){}}return Array.isArray(t)||(t=[t]),[4,(n=this._commandService).executeCommand.apply(n,_a([e.path],t))];case 1:return i.sent(),[2,!0]}}))}))},e=pa([ga(0,ua)],e),e}(),ba=function(){function e(e){this._editorService=e}return e.prototype.open=function(e,t){return ma(this,void 0,void 0,(function(){var n,i;return va(this,(function(o){switch(o.label){case 0:return"string"===typeof e&&(e=wt.parse(e)),n=void 0,i=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment),i&&(n={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1},e=e.with({fragment:""})),e.scheme===vi.file&&(e=Ts(e)),[4,this._editorService.openCodeEditor({resource:e,options:{selection:n,context:(null===t||void 0===t?void 0:t.fromUserGesture)?Js.USER:Js.API}},this._editorService.getFocusedCodeEditor(),null===t||void 0===t?void 0:t.openToSide)];case 1:return o.sent(),[2,!0]}}))}))},e=pa([ga(0,En)],e),e}(),Ca=function(){function e(e,t){var n=this;this._openers=new He,this._validators=new He,this._resolvers=new He,this._externalOpener={openExternal:function(e){return or(e),Promise.resolve(!0)}},this._openers.push({open:function(e,t){return ma(n,void 0,void 0,(function(){return va(this,(function(n){switch(n.label){case 0:return(null===t||void 0===t?void 0:t.openExternal)||fa(e,vi.mailto)||fa(e,vi.http)||fa(e,vi.https)?[4,this._doOpenExternal(e,t)]:[3,2];case 1:return n.sent(),[2,!0];case 2:return[2,!1]}}))}))}}),this._openers.push(new ya(t)),this._openers.push(new ba(e))}return e.prototype.open=function(e,t){return ma(this,void 0,void 0,(function(){var n,i,o,r,s,a,u;return va(this,(function(l){switch(l.label){case 0:n=0,i=this._validators.toArray(),l.label=1;case 1:return n<i.length?(o=i[n],[4,o.shouldOpen(e)]):[3,4];case 2:if(!l.sent())return[2,!1];l.label=3;case 3:return n++,[3,1];case 4:r=0,s=this._openers.toArray(),l.label=5;case 5:return r<s.length?(a=s[r],[4,a.open(e,t)]):[3,8];case 6:if(u=l.sent(),u)return[2,!0];l.label=7;case 7:return r++,[3,5];case 8:return[2,!1]}}))}))},e.prototype.resolveExternalUri=function(e,t){return ma(this,void 0,void 0,(function(){var n,i,o,r;return va(this,(function(s){switch(s.label){case 0:n=0,i=this._resolvers.toArray(),s.label=1;case 1:return n<i.length?(o=i[n],[4,o.resolveExternalUri(e,t)]):[3,4];case 2:if(r=s.sent(),r)return[2,r];s.label=3;case 3:return n++,[3,1];case 4:return[2,{resolved:e,dispose:function(){}}]}}))}))},e.prototype._doOpenExternal=function(e,t){return ma(this,void 0,void 0,(function(){var n,i;return va(this,(function(o){switch(o.label){case 0:return n="string"===typeof e?wt.parse(e):e,[4,this.resolveExternalUri(n,t)];case 1:return i=o.sent().resolved,"string"===typeof e&&n.toString()===i.toString()?[2,this._externalOpener.openExternal(e)]:[2,this._externalOpener.openExternal(encodeURI(i.toString(!0)))]}}))}))},e.prototype.dispose=function(){this._validators.clear()},e=pa([ga(0,En),ga(1,ua)],e),e}();function wa(e,t){if(!e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}function Sa(e){if(!e||"object"!==typeof e)return e;if(e instanceof RegExp)return e;var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((function(n){e[n]&&"object"===typeof e[n]?t[n]=Sa(e[n]):t[n]=e[n]})),t}function La(e){if(!e||"object"!==typeof e)return e;var t=[e];while(t.length>0){var n=t.shift();for(var i in Object.freeze(n),n)if(Na.call(n,i)){var o=n[i];"object"!==typeof o||Object.isFrozen(o)||t.push(o)}}return e}var Na=Object.prototype.hasOwnProperty;function Da(e,t,n){return void 0===n&&(n=!0),Ps(e)?(Ps(t)&&Object.keys(t).forEach((function(i){i in e?n&&(Ps(e[i])&&Ps(t[i])?Da(e[i],t[i],n):e[i]=t[i]):e[i]=t[i]})),e):t}function Ea(e,t,n){var i=t(e);return"undefined"===typeof i?n:i}var xa=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ka={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},Oa=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this)||this;return i._onDidUpdate=i._register(new qe),i._editor=t,i._options=Da(n,ka,!1),i.disposed=!1,i.nextIdx=-1,i.ranges=[],i.ignoreSelectionChange=!1,i.revealFirst=Boolean(i._options.alwaysRevealFirst),i._register(i._editor.onDidDispose((function(){return i.dispose()}))),i._register(i._editor.onDidUpdateDiff((function(){return i._onDiffUpdated()}))),i._options.followsCaret&&i._register(i._editor.getModifiedEditor().onDidChangeCursorPosition((function(e){i.ignoreSelectionChange||(i.nextIdx=-1)}))),i._options.alwaysRevealFirst&&i._register(i._editor.getModifiedEditor().onDidChangeModel((function(e){i.revealFirst=!0}))),i._init(),i}return xa(t,e),t.prototype._init=function(){this._editor.getLineChanges()},t.prototype._onDiffUpdated=function(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))},t.prototype._compute=function(e){var t=this;this.ranges=[],e&&e.forEach((function(e){!t._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((function(e){t.ranges.push({rhs:!0,range:new pn(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):t.ranges.push({rhs:!0,range:new pn(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})})),this.ranges.sort((function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0})),this._onDidUpdate.fire(this)},t.prototype._initIdx=function(e){var t=!1,n=this._editor.getPosition();if(n){for(var i=0,o=this.ranges.length;i<o&&!t;i++){var r=this.ranges[i].range;n.isBeforeOrEqual(r.getStartPosition())&&(this.nextIdx=i+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}else this.nextIdx=0},t.prototype._move=function(e,t){if(wa(!this.disposed,"Illegal State - diff navigator has been disposed"),this.canNavigate()){-1===this.nextIdx?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var n=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var i=n.range.getStartPosition();this._editor.setPosition(i),this._editor.revealPositionInCenter(i,t)}finally{this.ignoreSelectionChange=!1}}},t.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0},t.prototype.next=function(e){void 0===e&&(e=0),this._move(!0,e)},t.prototype.previous=function(e){void 0===e&&(e=0),this._move(!1,e)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.ranges=[],this.disposed=!0},t}(Me),Ta=new(function(){function e(){this._zoomLevel=0,this._onDidChangeZoomLevel=new qe,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.setZoomLevel=function(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))},e}()),Ma=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ia=s["e"]?1.5:1.35,Aa=8,Pa=function(){function e(e){this.zoomLevel=e.zoomLevel,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}return e.createFromValidatedSettings=function(t,n,i){var o=t.get(33),r=t.get(37),s=t.get(36),a=t.get(35),u=t.get(49),l=t.get(46);return e._create(o,r,s,a,u,l,n,i)},e._create=function(t,n,i,o,r,s,a,u){0===r?r=Math.round(Ia*i):r<Aa&&(r=Aa);var l=1+(u?0:.1*Ta.getZoomLevel());return i*=l,r*=l,new e({zoomLevel:a,fontFamily:t,fontWeight:n,fontSize:i,fontFeatureSettings:o,lineHeight:r,letterSpacing:s})},e.prototype.getId=function(){return this.zoomLevel+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing},e.prototype.getMassagedFontFamily=function(){return/[,"']/.test(this.fontFamily)?this.fontFamily:/[+ ]/.test(this.fontFamily)?'"'+this.fontFamily+'"':this.fontFamily},e}(),Ra=function(e){function t(t,n){var i=e.call(this,t)||this;return i.isTrusted=n,i.isMonospace=t.isMonospace,i.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,i.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,i.canUseHalfwidthRightwardsArrow=t.canUseHalfwidthRightwardsArrow,i.spaceWidth=t.spaceWidth,i.middotWidth=t.middotWidth,i.maxDigitWidth=t.maxDigitWidth,i}return Ma(t,e),t.prototype.equals=function(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.maxDigitWidth===e.maxDigitWidth},t}(Pa);function Fa(e){return e&&"string"===typeof e.id}var Wa,Va,Ba={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},Ha={ExecuteCommand:"executeCommand",ExecuteCommands:"executeCommands",Type:"type",ReplacePreviousChar:"replacePreviousChar",CompositionStart:"compositionStart",CompositionEnd:"compositionEnd",Paste:"paste",Cut:"cut",Undo:"undo",Redo:"redo"};(function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"})(Wa||(Wa={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(Va||(Va={}));var za=function(){function e(e){this.tabSize=Math.max(1,0|e.tabSize),this.indentSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace)}return e.prototype.equals=function(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace},e.prototype.createChangeEvent=function(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}},e}(),ja=function(){function e(e,t){this.range=e,this.matches=t}return e}(),Ua=function(){function e(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}return e}(),Ka="**",qa="/",Ga="[/\\\\]",Ya="[^/\\\\]",Za=/\//g;function Xa(e){switch(e){case 0:return"";case 1:return Ya+"*?";default:return"(?:"+Ga+"|"+Ya+"+"+Ga+"|"+Ga+Ya+"+)*?"}}function $a(e,t){if(!e)return[];for(var n=[],i=!1,o=!1,r="",s=0,a=e;s<a.length;s++){var u=a[s];switch(u){case t:if(!i&&!o){n.push(r),r="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":o=!0;break;case"]":o=!1;break}r+=u}return r&&n.push(r),n}function Qa(e){if(!e)return"";var t="",n=$a(e,qa);if(n.every((function(e){return e===Ka})))t=".*";else{var i=!1;n.forEach((function(e,o){if(e!==Ka){for(var r=!1,s="",a=!1,u="",l=0,c=e;l<c.length;l++){var h=c[l];if("}"!==h&&r)s+=h;else if(!a||"]"===h&&u)switch(h){case"{":r=!0;continue;case"[":a=!0;continue;case"}":var d=$a(s,","),f="(?:"+d.map((function(e){return Qa(e)})).join("|")+")";t+=f,r=!1,s="";break;case"]":t+="["+u+"]",a=!1,u="";break;case"?":t+=Ya;continue;case"*":t+=Xa(1);continue;default:t+=pr(h)}else{var p=void 0;p="-"===h?h:"^"!==h&&"!"!==h||u?h===qa?"":pr(h):"^",u+=p}}o<n.length-1&&(n[o+1]!==Ka||o+2<n.length)&&(t+=Ga),i=!1}else i||(t+=Xa(2),i=!0)}))}return t}var Ja=/^\*\*\/\*\.[\w\.-]+$/,eu=/^\*\*\/([\w\.-]+)\/?$/,tu=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,nu=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,iu=/^\*\*((\/[\w\.-]+)+)\/?$/,ou=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,ru=new sa(1e4),su=function(){return!1},au=function(){return null};function uu(e,t){if(!e)return au;var n;n="string"!==typeof e?e.pattern:e,n=n.trim();var i,o=n+"_"+!!t.trimForExclusions,r=ru.get(o);if(r)return lu(r,e);if(Ja.test(n)){var s=n.substr(4);r=function(e,t){return"string"===typeof e&&mr(e,s)?n:null}}else r=(i=eu.exec(cu(n,t)))?hu(i[1],n):(t.trimForExclusions?nu:tu).test(n)?du(n,t):(i=iu.exec(cu(n,t)))?fu(i[1].substr(1),n,!0):(i=ou.exec(cu(n,t)))?fu(i[1],n,!1):pu(n);return ru.set(o,r),lu(r,e)}function lu(e,t){return"string"===typeof t?e:function(n,i){return Ds(n,t.base)?e(Cs(t.base,n),i):null}}function cu(e,t){return t.trimForExclusions&&mr(e,"/**")?e.substr(0,e.length-2):e}function hu(e,t){var n="/"+e,i="\\"+e,o=function(o,r){return"string"!==typeof o?null:r?r===e?t:null:o===e||mr(o,n)||mr(o,i)?t:null},r=[e];return o.basenames=r,o.patterns=[t],o.allBasenames=r,o}function du(e,t){var n=bu(e.slice(1,-1).split(",").map((function(e){return uu(e,t)})).filter((function(e){return e!==au})),e),i=n.length;if(!i)return au;if(1===i)return n[0];var o=function(t,i){for(var o=0,r=n.length;o<r;o++)if(n[o](t,i))return e;return null},r=Ii(n,(function(e){return!!e.allBasenames}));r&&(o.allBasenames=r.allBasenames);var s=n.reduce((function(e,t){return t.allPaths?e.concat(t.allPaths):e}),[]);return s.length&&(o.allPaths=s),o}function fu(e,t,n){var i=Ns!==_s.sep?e.replace(Za,Ns):e,o=Ns+i,r=n?function(e,n){return"string"!==typeof e||e!==i&&!mr(e,o)?null:t}:function(e,n){return"string"===typeof e&&e===i?t:null};return r.allPaths=[(n?"*/":"./")+e],r}function pu(e){try{var t=new RegExp("^"+Qa(e)+"$");return function(n,i){return t.lastIndex=0,"string"===typeof n&&t.test(n)?e:null}}catch(n){return au}}function gu(e,t,n){return!(!e||"string"!==typeof t)&&mu(e)(t,void 0,n)}function mu(e,t){if(void 0===t&&(t={}),!e)return su;if("string"===typeof e||vu(e)){var n=uu(e,t);if(n===au)return su;var i=function(e,t){return!!n(e,t)};return n.allBasenames&&(i.allBasenames=n.allBasenames),n.allPaths&&(i.allPaths=n.allPaths),i}return _u(e,t)}function vu(e){var t=e;return t&&"string"===typeof t.base&&"string"===typeof t.pattern}function _u(e,t){var n=bu(Object.getOwnPropertyNames(e).map((function(n){return yu(n,e[n],t)})).filter((function(e){return e!==au}))),i=n.length;if(!i)return au;if(!n.some((function(e){return!!e.requiresSiblings}))){if(1===i)return n[0];var o=function(e,t){for(var i=0,o=n.length;i<o;i++){var r=n[i](e,t);if(r)return r}return null},r=Ii(n,(function(e){return!!e.allBasenames}));r&&(o.allBasenames=r.allBasenames);var s=n.reduce((function(e,t){return t.allPaths?e.concat(t.allPaths):e}),[]);return s.length&&(o.allPaths=s),o}var a=function(e,t,i){for(var o=void 0,r=0,s=n.length;r<s;r++){var a=n[r];a.requiresSiblings&&i&&(t||(t=Ss(e)),o||(o=t.substr(0,t.length-Ls(e).length)));var u=a(e,t,o,i);if(u)return u}return null},u=Ii(n,(function(e){return!!e.allBasenames}));u&&(a.allBasenames=u.allBasenames);var l=n.reduce((function(e,t){return t.allPaths?e.concat(t.allPaths):e}),[]);return l.length&&(a.allPaths=l),a}function yu(e,t,n){if(!1===t)return au;var i=uu(e,n);if(i===au)return au;if("boolean"===typeof t)return i;if(t){var o=t.when;if("string"===typeof o){var r=function(t,n,r,s){if(!s||!i(t,n))return null;var a=o.replace("$(basename)",r),u=s(a);return ui(u)?u.then((function(t){return t?e:null})):u?e:null};return r.requiresSiblings=!0,r}}return i}function bu(e,t){var n=e.filter((function(e){return!!e.basenames}));if(n.length<2)return e;var i,o=n.reduce((function(e,t){var n=t.basenames;return n?e.concat(n):e}),[]);if(t){i=[];for(var r=0,s=o.length;r<s;r++)i.push(t)}else i=n.reduce((function(e,t){var n=t.patterns;return n?e.concat(n):e}),[]);var a=function(e,t){if("string"!==typeof e)return null;if(!t){var n=void 0;for(n=e.length;n>0;n--){var r=e.charCodeAt(n-1);if(47===r||92===r)break}t=e.substr(n)}var s=o.indexOf(t);return-1!==s?i[s]:null};a.basenames=o,a.patterns=i,a.allBasenames=o;var u=e.filter((function(e){return!e.basenames}));return u.push(a),u}function Cu(e,t,n,i){if(Array.isArray(e)){for(var o=0,r=0,s=e;r<s.length;r++){var a=s[r],u=Cu(a,t,n,i);if(10===u)return u;u>o&&(o=u)}return o}if("string"===typeof e)return i?"*"===e?5:e===n?10:0:0;if(e){var l=e.language,c=e.pattern,h=e.scheme,d=e.hasAccessToAllModels;if(!i&&!d)return 0;o=0;if(h)if(h===t.scheme)o=10;else{if("*"!==h)return 0;o=5}if(l)if(l===n)o=10;else{if("*"!==l)return 0;o=Math.max(o,5)}if(c){if(c!==t.fsPath&&!gu(c,t.fsPath))return 0;o=10}return o}return 0}var wu=Nn("modelService");function Su(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}function Lu(e){return"string"!==typeof e&&(Array.isArray(e)?e.every(Lu):!!e.exclusive)}var Nu,Du,Eu,xu=function(){function e(){this._clock=0,this._entries=[],this._onDidChange=new qe}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this,i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),ke((function(){if(i){var e=n._entries.indexOf(i);e>=0&&(n._entries.splice(e,1),n._lastCandidate=void 0,n._onDidChange.fire(n._entries.length),i=void 0)}}))},e.prototype.has=function(e){return this.all(e).length>0},e.prototype.all=function(e){if(!e)return[];this._updateScores(e);for(var t=[],n=0,i=this._entries;n<i.length;n++){var o=i[n];o._score>0&&t.push(o.provider)}return t},e.prototype.ordered=function(e){var t=[];return this._orderedForEach(e,(function(e){return t.push(e.provider)})),t},e.prototype.orderedGroups=function(e){var t,n,i=[];return this._orderedForEach(e,(function(e){t&&n===e._score?t.push(e.provider):(n=e._score,t=[e.provider],i.push(t))})),i},e.prototype._orderedForEach=function(e,t){if(e){this._updateScores(e);for(var n=0,i=this._entries;n<i.length;n++){var o=i[n];o._score>0&&t(o)}}},e.prototype._updateScores=function(t){var n={uri:t.uri.toString(),language:t.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==n.language||this._lastCandidate.uri!==n.uri){this._lastCandidate=n;for(var i=0,o=this._entries;i<o.length;i++){var r=o[i];if(r._score=Cu(r.selector,t.uri,t.getLanguageIdentifier().language,Su(t)),Lu(r.selector)&&r._score>0){for(var s=0,a=this._entries;s<a.length;s++){var u=a[s];u._score=0}r._score=1e3;break}}this._entries.sort(e._compareByScoreAndTime)}},e._compareByScoreAndTime=function(e,t){return e._score<t._score?1:e._score>t._score?-1:e._time<t._time?1:e._time>t._time?-1:0},e}(),ku=function(){function e(){this._map=new Map,this._promises=new Map,this._onDidChange=new qe,this.onDidChange=this._onDidChange.event,this._colorMap=null}return e.prototype.fire=function(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})},e.prototype.register=function(e,t){var n=this;return this._map.set(e,t),this.fire([e]),ke((function(){n._map.get(e)===t&&(n._map.delete(e),n.fire([e]))}))},e.prototype.registerPromise=function(e,t){var n=this,i=null,o=!1;return this._promises.set(e,t.then((function(t){n._promises.delete(e),!o&&t&&(i=n.register(e,t))}))),ke((function(){o=!0,i&&i.dispose()}))},e.prototype.getPromise=function(e){var t=this,n=this.get(e);if(n)return Promise.resolve(n);var i=this._promises.get(e);return i?i.then((function(n){return t.get(e)})):null},e.prototype.get=function(e){return Zs(this._map.get(e))},e.prototype.setColorMap=function(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Qs(this._map),changedColorMap:!0})},e.prototype.getColorMap=function(){return this._colorMap},e.prototype.getDefaultBackground=function(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null},e}(),Ou=function(){function e(e,t){this.language=e,this.id=t}return e}(),Tu=function(){function e(){}return e.getLanguageId=function(e){return(255&e)>>>0},e.getTokenType=function(e){return(1792&e)>>>8},e.getFontStyle=function(e){return(14336&e)>>>11},e.getForeground=function(e){return(8372224&e)>>>14},e.getBackground=function(e){return(4286578688&e)>>>23},e.getClassNameFromMetadata=function(e){var t=this.getForeground(e),n="mtk"+t,i=this.getFontStyle(e);return 1&i&&(n+=" mtki"),2&i&&(n+=" mtkb"),4&i&&(n+=" mtku"),n},e.getInlineStyleFromMetadata=function(e,t){var n=this.getForeground(e),i=this.getFontStyle(e),o="color: "+t[n]+";";return 1&i&&(o+="font-style: italic;"),2&i&&(o+="font-weight: bold;"),4&i&&(o+="text-decoration: underline;"),o},e}();(function(){var e=Object.create(null);e[0]="method",e[1]="function",e[2]="constructor",e[3]="field",e[4]="variable",e[5]="class",e[6]="struct",e[7]="interface",e[8]="module",e[9]="property",e[10]="event",e[11]="operator",e[12]="unit",e[13]="value",e[14]="constant",e[15]="enum",e[16]="enum-member",e[17]="keyword",e[25]="snippet",e[18]="text",e[19]="color",e[20]="file",e[21]="reference",e[22]="customcolor",e[23]="folder",e[24]="type-parameter"})(),function(){var e=Object.create(null);e["method"]=0,e["function"]=1,e["constructor"]=2,e["field"]=3,e["variable"]=4,e["class"]=5,e["struct"]=6,e["interface"]=7,e["module"]=8,e["property"]=9,e["event"]=10,e["operator"]=11,e["unit"]=12,e["value"]=13,e["constant"]=14,e["enum"]=15,e["enum-member"]=16,e["enumMember"]=16,e["keyword"]=17,e["snippet"]=25,e["text"]=18,e["color"]=19,e["file"]=20,e["reference"]=21,e["customcolor"]=22,e["folder"]=23,e["type-parameter"]=24,e["typeParameter"]=24}();(function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"})(Nu||(Nu={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(Du||(Du={})),function(e){var t=new Map;t.set("file",0),t.set("module",1),t.set("namespace",2),t.set("package",3),t.set("class",4),t.set("method",5),t.set("property",6),t.set("field",7),t.set("constructor",8),t.set("enum",9),t.set("interface",10),t.set("function",11),t.set("variable",12),t.set("constant",13),t.set("string",14),t.set("number",15),t.set("boolean",16),t.set("array",17),t.set("object",18),t.set("key",19),t.set("null",20),t.set("enum-member",21),t.set("struct",22),t.set("event",23),t.set("operator",24),t.set("type-parameter",25);var n=new Map;function i(e){return t.get(e)}function o(e){return n.get(e)}function r(e,t){return"codicon "+(t?"inline":"block")+" codicon-symbol-"+(n.get(e)||"property")}n.set(0,"file"),n.set(1,"module"),n.set(2,"namespace"),n.set(3,"package"),n.set(4,"class"),n.set(5,"method"),n.set(6,"property"),n.set(7,"field"),n.set(8,"constructor"),n.set(9,"enum"),n.set(10,"interface"),n.set(11,"function"),n.set(12,"variable"),n.set(13,"constant"),n.set(14,"string"),n.set(15,"number"),n.set(16,"boolean"),n.set(17,"array"),n.set(18,"object"),n.set(19,"key"),n.set(20,"null"),n.set(21,"enum-member"),n.set(22,"struct"),n.set(23,"event"),n.set(24,"operator"),n.set(25,"type-parameter"),e.fromString=i,e.toString=o,e.toCssClassName=r}(Eu||(Eu={}));var Mu,Iu,Au=function(){function e(e){this.value=e}return e.Comment=new e("comment"),e.Imports=new e("imports"),e.Region=new e("region"),e}();(function(e){function t(e){return Ps(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}e.is=t})(Mu||(Mu={})),function(e){function t(e){return Ps(e)&&wt.isUri(e.resource)&&Ps(e.edit)}e.is=t}(Iu||(Iu={}));var Pu=new xu,Ru=new xu,Fu=new xu,Wu=new xu,Vu=new xu,Bu=new xu,Hu=new xu,zu=new xu,ju=new xu,Uu=new xu,Ku=new xu,qu=new xu,Gu=new xu,Yu=new xu,Zu=new xu,Xu=new xu,$u=new xu,Qu=new xu,Ju=new xu,el=new xu,tl=new xu,nl=new xu,il=new ku,ol=function(){function e(){}return e.prototype.clone=function(){return this},e.prototype.equals=function(e){return this===e},e}(),rl=new ol,sl="vs.editor.nullMode",al=new Ou(sl,0);function ul(e,t,n,i){return new _n([new vn(i,"",e)],n)}function ll(e,t,n,i){var o=new Uint32Array(2);return o[0]=i,o[1]=(16384|e<<0|2<<23)>>>0,new yn(o,null===n?rl:n)}var cl="editorWorkerService",hl=Nn(cl),dl=Nn("textModelService"),fl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),pl="$initialize",gl=!1;function ml(e){s["g"]&&(gl||(gl=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq")),console.warn(e.message))}var vl=function(){function e(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}return e.prototype.setWorkerId=function(e){this._workerId=e},e.prototype.sendMessage=function(e,t){var n=this,i=String(++this._lastSentReq);return new Promise((function(o,r){n._pendingReplies[i]={resolve:o,reject:r},n._send({vsWorker:n._workerId,req:i,method:e,args:t})}))},e.prototype.handleMessage=function(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))},e.prototype._handleMessage=function(e){var t=this;if(e.seq){var n=e;if(!this._pendingReplies[n.seq])return void console.warn("Got reply to unknown seq");var i=this._pendingReplies[n.seq];if(delete this._pendingReplies[n.seq],n.err){var o=n.err;return n.err.$isError&&(o=new Error,o.name=n.err.name,o.message=n.err.message,o.stack=n.err.stack),void i.reject(o)}i.resolve(n.res)}else{var r=e,s=r.req,a=this._handler.handleMessage(r.method,r.args);a.then((function(e){t._send({vsWorker:t._workerId,seq:s,res:e,err:void 0})}),(function(e){e.detail instanceof Error&&(e.detail=me(e.detail)),t._send({vsWorker:t._workerId,seq:s,res:void 0,err:me(e)})}))}},e.prototype._send=function(e){var t=[];if(e.req)for(var n=e,i=0;i<n.args.length;i++)n.args[i]instanceof ArrayBuffer&&t.push(n.args[i]);else{n=e;n.res instanceof ArrayBuffer&&t.push(n.res)}this._handler.sendMessage(e,t)},e}(),_l=function(e){function t(t,n,i){var o=e.call(this)||this,r=null;o._worker=o._register(t.create("vs/base/common/worker/simpleWorker",(function(e){o._protocol.handleMessage(e)}),(function(e){r&&r(e)}))),o._protocol=new vl({sendMessage:function(e,t){o._worker.postMessage(e,t)},handleMessage:function(e,t){if("function"!==typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(n){return Promise.reject(n)}}}),o._protocol.setWorkerId(o._worker.getId());var s=null;"undefined"!==typeof self.require&&"function"===typeof self.require.getConfig?s=self.require.getConfig():"undefined"!==typeof self.requirejs&&(s=self.requirejs.s.contexts._.config);var a=qs(i);o._onModuleLoaded=o._protocol.sendMessage(pl,[o._worker.getId(),JSON.parse(JSON.stringify(s)),n,a]);var u=function(e,t){return o._request(e,t)};return o._lazyProxy=new Promise((function(e,t){r=t,o._onModuleLoaded.then((function(t){e(Gs(t,u))}),(function(e){t(e),o._onError("Worker failed to load "+n,e)}))})),o}return fl(t,e),t.prototype.getProxyObject=function(){return this._lazyProxy},t.prototype._request=function(e,t){var n=this;return new Promise((function(i,o){n._onModuleLoaded.then((function(){n._protocol.sendMessage(e,t).then(i,o)}),o)}))},t.prototype._onError=function(e,t){console.error(e),console.info(t)},t}(Me);(function(){function e(e,t){var n=this;this._requestHandlerFactory=t,this._requestHandler=null,this._protocol=new vl({sendMessage:function(t,n){e(t,n)},handleMessage:function(e,t){return n._handleMessage(e,t)}})}e.prototype.onmessage=function(e){this._protocol.handleMessage(e)},e.prototype._handleMessage=function(e,t){if(e===pl)return this.initialize(t[0],t[1],t[2],t[3]);if(!this._requestHandler||"function"!==typeof this._requestHandler[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._requestHandler[e].apply(this._requestHandler,t))}catch(n){return Promise.reject(n)}},e.prototype.initialize=function(e,t,n,i){var o=this;this._protocol.setWorkerId(e);var r=function(e,t){return o._protocol.sendMessage(e,t)},s=Gs(i,r);return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(s),Promise.resolve(qs(this._requestHandler))):(t&&("undefined"!==typeof t.baseUrl&&delete t["baseUrl"],"undefined"!==typeof t.paths&&"undefined"!==typeof t.paths.vs&&delete t.paths["vs"],t.catchError=!0,self.require.config(t)),new Promise((function(e,t){self.require([n],(function(n){o._requestHandler=n.create(s),o._requestHandler?e(qs(o._requestHandler)):t(new Error("No RequestHandler!"))}),t)})))}})();function yl(e,t){if(s["b"].MonacoEnvironment){if("function"===typeof s["b"].MonacoEnvironment.getWorker)return s["b"].MonacoEnvironment.getWorker(e,t);if("function"===typeof s["b"].MonacoEnvironment.getWorkerUrl)return new Worker(s["b"].MonacoEnvironment.getWorkerUrl(e,t))}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function bl(e){return"function"===typeof e.then}var Cl,wl=function(){function e(e,t,n,i,o){this.id=t;var r=yl("workerMain.js",n);bl(r)?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(e,[]),this.worker.then((function(e){e.onmessage=function(e){i(e.data)},e.onmessageerror=o,"function"===typeof e.addEventListener&&e.addEventListener("error",o)}))}return e.prototype.getId=function(){return this.id},e.prototype.postMessage=function(e,t){this.worker&&this.worker.then((function(n){return n.postMessage(e,t)}))},e.prototype.dispose=function(){this.worker&&this.worker.then((function(e){return e.terminate()})),this.worker=null},e}(),Sl=function(){function e(e){this._label=e,this._webWorkerFailedBeforeError=!1}return e.prototype.create=function(t,n,i){var o=this,r=++e.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new wl(t,r,this._label||"anonymous"+r,n,(function(e){ml(e),o._webWorkerFailedBeforeError=e,i(e)}))},e.LAST_WORKER_ID=0,e}();(function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"})(Cl||(Cl={}));var Ll=function(){function e(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(var t=0,n=e.notIn.length;t<n;t++){var i=e.notIn[t];switch(i){case"string":this._standardTokenMask|=2;break;case"comment":this._standardTokenMask|=1;break;case"regex":this._standardTokenMask|=4;break}}}return e.prototype.isOK=function(e){return 0===(this._standardTokenMask&e)},e}();function Nl(e,t){var n=e.getCount(),i=e.findTokenIndexAtOffset(t),o=e.getLanguageId(i),r=i;while(r+1<n&&e.getLanguageId(r+1)===o)r++;var s=i;while(s>0&&e.getLanguageId(s-1)===o)s--;return new Dl(e,o,s,r+1,e.getStartOffset(s),e.getEndOffset(r))}var Dl=function(){function e(e,t,n,i,o,r){this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=o,this._lastCharOffset=r}return e.prototype.getLineContent=function(){var e=this._actual.getLineContent();return e.substring(this.firstCharOffset,this._lastCharOffset)},e.prototype.getActualLineContentBefore=function(e){var t=this._actual.getLineContent();return t.substring(0,this.firstCharOffset+e)},e.prototype.getTokenCount=function(){return this._lastTokenIndex-this._firstTokenIndex},e.prototype.findTokenIndexAtOffset=function(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex},e.prototype.getStandardTokenType=function(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)},e}();function El(e){return 0!==(7&e)}var xl=function(){function e(t){if(t.autoClosingPairs?this._autoClosingPairs=t.autoClosingPairs.map((function(e){return new Ll(e)})):t.brackets?this._autoClosingPairs=t.brackets.map((function(e){return new Ll({open:e[0],close:e[1]})})):this._autoClosingPairs=[],t.__electricCharacterSupport&&t.__electricCharacterSupport.docComment){var n=t.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new Ll({open:n.open,close:n.close||""}))}this._autoCloseBefore="string"===typeof t.autoCloseBefore?t.autoCloseBefore:e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=t.surroundingPairs||this._autoClosingPairs}return e.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs},e.prototype.getAutoCloseBeforeSet=function(){return this._autoCloseBefore},e.shouldAutoClosePair=function(e,t,n){if(0===t.getTokenCount())return!0;var i=t.findTokenIndexAtOffset(n-2),o=t.getStandardTokenType(i);return e.isOK(o)},e.prototype.getSurroundingPairs=function(){return this._surroundingPairs},e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t",e}(),kl=function(){function e(t,n,i,o,r,s){this.languageIdentifier=t,this.index=n,this.open=i,this.close=o,this.forwardRegex=r,this.reversedRegex=s,this._openSet=e._toSet(this.open),this._closeSet=e._toSet(this.close)}return e.prototype.isOpen=function(e){return this._openSet.has(e)},e.prototype.isClose=function(e){return this._closeSet.has(e)},e._toSet=function(e){for(var t=new Set,n=0,i=e;n<i.length;n++){var o=i[n];t.add(o)}return t},e}();function Ol(e){var t=e.length;e=e.map((function(e){return[e[0].toLowerCase(),e[1].toLowerCase()]}));for(var n=[],i=0;i<t;i++)n[i]=i;var o=function(e,t){var n=e[0],i=e[1],o=t[0],r=t[1];return n===o||n===r||i===o||i===r},r=function(e,i){for(var o=Math.min(e,i),r=Math.max(e,i),s=0;s<t;s++)n[s]===r&&(n[s]=o)};for(i=0;i<t;i++)for(var s=e[i],a=i+1;a<t;a++){var u=e[a];o(s,u)&&r(n[i],n[a])}for(var l=[],c=0;c<t;c++){var h=[],d=[];for(i=0;i<t;i++)if(n[i]===c){var f=e[i],p=f[0],g=f[1];h.push(p),d.push(g)}h.length>0&&l.push({open:h,close:d})}return l}var Tl=function(){function e(e,t){var n=Ol(t);this.brackets=n.map((function(t,i){return new kl(e,i,t.open,t.close,Pl(t.open,t.close,n,i),Rl(t.open,t.close,n,i))})),this.forwardRegex=Fl(this.brackets),this.reversedRegex=Wl(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(var i=0,o=this.brackets;i<o.length;i++){for(var r=o[i],s=0,a=r.open;s<a.length;s++){var u=a[s];this.textIsBracket[u]=r,this.textIsOpenBracket[u]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,u.length)}for(var l=0,c=r.close;l<c.length;l++){var h=c[l];this.textIsBracket[h]=r,this.textIsOpenBracket[h]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,h.length)}}}return e}();function Ml(e,t,n,i){for(var o=0,r=t.length;o<r;o++)if(o!==n){for(var s=t[o],a=0,u=s.open;a<u.length;a++){var l=u[a];l.indexOf(e)>=0&&i.push(l)}for(var c=0,h=s.close;c<h.length;c++){var d=h[c];d.indexOf(e)>=0&&i.push(d)}}}function Il(e,t){return e.length-t.length}function Al(e){if(e.length<=1)return e;for(var t=[],n=new Set,i=0,o=e;i<o.length;i++){var r=o[i];n.has(r)||(t.push(r),n.add(r))}return t}function Pl(e,t,n,i){var o=[];o=o.concat(e),o=o.concat(t);for(var r=0,s=o.length;r<s;r++)Ml(o[r],n,i,o);return o=Al(o),o.sort(Il),o.reverse(),Bl(o)}function Rl(e,t,n,i){var o=[];o=o.concat(e),o=o.concat(t);for(var r=0,s=o.length;r<s;r++)Ml(o[r],n,i,o);return o=Al(o),o.sort(Il),o.reverse(),Bl(o.map(Hl))}function Fl(e){for(var t=[],n=0,i=e;n<i.length;n++){for(var o=i[n],r=0,s=o.open;r<s.length;r++){var a=s[r];t.push(a)}for(var u=0,l=o.close;u<l.length;u++){var c=l[u];t.push(c)}}return t=Al(t),Bl(t)}function Wl(e){for(var t=[],n=0,i=e;n<i.length;n++){for(var o=i[n],r=0,s=o.open;r<s.length;r++){var a=s[r];t.push(a)}for(var u=0,l=o.close;u<l.length;u++){var c=l[u];t.push(c)}}return t=Al(t),Bl(t.map(Hl))}function Vl(e){var t=/^[\w ]+$/.test(e);return e=pr(e),t?"\\b"+e+"\\b":e}function Bl(e){var t="("+e.map(Vl).join(")|(")+")";return vr(t,!0)}var Hl=function(){function e(e){for(var t="",n=e.length-1;n>=0;n--)t+=e.charAt(n);return t}var t=null,n=null;return function(i){return t!==i&&(t=i,n=e(t)),n}}(),zl=function(){function e(){}return e._findPrevBracketInText=function(e,t,n,i){var o=n.match(e);if(!o)return null;var r=n.length-(o.index||0),s=o[0].length,a=i+r;return new pn(t,a-s+1,t,a+1)},e.findPrevBracketInRange=function(e,t,n,i,o){var r=Hl(n),s=r.substring(n.length-o,n.length-i);return this._findPrevBracketInText(e,t,s,i)},e.findNextBracketInText=function(e,t,n,i){var o=n.match(e);if(!o)return null;var r=o.index||0,s=o[0].length;if(0===s)return null;var a=i+r;return new pn(t,a+1,t,a+1+s)},e.findNextBracketInRange=function(e,t,n,i,o){var r=n.substring(i,o);return this.findNextBracketInText(e,t,r,i)},e}(),jl=function(){function e(e){this._richEditBrackets=e}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,n=this._richEditBrackets.brackets;t<n.length;t++)for(var i=n[t],o=0,r=i.close;o<r.length;o++){var s=r[o],a=s.charAt(s.length-1);e.push(a)}return e=e.filter((function(e,t,n){return n.indexOf(e)===t})),e},e.prototype.onElectricCharacter=function(e,t,n){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;var i=t.findTokenIndexAtOffset(n-1);if(El(t.getStandardTokenType(i)))return null;var o=this._richEditBrackets.reversedRegex,r=t.getLineContent().substring(0,n-1)+e,s=zl.findPrevBracketInRange(o,1,r,0,r.length);if(!s)return null;var a=r.substring(s.startColumn-1,s.endColumn-1).toLowerCase(),u=this._richEditBrackets.textIsOpenBracket[a];if(u)return null;var l=t.getActualLineContentBefore(s.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null},e}(),Ul=function(){function e(e){this._indentationRules=e}return e.prototype.shouldIncrease=function(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&this._indentationRules.increaseIndentPattern.test(e))},e.prototype.shouldDecrease=function(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&this._indentationRules.decreaseIndentPattern.test(e))},e.prototype.shouldIndentNextLine=function(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&this._indentationRules.indentNextLinePattern.test(e))},e.prototype.shouldIgnore=function(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&this._indentationRules.unIndentedLinePattern.test(e))},e.prototype.getIndentMetadata=function(e){var t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t},e}(),Kl=function(){function e(t){var n=this;t=t||{},t.brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],t.brackets.forEach((function(t){var i=e._createOpenBracketRegExp(t[0]),o=e._createCloseBracketRegExp(t[1]);i&&o&&n._brackets.push({open:t[0],openRegExp:i,close:t[1],closeRegExp:o})})),this._regExpRules=t.onEnterRules||[]}return e.prototype.onEnter=function(e,t,n,i){if(e>=3)for(var o=0,r=this._regExpRules.length;o<r;o++){var s=this._regExpRules[o],a=[{reg:s.beforeText,text:n},{reg:s.afterText,text:i},{reg:s.oneLineAboveText,text:t}].every((function(e){return!e.reg||e.reg.test(e.text)}));if(a)return s.action}if(e>=2&&n.length>0&&i.length>0)for(o=0,r=this._brackets.length;o<r;o++){var u=this._brackets[o];if(u.openRegExp.test(n)&&u.closeRegExp.test(i))return{indentAction:Cl.IndentOutdent}}if(e>=2&&n.length>0)for(o=0,r=this._brackets.length;o<r;o++){u=this._brackets[o];if(u.openRegExp.test(n))return{indentAction:Cl.Indent}}return null},e._createOpenBracketRegExp=function(t){var n=pr(t);return/\B/.test(n.charAt(0))||(n="\\b"+n),n+="\\s*$",e._safeRegExp(n)},e._createCloseBracketRegExp=function(t){var n=pr(t);return/\B/.test(n.charAt(n.length-1))||(n+="\\b"),n="^\\s*"+n,e._safeRegExp(n)},e._safeRegExp=function(e){try{return new RegExp(e)}catch(t){return ge(t),null}},e}(),ql=function(){function e(t,n,i){this._languageIdentifier=t,this._brackets=null,this._electricCharacter=null;var o=null;n&&(o=n._conf),this._conf=e._mergeConf(o,i),this._onEnterSupport=this._conf.brackets||this._conf.indentationRules||this._conf.onEnterRules?new Kl(this._conf):null,this.comments=e._handleComments(this._conf),this.characterPair=new xl(this._conf),this.wordDefinition=this._conf.wordPattern||l,this.indentationRules=this._conf.indentationRules,this._conf.indentationRules?this.indentRulesSupport=new Ul(this._conf.indentationRules):this.indentRulesSupport=null,this.foldingRules=this._conf.folding||{}}return Object.defineProperty(e.prototype,"brackets",{get:function(){return!this._brackets&&this._conf.brackets&&(this._brackets=new Tl(this._languageIdentifier,this._conf.brackets)),this._brackets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"electricCharacter",{get:function(){return this._electricCharacter||(this._electricCharacter=new jl(this.brackets)),this._electricCharacter},enumerable:!0,configurable:!0}),e.prototype.onEnter=function(e,t,n,i){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,i):null},e._mergeConf=function(e,t){return{comments:e?t.comments||e.comments:t.comments,brackets:e?t.brackets||e.brackets:t.brackets,wordPattern:e?t.wordPattern||e.wordPattern:t.wordPattern,indentationRules:e?t.indentationRules||e.indentationRules:t.indentationRules,onEnterRules:e?t.onEnterRules||e.onEnterRules:t.onEnterRules,autoClosingPairs:e?t.autoClosingPairs||e.autoClosingPairs:t.autoClosingPairs,surroundingPairs:e?t.surroundingPairs||e.surroundingPairs:t.surroundingPairs,autoCloseBefore:e?t.autoCloseBefore||e.autoCloseBefore:t.autoCloseBefore,folding:e?t.folding||e.folding:t.folding,__electricCharacterSupport:e?t.__electricCharacterSupport||e.__electricCharacterSupport:t.__electricCharacterSupport}},e._handleComments=function(e){var t=e.comments;if(!t)return null;var n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){var i=t.blockComment,o=i[0],r=i[1];n.blockCommentStartToken=o,n.blockCommentEndToken=r}return n},e}(),Gl=function(){function e(e){this.languageIdentifier=e}return e}(),Yl=function(){function e(){this._entries=new Map,this._onDidChange=new qe,this.onDidChange=this._onDidChange.event}return e.prototype.register=function(e,t){var n=this,i=this._getRichEditSupport(e.id),o=new ql(e,i,t);return this._entries.set(e.id,o),this._onDidChange.fire(new Gl(e)),ke((function(){n._entries.get(e.id)===o&&(n._entries.set(e.id,i),n._onDidChange.fire(new Gl(e)))}))},e.prototype._getRichEditSupport=function(e){return this._entries.get(e)},e.prototype._getElectricCharacterSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.electricCharacter||null},e.prototype.getElectricCharacters=function(e){var t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]},e.prototype.onElectricCharacter=function(e,t,n){var i=Nl(t,n-1),o=this._getElectricCharacterSupport(i.languageId);return o?o.onElectricCharacter(e,i,n-i.firstCharOffset):null},e.prototype.getComments=function(e){var t=this._getRichEditSupport(e);return t&&t.comments||null},e.prototype._getCharacterPairSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.characterPair||null},e.prototype.getAutoClosingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getAutoClosingPairs():[]},e.prototype.getAutoCloseBeforeSet=function(e){var t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():xl.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED},e.prototype.getSurroundingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]},e.prototype.shouldAutoClosePair=function(e,t,n){var i=Nl(t,n-1);return xl.shouldAutoClosePair(e,i,n-i.firstCharOffset)},e.prototype.getWordDefinition=function(e){var t=this._getRichEditSupport(e);return c(t&&t.wordDefinition||null)},e.prototype.getFoldingRules=function(e){var t=this._getRichEditSupport(e);return t?t.foldingRules:{}},e.prototype.getIndentRulesSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.indentRulesSupport||null},e.prototype.getPrecedingValidLine=function(e,t,n){var i=e.getLanguageIdAtPosition(t,0);if(t>1){var o=void 0,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;var s=e.getLineContent(o);if(!n.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return o;r=o}}return-1},e.prototype.getInheritIndentForLine=function(e,t,n,i){if(void 0===i&&(i=!0),e<4)return null;var o=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!o)return null;if(n<=1)return{indentation:"",action:null};var r=this.getPrecedingValidLine(t,n,o);if(r<0)return null;if(r<1)return{indentation:"",action:null};var s=t.getLineContent(r);if(o.shouldIncrease(s)||o.shouldIndentNextLine(s))return{indentation:Cr(s),action:Cl.Indent,line:r};if(o.shouldDecrease(s))return{indentation:Cr(s),action:null,line:r};if(1===r)return{indentation:Cr(t.getLineContent(r)),action:null,line:r};var a=r-1,u=o.getIndentMetadata(t.getLineContent(a));if(!(3&u)&&4&u){for(var l=0,c=a-1;c>0;c--)if(!o.shouldIndentNextLine(t.getLineContent(c))){l=c;break}return{indentation:Cr(t.getLineContent(l+1)),action:null,line:l+1}}if(i)return{indentation:Cr(t.getLineContent(r)),action:null,line:r};for(c=r;c>0;c--){var h=t.getLineContent(c);if(o.shouldIncrease(h))return{indentation:Cr(h),action:Cl.Indent,line:c};if(o.shouldIndentNextLine(h)){l=0;for(var d=c-1;d>0;d--)if(!o.shouldIndentNextLine(t.getLineContent(c))){l=d;break}return{indentation:Cr(t.getLineContent(l+1)),action:null,line:l+1}}if(o.shouldDecrease(h))return{indentation:Cr(h),action:null,line:c}}return{indentation:Cr(t.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,n,i,o){if(e<4)return null;var r=this._getRichEditSupport(n);if(!r)return null;var s=this.getIndentRulesSupport(n);if(!s)return null;var a=this.getInheritIndentForLine(e,t,i),u=t.getLineContent(i);if(a){var l=a.line;if(void 0!==l){var c=r.onEnter(e,"",t.getLineContent(l),"");if(c){var h=Cr(t.getLineContent(l));return c.removeText&&(h=h.substring(0,h.length-c.removeText)),c.indentAction===Cl.Indent||c.indentAction===Cl.IndentOutdent?h=o.shiftIndent(h):c.indentAction===Cl.Outdent&&(h=o.unshiftIndent(h)),s.shouldDecrease(u)&&(h=o.unshiftIndent(h)),c.appendText&&(h+=c.appendText),Cr(h)}}return s.shouldDecrease(u)?a.action===Cl.Indent?a.indentation:o.unshiftIndent(a.indentation):a.action===Cl.Indent?o.shiftIndent(a.indentation):a.indentation}return null},e.prototype.getIndentForEnter=function(e,t,n,i){if(e<4)return null;t.forceTokenization(n.startLineNumber);var o,r,s=t.getLineTokens(n.startLineNumber),a=Nl(s,n.startColumn-1),u=a.getLineContent(),l=!1;if(a.firstCharOffset>0&&s.getLanguageId(0)!==a.languageId?(l=!0,o=u.substr(0,n.startColumn-1-a.firstCharOffset)):o=s.getLineContent().substring(0,n.startColumn-1),n.isEmpty())r=u.substr(n.startColumn-1-a.firstCharOffset);else{var c=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn);r=c.getLineContent().substr(n.endColumn-1-a.firstCharOffset)}var h=this.getIndentRulesSupport(a.languageId);if(!h)return null;var d=o,f=Cr(o),p={getLineTokens:function(e){return t.getLineTokens(e)},getLanguageIdentifier:function(){return t.getLanguageIdentifier()},getLanguageIdAtPosition:function(e,n){return t.getLanguageIdAtPosition(e,n)},getLineContent:function(e){return e===n.startLineNumber?d:t.getLineContent(e)}},g=Cr(s.getLineContent()),m=this.getInheritIndentForLine(e,p,n.startLineNumber+1);if(!m){var v=l?g:f;return{beforeEnter:v,afterEnter:v}}var _=l?g:m.indentation;return m.action===Cl.Indent&&(_=i.shiftIndent(_)),h.shouldDecrease(r)&&(_=i.unshiftIndent(_)),{beforeEnter:l?g:f,afterEnter:_}},e.prototype.getIndentActionForType=function(e,t,n,i,o){if(e<4)return null;var r=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),s=this.getIndentRulesSupport(r.languageId);if(!s)return null;var a,u=r.getLineContent(),l=u.substr(0,n.startColumn-1-r.firstCharOffset);if(n.isEmpty())a=u.substr(n.startColumn-1-r.firstCharOffset);else{var c=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn);a=c.getLineContent().substr(n.endColumn-1-r.firstCharOffset)}if(!s.shouldDecrease(l+a)&&s.shouldDecrease(l+i+a)){var h=this.getInheritIndentForLine(e,t,n.startLineNumber,!1);if(!h)return null;var d=h.indentation;return h.action!==Cl.Indent&&(d=o.unshiftIndent(d)),d}return null},e.prototype.getIndentMetadata=function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null},e.prototype.getEnterAction=function(e,t,n){var i=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),o=this._getRichEditSupport(i.languageId);if(!o)return null;var r,s=i.getLineContent(),a=s.substr(0,n.startColumn-1-i.firstCharOffset);if(n.isEmpty())r=s.substr(n.startColumn-1-i.firstCharOffset);else{var u=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn);r=u.getLineContent().substr(n.endColumn-1-i.firstCharOffset)}var l="";if(n.startLineNumber>1&&0===i.firstCharOffset){var c=this.getScopedLineTokens(t,n.startLineNumber-1);c.languageId===i.languageId&&(l=c.getLineContent())}var h=o.onEnter(e,l,a,r);if(!h)return null;var d=h.indentAction,f=h.appendText,p=h.removeText||0;f||(f=d===Cl.Indent||d===Cl.IndentOutdent?"\t":"");var g=this.getIndentationAtPosition(t,n.startLineNumber,n.startColumn);return p&&(g=g.substring(0,g.length-p)),{indentAction:d,appendText:f,removeText:p,indentation:g}},e.prototype.getIndentationAtPosition=function(e,t,n){var i=e.getLineContent(t),o=Cr(i);return o.length>n-1&&(o=o.substring(0,n-1)),o},e.prototype.getScopedLineTokens=function(e,t,n){e.forceTokenization(t);var i=e.getLineTokens(t),o="undefined"===typeof n?e.getLineMaxColumn(t)-1:n-1;return Nl(i,o)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.brackets||null},e}(),Zl=new Yl,Xl=function(){function e(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}return e.prototype.getOriginalEnd=function(){return this.originalStart+this.originalLength},e.prototype.getModifiedEnd=function(){return this.modifiedStart+this.modifiedLength},e}();function $l(e,t){return(t<<5)-t+e|0}function Ql(e,t){t=$l(149417,t);for(var n=0,i=e.length;n<i;n++)t=$l(e.charCodeAt(n),t);return t}var Jl=function(){function e(e){this.source=e}return e.prototype.getElements=function(){for(var e=this.source,t=new Int32Array(e.length),n=0,i=e.length;n<i;n++)t[n]=e.charCodeAt(n);return t},e}();function ec(e,t,n){return new oc(new Jl(e),new Jl(t)).ComputeDiff(n).changes}var tc=function(){function e(){}return e.Assert=function(e,t){if(!e)throw new Error(t)},e}(),nc=function(){function e(){}return e.Copy=function(e,t,n,i,o){for(var r=0;r<o;r++)n[i+r]=e[t+r]},e.Copy2=function(e,t,n,i,o){for(var r=0;r<o;r++)n[i+r]=e[t+r]},e}(),ic=function(){function e(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}return e.prototype.MarkNextChange=function(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new Xl(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},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),oc=function(){function e(t,n,i){void 0===i&&(i=null),this.ContinueProcessingPredicate=i;var o=e._getElements(t),r=o[0],s=o[1],a=o[2],u=e._getElements(n),l=u[0],c=u[1],h=u[2];this._hasStrings=a&&h,this._originalStringElements=r,this._originalElementsOrHash=s,this._modifiedStringElements=l,this._modifiedElementsOrHash=c,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e._isStringArray=function(e){return e.length>0&&"string"===typeof e[0]},e._getElements=function(t){var n=t.getElements();if(e._isStringArray(n)){for(var i=new Int32Array(n.length),o=0,r=n.length;o<r;o++)i[o]=Ql(n[o],0);return[n,i,!0]}return n instanceof Int32Array?[[],n,!1]:[[],new Int32Array(n),!1]},e.prototype.ElementsAreEqual=function(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])},e.prototype.OriginalElementsAreEqual=function(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])},e.prototype.ModifiedElementsAreEqual=function(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])},e.prototype.ComputeDiff=function(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)},e.prototype._ComputeDiff=function(e,t,n,i,o){var r=[!1],s=this.ComputeDiffRecursive(e,t,n,i,r);return o&&(s=this.PrettifyChanges(s)),{quitEarly:r[0],changes:s}},e.prototype.ComputeDiffRecursive=function(e,t,n,i,o){o[0]=!1;while(e<=t&&n<=i&&this.ElementsAreEqual(e,n))e++,n++;while(t>=e&&i>=n&&this.ElementsAreEqual(t,i))t--,i--;if(e>t||n>i){var r=void 0;return n<=i?(tc.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r=[new Xl(e,0,n,i-n+1)]):e<=t?(tc.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),r=[new Xl(e,t-e+1,n,0)]):(tc.Assert(e===t+1,"originalStart should only be one more than originalEnd"),tc.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),r=[]),r}var s=[0],a=[0],u=this.ComputeRecursionPoint(e,t,n,i,s,a,o),l=s[0],c=a[0];if(null!==u)return u;if(!o[0]){var h=this.ComputeDiffRecursive(e,l,n,c,o),d=[];return d=o[0]?[new Xl(l+1,t-(l+1)+1,c+1,i-(c+1)+1)]:this.ComputeDiffRecursive(l+1,t,c+1,i,o),this.ConcatenateChanges(h,d)}return[new Xl(e,t-e+1,n,i-n+1)]},e.prototype.WALKTRACE=function(e,t,n,i,o,r,s,a,u,l,c,h,d,f,p,g,m,v){var _=null,y=null,b=new ic,C=t,w=n,S=d[0]-g[0]-i,L=-1073741824,N=this.m_forwardHistory.length-1;do{var D=S+e;D===C||D<w&&u[D-1]<u[D+1]?(c=u[D+1],f=c-S-i,c<L&&b.MarkNextChange(),L=c,b.AddModifiedElement(c+1,f),S=D+1-e):(c=u[D-1]+1,f=c-S-i,c<L&&b.MarkNextChange(),L=c-1,b.AddOriginalElement(c,f+1),S=D-1-e),N>=0&&(u=this.m_forwardHistory[N],e=u[0],C=1,w=u.length-1)}while(--N>=-1);if(_=b.getReverseChanges(),v[0]){var E=d[0]+1,x=g[0]+1;if(null!==_&&_.length>0){var k=_[_.length-1];E=Math.max(E,k.getOriginalEnd()),x=Math.max(x,k.getModifiedEnd())}y=[new Xl(E,h-E+1,x,p-x+1)]}else{b=new ic,C=r,w=s,S=d[0]-g[0]-a,L=1073741824,N=m?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{D=S+o;D===C||D<w&&l[D-1]>=l[D+1]?(c=l[D+1]-1,f=c-S-a,c>L&&b.MarkNextChange(),L=c+1,b.AddOriginalElement(c+1,f+1),S=D+1-o):(c=l[D-1],f=c-S-a,c>L&&b.MarkNextChange(),L=c,b.AddModifiedElement(c+1,f+1),S=D-1-o),N>=0&&(l=this.m_reverseHistory[N],o=l[0],C=1,w=l.length-1)}while(--N>=-1);y=b.getChanges()}return this.ConcatenateChanges(_,y)},e.prototype.ComputeRecursionPoint=function(e,t,n,i,o,r,s){var a=0,u=0,l=0,c=0,h=0,d=0;e--,n--,o[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var f=t-e+(i-n),p=f+1,g=new Int32Array(p),m=new Int32Array(p),v=i-n,_=t-e,y=e-n,b=t-i,C=_-v,w=C%2===0;g[v]=e,m[_]=t,s[0]=!1;for(var S=1;S<=f/2+1;S++){var L=0,N=0;l=this.ClipDiagonalBound(v-S,S,v,p),c=this.ClipDiagonalBound(v+S,S,v,p);for(var D=l;D<=c;D+=2){a=D===l||D<c&&g[D-1]<g[D+1]?g[D+1]:g[D-1]+1,u=a-(D-v)-y;var E=a;while(a<t&&u<i&&this.ElementsAreEqual(a+1,u+1))a++,u++;if(g[D]=a,a+u>L+N&&(L=a,N=u),!w&&Math.abs(D-_)<=S-1&&a>=m[D])return o[0]=a,r[0]=u,E<=m[D]&&S<=1448?this.WALKTRACE(v,l,c,y,_,h,d,b,g,m,a,t,o,u,i,r,w,s):null}var x=(L-e+(N-n)-S)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(L,x))return s[0]=!0,o[0]=L,r[0]=N,x>0&&S<=1448?this.WALKTRACE(v,l,c,y,_,h,d,b,g,m,a,t,o,u,i,r,w,s):(e++,n++,[new Xl(e,t-e+1,n,i-n+1)]);h=this.ClipDiagonalBound(_-S,S,_,p),d=this.ClipDiagonalBound(_+S,S,_,p);for(D=h;D<=d;D+=2){a=D===h||D<d&&m[D-1]>=m[D+1]?m[D+1]-1:m[D-1],u=a-(D-_)-b;E=a;while(a>e&&u>n&&this.ElementsAreEqual(a,u))a--,u--;if(m[D]=a,w&&Math.abs(D-v)<=S&&a<=g[D])return o[0]=a,r[0]=u,E>=g[D]&&S<=1448?this.WALKTRACE(v,l,c,y,_,h,d,b,g,m,a,t,o,u,i,r,w,s):null}if(S<=1447){var k=new Int32Array(c-l+2);k[0]=v-l+1,nc.Copy2(g,l,k,1,c-l+1),this.m_forwardHistory.push(k),k=new Int32Array(d-h+2),k[0]=_-h+1,nc.Copy2(m,h,k,1,d-h+1),this.m_reverseHistory.push(k)}}return this.WALKTRACE(v,l,c,y,_,h,d,b,g,m,a,t,o,u,i,r,w,s)},e.prototype.PrettifyChanges=function(e){for(var t=0;t<e.length;t++){var n=e[t],i=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,o=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,r=n.originalLength>0,s=n.modifiedLength>0;while(n.originalStart+n.originalLength<i&&n.modifiedStart+n.modifiedLength<o&&(!r||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!s||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength)))n.originalStart++,n.modifiedStart++;var a=[null];t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],a)&&(e[t]=a[0],e.splice(t+1,1),t--)}for(t=e.length-1;t>=0;t--){n=e[t],i=0,o=0;if(t>0){var u=e[t-1];u.originalLength>0&&(i=u.originalStart+u.originalLength),u.modifiedLength>0&&(o=u.modifiedStart+u.modifiedLength)}r=n.originalLength>0,s=n.modifiedLength>0;for(var l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),h=1;;h++){var d=n.originalStart-h,f=n.modifiedStart-h;if(d<i||f<o)break;if(r&&!this.OriginalElementsAreEqual(d,d+n.originalLength))break;if(s&&!this.ModifiedElementsAreEqual(f,f+n.modifiedLength))break;var p=this._boundaryScore(d,n.originalLength,f,n.modifiedLength);p>c&&(c=p,l=h)}n.originalStart-=l,n.modifiedStart-=l}return e},e.prototype._OriginalIsBoundary=function(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,i){var o=this._OriginalRegionIsBoundary(e,t)?1:0,r=this._ModifiedRegionIsBoundary(n,i)?1:0;return o+r},e.prototype.ConcatenateChanges=function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){var i=new Array(e.length+t.length-1);return nc.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],nc.Copy(t,1,i,e.length,t.length-1),i}i=new Array(e.length+t.length);return nc.Copy(e,0,i,0,e.length),nc.Copy(t,0,i,e.length,t.length),i},e.prototype.ChangesOverlap=function(e,t,n){if(tc.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),tc.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){var i=e.originalStart,o=e.originalLength,r=e.modifiedStart,s=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(s=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new Xl(i,o,r,s),!0}return n[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,i){if(e>=0&&e<i)return e;var o=n,r=i-n-1,s=t%2===0;if(e<0){var a=o%2===0;return s===a?0:1}var u=r%2===0;return s===u?i-1:i-2},e}(),rc=3;function sc(e,t,n,i){var o=new oc(e,t,n);return o.ComputeDiff(i)}var ac=function(){function e(e){for(var t=[],n=[],i=0,o=e.length;i<o;i++)t[i]=fc(e[i],1),n[i]=pc(e[i],1);this.lines=e,this._startColumns=t,this._endColumns=n}return e.prototype.getElements=function(){for(var e=[],t=0,n=this.lines.length;t<n;t++)e[t]=this.lines[t].substring(this._startColumns[t]-1,this._endColumns[t]-1);return e},e.prototype.getStartLineNumber=function(e){return e+1},e.prototype.getEndLineNumber=function(e){return e+1},e.prototype.createCharSequence=function(e,t,n){for(var i=[],o=[],r=[],s=0,a=t;a<=n;a++)for(var u=this.lines[a],l=e?this._startColumns[a]:1,c=e?this._endColumns[a]:u.length+1,h=l;h<c;h++)i[s]=u.charCodeAt(h-1),o[s]=a+1,r[s]=h,s++;return new uc(i,o,r)},e}(),uc=function(){function e(e,t,n){this._charCodes=e,this._lineNumbers=t,this._columns=n}return e.prototype.getElements=function(){return this._charCodes},e.prototype.getStartLineNumber=function(e){return this._lineNumbers[e]},e.prototype.getStartColumn=function(e){return this._columns[e]},e.prototype.getEndLineNumber=function(e){return this._lineNumbers[e]},e.prototype.getEndColumn=function(e){return this._columns[e]+1},e}(),lc=function(){function e(e,t,n,i,o,r,s,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=o,this.modifiedStartColumn=r,this.modifiedEndLineNumber=s,this.modifiedEndColumn=a}return e.createFromDiffChange=function(t,n,i){var o,r,s,a,u,l,c,h;return 0===t.originalLength?(o=0,r=0,s=0,a=0):(o=n.getStartLineNumber(t.originalStart),r=n.getStartColumn(t.originalStart),s=n.getEndLineNumber(t.originalStart+t.originalLength-1),a=n.getEndColumn(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(u=0,l=0,c=0,h=0):(u=i.getStartLineNumber(t.modifiedStart),l=i.getStartColumn(t.modifiedStart),c=i.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),h=i.getEndColumn(t.modifiedStart+t.modifiedLength-1)),new e(o,r,s,a,u,l,c,h)},e}();function cc(e){if(e.length<=1)return e;for(var t=[e[0]],n=t[0],i=1,o=e.length;i<o;i++){var r=e[i],s=r.originalStart-(n.originalStart+n.originalLength),a=r.modifiedStart-(n.modifiedStart+n.modifiedLength),u=Math.min(s,a);u<rc?(n.originalLength=r.originalStart+r.originalLength-n.originalStart,n.modifiedLength=r.modifiedStart+r.modifiedLength-n.modifiedStart):(t.push(r),n=r)}return t}var hc=function(){function e(e,t,n,i,o){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=i,this.charChanges=o}return e.createFromDiffResult=function(t,n,i,o,r,s,a){var u,l,c,h,d=void 0;if(0===n.originalLength?(u=i.getStartLineNumber(n.originalStart)-1,l=0):(u=i.getStartLineNumber(n.originalStart),l=i.getEndLineNumber(n.originalStart+n.originalLength-1)),0===n.modifiedLength?(c=o.getStartLineNumber(n.modifiedStart)-1,h=0):(c=o.getStartLineNumber(n.modifiedStart),h=o.getEndLineNumber(n.modifiedStart+n.modifiedLength-1)),s&&n.originalLength>0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&r()){var f=i.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),p=o.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1),g=sc(f,p,r,!0).changes;a&&(g=cc(g)),d=[];for(var m=0,v=g.length;m<v;m++)d.push(lc.createFromDiffChange(g[m],f,p))}return new e(u,l,c,h,d)},e}(),dc=function(){function e(e,t,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new ac(e),this.modified=new ac(t),this.continueLineDiff=gc(n.maxComputationTime),this.continueCharDiff=gc(0===n.maxComputationTime?0:Math.min(n.maxComputationTime,5e3))}return e.prototype.computeDiff=function(){if(1===this.original.lines.length&&0===this.original.lines[0].length)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(1===this.modified.lines.length&&0===this.modified.lines[0].length)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};var e=sc(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,n=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){for(var i=[],o=0,r=t.length;o<r;o++)i.push(hc.createFromDiffResult(this.shouldIgnoreTrimWhitespace,t[o],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:n,changes:i}}for(var s=[],a=0,u=0,l=(o=-1,t.length);o<l;o++){var c=o+1<l?t[o+1]:null,h=c?c.originalStart:this.originalLines.length,d=c?c.modifiedStart:this.modifiedLines.length;while(a<h&&u<d){var f=this.originalLines[a],p=this.modifiedLines[u];if(f!==p){var g=fc(f,1),m=fc(p,1);while(g>1&&m>1){var v=f.charCodeAt(g-2),_=p.charCodeAt(m-2);if(v!==_)break;g--,m--}(g>1||m>1)&&this._pushTrimWhitespaceCharChange(s,a+1,1,g,u+1,1,m);var y=pc(f,1),b=pc(p,1),C=f.length+1,w=p.length+1;while(y<C&&b<w){v=f.charCodeAt(y-1),_=f.charCodeAt(b-1);if(v!==_)break;y++,b++}(y<C||b<w)&&this._pushTrimWhitespaceCharChange(s,a+1,y,C,u+1,b,w)}a++,u++}c&&(s.push(hc.createFromDiffResult(this.shouldIgnoreTrimWhitespace,c,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),a+=c.originalLength,u+=c.modifiedLength)}return{quitEarly:n,changes:s}},e.prototype._pushTrimWhitespaceCharChange=function(e,t,n,i,o,r,s){if(!this._mergeTrimWhitespaceCharChange(e,t,n,i,o,r,s)){var a=void 0;this.shouldComputeCharChanges&&(a=[new lc(t,n,t,i,o,r,o,s)]),e.push(new hc(t,t,o,o,a))}},e.prototype._mergeTrimWhitespaceCharChange=function(e,t,n,i,o,r,s){var a=e.length;if(0===a)return!1;var u=e[a-1];return 0!==u.originalEndLineNumber&&0!==u.modifiedEndLineNumber&&(u.originalEndLineNumber+1===t&&u.modifiedEndLineNumber+1===o&&(u.originalEndLineNumber=t,u.modifiedEndLineNumber=o,this.shouldComputeCharChanges&&u.charChanges&&u.charChanges.push(new lc(t,n,t,i,o,r,o,s)),!0))},e}();function fc(e,t){var n=br(e);return-1===n?t:n+1}function pc(e,t){var n=wr(e);return-1===n?t:n+2}function gc(e){if(0===e)return function(){return!0};var t=Date.now();return function(){return Date.now()-t<e}}function mc(e){return e<0?0:e>255?255:0|e}function vc(e){return e<0?0:e>4294967295?4294967295:0|e}var _c=function(){function e(e,t){this.index=e,this.remainder=t}return e}(),yc=function(){function e(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return e.prototype.insertValues=function(e,t){e=vc(e);var n=this.values,i=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(n.length+o),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+o),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=vc(e),t=vc(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)},e.prototype.removeValues=function(e,t){e=vc(e),t=vc(t);var n=this.values,i=this.prefixSum;if(e>=n.length)return!1;var o=n.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=vc(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();var t=0,n=this.values.length-1,i=0,o=0,r=0;while(t<=n)if(i=t+(n-t)/2|0,o=this.prefixSum[i],r=o-this.values[i],e<r)n=i-1;else{if(!(e>=o))break;t=i+1}return new _c(i,e-r)},e}(),bc=function(){function e(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i,this._lineStarts=null}return e.prototype.dispose=function(){this._lines.length=0},e.prototype.getText=function(){return this._lines.join(this._eol)},e.prototype.onEvents=function(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);for(var t=e.changes,n=0,i=t;n<i.length;n++){var o=i[n];this._acceptDeleteRange(o.range),this._acceptInsertText(new fn(o.range.startLineNumber,o.range.startColumn),o.text)}this._versionId=e.versionId},e.prototype._ensureLineStarts=function(){if(!this._lineStarts){for(var e=this._eol.length,t=this._lines.length,n=new Uint32Array(t),i=0;i<t;i++)n[i]=this._lines[i].length+e;this._lineStarts=new yc(n)}},e.prototype._setLineText=function(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)},e.prototype._acceptDeleteRange=function(e){if(e.startLineNumber!==e.endLineNumber)this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber);else{if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}},e.prototype._acceptInsertText=function(e,t){if(0!==t.length){var n=t.split(/\r\n|\r|\n/);if(1!==n.length){n[n.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]);for(var i=new Uint32Array(n.length-1),o=1;o<n.length;o++)this._lines.splice(e.lineNumber+o-1,0,n[o]),i[o-1]=n[o].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,i)}else this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]+this._lines[e.lineNumber-1].substring(e.column-1))}},e}(),Cc=function(){function e(t){var n=mc(t);this._defaultValue=n,this._asciiMap=e._createAsciiMap(n),this._map=new Map}return e._createAsciiMap=function(e){for(var t=new Uint8Array(256),n=0;n<256;n++)t[n]=e;return t},e.prototype.set=function(e,t){var n=mc(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}(),wc=(function(){function e(){this._actual=new Cc(0)}e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)}}(),function(){function e(e,t,n){for(var i=new Uint8Array(e*t),o=0,r=e*t;o<r;o++)i[o]=n;this._data=i,this.rows=e,this.cols=t}return e.prototype.get=function(e,t){return this._data[e*this.cols+t]},e.prototype.set=function(e,t,n){this._data[e*this.cols+t]=n},e}()),Sc=function(){function e(e){for(var t=0,n=0,i=0,o=e.length;i<o;i++){var r=e[i],s=r[0],a=r[1],u=r[2];a>t&&(t=a),s>n&&(n=s),u>n&&(n=u)}t++,n++;var l=new wc(n,t,0);for(i=0,o=e.length;i<o;i++){var c=e[i];s=c[0],a=c[1],u=c[2];l.set(s,a,u)}this._states=l,this._maxCharCode=t}return e.prototype.nextState=function(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)},e}(),Lc=null;function Nc(){return null===Lc&&(Lc=new Sc([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Lc}var Dc=null;function Ec(){if(null===Dc){Dc=new Cc(0);for(var e=" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…",t=0;t<e.length;t++)Dc.set(e.charCodeAt(t),1);var n=".,;";for(t=0;t<n.length;t++)Dc.set(n.charCodeAt(t),2)}return Dc}var xc=function(){function e(){}return e._createLink=function(e,t,n,i,o){var r=o-1;do{var s=t.charCodeAt(r),a=e.get(s);if(2!==a)break;r--}while(r>i);if(i>0){var u=t.charCodeAt(i-1),l=t.charCodeAt(r);(40===u&&41===l||91===u&&93===l||123===u&&125===l)&&r--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:r+2},url:t.substring(i,r+1)}},e.computeLinks=function(t,n){void 0===n&&(n=Nc());for(var i=Ec(),o=[],r=1,s=t.getLineCount();r<=s;r++){var a=t.getLineContent(r),u=a.length,l=0,c=0,h=0,d=1,f=!1,p=!1,g=!1;while(l<u){var m=!1,v=a.charCodeAt(l);if(13===d){var _=void 0;switch(v){case 40:f=!0,_=0;break;case 41:_=f?0:1;break;case 91:p=!0,_=0;break;case 93:_=p?0:1;break;case 123:g=!0,_=0;break;case 125:_=g?0:1;break;case 39:_=34===h||96===h?0:1;break;case 34:_=39===h||96===h?0:1;break;case 96:_=39===h||34===h?0:1;break;case 42:_=42===h?1:0;break;case 124:_=124===h?1:0;break;default:_=i.get(v)}1===_&&(o.push(e._createLink(i,a,r,c,l)),m=!0)}else if(12===d){_=void 0;91===v?(p=!0,_=0):_=i.get(v),1===_?m=!0:d=13}else d=n.nextState(d,v),0===d&&(m=!0);m&&(d=1,f=!1,p=!1,g=!1,c=l+1,h=v),l++}13===d&&o.push(e._createLink(i,a,r,c,u))}return o},e}();function kc(e){return e&&"function"===typeof e.getLineCount&&"function"===typeof e.getLineContent?xc.computeLinks(e):[]}var Oc=function(){function e(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}return e.prototype.navigateValueSet=function(e,t,n,i,o){if(e&&t){var r=this.doNavigateValueSet(t,o);if(r)return{range:e,value:r}}if(n&&i){r=this.doNavigateValueSet(i,o);if(r)return{range:n,value:r}}return null},e.prototype.doNavigateValueSet=function(e,t){var n=this.numberReplace(e,t);return null!==n?n:this.textReplace(e,t)},e.prototype.numberReplace=function(e,t){var n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),i=Number(e),o=parseFloat(e);return isNaN(i)||isNaN(o)||i!==o?null:0!==i||t?(i=Math.floor(i*n),i+=t?n:-n,String(i/n)):null},e.prototype.textReplace=function(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)},e.prototype.valueSetsReplace=function(e,t,n){for(var i=null,o=0,r=e.length;null===i&&o<r;o++)i=this.valueSetReplace(e[o],t,n);return i},e.prototype.valueSetReplace=function(e,t,n){var i=e.indexOf(t);return i>=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null},e.INSTANCE=new e,e}(),Tc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Mc=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{u(i.next(e))}catch(t){r(t)}}function a(e){try{u(i["throw"](e))}catch(t){r(t)}}function u(e){e.done?n(e.value):o(e.value).then(s,a)}u((i=i.apply(e,t||[])).next())}))},Ic=function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return u([e,t])}}function u(r){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(o=2&r[0]?i["return"]:r[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(a){r=[6,a],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}},Ac=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tc(t,e),Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._versionId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eol",{get:function(){return this._eol},enumerable:!0,configurable:!0}),t.prototype.getValue=function(){return this.getText()},t.prototype.getLinesContent=function(){return this._lines.slice(0)},t.prototype.getLineCount=function(){return this._lines.length},t.prototype.getLineContent=function(e){return this._lines[e-1]},t.prototype.getWordAtPosition=function(e,t){var n=f(e.column,c(t),this._lines[e.lineNumber-1],0);return n?new pn(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null},t.prototype.createWordIterator=function(e){var t,n,i=this,o=0,r=0,s=[],a=function(){if(r<s.length){var u=n.substring(s[r].start,s[r].end);return r+=1,t?t.value=u:t={done:!1,value:u},t}return o>=i._lines.length?Pe:(n=i._lines[o],s=i._wordenize(n,e),r=0,o+=1,a())};return{next:a}},t.prototype.getLineWords=function(e,t){for(var n=this._lines[e-1],i=this._wordenize(n,t),o=[],r=0,s=i;r<s.length;r++){var a=s[r];o.push({word:n.substring(a.start,a.end),startColumn:a.start+1,endColumn:a.end+1})}return o},t.prototype._wordenize=function(e,t){var n,i=[];t.lastIndex=0;while(n=t.exec(e)){if(0===n[0].length)break;i.push({start:n.index,end:n.index+n[0].length})}return i},t.prototype.getValueInRange=function(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);var t=this._eol,n=e.startLineNumber-1,i=e.endLineNumber-1,o=[];o.push(this._lines[n].substring(e.startColumn-1));for(var r=n+1;r<i;r++)o.push(this._lines[r]);return o.push(this._lines[i].substring(0,e.endColumn-1)),o.join(t)},t.prototype.offsetAt=function(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getAccumulatedValue(e.lineNumber-2)+(e.column-1)},t.prototype.positionAt=function(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();var t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,n)}},t.prototype._validateRange=function(e){var t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||n.lineNumber!==e.endLineNumber||n.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}:e},t.prototype._validatePosition=function(e){if(!fn.isIPosition(e))throw new Error("bad position");var t=e.lineNumber,n=e.column,i=!1;if(t<1)t=1,n=1,i=!0;else if(t>this._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{var o=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>o&&(n=o,i=!0)}return i?{lineNumber:t,column:n}:e},t}(bc),Pc=function(){function e(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}return e.prototype.dispose=function(){this._models=Object.create(null)},e.prototype._getModel=function(e){return this._models[e]},e.prototype._getModels=function(){var e=this,t=[];return Object.keys(this._models).forEach((function(n){return t.push(e._models[n])})),t},e.prototype.acceptNewModel=function(e){this._models[e.url]=new Ac(wt.parse(e.url),e.lines,e.EOL,e.versionId)},e.prototype.acceptModelChanged=function(e,t){if(this._models[e]){var n=this._models[e];n.onEvents(t)}},e.prototype.acceptRemovedModel=function(e){this._models[e]&&delete this._models[e]},e.prototype.computeDiff=function(e,t,n,i){return Mc(this,void 0,void 0,(function(){var o,r,s,a,u,l,c;return Ic(this,(function(h){return o=this._getModel(e),r=this._getModel(t),o&&r?(s=o.getLinesContent(),a=r.getLinesContent(),u=new dc(s,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:i}),l=u.computeDiff(),c=!(l.changes.length>0)&&this._modelsAreIdentical(o,r),[2,{quitEarly:l.quitEarly,identical:c,changes:l.changes}]):[2,null]}))}))},e.prototype._modelsAreIdentical=function(e,t){var n=e.getLineCount(),i=t.getLineCount();if(n!==i)return!1;for(var o=1;o<=n;o++){var r=e.getLineContent(o),s=t.getLineContent(o);if(r!==s)return!1}return!0},e.prototype.computeMoreMinimalEdits=function(t,n){return Mc(this,void 0,void 0,(function(){var i,o,r,s,a,u,l,c,h,d,f,p,g,m,v,_,y,b;return Ic(this,(function(C){if(i=this._getModel(t),!i)return[2,n];for(o=[],r=void 0,n=Si(n,(function(e,t){if(e.range&&t.range)return pn.compareRangesUsingStarts(e.range,t.range);var n=e.range?0:1,i=t.range?0:1;return n-i})),s=0,a=n;s<a.length;s++)if(u=a[s],l=u.range,c=u.text,h=u.eol,"number"===typeof h&&(r=h),(!pn.isEmpty(l)||c)&&(d=i.getValueInRange(l),c=c.replace(/\r\n|\n|\r/g,i.eol),d!==c))if(Math.max(c.length,d.length)>e._diffLimit)o.push({range:l,text:c});else for(f=ec(d,c,!1),p=i.offsetAt(pn.lift(l).getStartPosition()),g=0,m=f;g<m.length;g++)v=m[g],_=i.positionAt(p+v.originalStart),y=i.positionAt(p+v.originalStart+v.originalLength),b={text:c.substr(v.modifiedStart,v.modifiedLength),range:{startLineNumber:_.lineNumber,startColumn:_.column,endLineNumber:y.lineNumber,endColumn:y.column}},i.getValueInRange(b.range)!==b.text&&o.push(b);return"number"===typeof r&&o.push({eol:r,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),[2,o]}))}))},e.prototype.computeLinks=function(e){return Mc(this,void 0,void 0,(function(){var t;return Ic(this,(function(n){return t=this._getModel(e),t?[2,kc(t)]:[2,null]}))}))},e.prototype.textualSuggest=function(t,n,i,o){return Mc(this,void 0,void 0,(function(){var r,s,a,u,l,c,h,d;return Ic(this,(function(f){if(r=this._getModel(t),!r)return[2,null];for(s=[],a=new Set,u=new RegExp(i,o),l=r.getWordAtPosition(n,u),l&&a.add(r.getValueInRange(l)),c=r.createWordIterator(u),h=c.next();!h.done&&a.size<=e._suggestionsLimit;h=c.next())d=h.value,a.has(d)||(a.add(d),isNaN(Number(d))&&s.push(d));return[2,s]}))}))},e.prototype.computeWordRanges=function(e,t,n,i){return Mc(this,void 0,void 0,(function(){var o,r,s,a,u,l,c,h,d;return Ic(this,(function(f){if(o=this._getModel(e),!o)return[2,Object.create(null)];for(r=new RegExp(n,i),s=Object.create(null),a=t.startLineNumber;a<t.endLineNumber;a++)for(u=o.getLineWords(a,r),l=0,c=u;l<c.length;l++)h=c[l],isNaN(Number(h.word))&&(d=s[h.word],d||(d=[],s[h.word]=d),d.push({startLineNumber:a,startColumn:h.startColumn,endLineNumber:a,endColumn:h.endColumn}));return[2,s]}))}))},e.prototype.navigateValueSet=function(e,t,n,i,o){return Mc(this,void 0,void 0,(function(){var r,s,a,u,l,c;return Ic(this,(function(h){return r=this._getModel(e),r?(s=new RegExp(i,o),t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1}),a=r.getValueInRange(t),u=r.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},s),u?(l=r.getValueInRange(u),c=Oc.INSTANCE.navigateValueSet(t,a,u,l,n),[2,c]):[2,null]):[2,null]}))}))},e.prototype.loadForeignModule=function(e,t,n){var i=this,o=function(e,t){return i._host.fhr(e,t)},r=Gs(n,o),s={host:r,getMirrorModels:function(){return i._getModels()}};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(s,t),Promise.resolve(qs(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))},e.prototype.fmr=function(e,t){if(!this._foreignModule||"function"!==typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}},e._diffLimit=1e5,e._suggestionsLimit=1e4,e}();"function"===typeof importScripts&&(s["b"].monaco=Cn());var Rc,Fc=Nn("textResourceConfigurationService"),Wc=Nn("textResourcePropertiesService"),Vc=Nn("logService");(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"})(Rc||(Rc={}));var Bc=function(){function e(){}return e.prototype.getLevel=function(){return Rc.Info},e.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.dispose=function(){},e}(),Hc=s["b"].performance&&"function"===typeof s["b"].performance.now,zc=function(){function e(e){this._highResolution=Hc&&e,this._startTime=this._now(),this._stopTime=-1}return e.create=function(t){return void 0===t&&(t=!0),new e(t)},e.prototype.stop=function(){this._stopTime=this._now()},e.prototype.elapsed=function(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime},e.prototype._now=function(){return this._highResolution?s["b"].performance.now():(new Date).getTime()},e}(),jc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Uc=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Kc=function(e,t){return function(n,i){t(n,i,e)}},qc=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{u(i.next(e))}catch(t){r(t)}}function a(e){try{u(i["throw"](e))}catch(t){r(t)}}function u(e){e.done?n(e.value):o(e.value).then(s,a)}u((i=i.apply(e,t||[])).next())}))},Gc=function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return u([e,t])}}function u(r){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(o=2&r[0]?i["return"]:r[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(a){r=[6,a],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}},Yc=6e4,Zc=3e5;function Xc(e,t){var n=e.getModel(t);return!!n&&!n.isTooLargeForSyncing()}var $c=function(e){function t(t,n,i){var o=e.call(this)||this;return o._modelService=t,o._workerManager=o._register(new Jc(o._modelService)),o._logService=i,o._register($u.register("*",{provideLinks:function(e,t){return Xc(o._modelService,e.uri)?o._workerManager.withWorker().then((function(t){return t.computeLinks(e.uri)})).then((function(e){return e&&{links:e}})):Promise.resolve({links:[]})}})),o._register(Fu.register("*",new Qc(o._workerManager,n,o._modelService))),o}return jc(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.canComputeDiff=function(e,t){return Xc(this._modelService,e)&&Xc(this._modelService,t)},t.prototype.computeDiff=function(e,t,n,i){return this._workerManager.withWorker().then((function(o){return o.computeDiff(e,t,n,i)}))},t.prototype.computeMoreMinimalEdits=function(e,t){var n=this;if(xi(t)){if(!Xc(this._modelService,e))return Promise.resolve(t);var i=zc.create(!0),o=this._workerManager.withWorker().then((function(n){return n.computeMoreMinimalEdits(e,t)}));return o.finally((function(){return n._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed())})),o}return Promise.resolve(void 0)},t.prototype.canNavigateValueSet=function(e){return Xc(this._modelService,e)},t.prototype.navigateValueSet=function(e,t,n){return this._workerManager.withWorker().then((function(i){return i.navigateValueSet(e,t,n)}))},t.prototype.canComputeWordRanges=function(e){return Xc(this._modelService,e)},t.prototype.computeWordRanges=function(e,t){return this._workerManager.withWorker().then((function(n){return n.computeWordRanges(e,t)}))},t=Uc([Kc(0,wu),Kc(1,Fc),Kc(2,Vc)],t),t}(Me),Qc=function(){function e(e,t,n){this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=n}return e.prototype.provideCompletionItems=function(e,t){return qc(this,void 0,void 0,(function(){var n,i,o,r,s,a;return Gc(this,(function(u){switch(u.label){case 0:return n=this._configurationService.getValue(e.uri,t,"editor").wordBasedSuggestions,n?Xc(this._modelService,e.uri)?(i=e.getWordAtPosition(t),o=i?new pn(t.lineNumber,i.startColumn,t.lineNumber,i.endColumn):pn.fromPositions(t),r=o.setEndPosition(t.lineNumber,t.column),[4,this._workerManager.withWorker()]):[2,void 0]:[2,void 0];case 1:return s=u.sent(),[4,s.textualSuggest(e.uri,t)];case 2:return a=u.sent(),a?[2,{suggestions:a.map((function(e){return{kind:18,label:e,insertText:e,range:{insert:r,replace:o}}}))}]:[2,void 0]}}))}))},e}(),Jc=function(e){function t(t){var n=e.call(this)||this;n._modelService=t,n._editorWorkerClient=null,n._lastWorkerUsedTime=(new Date).getTime();var i=n._register(new gi);return i.cancelAndSet((function(){return n._checkStopIdleWorker()}),Math.round(Zc/2)),n._register(n._modelService.onModelRemoved((function(e){return n._checkStopEmptyWorker()}))),n}return jc(t,e),t.prototype.dispose=function(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),e.prototype.dispose.call(this)},t.prototype._checkStopEmptyWorker=function(){if(this._editorWorkerClient){var e=this._modelService.getModels();0===e.length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}},t.prototype._checkStopIdleWorker=function(){if(this._editorWorkerClient){var e=(new Date).getTime()-this._lastWorkerUsedTime;e>Zc&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}},t.prototype.withWorker=function(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new ih(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)},t}(Me),eh=function(e){function t(t,n,i){var o=e.call(this)||this;if(o._syncedModels=Object.create(null),o._syncedModelsLastUsedTime=Object.create(null),o._proxy=t,o._modelService=n,!i){var r=new gi;r.cancelAndSet((function(){return o._checkStopModelSync()}),Math.round(Yc/2)),o._register(r)}return o}return jc(t,e),t.prototype.dispose=function(){for(var t in this._syncedModels)Ee(this._syncedModels[t]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),e.prototype.dispose.call(this)},t.prototype.ensureSyncedResources=function(e){for(var t=0,n=e;t<n.length;t++){var i=n[t],o=i.toString();this._syncedModels[o]||this._beginModelSync(i),this._syncedModels[o]&&(this._syncedModelsLastUsedTime[o]=(new Date).getTime())}},t.prototype._checkStopModelSync=function(){var e=(new Date).getTime(),t=[];for(var n in this._syncedModelsLastUsedTime){var i=e-this._syncedModelsLastUsedTime[n];i>Yc&&t.push(n)}for(var o=0,r=t;o<r.length;o++){var s=r[o];this._stopModelSync(s)}},t.prototype._beginModelSync=function(e){var t=this,n=this._modelService.getModel(e);if(n&&!n.isTooLargeForSyncing()){var i=e.toString();this._proxy.acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});var o=new Te;o.add(n.onDidChangeContent((function(e){t._proxy.acceptModelChanged(i.toString(),e)}))),o.add(n.onWillDispose((function(){t._stopModelSync(i)}))),o.add(ke((function(){t._proxy.acceptRemovedModel(i)}))),this._syncedModels[i]=o}},t.prototype._stopModelSync=function(e){var t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Ee(t)},t}(Me),th=function(){function e(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}return e.prototype.dispose=function(){this._instance.dispose()},e.prototype.getProxyObject=function(){return this._proxyObj},e}(),nh=function(){function e(e){this._workerClient=e}return e.prototype.fhr=function(e,t){return this._workerClient.fhr(e,t)},e}(),ih=function(e){function t(t,n,i){var o=e.call(this)||this;return o._modelService=t,o._keepIdleModels=n,o._workerFactory=new Sl(i),o._worker=null,o._modelManager=null,o}return jc(t,e),t.prototype.fhr=function(e,t){throw new Error("Not implemented!")},t.prototype._getOrCreateWorker=function(){if(!this._worker)try{this._worker=this._register(new _l(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new nh(this)))}catch(e){ml(e),this._worker=new th(new Pc(new nh(this),null))}return this._worker},t.prototype._getProxy=function(){var e=this;return this._getOrCreateWorker().getProxyObject().then(void 0,(function(t){return ml(t),e._worker=new th(new Pc(new nh(e),null)),e._getOrCreateWorker().getProxyObject()}))},t.prototype._getOrCreateModelManager=function(e){return this._modelManager||(this._modelManager=this._register(new eh(e,this._modelService,this._keepIdleModels))),this._modelManager},t.prototype._withSyncedResources=function(e){var t=this;return this._getProxy().then((function(n){return t._getOrCreateModelManager(n).ensureSyncedResources(e),n}))},t.prototype.computeDiff=function(e,t,n,i){return this._withSyncedResources([e,t]).then((function(o){return o.computeDiff(e.toString(),t.toString(),n,i)}))},t.prototype.computeMoreMinimalEdits=function(e,t){return this._withSyncedResources([e]).then((function(n){return n.computeMoreMinimalEdits(e.toString(),t)}))},t.prototype.computeLinks=function(e){return this._withSyncedResources([e]).then((function(t){return t.computeLinks(e.toString())}))},t.prototype.textualSuggest=function(e,t){var n=this;return this._withSyncedResources([e]).then((function(i){var o=n._modelService.getModel(e);if(!o)return null;var r=Zl.getWordDefinition(o.getLanguageIdentifier().id),s=r.source,a=yr(r);return i.textualSuggest(e.toString(),t,s,a)}))},t.prototype.computeWordRanges=function(e,t){var n=this;return this._withSyncedResources([e]).then((function(i){var o=n._modelService.getModel(e);if(!o)return Promise.resolve(null);var r=Zl.getWordDefinition(o.getLanguageIdentifier().id),s=r.source,a=yr(r);return i.computeWordRanges(e.toString(),t,s,a)}))},t.prototype.navigateValueSet=function(e,t,n){var i=this;return this._withSyncedResources([e]).then((function(o){var r=i._modelService.getModel(e);if(!r)return null;var s=Zl.getWordDefinition(r.getLanguageIdentifier().id),a=s.source,u=yr(s);return o.navigateValueSet(e.toString(),t,n,a,u)}))},t}(Me),oh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function rh(e,t){return new ah(e,t)}var sh,ah=function(e){function t(t,n){var i=e.call(this,t,n.keepIdleModels||!1,n.label)||this;return i._foreignModuleId=n.moduleId,i._foreignModuleCreateData=n.createData||null,i._foreignModuleHost=n.host||null,i._foreignProxy=null,i}return oh(t,e),t.prototype.fhr=function(e,t){if(!this._foreignModuleHost||"function"!==typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(n){return Promise.reject(n)}},t.prototype._getForeignProxy=function(){var e=this;return this._foreignProxy||(this._foreignProxy=this._getProxy().then((function(t){var n=e._foreignModuleHost?qs(e._foreignModuleHost):[];return t.loadForeignModule(e._foreignModuleId,e._foreignModuleCreateData,n).then((function(n){e._foreignModuleCreateData=null;for(var i=function(e,n){return t.fmr(e,n)},o=function(e,t){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}},r={},s=0,a=n;s<a.length;s++){var u=a[s];r[u]=o(u,i)}return r}))}))),this._foreignProxy},t.prototype.getProxy=function(){return this._getForeignProxy()},t.prototype.withSyncedResources=function(e){var t=this;return this._withSyncedResources(e).then((function(e){return t.getProxy()}))},t}(ih),uh=function(){function e(e,t){this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}return e.prototype.equals=function(t){return t instanceof e&&this.slicedEquals(t,0,this._tokensCount)},e.prototype.slicedEquals=function(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;for(var i=t<<1,o=i+(n<<1),r=i;r<o;r++)if(this._tokens[r]!==e._tokens[r])return!1;return!0},e.prototype.getLineContent=function(){return this._text},e.prototype.getCount=function(){return this._tokensCount},e.prototype.getStartOffset=function(e){return e>0?this._tokens[e-1<<1]:0},e.prototype.getMetadata=function(e){var t=this._tokens[1+(e<<1)];return t},e.prototype.getLanguageId=function(e){var t=this._tokens[1+(e<<1)];return Tu.getLanguageId(t)},e.prototype.getStandardTokenType=function(e){var t=this._tokens[1+(e<<1)];return Tu.getTokenType(t)},e.prototype.getForeground=function(e){var t=this._tokens[1+(e<<1)];return Tu.getForeground(t)},e.prototype.getClassName=function(e){var t=this._tokens[1+(e<<1)];return Tu.getClassNameFromMetadata(t)},e.prototype.getInlineStyle=function(e,t){var n=this._tokens[1+(e<<1)];return Tu.getInlineStyleFromMetadata(n,t)},e.prototype.getEndOffset=function(e){return this._tokens[e<<1]},e.prototype.findTokenIndexAtOffset=function(t){return e.findIndexInTokensArray(this._tokens,t)},e.prototype.inflate=function(){return this},e.prototype.sliceAndInflate=function(e,t,n){return new lh(this,e,t,n)},e.convertToEndOffset=function(e,t){for(var n=e.length>>>1,i=n-1,o=0;o<i;o++)e[o<<1]=e[o+1<<1];e[i<<1]=t},e.findIndexInTokensArray=function(e,t){if(e.length<=2)return 0;var n=0,i=(e.length>>>1)-1;while(n<i){var o=n+Math.floor((i-n)/2),r=e[o<<1];if(r===t)return o+1;r<t?n=o+1:r>t&&(i=o)}return n},e}(),lh=function(){function e(e,t,n,i){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=i,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(var o=this._firstTokenIndex,r=e.getCount();o<r;o++){var s=e.getStartOffset(o);if(s>=n)break;this._tokensCount++}}return e.prototype.equals=function(t){return t instanceof e&&(this._startOffset===t._startOffset&&this._endOffset===t._endOffset&&this._deltaOffset===t._deltaOffset&&this._source.slicedEquals(t._source,this._firstTokenIndex,this._tokensCount))},e.prototype.getCount=function(){return this._tokensCount},e.prototype.getForeground=function(e){return this._source.getForeground(this._firstTokenIndex+e)},e.prototype.getEndOffset=function(e){var t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset},e.prototype.getClassName=function(e){return this._source.getClassName(this._firstTokenIndex+e)},e.prototype.getInlineStyle=function(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)},e.prototype.findTokenIndexAtOffset=function(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex},e}();sh="undefined"!==typeof TextDecoder?function(e){return new ch(e)}:function(e){return new hh};var ch=function(){function e(e){this._decoder=new TextDecoder("UTF-16LE"),this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}return e.prototype.reset=function(){this._completedStrings=null,this._bufferLength=0},e.prototype.build=function(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()},e.prototype._buildBuffer=function(){if(0===this._bufferLength)return"";var e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return this._decoder.decode(e)},e.prototype._flushBuffer=function(){var e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e},e.prototype.write1=function(e){var t=this._capacity-this._bufferLength;t<=1&&(0===t||Tr(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e},e.prototype.appendASCII=function(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e},e.prototype.appendASCIIString=function(e){var t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(var n=0;n<t;n++)this._buffer[this._bufferLength++]=e.charCodeAt(n)},e}(),hh=function(){function e(){this._pieces=[],this._piecesLen=0}return e.prototype.reset=function(){this._pieces=[],this._piecesLen=0},e.prototype.build=function(){return this._pieces.join("")},e.prototype.write1=function(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)},e.prototype.appendASCII=function(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)},e.prototype.appendASCIIString=function(e){this._pieces[this._piecesLen++]=e},e}(),dh=function(){function e(e,t,n,i){this.startColumn=e,this.endColumn=t,this.className=n,this.type=i}return e._equals=function(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type},e.equalsArr=function(t,n){var i=t.length,o=n.length;if(i!==o)return!1;for(var r=0;r<i;r++)if(!e._equals(t[r],n[r]))return!1;return!0},e.filter=function(t,n,i,o){if(0===t.length)return[];for(var r=[],s=0,a=0,u=t.length;a<u;a++){var l=t[a],c=l.range;if(!(c.endLineNumber<n||c.startLineNumber>n)&&(!c.isEmpty()||0!==l.type&&3!==l.type)){var h=c.startLineNumber===n?c.startColumn:i,d=c.endLineNumber===n?c.endColumn:o;r[s++]=new e(h,d,l.inlineClassName,l.type)}}return r},e.compare=function(e,t){return e.startColumn===t.startColumn?e.endColumn===t.endColumn?e.className<t.className?-1:e.className>t.className?1:0:e.endColumn-t.endColumn:e.startColumn-t.startColumn},e}(),fh=function(){function e(e,t,n){this.startOffset=e,this.endOffset=t,this.className=n}return e}(),ph=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0}return e.prototype.consumeLowerThan=function(e,t,n){while(this.count>0&&this.stopOffsets[0]<e){var i=0;while(i+1<this.count&&this.stopOffsets[i]===this.stopOffsets[i+1])i++;n.push(new fh(t,this.stopOffsets[i],this.classNames.join(" "))),t=this.stopOffsets[i]+1,this.stopOffsets.splice(0,i+1),this.classNames.splice(0,i+1),this.count-=i+1}return this.count>0&&t<e&&(n.push(new fh(t,e-1,this.classNames.join(" "))),t=e),t},e.prototype.insert=function(e,t){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t);else for(var n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t);break}this.count++},e}(),gh=function(){function e(){}return e.normalize=function(e,t){if(0===t.length)return[];for(var n=[],i=new ph,o=0,r=0,s=t.length;r<s;r++){var a=t[r],u=a.startColumn,l=a.endColumn,c=a.className;if(u>1){var h=e.charCodeAt(u-2);Tr(h)&&u--}if(l>1){h=e.charCodeAt(l-2);Tr(h)&&l--}var d=u-1,f=l-2;o=i.consumeLowerThan(d,o,n),0===i.count&&(o=d),i.insert(f,c)}return i.consumeLowerThan(1073741824,o,n),n},e}(),mh=function(){function e(e,t){this.endIndex=e,this.type=t}return e}(),vh=function(){function e(e,t){this.startOffset=e,this.endOffset=t}return e.prototype.equals=function(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset},e}(),_h=function(){function e(e,t,n,i,o,r,s,a,u,l,c,h,d,f,p,g,m,v){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=i,this.isBasicASCII=o,this.containsRTL=r,this.fauxIndentLength=s,this.lineTokens=a,this.lineDecorations=u,this.tabSize=l,this.startVisibleColumn=c,this.spaceWidth=h,this.middotWidth=d,this.stopRenderingLineAfter=f,this.renderWhitespace="all"===p?3:"boundary"===p?1:"selection"===p?2:0,this.renderControlCharacters=g,this.fontLigatures=m,this.selectionsOnLine=v&&v.sort((function(e,t){return e.startOffset<t.startOffset?-1:1}))}return e.prototype.sameSelection=function(e){if(null===this.selectionsOnLine)return null===e;if(null===e)return!1;if(e.length!==this.selectionsOnLine.length)return!1;for(var t=0;t<this.selectionsOnLine.length;t++)if(!this.selectionsOnLine[t].equals(e[t]))return!1;return!0},e.prototype.equals=function(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&dh.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)},e}(),yh=function(){function e(e,t){this.length=e,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}return e.getPartIndex=function(e){return(4294901760&e)>>>16},e.getCharIndex=function(e){return(65535&e)>>>0},e.prototype.setPartData=function(e,t,n,i){var o=(t<<16|n<<0)>>>0;this._data[e]=o,this._absoluteOffsets[e]=i+n},e.prototype.getAbsoluteOffsets=function(){return this._absoluteOffsets},e.prototype.charOffsetToPartData=function(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]},e.prototype.partDataToCharOffset=function(t,n,i){if(0===this.length)return 0;var o=(t<<16|i<<0)>>>0,r=0,s=this.length-1;while(r+1<s){var a=r+s>>>1,u=this._data[a];if(u===o)return a;u>o?s=a:r=a}if(r===s)return r;var l=this._data[r],c=this._data[s];if(l===o)return r;if(c===o)return s;var h,d=e.getPartIndex(l),f=e.getCharIndex(l),p=e.getPartIndex(c);h=d!==p?n:e.getCharIndex(c);var g=i-f,m=h-i;return g<=m?r:s},e}(),bh=function(){function e(e,t,n){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}return e}();function Ch(e,t){if(0===e.lineContent.length){var n=0,i="<span><span> </span></span>";if(e.lineDecorations.length>0){for(var o=[],r=[],s=0,a=e.lineDecorations.length;s<a;s++){var u=e.lineDecorations[s];1===u.type&&(o.push(e.lineDecorations[s].className),n|=1),2===u.type&&(r.push(e.lineDecorations[s].className),n|=2)}if(0!==n){var l=o.length>0?'<span class="'+o.join(" ")+'"></span>':"",c=r.length>0?'<span class="'+r.join(" ")+'"></span>':"";i="<span>"+l+c+"</span>"}}return t.appendASCIIString(i),new bh(new yh(0,0),!1,n)}return Oh(Nh(e),t)}var wh=function(){function e(e,t,n,i){this.characterMapping=e,this.html=t,this.containsRTL=n,this.containsForeignElements=i}return e}();function Sh(e){var t=sh(1e4),n=Ch(e,t);return new wh(n.characterMapping,t.build(),n.containsRTL,n.containsForeignElements)}var Lh=function(){function e(e,t,n,i,o,r,s,a,u,l,c,h,d,f,p){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.len=i,this.isOverflowing=o,this.parts=r,this.containsForeignElements=s,this.fauxIndentLength=a,this.tabSize=u,this.startVisibleColumn=l,this.containsRTL=c,this.spaceWidth=h,this.middotWidth=d,this.renderWhitespace=f,this.renderControlCharacters=p}return e}();function Nh(e){var t,n,i=e.useMonospaceOptimizations,o=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter<o.length?(t=!0,n=e.stopRenderingLineAfter):(t=!1,n=o.length);var r=Dh(e.lineTokens,e.fauxIndentLength,n);(3===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine)&&(r=xh(o,n,e.continuesWithWrappedLine,r,e.fauxIndentLength,e.tabSize,e.startVisibleColumn,i,e.selectionsOnLine,1===e.renderWhitespace));var s=0;if(e.lineDecorations.length>0){for(var a=0,u=e.lineDecorations.length;a<u;a++){var l=e.lineDecorations[a];3===l.type?s|=1:1===l.type?s|=1:2===l.type&&(s|=2)}r=kh(o,n,r,e.lineDecorations)}return e.containsRTL||(r=Eh(o,r,!e.isBasicASCII||e.fontLigatures)),new Lh(i,e.canUseHalfwidthRightwardsArrow,o,n,t,r,s,e.fauxIndentLength,e.tabSize,e.startVisibleColumn,e.containsRTL,e.spaceWidth,e.middotWidth,e.renderWhitespace,e.renderControlCharacters)}function Dh(e,t,n){var i=[],o=0;t>0&&(i[o++]=new mh(t,""));for(var r=0,s=e.getCount();r<s;r++){var a=e.getEndOffset(r);if(!(a<=t)){var u=e.getClassName(r);if(a>=n){i[o++]=new mh(n,u);break}i[o++]=new mh(a,u)}}return i}function Eh(e,t,n){var i=0,o=[],r=0;if(n)for(var s=0,a=t.length;s<a;s++){var u=t[s],l=u.endIndex;if(i+50<l){for(var c=u.type,h=-1,d=i,f=i;f<l;f++)32===e.charCodeAt(f)&&(h=f),-1!==h&&f-d>=50&&(o[r++]=new mh(h+1,c),d=h+1,h=-1);d!==l&&(o[r++]=new mh(l,c))}else o[r++]=u;i=l}else for(s=0,a=t.length;s<a;s++){u=t[s],l=u.endIndex;var p=l-i;if(p>50){c=u.type;var g=Math.ceil(p/50);for(f=1;f<g;f++){var m=i+50*f;o[r++]=new mh(m,c)}o[r++]=new mh(l,c)}else o[r++]=u;i=l}return o}function xh(e,t,n,i,o,r,s,a,u,l){var c,h=[],d=0,f=0,p=i[f].type,g=i[f].endIndex,m=i.length,v=br(e);-1===v?(v=t,c=t):c=wr(e);for(var _=!1,y=0,b=u&&u[y],C=s%r,w=o;w<t;w++){var S=e.charCodeAt(w);b&&w>=b.endOffset&&(y++,b=u&&u[y]);var L=void 0;if(w<v||w>c)L=!0;else if(9===S)L=!0;else if(32===S)if(l)if(_)L=!0;else{var N=w+1<t?e.charCodeAt(w+1):0;L=32===N||9===N}else L=!0;else L=!1;L&&u&&(L=!!b&&b.startOffset<=w&&b.endOffset>w),_?(!L||!a&&C>=r)&&(h[d++]=new mh(w,"vs-whitespace"),C%=r):(w===g||L&&w>o)&&(h[d++]=new mh(w,p),C%=r),9===S?C=r:Ur(S)?C+=2:C++,_=L,w===g&&(f++,f<m&&(p=i[f].type,g=i[f].endIndex))}var D=!1;if(_)if(n&&l){var E=t>0?e.charCodeAt(t-1):0,x=t>1?e.charCodeAt(t-2):0,k=32===E&&32!==x&&9!==x;k||(D=!0)}else D=!0;return h[d++]=new mh(t,D?"vs-whitespace":p),h}function kh(e,t,n,i){i.sort(dh.compare);for(var o=gh.normalize(e,i),r=o.length,s=0,a=[],u=0,l=0,c=0,h=n.length;c<h;c++){var d=n[c],f=d.endIndex,p=d.type;while(s<r&&o[s].startOffset<f){var g=o[s];if(g.startOffset>l&&(l=g.startOffset,a[u++]=new mh(l,p)),!(g.endOffset+1<=f)){l=f,a[u++]=new mh(l,p+" "+g.className);break}l=g.endOffset+1,a[u++]=new mh(l,p+" "+g.className),s++}f>l&&(l=f,a[u++]=new mh(l,p))}var m=n[n.length-1].endIndex;if(s<r&&o[s].startOffset===m){var v=[];while(s<r&&o[s].startOffset===m)v.push(o[s].className),s++;a[u++]=new mh(l,v.join(" "))}return a}function Oh(e,t){var n=e.fontIsMonospace,i=e.canUseHalfwidthRightwardsArrow,o=e.containsForeignElements,r=e.lineContent,s=e.len,a=e.isOverflowing,u=e.parts,l=e.fauxIndentLength,c=e.tabSize,h=e.startVisibleColumn,d=e.containsRTL,f=e.spaceWidth,p=e.middotWidth,g=e.renderWhitespace,m=e.renderControlCharacters,v=p>f?11825:183,_=new yh(s+1,u.length),y=0,b=h,C=0,w=0,S=0;t.appendASCIIString("<span>");for(var L=0,N=u.length;L<N;L++){S+=w;var D=u[L],E=D.endIndex,x=D.type,k=0!==g&&x.indexOf("vs-whitespace")>=0;if(C=0,t.appendASCIIString('<span class="'),t.appendASCIIString(x),t.appendASCII(34),k){for(var O=0,T=y,M=b;T<E;T++){var I=r.charCodeAt(T),A=0|(9===I?c-M%c:1);O+=A,T>=l&&(M+=A)}if(!n){var P="vs-whitespace"===x;!P&&o||(t.appendASCIIString(' style="display:inline-block;width:'),t.appendASCIIString(String(f*O)),t.appendASCIIString('px"'))}for(t.appendASCII(62);y<E;y++){_.setPartData(y,L,C,S);I=r.charCodeAt(y),A=void 0;if(9===I){A=c-b%c|0,!i||A>1?t.write1(8594):t.write1(65515);for(var R=2;R<=A;R++)t.write1(160)}else A=1,t.write1(v);C+=A,y>=l&&(b+=A)}w=O}else{O=0;for(d&&t.appendASCIIString(' dir="ltr"'),t.appendASCII(62);y<E;y++){_.setPartData(y,L,C,S);I=r.charCodeAt(y);var F=1;A=1;switch(I){case 9:F=c-b%c,A=F;for(R=1;R<=F;R++)t.write1(160);break;case 32:t.write1(160);break;case 60:t.appendASCIIString("&lt;");break;case 62:t.appendASCIIString("&gt;");break;case 38:t.appendASCIIString("&amp;");break;case 0:t.appendASCIIString("&#00;");break;case 65279:case 8232:t.write1(65533);break;default:Ur(I)&&A++,m&&I<32?t.write1(9216+I):t.write1(I)}C+=F,O+=F,y>=l&&(b+=A)}w=O}t.appendASCIIString("</span>")}return _.setPartData(s,u.length-1,C,S),a&&t.appendASCIIString("<span>&hellip;</span>"),t.appendASCIIString("</span>"),new bh(_,d,o)}var Th=function(){function e(e,t,n,i){this.top=0|e,this.left=0|t,this.width=0|n,this.height=0|i}return e}(),Mh=function(){function e(e,t){this.tabSize=e,this.data=t}return e}(),Ih=function(){function e(e,t,n,i,o,r){this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=i,this.startVisibleColumn=o,this.tokens=r}return e}(),Ah=function(){function e(t,n,i,o,r,s,a,u,l,c){this.minColumn=t,this.maxColumn=n,this.content=i,this.continuesWithWrappedLine=o,this.isBasicASCII=e.isBasicASCII(i,s),this.containsRTL=e.containsRTL(i,this.isBasicASCII,r),this.tokens=a,this.inlineDecorations=u,this.tabSize=l,this.startVisibleColumn=c}return e.isBasicASCII=function(e,t){return!t||zr(e)},e.containsRTL=function(e,t,n){return!(t||!n)&&Wr(e)},e}(),Ph=function(){function e(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}return e}(),Rh=function(){function e(e,t){this.range=e,this.options=t}return e}();function Fh(e){return Array.isArray(e)}function Wh(e){return!Fh(e)}function Vh(e){return"string"===typeof e}function Bh(e){return!Vh(e)}function Hh(e){return!e}function zh(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function jh(e){return e.replace(/[&<>'"_]/g,"-")}function Uh(e,t){console.log(e.languageId+": "+t)}function Kh(e,t){return new Error(e.languageId+": "+t)}function qh(e,t,n,i,o){var r=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,s=null;return t.replace(r,(function(t,r,a,u,l,c,h,d,f){return Hh(a)?Hh(u)?!Hh(l)&&l<i.length?zh(e,i[l]):!Hh(h)&&e&&"string"===typeof e[h]?e[h]:(null===s&&(s=o.split("."),s.unshift(o)),!Hh(c)&&c<s.length?zh(e,s[c]):""):zh(e,n):"$"}))}function Gh(e,t){var n=t;while(n&&n.length>0){var i=e.tokenizer[n];if(i)return i;var o=n.lastIndexOf(".");n=o<0?null:n.substr(0,o)}return null}function Yh(e,t){var n=t;while(n&&n.length>0){var i=e.stateNames[n];if(i)return!0;var o=n.lastIndexOf(".");n=o<0?null:n.substr(0,o)}return!1}var Zh=5,Xh=function(){function e(e){this._maxCacheDepth=e,this._entries=Object.create(null)}return e.create=function(e,t){return this._INSTANCE.create(e,t)},e.prototype.create=function(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new $h(e,t);var n=$h.getStackElementId(e);n.length>0&&(n+="|"),n+=t;var i=this._entries[n];return i||(i=new $h(e,t),this._entries[n]=i,i)},e._INSTANCE=new e(Zh),e}(),$h=function(){function e(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}return e.getStackElementId=function(e){var t="";while(null!==e)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t},e._equals=function(e,t){while(null!==e&&null!==t){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t},e.prototype.equals=function(t){return e._equals(this,t)},e.prototype.push=function(e){return Xh.create(this,e)},e.prototype.pop=function(){return this.parent},e.prototype.popall=function(){var e=this;while(e.parent)e=e.parent;return e},e.prototype.switchTo=function(e){return Xh.create(this.parent,e)},e}(),Qh=function(){function e(e,t){this.modeId=e,this.state=t}return e.prototype.equals=function(e){return this.modeId===e.modeId&&this.state.equals(e.state)},e.prototype.clone=function(){var t=this.state.clone();return t===this.state?this:new e(this.modeId,this.state)},e}(),Jh=function(){function e(e){this._maxCacheDepth=e,this._entries=Object.create(null)}return e.create=function(e,t){return this._INSTANCE.create(e,t)},e.prototype.create=function(e,t){if(null!==t)return new ed(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new ed(e,t);var n=$h.getStackElementId(e),i=this._entries[n];return i||(i=new ed(e,null),this._entries[n]=i,i)},e._INSTANCE=new e(Zh),e}(),ed=function(){function e(e,t){this.stack=e,this.embeddedModeData=t}return e.prototype.clone=function(){var e=this.embeddedModeData?this.embeddedModeData.clone():null;return e===this.embeddedModeData?this:Jh.create(this.stack,this.embeddedModeData)},e.prototype.equals=function(t){return t instanceof e&&(!!this.stack.equals(t.stack)&&(null===this.embeddedModeData&&null===t.embeddedModeData||null!==this.embeddedModeData&&null!==t.embeddedModeData&&this.embeddedModeData.equals(t.embeddedModeData)))},e}(),td=function(){function e(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}return e.prototype.enterMode=function(e,t){this._language=t},e.prototype.emit=function(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new vn(e,t,this._language)))},e.prototype.nestedModeTokenize=function(e,t,n){var i=t.modeId,o=t.state,r=il.get(i);if(!r)return this.enterMode(n,i),this.emit(n,""),o;var s=r.tokenize(e,o,n);return this._tokens=this._tokens.concat(s.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,s.endState},e.prototype.finalize=function(e){return new _n(this._tokens,e)},e}(),nd=function(){function e(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}return e.prototype.enterMode=function(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id},e.prototype.emit=function(e,t){var n=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))},e._merge=function(e,t,n){var i=null!==e?e.length:0,o=t.length,r=null!==n?n.length:0;if(0===i&&0===o&&0===r)return new Uint32Array(0);if(0===i&&0===o)return n;if(0===o&&0===r)return e;var s=new Uint32Array(i+o+r);null!==e&&s.set(e);for(var a=0;a<o;a++)s[i+a]=t[a];return null!==n&&s.set(n,i+o),s},e.prototype.nestedModeTokenize=function(t,n,i){var o=n.modeId,r=n.state,s=il.get(o);if(!s)return this.enterMode(i,o),this.emit(i,""),r;var a=s.tokenize2(t,r,i);return this._prependTokens=e._merge(this._prependTokens,this._tokens,a.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,a.endState},e.prototype.finalize=function(t){return new yn(e._merge(this._prependTokens,this._tokens,null),t)},e}(),id=function(){function e(e,t,n,i){var o=this;this._modeService=e,this._standaloneThemeService=t,this._modeId=n,this._lexer=i,this._embeddedModes=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);var r=!1;this._tokenizationRegistryListener=il.onDidChange((function(e){if(!r){for(var t=!1,n=0,i=e.changedLanguages.length;n<i;n++){var s=e.changedLanguages[n];if(o._embeddedModes[s]){t=!0;break}}t&&(r=!0,il.fire([o._modeId]),r=!1)}}))}return e.prototype.dispose=function(){this._tokenizationRegistryListener.dispose()},e.prototype.getLoadStatus=function(){var t=[];for(var n in this._embeddedModes){var i=il.get(n);if(i){if(i instanceof e){var o=i.getLoadStatus();!1===o.loaded&&t.push(o.promise)}}else{var r=il.getPromise(n);r&&t.push(r)}}return 0===t.length?{loaded:!0}:{loaded:!1,promise:Promise.all(t).then((function(e){}))}},e.prototype.getInitialState=function(){var e=Xh.create(null,this._lexer.start);return Jh.create(e,null)},e.prototype.tokenize=function(e,t,n){var i=new td,o=this._tokenize(e,t,n,i);return i.finalize(o)},e.prototype.tokenize2=function(e,t,n){var i=new nd(this._modeService,this._standaloneThemeService.getTheme().tokenTheme),o=this._tokenize(e,t,n,i);return i.finalize(o)},e.prototype._tokenize=function(e,t,n,i){return t.embeddedModeData?this._nestedTokenize(e,t,n,i):this._myTokenize(e,t,n,i)},e.prototype._findLeavingNestedModeOffset=function(e,t){var n=this._lexer.tokenizer[t.stack.state];if(!n&&(n=Gh(this._lexer,t.stack.state),!n))throw Kh(this._lexer,"tokenizer state is not defined: "+t.stack.state);for(var i=-1,o=!1,r=0,s=n;r<s.length;r++){var a=s[r];if(Bh(a.action)&&"@pop"===a.action.nextEmbedded){o=!0;var u=a.regex,l=a.regex.source;"^(?:"===l.substr(0,4)&&")"===l.substr(l.length-1,1)&&(u=new RegExp(l.substr(4,l.length-5),u.ignoreCase?"i":""));var c=e.search(u);-1===c||0!==c&&a.matchOnlyAtLineStart||(-1===i||c<i)&&(i=c)}}if(!o)throw Kh(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+t.stack.state);return i},e.prototype._nestedTokenize=function(e,t,n,i){var o=this._findLeavingNestedModeOffset(e,t);if(-1===o){var r=i.nestedModeTokenize(e,t.embeddedModeData,n);return Jh.create(t.stack,new Qh(t.embeddedModeData.modeId,r))}var s=e.substring(0,o);s.length>0&&i.nestedModeTokenize(s,t.embeddedModeData,n);var a=e.substring(o);return this._myTokenize(a,t,n+o,i)},e.prototype._safeRuleName=function(e){return e?e.name:"(unknown)"},e.prototype._myTokenize=function(e,t,n,i){i.enterMode(n,this._modeId);var o=e.length,r=t.embeddedModeData,s=t.stack,a=0,u=null,l=!0;while(l||a<o){var c=a,h=s.depth,d=u?u.groups.length:0,f=s.state,p=null,g=null,m=null,v=null,_=null;if(u){p=u.matches;var y=u.groups.shift();g=y.matched,m=y.action,v=u.rule,0===u.groups.length&&(u=null)}else{if(!l&&a>=o)break;l=!1;var b=this._lexer.tokenizer[f];if(!b&&(b=Gh(this._lexer,f),!b))throw Kh(this._lexer,"tokenizer state is not defined: "+f);for(var C=e.substr(a),w=0,S=b;w<S.length;w++){var L=S[w];if((0===a||!L.matchOnlyAtLineStart)&&(p=C.match(L.regex),p)){g=p[0],m=L.action;break}}}if(p||(p=[""],g=""),m||(a<o&&(p=[e.charAt(a)],g=p[0]),m=this._lexer.defaultToken),null===g)break;a+=g.length;while(Wh(m)&&Bh(m)&&m.test)m=m.test(g,p,f,a===o);var N=null;if("string"===typeof m||Array.isArray(m))N=m;else if(m.group)N=m.group;else if(null!==m.token&&void 0!==m.token){if(N=m.tokenSubst?qh(this._lexer,m.token,g,p,f):m.token,m.nextEmbedded)if("@pop"===m.nextEmbedded){if(!r)throw Kh(this._lexer,"cannot pop embedded mode if not inside one");r=null}else{if(r)throw Kh(this._lexer,"cannot enter embedded mode from within an embedded mode");_=qh(this._lexer,m.nextEmbedded,g,p,f)}if(m.goBack&&(a=Math.max(0,a-m.goBack)),m.switchTo&&"string"===typeof m.switchTo){var D=qh(this._lexer,m.switchTo,g,p,f);if("@"===D[0]&&(D=D.substr(1)),!Gh(this._lexer,D))throw Kh(this._lexer,"trying to switch to a state '"+D+"' that is undefined in rule: "+this._safeRuleName(v));s=s.switchTo(D)}else{if(m.transform&&"function"===typeof m.transform)throw Kh(this._lexer,"action.transform not supported");if(m.next)if("@push"===m.next){if(s.depth>=this._lexer.maxStack)throw Kh(this._lexer,"maximum tokenizer stack size reached: ["+s.state+","+s.parent.state+",...]");s=s.push(f)}else if("@pop"===m.next){if(s.depth<=1)throw Kh(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(v));s=s.pop()}else if("@popall"===m.next)s=s.popall();else{D=qh(this._lexer,m.next,g,p,f);if("@"===D[0]&&(D=D.substr(1)),!Gh(this._lexer,D))throw Kh(this._lexer,"trying to set a next state '"+D+"' that is undefined in rule: "+this._safeRuleName(v));s=s.push(D)}}m.log&&"string"===typeof m.log&&Uh(this._lexer,this._lexer.languageId+": "+qh(this._lexer,m.log,g,p,f))}if(null===N)throw Kh(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(v));if(Array.isArray(N)){if(u&&u.groups.length>0)throw Kh(this._lexer,"groups cannot be nested: "+this._safeRuleName(v));if(p.length!==N.length+1)throw Kh(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(v));for(var E=0,x=1;x<p.length;x++)E+=p[x].length;if(E!==g.length)throw Kh(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(v));u={rule:v,matches:p,groups:[]};for(x=0;x<N.length;x++)u.groups[x]={action:N[x],matched:p[x+1]};a-=g.length}else{if("@rematch"===N&&(a-=g.length,g="",p=null,N=""),0===g.length){if(0===o||h!==s.depth||f!==s.state||(u?u.groups.length:0)!==d)continue;throw Kh(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(v))}var k=null;if(Vh(N)&&0===N.indexOf("@brackets")){var O=N.substr("@brackets".length),T=od(this._lexer,g);if(!T)throw Kh(this._lexer,"@brackets token returned but no bracket defined as: "+g);k=jh(T.token+O)}else{var M=""===N?"":N+this._lexer.tokenPostfix;k=jh(M)}if(i.emit(c+n,k),null!==_){var I=this._modeService.getModeIdForLanguageName(_);I&&(_=I);var A=this._getNestedEmbeddedModeData(_);if(a<o){C=e.substr(a);return this._nestedTokenize(C,Jh.create(s,A),n+a,i)}return Jh.create(s,A)}}}return Jh.create(s,r)},e.prototype._getNestedEmbeddedModeData=function(e){var t=this._locateMode(e);if(t){var n=il.get(t);if(n)return new Qh(t,n.getInitialState())}return new Qh(t||sl,rl)},e.prototype._locateMode=function(e){if(!e||!this._modeService.isRegisteredMode(e))return null;if(e===this._modeId)return e;var t=this._modeService.getModeId(e);return t&&(this._modeService.triggerMode(t),this._embeddedModes[t]=!0),t},e}();function od(e,t){if(!t)return null;t=zh(e,t);for(var n=e.brackets,i=0,o=n;i<o.length;i++){var r=o[i];if(r.open===t)return{token:r.token,bracketType:1};if(r.close===t)return{token:r.token,bracketType:-1}}return null}function rd(e,t,n,i){return new id(e,t,n,i)}var sd,ad=function(){function e(){}return e.colorizeElement=function(e,t,n,i){i=i||{};var o=i.theme||"vs",r=i.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();e.setTheme(o);var s=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+o;var a=function(e){n.innerHTML=e};return this.colorize(t,s||"",r,i).then(a,(function(e){return console.error(e)}))},e.colorize=function(e,t,n,i){var o=4;i&&"number"===typeof i.tabSize&&(o=i.tabSize),Gr(t)&&(t=t.substr(1));var r=t.split(/\r\n|\r|\n/),s=e.getModeId(n);if(!s)return Promise.resolve(ld(r,o));e.triggerMode(s);var a=il.get(s);if(a)return ud(r,o,a);var u=il.getPromise(s);return u?new Promise((function(e,t){u.then((function(n){ud(r,o,n).then(e,t)}),t)})):new Promise((function(e,t){var n=null,i=null,a=function(){n&&(n.dispose(),n=null),i&&(i.dispose(),i=null);var a=il.get(s);a?ud(r,o,a).then(e,t):e(ld(r,o))};i=new pi,i.cancelAndSet(a,500),n=il.onDidChange((function(e){e.changedLanguages.indexOf(s)>=0&&a()}))}))},e.colorizeLine=function(e,t,n,i,o){void 0===o&&(o=4);var r=Ah.isBasicASCII(e,t),s=Ah.containsRTL(e,r,n),a=Sh(new _h(!1,!0,e,!1,r,s,0,i,[],o,0,0,0,-1,"none",!1,!1,null));return a.html},e.colorizeModelLine=function(e,t,n){void 0===n&&(n=4);var i=e.getLineContent(t);e.forceTokenization(t);var o=e.getLineTokens(t),r=o.inflate();return this.colorizeLine(i,e.mightContainNonBasicASCII(),e.mightContainRTL(),r,n)},e}();function ud(e,t,n){return new Promise((function(i,o){var r=function(){var s=cd(e,t,n);if(n instanceof id){var a=n.getLoadStatus();if(!1===a.loaded)return void a.promise.then(r,o)}i(s)};r()}))}function ld(e,t){var n=[],i=16793600,o=new Uint32Array(2);o[0]=0,o[1]=i;for(var r=0,s=e.length;r<s;r++){var a=e[r];o[0]=a.length;var u=new uh(o,a),l=Ah.isBasicASCII(a,!0),c=Ah.containsRTL(a,l,!0),h=Sh(new _h(!1,!0,a,!1,l,c,0,u,[],t,0,0,0,-1,"none",!1,!1,null));n=n.concat(h.html),n.push("<br/>")}return n.join("")}function cd(e,t,n){for(var i=[],o=n.getInitialState(),r=0,s=e.length;r<s;r++){var a=e[r],u=n.tokenize2(a,o,0);uh.convertToEndOffset(u.tokens,a.length);var l=new uh(u.tokens,a),c=Ah.isBasicASCII(a,!0),h=Ah.containsRTL(a,c,!0),d=Sh(new _h(!1,!0,a,!1,c,h,0,l.inflate(),[],t,0,0,0,-1,"none",!1,!1,null));i=i.concat(d.html),i.push("<br/>"),o=u.endState}return i.join("")}(function(e){e[e["Ignore"]=0]="Ignore",e[e["Info"]=1]="Info",e[e["Warning"]=2]="Warning",e[e["Error"]=3]="Error"})(sd||(sd={})),function(e){var t="error",n="warning",i="warn",o="info",s=Object.create(null);function a(r){return r?Dr(t,r)?e.Error:Dr(n,r)||Dr(i,r)?e.Warning:Dr(o,r)?e.Info:e.Ignore:e.Ignore}s[e.Error]=r("sev.error","Error"),s[e.Warning]=r("sev.warning","Warning"),s[e.Info]=r("sev.info","Info"),e.fromValue=a}(sd||(sd={}));var hd=sd;function dd(e){return!(!e||"function"!==typeof e.getEditorType)&&e.getEditorType()===Ba.ICodeEditor}var fd=function(){function e(){this.data=new Map}return e.prototype.add=function(e,t){wa(As(e)),wa(Ps(t)),wa(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)},e.prototype.as=function(e){return this.data.get(e)||null},e}(),pd=new fd,gd={JSONContribution:"base.contributions.json"};function md(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}var vd=function(){function e(){this._onDidChangeSchema=new qe,this.schemasById={}}return e.prototype.registerSchema=function(e,t){this.schemasById[md(e)]=t,this._onDidChangeSchema.fire(e)},e.prototype.notifySchemaChanged=function(e){this._onDidChangeSchema.fire(e)},e}(),_d=new vd;pd.add(gd.JSONContribution,_d);var yd={Configuration:"base.contributions.configuration"},bd={properties:{},patternProperties:{}},Cd={properties:{},patternProperties:{}},wd={properties:{},patternProperties:{}},Sd={properties:{},patternProperties:{}},Ld={properties:{},patternProperties:{}},Nd={properties:{},patternProperties:{}},Dd="vscode://schemas/settings/resourceLanguage",Ed=pd.as(gd.JSONContribution),xd=function(){function e(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new qe,this._onDidUpdateConfiguration=new qe,this.defaultOverridesConfigurationNode={id:"defaultOverrides",title:r("defaultConfigurations.title","Default Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultOverridesConfigurationNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},Ed.registerSchema(Dd,this.resourceLanguageSettingsSchema)}return e.prototype.registerConfiguration=function(e,t){void 0===t&&(t=!0),this.registerConfigurations([e],t)},e.prototype.registerConfigurations=function(e,t){var n=this;void 0===t&&(t=!0);var i=[];e.forEach((function(e){i.push.apply(i,n.validateAndRegisterProperties(e,t)),n.configurationContributors.push(e),n.registerJSONConfiguration(e)})),Ed.registerSchema(Dd,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)},e.prototype.registerOverrideIdentifiers=function(e){for(var t=0,n=e;t<n.length;t++){var i=n[t];this.overrideIdentifiers.add(i)}this.updateOverridePropertyPatternKey()},e.prototype.validateAndRegisterProperties=function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=3),n=Vs(e.scope)?n:e.scope;var i=[],o=e.properties;if(o)for(var r in o)if(t&&Id(r))delete o[r];else{var s=o[r],a=s.default;Ws(a)&&(s.default=Td(s.type)),Od.test(r)?s.scope=void 0:s.scope=Vs(s.scope)?n:s.scope,!o[r].hasOwnProperty("included")||o[r].included?(this.configurationProperties[r]=o[r],i.push(r)):(this.excludedConfigurationProperties[r]=o[r],delete o[r])}var u=e.allOf;if(u)for(var l=0,c=u;l<c.length;l++){var h=c[l];i.push.apply(i,this.validateAndRegisterProperties(h,t,n))}return i},e.prototype.getConfigurationProperties=function(){return this.configurationProperties},e.prototype.registerJSONConfiguration=function(e){var t=this,n=function(e){var i=e.properties;if(i)for(var o in i)switch(bd.properties[o]=i[o],i[o].scope){case 1:Cd.properties[o]=i[o];break;case 2:wd.properties[o]=i[o];break;case 6:Sd.properties[o]=i[o];break;case 3:Ld.properties[o]=i[o];break;case 4:Nd.properties[o]=i[o];break;case 5:Nd.properties[o]=i[o],t.resourceLanguageSettingsSchema.properties[o]=i[o];break}var r=e.allOf;r&&r.forEach(n)};n(e)},e.prototype.updateOverridePropertyPatternKey=function(){for(var e,t=0,n=$s(this.overrideIdentifiers);t<n.length;t++){var i=n[t],o="["+i+"]",s={type:"object",description:r("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:Dd,default:null===(e=this.defaultOverridesConfigurationNode.properties[o])||void 0===e?void 0:e.default};bd.properties[o]=s,Cd.properties[o]=s,wd.properties[o]=s,Sd.properties[o]=s,Ld.properties[o]=s,Nd.properties[o]=s}this._onDidSchemaChange.fire()},e}(),kd="\\[.*\\]$",Od=new RegExp(kd);function Td(e){var t=Array.isArray(e)?e[0]:e;switch(t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}var Md=new xd;function Id(e){return Od.test(e)?r("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==Md.getConfigurationProperties()[e]?r("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):null}pd.add(yd.Configuration,Md);var Ad=Object.prototype.hasOwnProperty;function Pd(e,t){var n=function(n){if(Ad.call(e,n)){var i=t({key:n,value:e[n]},(function(){delete e[n]}));if(!1===i)return{value:void 0}}};for(var i in e){var o=n(i);if("object"===typeof o)return o.value}}var Rd=function(){function e(){this.map=new Map}return e.prototype.add=function(e,t){var n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)},e.prototype.delete=function(e,t){var n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))},e.prototype.forEach=function(e,t){var n=this.map.get(e);n&&n.forEach(t)},e}(),Fd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wd=function(){return Wd=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Wd.apply(this,arguments)},Vd=new(function(){function e(){this._tabFocus=!1,this._onDidChangeTabFocus=new qe,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}return e.prototype.getTabFocusMode=function(){return this._tabFocus},e.prototype.setTabFocusMode=function(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))},e}()),Bd=Object.hasOwnProperty,Hd=function(){function e(){this._values=[]}return e.prototype._read=function(e){return this._values[e]},e.prototype.get=function(e){return this._values[e]},e.prototype._write=function(e,t){this._values[e]=t},e}(),zd=function(){function e(){this._values=[]}return e.prototype._read=function(e){return this._values[e]},e.prototype._write=function(e,t){this._values[e]=t},e}(),jd=function(){function e(){}return e.readOptions=function(e){for(var t=e,n=new zd,i=0,o=ce;i<o.length;i++){var r=o[i],s="_never_"===r.name?void 0:t[r.name];n._write(r.id,s)}return n},e.validateOptions=function(e){for(var t=new _,n=0,i=ce;n<i.length;n++){var o=i[n];t._write(o.id,o.validate(e._read(o.id)))}return t},e.computeOptions=function(e,t){for(var n=new Hd,i=0,o=ce;i<o.length;i++){var r=o[i];n._write(r.id,r.compute(t,n,e._read(r.id)))}return n},e._deepEquals=function(t,n){if("object"!==typeof t||"object"!==typeof n)return t===n;if(Array.isArray(t)||Array.isArray(n))return!(!Array.isArray(t)||!Array.isArray(n))&&Ci(t,n);for(var i in t)if(!e._deepEquals(t[i],n[i]))return!1;return!0},e.checkEquals=function(t,n){for(var i=[],o=!1,r=0,s=ce;r<s.length;r++){var a=s[r],u=!e._deepEquals(t._read(a.id),n._read(a.id));i[a.id]=u,u&&(o=!0)}return o?new v(i):null},e}();function Ud(e){var t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");var n=e.lineNumbers;!0===n?e.lineNumbers="on":!1===n&&(e.lineNumbers="off");var i=e.autoClosingBrackets;!1===i&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never");var o=e.cursorBlinking;"visible"===o&&(e.cursorBlinking="solid");var r=e.renderWhitespace;!0===r?e.renderWhitespace="boundary":!1===r&&(e.renderWhitespace="none");var s=e.renderLineHighlight;!0===s?e.renderLineHighlight="line":!1===s&&(e.renderLineHighlight="none");var a=e.acceptSuggestionOnEnter;!0===a?e.acceptSuggestionOnEnter="on":!1===a&&(e.acceptSuggestionOnEnter="off");var u=e.tabCompletion;!1===u?e.tabCompletion="off":!0===u&&(e.tabCompletion="onlySnippets");var l=e.suggest;if(l&&"object"===typeof l.filteredTypes&&l.filteredTypes){var c={method:"showMethods",function:"showFunctions",constructor:"showConstructors",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"};Pd(c,(function(e){var t=l.filteredTypes[e.key];!1===t&&(l[e.value]=t)}))}var h=e.hover;!0===h?e.hover={enabled:!0}:!1===h&&(e.hover={enabled:!1});var d=e.parameterHints;!0===d?e.parameterHints={enabled:!0}:!1===d&&(e.parameterHints={enabled:!1});var f=e.autoIndent;!0===f?e.autoIndent="full":!1===f&&(e.autoIndent="advanced");var p=e.matchBrackets;!0===p?e.matchBrackets="always":!1===p&&(e.matchBrackets="never")}function Kd(e){var t=Sa(e);return Ud(t),t}var qd=function(e){function t(t,n){var i=e.call(this)||this;return i._onDidChange=i._register(new qe),i.onDidChange=i._onDidChange.event,i.isSimpleWidget=t,i._isDominatedByLongLines=!1,i._lineNumbersDigitCount=1,i._rawOptions=Kd(n),i._readOptions=jd.readOptions(i._rawOptions),i._validatedOptions=jd.validateOptions(i._readOptions),i._register(Ta.onDidChangeZoomLevel((function(e){return i._recomputeOptions()}))),i._register(Vd.onDidChangeTabFocus((function(e){return i._recomputeOptions()}))),i}return Fd(t,e),t.prototype.observeReferenceElement=function(e){},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._recomputeOptions=function(){var e=this.options,t=this._computeInternalOptions();if(e){var n=jd.checkEquals(e,t);if(null===n)return;this.options=t,this._onDidChange.fire(n)}else this.options=t},t.prototype.getRawOptions=function(){return this._rawOptions},t.prototype._computeInternalOptions=function(){var e=this._getEnvConfiguration(),t=Pa.createFromValidatedSettings(this._validatedOptions,e.zoomLevel,this.isSimpleWidget),n={outerWidth:e.outerWidth,outerHeight:e.outerHeight,fontInfo:this.readConfiguration(t),extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:Vd.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return jd.computeOptions(this._validatedOptions,n)},t._subsetEquals=function(e,t){for(var n in t)if(Bd.call(t,n)){var i=t[n],o=e[n];if(o===i)continue;if(Array.isArray(o)&&Array.isArray(i)){if(!Ci(o,i))return!1;continue}if("object"===typeof o&&"object"===typeof i){if(!this._subsetEquals(o,i))return!1;continue}return!1}return!0},t.prototype.updateOptions=function(e){if("undefined"!==typeof e){var n=Kd(e);t._subsetEquals(this._rawOptions,n)||(this._rawOptions=Da(this._rawOptions,n||{}),this._readOptions=jd.readOptions(this._rawOptions),this._validatedOptions=jd.validateOptions(this._readOptions),this._recomputeOptions())}},t.prototype.setIsDominatedByLongLines=function(e){this._isDominatedByLongLines=e,this._recomputeOptions()},t.prototype.setMaxLineNumber=function(e){var n=t._digitCount(e);this._lineNumbersDigitCount!==n&&(this._lineNumbersDigitCount=n,this._recomputeOptions())},t._digitCount=function(e){var t=0;while(e)e=Math.floor(e/10),t++;return t||1},t}(Me),Gd=Object.freeze({id:"editor",order:5,type:"object",title:r("editorConfigurationTitle","Editor"),scope:5}),Yd=pd.as(yd.Configuration),Zd=Wd(Wd({},Gd),{properties:{"editor.tabSize":{type:"number",default:le.tabSize,minimum:1,markdownDescription:r("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:le.insertSpaces,markdownDescription:r("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:le.detectIndentation,markdownDescription:r("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:le.trimAutoWhitespace,description:r("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:le.largeFileOptimizations,description:r("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:r("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.semanticHighlighting.enabled":{type:"boolean",default:!1,description:r("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:r("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:r("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:r("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:r("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:r("ignoreTrimWhitespace","Controls whether the diff editor shows changes in leading or trailing whitespace as diffs.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:r("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")}}});function Xd(e){return"undefined"!==typeof e.type||"undefined"!==typeof e.anyOf}for(var $d=0,Qd=ce;$d<Qd.length;$d++){var Jd=Qd[$d],ef=Jd.schema;if("undefined"!==typeof ef)if(Xd(ef))Zd.properties["editor."+Jd.name]=ef;else for(var tf in ef)Bd.call(ef,tf)&&(Zd.properties[tf]=ef[tf])}var nf=null;function of(){return null===nf&&(nf=Object.create(null),Object.keys(Zd.properties).forEach((function(e){nf[e]=!0}))),nf}function rf(e){var t=of();return t["editor."+e]||!1}function sf(e){var t=of();return t["diffEditor."+e]||!1}Yd.registerConfiguration(Zd);var af=function(){function e(){}return e.insert=function(e,t){return{range:new pn(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}},e.delete=function(e){return{range:e,text:null}},e.replace=function(e,t){return{range:e,text:t}},e.replaceMove=function(e,t){return{range:e,text:t,forceMoveMarkers:!0}},e}(),uf=Nn("configurationService");function lf(e,t){var n=Object.create(null);for(var i in e)cf(n,i,e[i],t);return n}function cf(e,t,n,i){for(var o=t.split("."),r=o.pop(),s=e,a=0;a<o.length;a++){var u=o[a],l=s[u];switch(typeof l){case"undefined":l=s[u]=Object.create(null);break;case"object":break;default:return void i("Ignoring "+t+" as "+o.slice(0,a+1).join(".")+" is "+JSON.stringify(l))}s=l}"object"===typeof s?s[r]=n:i("Ignoring "+t+" as "+o.join(".")+" is "+JSON.stringify(s))}function hf(e,t){var n=t.split(".");df(e,n)}function df(e,t){var n=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(n)){var i=e[n];"object"!==typeof i||Array.isArray(i)||(df(i,t),0===Object.keys(i).length&&delete e[n])}}else delete e[n]}function ff(e,t,n){function i(e,t){for(var n=e,i=0,o=t;i<o.length;i++){var r=o[i];if("object"!==typeof n||null===n)return;n=n[r]}return n}var o=t.split("."),r=i(e,o);return"undefined"===typeof r?n:r}function pf(){var e=pd.as(yd.Configuration).getConfigurationProperties();return Object.keys(e)}function gf(){var e=Object.create(null),t=pd.as(yd.Configuration).getConfigurationProperties();for(var n in t){var i=t[n].default;cf(e,n,i,(function(e){return console.error("Conflict in default settings: "+e)}))}return e}function mf(e){return e.substring(1,e.length-1)}function vf(e,t,n){var i=e.inspect(t),o=e.inspect(n);return"undefined"!==typeof i.userValue||"undefined"!==typeof i.workspaceValue||"undefined"!==typeof i.workspaceFolderValue?i.value:"undefined"!==typeof o.userValue||"undefined"!==typeof o.workspaceValue||"undefined"!==typeof o.workspaceFolderValue?o.value:i.defaultValue}var _f=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),yf=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i},bf=function(){function e(e,t,n){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===n&&(n=[]),this._contents=e,this._keys=t,this._overrides=n,this.isFrozen=!1}return Object.defineProperty(e.prototype,"contents",{get:function(){return this.checkAndFreeze(this._contents)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overrides",{get:function(){return this.checkAndFreeze(this._overrides)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){return this.checkAndFreeze(this._keys)},enumerable:!0,configurable:!0}),e.prototype.isEmpty=function(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length},e.prototype.getValue=function(e){return e?ff(this.contents,e):this.contents},e.prototype.getOverrideValue=function(e,t){var n=this.getContentsForOverrideIdentifer(t);return n?e?ff(n,e):n:void 0},e.prototype.override=function(t){var n=this.getContentsForOverrideIdentifer(t);if(!n||"object"!==typeof n||!Object.keys(n).length)return this;for(var i={},o=0,r=ki(yf(Object.keys(this.contents),Object.keys(n)));o<r.length;o++){var s=r[o],a=this.contents[s],u=n[s];u&&("object"===typeof a&&"object"===typeof u?(a=Sa(a),this.mergeContents(a,u)):a=u),i[s]=a}return new e(i,this.keys,this.overrides)},e.prototype.merge=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=Sa(this.contents),o=Sa(this.overrides),r=yf(this.keys),s=0,a=t;s<a.length;s++){var u=a[s];this.mergeContents(i,u.contents);for(var l=function(e){var t=o.filter((function(t){return Ci(t.identifiers,e.identifiers)}))[0];t?c.mergeContents(t.contents,e.contents):o.push(Sa(e))},c=this,h=0,d=u.overrides;h<d.length;h++){var f=d[h];l(f)}for(var p=0,g=u.keys;p<g.length;p++){var m=g[p];-1===r.indexOf(m)&&r.push(m)}}return new e(i,r,o)},e.prototype.freeze=function(){return this.isFrozen=!0,this},e.prototype.mergeContents=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];o in e&&Ps(e[o])&&Ps(t[o])?this.mergeContents(e[o],t[o]):e[o]=Sa(t[o])}},e.prototype.checkAndFreeze=function(e){return this.isFrozen&&!Object.isFrozen(e)?La(e):e},e.prototype.getContentsForOverrideIdentifer=function(e){for(var t=0,n=this.overrides;t<n.length;t++){var i=n[t];if(-1!==i.identifiers.indexOf(e))return i.contents}return null},e.prototype.toJSON=function(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}},e.prototype.setValue=function(e,t){this.addKey(e),cf(this.contents,e,t,(function(e){throw new Error(e)}))},e.prototype.removeValue=function(e){this.removeKey(e)&&hf(this.contents,e)},e.prototype.addKey=function(e){for(var t=this.keys.length,n=0;n<t;n++)0===e.indexOf(this.keys[n])&&(t=n);this.keys.splice(t,1,e)},e.prototype.removeKey=function(e){var t=this.keys.indexOf(e);return-1!==t&&(this.keys.splice(t,1),!0)},e}(),Cf=function(e){function t(){for(var t=this,n=gf(),i=pf(),o=[],r=0,s=Object.keys(n);r<s.length;r++){var a=s[r];Od.test(a)&&o.push({identifiers:[mf(a).trim()],keys:Object.keys(n[a]),contents:lf(n[a],(function(e){return console.error("Conflict in default settings file: "+e)}))})}return t=e.call(this,n,i,o)||this,t}return _f(t,e),t}(bf),wf=function(){function e(e,t,n,i,o,r,s,a){void 0===n&&(n=new bf),void 0===i&&(i=new bf),void 0===o&&(o=new oa),void 0===r&&(r=new bf),void 0===s&&(s=new oa),void 0===a&&(a=!0),this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=n,this._workspaceConfiguration=i,this._folderConfigurations=o,this._memoryConfiguration=r,this._memoryConfigurationByResource=s,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new oa,this._userConfiguration=null}return e.prototype.getValue=function(e,t,n){var i=this.getConsolidateConfigurationModel(t,n);return i.getValue(e)},e.prototype.updateValue=function(e,t,n){var i;void 0===n&&(n={}),n.resource?(i=this._memoryConfigurationByResource.get(n.resource),i||(i=new bf,this._memoryConfigurationByResource.set(n.resource,i))):i=this._memoryConfiguration,void 0===t?i.removeValue(e):i.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)},e.prototype.inspect=function(e,t,n){var i=this.getConsolidateConfigurationModel(t,n),o=this.getFolderConfigurationModelForResource(t.resource,n),r=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,s=t.overrideIdentifier?this._defaultConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._defaultConfiguration.freeze().getValue(e),a=t.overrideIdentifier?this.userConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.userConfiguration.freeze().getValue(e),u=t.overrideIdentifier?this.localUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.localUserConfiguration.freeze().getValue(e),l=t.overrideIdentifier?this.remoteUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.remoteUserConfiguration.freeze().getValue(e),c=n?t.overrideIdentifier?this._workspaceConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._workspaceConfiguration.freeze().getValue(e):void 0,h=o?t.overrideIdentifier?o.freeze().override(t.overrideIdentifier).getValue(e):o.freeze().getValue(e):void 0,d=t.overrideIdentifier?r.override(t.overrideIdentifier).getValue(e):r.getValue(e),f=i.getValue(e),p=ki(Pi(i.overrides.map((function(e){return e.identifiers})))).filter((function(t){return void 0!==i.getOverrideValue(e,t)}));return{defaultValue:s,userValue:a,userLocalValue:u,userRemoteValue:l,workspaceValue:c,workspaceFolderValue:h,memoryValue:d,value:f,default:void 0!==s?{value:this._defaultConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this._defaultConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,user:void 0!==a?{value:this.userConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.userConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userLocal:void 0!==u?{value:this.localUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.localUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userRemote:void 0!==l?{value:this.remoteUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.remoteUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspace:void 0!==c?{value:this._workspaceConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this._workspaceConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspaceFolder:void 0!==h?{value:null===o||void 0===o?void 0:o.freeze().getValue(e),override:t.overrideIdentifier?null===o||void 0===o?void 0:o.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,memory:void 0!==d?{value:r.getValue(e),override:t.overrideIdentifier?r.getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,overrideIdentifiers:p.length?p:void 0}},Object.defineProperty(e.prototype,"userConfiguration",{get:function(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localUserConfiguration",{get:function(){return this._localUserConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"remoteUserConfiguration",{get:function(){return this._remoteUserConfiguration},enumerable:!0,configurable:!0}),e.prototype.getConsolidateConfigurationModel=function(e,t){var n=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?n.override(e.overrideIdentifier):n},e.prototype.getConsolidatedConfigurationModelForResource=function(e,t){var n=e.resource,i=this.getWorkspaceConsolidatedConfiguration();if(t&&n){var o=t.getFolder(n);o&&(i=this.getFolderConsolidatedConfiguration(o.uri)||i);var r=this._memoryConfigurationByResource.get(n);r&&(i=i.merge(r))}return i},e.prototype.getWorkspaceConsolidatedConfiguration=function(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration},e.prototype.getFolderConsolidatedConfiguration=function(e){var t=this._foldersConsolidatedConfigurations.get(e);if(!t){var n=this.getWorkspaceConsolidatedConfiguration(),i=this._folderConfigurations.get(e);i?(t=n.merge(i),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t},e.prototype.getFolderConfigurationModelForResource=function(e,t){if(t&&e){var n=t.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)}},e}(),Sf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Lf=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r._contextKeyService=t,r._commandService=n,r._telemetryService=i,r._notificationService=o,r._onDidUpdateKeybindings=r._register(new qe),r._currentChord=null,r._currentChordChecker=new gi,r._currentChordStatusMessage=null,r}return Sf(t,e),Object.defineProperty(t.prototype,"onDidUpdateKeybindings",{get:function(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:We.None},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.getKeybindings=function(){return this._getResolver().getKeybindings()},t.prototype.lookupKeybinding=function(e){var t=this._getResolver().lookupPrimaryKeybinding(e);if(t)return t.resolvedKeybinding},t.prototype.softDispatch=function(e,t){var n=this.resolveKeyboardEvent(e);if(n.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;var i=n.getDispatchParts()[0];if(null===i)return null;var o=this._contextKeyService.getContext(t),r=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,r,i)},t.prototype._enterChordMode=function(e,t){var n=this;this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(r("first.chord","({0}) was pressed. Waiting for second key of chord...",t));var i=Date.now();this._currentChordChecker.cancelAndSet((function(){n._documentHasFocus()?Date.now()-i>5e3&&n._leaveChordMode():n._leaveChordMode()}),500)},t.prototype._leaveChordMode=function(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null},t.prototype._dispatch=function(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t)},t.prototype._doDispatch=function(e,t){var n=this,i=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;var o=e.getDispatchParts()[0];if(null===o)return i;var s=this._contextKeyService.getContext(t),a=this._currentChord?this._currentChord.keypress:null,u=e.getLabel(),l=this._getResolver().resolve(s,a,o);return l&&l.enterChord?(i=!0,this._enterChordMode(o,u),i):(this._currentChord&&(l&&l.commandId||(this._notificationService.status(r("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,u),{hideAfter:1e4}),i=!0)),this._leaveChordMode(),l&&l.commandId&&(l.bubble||(i=!0),"undefined"===typeof l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,(function(e){return n._notificationService.warn(e)})):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,(function(e){return n._notificationService.warn(e)})),this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding"})),i)},t.prototype.mightProducePrintableCharacter=function(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)},t}(Me),Nf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Df=function(){function e(){}return e.has=function(e){return xf.create(e)},e.equals=function(e,t){return kf.create(e,t)},e.regex=function(e,t){return Mf.create(e,t)},e.not=function(e){return Tf.create(e)},e.and=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Af.create(e)},e.or=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Pf.create(e)},e.deserialize=function(e,t){if(void 0===t&&(t=!1),e)return this._deserializeOrExpression(e,t)},e._deserializeOrExpression=function(e,t){var n=this,i=e.split("||");return Pf.create(i.map((function(e){return n._deserializeAndExpression(e,t)})))},e._deserializeAndExpression=function(e,t){var n=this,i=e.split("&&");return Af.create(i.map((function(e){return n._deserializeOne(e,t)})))},e._deserializeOne=function(e,t){if(e=e.trim(),e.indexOf("!=")>=0){var n=e.split("!=");return Of.create(n[0].trim(),this._deserializeValue(n[1],t))}if(e.indexOf("==")>=0){n=e.split("==");return kf.create(n[0].trim(),this._deserializeValue(n[1],t))}if(e.indexOf("=~")>=0){n=e.split("=~");return Mf.create(n[0].trim(),this._deserializeRegexValue(n[1],t))}return/^\!\s*/.test(e)?Tf.create(e.substr(1).trim()):xf.create(e)},e._deserializeValue=function(e,t){if(e=e.trim(),"true"===e)return!0;if("false"===e)return!1;var n=/^'([^']*)'$/.exec(e);return n?n[1].trim():e},e._deserializeRegexValue=function(e,t){if(cr(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}var n=e.indexOf("/"),i=e.lastIndexOf("/");if(n===i||n<0){if(t)throw new Error("bad regexp-value '"+e+"', missing /-enclosure");return console.warn("bad regexp-value '"+e+"', missing /-enclosure"),null}var o=e.slice(n+1,i),r="i"===e[i+1]?"i":"";try{return new RegExp(o,r)}catch(s){if(t)throw new Error("bad regexp-value '"+e+"', parse error: "+s);return console.warn("bad regexp-value '"+e+"', parse error: "+s),null}},e}();function Ef(e,t){var n=e.getType(),i=t.getType();if(n!==i)return n-i;switch(n){case 1:return e.cmp(t);case 2:return e.cmp(t);case 3:return e.cmp(t);case 4:return e.cmp(t);case 6:return e.cmp(t);case 7:return e.cmp(t);case 5:return e.cmp(t);default:throw new Error("Unknown ContextKeyExpr!")}}var xf=function(){function e(e){this.key=e}return e.create=function(t){return new e(t)},e.prototype.getType=function(){return 1},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!!e.getValue(this.key)},e.prototype.keys=function(){return[this.key]},e.prototype.negate=function(){return Tf.create(this.key)},e}(),kf=function(){function e(e,t){this.key=e,this.value=t}return e.create=function(t,n){return"boolean"===typeof n?n?xf.create(t):Tf.create(t):new e(t,n)},e.prototype.getType=function(){return 3},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:this.value<e.value?-1:this.value>e.value?1:0},e.prototype.equals=function(t){return t instanceof e&&(this.key===t.key&&this.value===t.value)},e.prototype.evaluate=function(e){return e.getValue(this.key)==this.value},e.prototype.keys=function(){return[this.key]},e.prototype.negate=function(){return Of.create(this.key,this.value)},e}(),Of=function(){function e(e,t){this.key=e,this.value=t}return e.create=function(t,n){return"boolean"===typeof n?n?Tf.create(t):xf.create(t):new e(t,n)},e.prototype.getType=function(){return 4},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:this.value<e.value?-1:this.value>e.value?1:0},e.prototype.equals=function(t){return t instanceof e&&(this.key===t.key&&this.value===t.value)},e.prototype.evaluate=function(e){return e.getValue(this.key)!=this.value},e.prototype.keys=function(){return[this.key]},e.prototype.negate=function(){return kf.create(this.key,this.value)},e}(),Tf=function(){function e(e){this.key=e}return e.create=function(t){return new e(t)},e.prototype.getType=function(){return 2},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!e.getValue(this.key)},e.prototype.keys=function(){return[this.key]},e.prototype.negate=function(){return xf.create(this.key)},e}(),Mf=function(){function e(e,t){this.key=e,this.regexp=t}return e.create=function(t,n){return new e(t,n)},e.prototype.getType=function(){return 6},e.prototype.cmp=function(e){if(this.key<e.key)return-1;if(this.key>e.key)return 1;var t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return t<n?-1:t>n?1:0},e.prototype.equals=function(t){if(t instanceof e){var n=this.regexp?this.regexp.source:"",i=t.regexp?t.regexp.source:"";return this.key===t.key&&n===i}return!1},e.prototype.evaluate=function(e){var t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)},e.prototype.keys=function(){return[this.key]},e.prototype.negate=function(){return If.create(this)},e}(),If=function(){function e(e){this._actual=e}return e.create=function(t){return new e(t)},e.prototype.getType=function(){return 7},e.prototype.cmp=function(e){return this._actual.cmp(e._actual)},e.prototype.equals=function(t){return t instanceof e&&this._actual.equals(t._actual)},e.prototype.evaluate=function(e){return!this._actual.evaluate(e)},e.prototype.keys=function(){return this._actual.keys()},e.prototype.negate=function(){return this._actual},e}(),Af=function(){function e(e){this.expr=e}return e.create=function(t){var n=e._normalizeArr(t);if(0!==n.length)return 1===n.length?n[0]:new e(n)},e.prototype.getType=function(){return 5},e.prototype.cmp=function(e){if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(var t=0,n=this.expr.length;t<n;t++){var i=Ef(this.expr[t],e.expr[t]);if(0!==i)return i}return 0},e.prototype.equals=function(t){if(t instanceof e){if(this.expr.length!==t.expr.length)return!1;for(var n=0,i=this.expr.length;n<i;n++)if(!this.expr[n].equals(t.expr[n]))return!1;return!0}return!1},e.prototype.evaluate=function(e){for(var t=0,n=this.expr.length;t<n;t++)if(!this.expr[t].evaluate(e))return!1;return!0},e._normalizeArr=function(t){var n=[];if(t){for(var i=0,o=t.length;i<o;i++){var r=t[i];if(r)if(r instanceof e)n=n.concat(r.expr);else{if(r instanceof Pf)throw new Error('It is not allowed to have an or expression here due to lack of parens! For example "a && (b||c)" is not supported, use "(a&&b) || (a&&c)" instead.');n.push(r)}}n.sort(Ef)}return n},e.prototype.keys=function(){for(var e=[],t=0,n=this.expr;t<n.length;t++){var i=n[t];e.push.apply(e,i.keys())}return e},e.prototype.negate=function(){for(var e=[],t=0,n=this.expr;t<n.length;t++){var i=n[t];e.push(i.negate())}return Pf.create(e)},e}(),Pf=function(){function e(e){this.expr=e}return e.create=function(t){var n=e._normalizeArr(t);if(0!==n.length)return 1===n.length?n[0]:new e(n)},e.prototype.getType=function(){return 8},e.prototype.equals=function(t){if(t instanceof e){if(this.expr.length!==t.expr.length)return!1;for(var n=0,i=this.expr.length;n<i;n++)if(!this.expr[n].equals(t.expr[n]))return!1;return!0}return!1},e.prototype.evaluate=function(e){for(var t=0,n=this.expr.length;t<n;t++)if(this.expr[t].evaluate(e))return!0;return!1},e._normalizeArr=function(t){var n=[];if(t){for(var i=0,o=t.length;i<o;i++){var r=t[i];r&&(r instanceof e?n=n.concat(r.expr):n.push(r))}n.sort(Ef)}return n},e.prototype.keys=function(){for(var e=[],t=0,n=this.expr;t<n.length;t++){var i=n[t];e.push.apply(e,i.keys())}return e},e.prototype.negate=function(){for(var t=[],n=0,i=this.expr;n<i.length;n++){var o=i[n];t.push(o.negate())}var r=function(t){return t instanceof e?t.expr:[t]};while(t.length>1){for(var s=t.shift(),a=t.shift(),u=[],l=0,c=r(s);l<c.length;l++)for(var h=c[l],d=0,f=r(a);d<f.length;d++){var p=f[d];u.push(Df.and(h,p))}t.unshift(Df.or.apply(Df,u))}return t[0]},e}(),Rf=function(e){function t(t,n){var i=e.call(this,t)||this;return i._defaultValue=n,i}return Nf(t,e),t.prototype.bindTo=function(e){return e.createKey(this.key,this._defaultValue)},t.prototype.getValue=function(e){return e.getContextKeyValue(this.key)},t.prototype.toNegated=function(){return Df.not(this.key)},t}(xf),Ff=Nn("contextKeyService"),Wf="setContext",Vf=function(){function e(t,n){this._defaultKeybindings=t,this._defaultBoundCommands=new Map;for(var i=0,o=t.length;i<o;i++){var r=t[i].command;r&&this._defaultBoundCommands.set(r,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=e.combine(t,n);for(i=0,o=this._keybindings.length;i<o;i++){var s=this._keybindings[i];0!==s.keypressParts.length&&this._addKeyPress(s.keypressParts[0],s)}}return e._isTargetedForRemoval=function(e,t,n,i,o){if(e.command!==i)return!1;if(t&&e.keypressParts[0]!==t)return!1;if(n&&e.keypressParts[1]!==n)return!1;if(o){if(!e.when)return!1;if(!o.equals(e.when))return!1}return!0},e.combine=function(e,t){e=e.slice(0);for(var n=[],i=0,o=t;i<o.length;i++){var r=o[i];if(r.command&&0!==r.command.length&&"-"===r.command.charAt(0))for(var s=r.command.substr(1),a=r.keypressParts[0],u=r.keypressParts[1],l=r.when,c=e.length-1;c>=0;c--)this._isTargetedForRemoval(e[c],a,u,s,l)&&e.splice(c,1);else n.push(r)}return e.concat(n)},e.prototype._addKeyPress=function(t,n){var i=this._map.get(t);if("undefined"===typeof i)return this._map.set(t,[n]),void this._addToLookupMap(n);for(var o=i.length-1;o>=0;o--){var r=i[o];if(r.command!==n.command){var s=r.keypressParts.length>1,a=n.keypressParts.length>1;s&&a&&r.keypressParts[1]!==n.keypressParts[1]||e.whenIsEntirelyIncluded(r.when,n.when)&&this._removeFromLookupMap(r)}}i.push(n),this._addToLookupMap(n)},e.prototype._addToLookupMap=function(e){if(e.command){var t=this._lookupMap.get(e.command);"undefined"===typeof t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}},e.prototype._removeFromLookupMap=function(e){if(e.command){var t=this._lookupMap.get(e.command);if("undefined"!==typeof t)for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return void t.splice(n,1)}},e.whenIsEntirelyIncluded=function(e,t){return!t||!!e&&this._implies(e,t)},e._implies=function(e,t){for(var n=e.negate(),i=function(e){return e instanceof Pf?e.expr:[e]},o=i(n).concat(i(t)),r=0;r<o.length;r++)for(var s=o[r],a=s.negate(),u=r+1;u<o.length;u++){var l=o[u];if(a.equals(l))return!0}return!1},e.prototype.getKeybindings=function(){return this._keybindings},e.prototype.lookupPrimaryKeybinding=function(e){var t=this._lookupMap.get(e);return"undefined"===typeof t||0===t.length?null:t[t.length-1]},e.prototype.resolve=function(e,t,n){var i=null;if(null!==t){var o=this._map.get(t);if("undefined"===typeof o)return null;i=[];for(var r=0,s=o.length;r<s;r++){var a=o[r];a.keypressParts[1]===n&&i.push(a)}}else{o=this._map.get(n);if("undefined"===typeof o)return null;i=o}var u=this._findCommand(e,i);return u?null===t&&u.keypressParts.length>1&&null!==u.keypressParts[1]?{enterChord:!0,commandId:null,commandArgs:null,bubble:!1}:{enterChord:!1,commandId:u.command,commandArgs:u.commandArgs,bubble:u.bubble}:null},e.prototype._findCommand=function(t,n){for(var i=n.length-1;i>=0;i--){var o=n[i];if(e.contextMatchesRules(t,o.when))return o}return null},e.contextMatchesRules=function(e,t){return!t||t.evaluate(e)},e}(),Bf=function(){function e(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}return e.bindToCurrentPlatform=function(e){if(1===s["a"]){if(e&&e.win)return e.win}else if(2===s["a"]){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e},e.prototype.registerKeybindingRule=function(t){var n=e.bindToCurrentPlatform(t);if(n&&n.primary){var i=rt(n.primary,s["a"]);i&&this._registerDefaultKeybinding(i,t.id,t.args,t.weight,0,t.when)}if(n&&Array.isArray(n.secondary))for(var o=0,r=n.secondary.length;o<r;o++){var a=n.secondary[o];i=rt(a,s["a"]);i&&this._registerDefaultKeybinding(i,t.id,t.args,t.weight,-o-1,t.when)}},e.prototype.registerCommandAndKeybindingRule=function(e){this.registerKeybindingRule(e),la.registerCommand(e)},e._mightProduceChar=function(e){return e>=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))},e.prototype._assertNoCtrlAlt=function(t,n){t.ctrlKey&&t.altKey&&!t.metaKey&&e._mightProduceChar(t.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",t," for ",n)},e.prototype._registerDefaultKeybinding=function(e,t,n,i,o,r){1===s["a"]&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e,command:t,commandArgs:n,when:r,weight1:i,weight2:o}),this._cachedMergedKeybindings=null},e.prototype.getDefaultKeybindings=function(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(jf)),this._cachedMergedKeybindings.slice(0)},e}(),Hf=new Bf,zf={EditorModes:"platform.keybindingsRegistry"};function jf(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.command<t.command?-1:e.command>t.command?1:e.weight2-t.weight2}pd.add(zf.EditorModes,Hf);var Uf=function(){function e(e,t,n,i,o){this.resolvedKeybinding=e,this.keypressParts=e?Kf(e.getDispatchParts()):[],this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=i,this.isDefault=o}return e}();function Kf(e){for(var t=[],n=0,i=e.length;n<i;n++){var o=e[n];if(!o)return t;t.push(o)}return t}var qf=function(){function e(e,t,n){void 0===n&&(n=t),this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n}return e.prototype.toLabel=function(e,t,n){if(0===t.length)return null;for(var i=[],o=0,r=t.length;o<r;o++){var s=t[o],a=n(s);if(null===a)return null;i[o]=Zf(s,a,this.modifierLabels[e])}return i.join(" ")},e}(),Gf=new qf({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:r({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:r({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:r({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:r({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:r({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:r({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:r({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:r({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),Yf=new qf({ctrlKey:r({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:r({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:r({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:r({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:r({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:r({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:r({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:r({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:r({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:r({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:r({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:r({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"});function Zf(e,t,n){if(null===t)return"";var i=[];return e.ctrlKey&&i.push(n.ctrlKey),e.shiftKey&&i.push(n.shiftKey),e.altKey&&i.push(n.altKey),e.metaKey&&i.push(n.metaKey),i.push(t),i.join(n.separator)}var Xf,$f,Qf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Jf=function(e){function t(t,n){var i=e.call(this)||this;if(0===n.length)throw be("parts");return i._os=t,i._parts=n,i}return Qf(t,e),t.prototype.getLabel=function(){var e=this;return Gf.toLabel(this._os,this._parts,(function(t){return e._getLabel(t)}))},t.prototype.getAriaLabel=function(){var e=this;return Yf.toLabel(this._os,this._parts,(function(t){return e._getAriaLabel(t)}))},t.prototype.isChord=function(){return this._parts.length>1},t.prototype.getParts=function(){var e=this;return this._parts.map((function(t){return e._getPart(t)}))},t.prototype._getPart=function(e){return new ct(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))},t.prototype.getDispatchParts=function(){var e=this;return this._parts.map((function(t){return e._getDispatchPart(t)}))},t}(ht),ep=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),tp=function(e){function t(t,n){return e.call(this,n,t.parts)||this}return ep(t,e),t.prototype._keyCodeToUILabel=function(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return $e.toString(e)},t.prototype._getLabel=function(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)},t.prototype._getAriaLabel=function(e){return e.isDuplicateModifierCase()?"":$e.toString(e.keyCode)},t.prototype._getDispatchPart=function(e){return t.getDispatchStr(e)},t.getDispatchStr=function(e){if(e.isModifierKey())return null;var t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=$e.toString(e.keyCode),t},t}(Jf),np=Nn("notificationService"),ip=function(){function e(){}return e}(),op=Nn("contextService");(function(e){function t(e){return e&&"object"===typeof e&&"string"===typeof e.id&&Array.isArray(e.folders)}e.isIWorkspace=t})(Xf||(Xf={})),function(e){function t(e){return e&&"object"===typeof e&&wt.isUri(e.uri)&&"string"===typeof e.name&&"function"===typeof e.toResource}e.isIWorkspaceFolder=t}($f||($f={}));(function(){function e(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=null),this._id=e,this._configuration=n,this._foldersMap=ia.forPaths(),this.folders=t}Object.defineProperty(e.prototype,"folders",{get:function(){return this._folders},set:function(e){this._folders=e,this.updateFoldersMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"configuration",{get:function(){return this._configuration},set:function(e){this._configuration=e},enumerable:!0,configurable:!0}),e.prototype.getFolder=function(e){return e&&this._foldersMap.findSubstr(e.with({scheme:e.scheme,authority:e.authority,path:e.path}).toString())||null},e.prototype.updateFoldersMap=function(){this._foldersMap=ia.forPaths();for(var e=0,t=this.folders;e<t.length;e++){var n=t[e];this._foldersMap.set(n.uri.toString(),n)}},e.prototype.toJSON=function(){return{id:this.id,folders:this.folders,configuration:this.configuration}}})();var rp,sp,ap,up,lp,cp,hp,dp,fp=function(){function e(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}return e.prototype.toResource=function(e){return Os(this.uri,e)},e.prototype.toJSON=function(){return{uri:this.uri,name:this.name,index:this.index}},e}();(function(e){e.noSelection=r("noSelection","No selection"),e.singleSelectionRange=r("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),e.singleSelection=r("singleSelection","Line {0}, Column {1}"),e.multiSelectionRange=r("multiSelectionRange","{0} selections ({1} characters selected)"),e.multiSelection=r("multiSelection","{0} selections"),e.emergencyConfOn=r("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),e.openingDocs=r("openingDocs","Now opening the Editor Accessibility documentation page."),e.readonlyDiffEditor=r("readonlyDiffEditor"," in a read-only pane of a diff editor."),e.editableDiffEditor=r("editableDiffEditor"," in a pane of a diff editor."),e.readonlyEditor=r("readonlyEditor"," in a read-only code editor"),e.editableEditor=r("editableEditor"," in a code editor"),e.changeConfigToOnMac=r("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),e.changeConfigToOnWinLinux=r("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),e.auto_on=r("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),e.auto_off=r("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),e.tabFocusModeOnMsg=r("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),e.tabFocusModeOnMsgNoKb=r("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),e.tabFocusModeOffMsg=r("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),e.tabFocusModeOffMsgNoKb=r("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),e.openDocMac=r("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),e.openDocWinLinux=r("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),e.outroMsg=r("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),e.showAccessibilityHelpAction=r("showAccessibilityHelpAction","Show Accessibility Help")})(rp||(rp={})),function(e){e.inspectTokensAction=r("inspectTokens","Developer: Inspect Tokens")}(sp||(sp={})),function(e){e.gotoLineLabelValidLineAndColumn=r("gotoLineLabelValidLineAndColumn","Go to line {0} and character {1}"),e.gotoLineLabelValidLine=r("gotoLineLabelValidLine","Go to line {0}"),e.gotoLineLabelEmptyWithLineLimit=r("gotoLineLabelEmptyWithLineLimit","Type a line number between 1 and {0} to navigate to"),e.gotoLineLabelEmptyWithLineAndColumnLimit=r("gotoLineLabelEmptyWithLineAndColumnLimit","Type a character between 1 and {0} to navigate to"),e.gotoLineAriaLabel=r("gotoLineAriaLabel","Current Line: {0}. Go to line {1}."),e.gotoLineActionInput=r("gotoLineActionInput","Type a line number, followed by an optional colon and a character number to navigate to"),e.gotoLineActionLabel=r("gotoLineActionLabel","Go to Line...")}(ap||(ap={})),function(e){e.ariaLabelEntryWithKey=r("ariaLabelEntryWithKey","{0}, {1}, commands"),e.ariaLabelEntry=r("ariaLabelEntry","{0}, commands"),e.quickCommandActionInput=r("quickCommandActionInput","Type the name of an action you want to execute"),e.quickCommandActionLabel=r("quickCommandActionLabel","Command Palette")}(up||(up={})),function(e){e.entryAriaLabel=r("entryAriaLabel","{0}, symbols"),e.quickOutlineActionInput=r("quickOutlineActionInput","Type the name of an identifier you wish to navigate to"),e.quickOutlineActionLabel=r("quickOutlineActionLabel","Go to Symbol..."),e._symbols_=r("symbols","symbols ({0})"),e._modules_=r("modules","modules ({0})"),e._class_=r("class","classes ({0})"),e._interface_=r("interface","interfaces ({0})"),e._method_=r("method","methods ({0})"),e._function_=r("function","functions ({0})"),e._property_=r("property","properties ({0})"),e._variable_=r("variable","variables ({0})"),e._variable2_=r("variable2","variables ({0})"),e._constructor_=r("_constructor","constructors ({0})"),e._call_=r("call","calls ({0})")}(lp||(lp={})),function(e){e.editorViewAccessibleLabel=r("editorViewAccessibleLabel","Editor content"),e.accessibilityHelpMessageIE=r("accessibilityHelpMessageIE","Press Ctrl+F1 for Accessibility Options."),e.accessibilityHelpMessage=r("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")}(cp||(cp={})),function(e){e.toggleHighContrast=r("toggleHighContrast","Toggle High Contrast Theme")}(hp||(hp={})),function(e){e.bulkEditServiceSummary=r("bulkEditServiceSummary","Made {0} edits in {1} files")}(dp||(dp={}));var pp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),gp=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},mp=function(e,t){return function(n,i){t(n,i,e)}},vp=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i},_p=function(){function e(e){this.model=e,this._onDispose=new qe}return Object.defineProperty(e.prototype,"textEditorModel",{get:function(){return this.model},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose.fire()},e}();function yp(e,t,n){return dd(e)?t(e):n(e)}var bp=function(){function e(e){this.modelService=e}return e.prototype.setEditor=function(e){this.editor=e},e.prototype.createModelReference=function(e){var t=this,n=null;return this.editor&&(n=yp(this.editor,(function(n){return t.findModel(n,e)}),(function(n){return t.findModel(n.getOriginalEditor(),e)||t.findModel(n.getModifiedEditor(),e)}))),n?Promise.resolve(new Ie(new _p(n))):Promise.reject(new Error("Model not found"))},e.prototype.findModel=function(e,t){var n=this.modelService?this.modelService.getModel(t):e.getModel();return n&&n.uri.toString()!==t.toString()?null:n},e}(),Cp=function(){function e(){}return e.prototype.show=function(){return e.NULL_PROGRESS_RUNNER},e.prototype.showWhile=function(e,t){return Promise.resolve(void 0)},e.NULL_PROGRESS_RUNNER={done:function(){},total:function(){},worked:function(){}},e}(),wp=function(){function e(){}return e}(),Sp=function(){function e(){}return e.prototype.info=function(e){return this.notify({severity:hd.Info,message:e})},e.prototype.warn=function(e){return this.notify({severity:hd.Warning,message:e})},e.prototype.error=function(e){return this.notify({severity:hd.Error,message:e})},e.prototype.notify=function(t){switch(t.severity){case hd.Error:console.error(t.message);break;case hd.Warning:console.warn(t.message);break;default:console.log(t.message);break}return e.NO_OP},e.prototype.status=function(e,t){return Me.None},e.NO_OP=new ip,e}(),Lp=function(){function e(e){this._onWillExecuteCommand=new qe,this._onDidExecuteCommand=new qe,this._instantiationService=e,this._dynamicCommands=Object.create(null)}return e.prototype.addCommand=function(e){var t=this,n=e.id;return this._dynamicCommands[n]=e,ke((function(){delete t._dynamicCommands[n]}))},e.prototype.executeCommand=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=la.getCommand(e)||this._dynamicCommands[e];if(!i)return Promise.reject(new Error("command '"+e+"' not found"));try{this._onWillExecuteCommand.fire({commandId:e,args:t});var o=this._instantiationService.invokeFunction.apply(this._instantiationService,vp([i.handler],t));return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(o)}catch(r){return Promise.reject(r)}},e}(),Np=function(e){function t(t,n,i,o,r){var s=e.call(this,t,n,i,o)||this;return s._cachedResolver=null,s._dynamicKeybindings=[],s._register(io(r,Ho.KEY_DOWN,(function(e){var t=new Jn(e),n=s._dispatch(t,t.target);n&&(t.preventDefault(),t.stopPropagation())}))),s}return pp(t,e),t.prototype.addDynamicKeybinding=function(e,t,n,i){var o=this,r=rt(t,s["a"]),a=new Te;r&&(this._dynamicKeybindings.push({keybinding:r,command:e,when:i,weight1:1e3,weight2:0}),a.add(ke((function(){for(var t=0;t<o._dynamicKeybindings.length;t++){var n=o._dynamicKeybindings[t];if(n.command===e)return o._dynamicKeybindings.splice(t,1),void o.updateResolver({source:1})}}))));var u=this._commandService;if(!(u instanceof Lp))throw new Error("Unknown command service!");return a.add(u.addCommand({id:e,handler:n})),this.updateResolver({source:1}),a},t.prototype.updateResolver=function(e){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(e)},t.prototype._getResolver=function(){if(!this._cachedResolver){var e=this._toNormalizedKeybindingItems(Hf.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new Vf(e,t)}return this._cachedResolver},t.prototype._documentHasFocus=function(){return document.hasFocus()},t.prototype._toNormalizedKeybindingItems=function(e,t){for(var n=[],i=0,o=0,r=e;o<r.length;o++){var s=r[o],a=s.when||void 0,u=s.keybinding;if(u)for(var l=this.resolveKeybinding(u),c=0,h=l;c<h.length;c++){var d=h[c];n[i++]=new Uf(d,s.command,s.commandArgs,a,t)}else n[i++]=new Uf(void 0,s.command,s.commandArgs,a,t)}return n},t.prototype.resolveKeybinding=function(e){return[new tp(e,s["a"])]},t.prototype.resolveKeyboardEvent=function(e){var t=new ut(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new tp(t,s["a"])},t}(Lf);function Dp(e){return e&&"object"===typeof e&&(!e.overrideIdentifier||"string"===typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof wt)}var Ep=function(){function e(){this._onDidChangeConfiguration=new qe,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new wf(new Cf,new bf)}return e.prototype.configuration=function(){return this._configuration},e.prototype.getValue=function(e,t){var n="string"===typeof e?e:void 0,i=Dp(e)?e:Dp(t)?t:{};return this.configuration().getValue(n,i,void 0)},e.prototype.updateValue=function(e,t,n,i){return this.configuration().updateValue(e,t),Promise.resolve()},e.prototype.inspect=function(e,t){return void 0===t&&(t={}),this.configuration().inspect(e,t,void 0)},e}(),xp=function(){function e(e){var t=this;this.configurationService=e,this._onDidChangeConfiguration=new qe,this.configurationService.onDidChangeConfiguration((function(e){t._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:function(t,n){return e.affectsConfiguration(n)}})}))}return e.prototype.getValue=function(e,t,n){var i=fn.isIPosition(t)?t:null,o=i?"string"===typeof n?n:void 0:"string"===typeof t?t:void 0;return"undefined"===typeof o?this.configurationService.getValue():this.configurationService.getValue(o)},e}(),kp=function(){function e(e){this.configurationService=e}return e.prototype.getEOL=function(e,t){var n=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return n&&"auto"!==n?n:s["d"]||s["e"]?"\n":"\r\n"},e=gp([mp(0,uf)],e),e}(),Op=function(){function e(){}return e.prototype.publicLog=function(e,t){return Promise.resolve(void 0)},e.prototype.publicLog2=function(e,t){return this.publicLog(e,t)},e}(),Tp=function(){function e(){var t=wt.from({scheme:e.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new fp({uri:t,name:"",index:0})]}}return e.prototype.getWorkspace=function(){return this.workspace},e.prototype.getWorkspaceFolder=function(t){return t&&t.scheme===e.SCHEME?this.workspace.folders[0]:null},e.SCHEME="inmemory",e}();function Mp(e,t,n){t&&e instanceof Ep&&Object.keys(t).forEach((function(i){rf(i)&&e.updateValue("editor."+i,t[i]),n&&sf(i)&&e.updateValue("diffEditor."+i,t[i])}))}var Ip,Ap,Pp,Rp=function(){function e(e){this._modelService=e}return e.prototype.hasPreviewHandler=function(){return!1},e.prototype.apply=function(e,t){var n=new Map;if(e.edits)for(var i=0,o=e.edits;i<o.length;i++){var r=o[i];if(!Iu.is(r))return Promise.reject(new Error("bad edit - only text edits are supported"));var s=this._modelService.getModel(r.resource);if(!s)return Promise.reject(new Error("bad edit - model not found"));var a=n.get(s);a||(a=[],n.set(s,a)),a.push(r.edit)}var u=0,l=0;return n.forEach((function(e,t){t.pushStackElement(),t.pushEditOperations([],e.map((function(e){return af.replaceMove(pn.lift(e.range),e.text)})),(function(){return[]})),t.pushStackElement(),l+=1,u+=e.length})),Promise.resolve({selection:void 0,ariaSummary:dr(dp.bulkEditServiceSummary,u,l)})},e}(),Fp=function(){function e(){}return e.prototype.getUriLabel=function(e,t){return"file"===e.scheme?e.fsPath:e.path},e}(),Wp=function(){function e(e){this._container=e,this.onLayout=We.None}return Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),e}();n("5029");function Vp(e){Ip=document.createElement("div"),Ip.className="monaco-aria-container",Ap=document.createElement("div"),Ap.className="monaco-alert",Ap.setAttribute("role","alert"),Ap.setAttribute("aria-atomic","true"),Ip.appendChild(Ap),Pp=document.createElement("div"),Pp.className="monaco-status",Pp.setAttribute("role","status"),Pp.setAttribute("aria-atomic","true"),Ip.appendChild(Pp),e.appendChild(Ip)}n("96b9");var Bp=function(){function e(e,t){this.chr=e,this.type=t,this.width=0}return e.prototype.fulfill=function(e){this.width=e},e}(),Hp=function(){function e(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}return e.prototype.read=function(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null},e.prototype._createDomElements=function(){var t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";var n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),n.style.fontWeight=this._bareFontInfo.fontWeight,n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(n);var i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),i.style.fontWeight="bold",i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(i);var o=document.createElement("div");o.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),o.style.fontWeight=this._bareFontInfo.fontWeight,o.style.fontSize=this._bareFontInfo.fontSize+"px",o.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,o.style.lineHeight=this._bareFontInfo.lineHeight+"px",o.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",o.style.fontStyle="italic",t.appendChild(o);for(var r=[],s=0,a=this._requests;s<a.length;s++){var u=a[s],l=void 0;0===u.type&&(l=n),2===u.type&&(l=i),1===u.type&&(l=o),l.appendChild(document.createElement("br"));var c=document.createElement("span");e._render(c,u),l.appendChild(c),r.push(c)}this._container=t,this._testElements=r},e._render=function(e,t){if(" "===t.chr){for(var n="&#160;",i=0;i<8;i++)n+=n;e.innerHTML=n}else{var o=t.chr;for(i=0;i<8;i++)o+=o;e.textContent=o}},e.prototype._readFromDomElements=function(){for(var e=0,t=this._requests.length;e<t;e++){var n=this._requests[e],i=this._testElements[e];n.fulfill(i.offsetWidth/256)}},e}();function zp(e,t){var n=new Hp(e,t);n.read()}var jp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Up=function(e){function t(t,n,i){var o=e.call(this)||this;return o.referenceDomElement=t,o.changeCallback=i,o.width=-1,o.height=-1,o.mutationObserver=null,o.windowSizeListener=null,o.measureReferenceDomElement(!1,n),o}return jp(t,e),t.prototype.dispose=function(){this.stopObserving(),e.prototype.dispose.call(this)},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.startObserving=function(){var e=this;!this.mutationObserver&&this.referenceDomElement&&(this.mutationObserver=new MutationObserver((function(){return e._onDidMutate()})),this.mutationObserver.observe(this.referenceDomElement,{attributes:!0})),this.windowSizeListener||(this.windowSizeListener=io(window,"resize",(function(){return e._onDidResizeWindow()})))},t.prototype.stopObserving=function(){this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.windowSizeListener&&(this.windowSizeListener.dispose(),this.windowSizeListener=null)},t.prototype.observe=function(e){this.measureReferenceDomElement(!0,e)},t.prototype._onDidMutate=function(){this.measureReferenceDomElement(!0)},t.prototype._onDidResizeWindow=function(){this.measureReferenceDomElement(!0)},t.prototype.measureReferenceDomElement=function(e,t){var n=0,i=0;t?(n=t.width,i=t.height):this.referenceDomElement&&(n=this.referenceDomElement.clientWidth,i=this.referenceDomElement.clientHeight),n=Math.max(5,n),i=Math.max(5,i),this.width===n&&this.height===i||(this.width=n,this.height=i,e&&this.changeCallback())},t}(Me),Kp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),qp=function(){function e(){this._keys=Object.create(null),this._values=Object.create(null)}return e.prototype.has=function(e){var t=e.getId();return!!this._values[t]},e.prototype.get=function(e){var t=e.getId();return this._values[t]},e.prototype.put=function(e,t){var n=e.getId();this._keys[n]=e,this._values[n]=t},e.prototype.remove=function(e){var t=e.getId();delete this._keys[t],delete this._values[t]},e.prototype.getValues=function(){var e=this;return Object.keys(this._keys).map((function(t){return e._values[t]}))},e}();function Gp(){Yp.INSTANCE.clearCache()}var Yp=function(e){function t(){var t=e.call(this)||this;return t._onDidChange=t._register(new qe),t.onDidChange=t._onDidChange.event,t._cache=new qp,t._evictUntrustedReadingsTimeout=-1,t}return Kp(t,e),t.prototype.dispose=function(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),e.prototype.dispose.call(this)},t.prototype.clearCache=function(){this._cache=new qp,this._onDidChange.fire()},t.prototype._writeToCache=function(e,t){var n=this;this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=setTimeout((function(){n._evictUntrustedReadingsTimeout=-1,n._evictUntrustedReadings()}),5e3))},t.prototype._evictUntrustedReadings=function(){for(var e=this._cache.getValues(),t=!1,n=0,i=e.length;n<i;n++){var o=e[n];o.isTrusted||(t=!0,this._cache.remove(o))}t&&this._onDidChange.fire()},t.prototype.readConfiguration=function(e){if(!this._cache.has(e)){var n=t._actualReadConfiguration(e);(n.typicalHalfwidthCharacterWidth<=2||n.typicalFullwidthCharacterWidth<=2||n.spaceWidth<=2||n.maxDigitWidth<=2)&&(n=new Ra({zoomLevel:kn(),fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,fontFeatureSettings:n.fontFeatureSettings,lineHeight:n.lineHeight,letterSpacing:n.letterSpacing,isMonospace:n.isMonospace,typicalHalfwidthCharacterWidth:Math.max(n.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(n.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:n.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(n.spaceWidth,5),middotWidth:Math.max(n.middotWidth,5),maxDigitWidth:Math.max(n.maxDigitWidth,5)},!1)),this._writeToCache(e,n)}return this._cache.get(e)},t.createRequest=function(e,t,n,i){var o=new Bp(e,t);return n.push(o),i&&i.push(o),o},t._actualReadConfiguration=function(e){var t=[],n=[],i=this.createRequest("n",0,t,n),o=this.createRequest("",0,t,null),r=this.createRequest(" ",0,t,n),s=this.createRequest("0",0,t,n),a=this.createRequest("1",0,t,n),u=this.createRequest("2",0,t,n),l=this.createRequest("3",0,t,n),c=this.createRequest("4",0,t,n),h=this.createRequest("5",0,t,n),d=this.createRequest("6",0,t,n),f=this.createRequest("7",0,t,n),p=this.createRequest("8",0,t,n),g=this.createRequest("9",0,t,n),m=this.createRequest("→",0,t,n),v=this.createRequest("→",0,t,null),_=this.createRequest("·",0,t,n);this.createRequest("|",0,t,n),this.createRequest("/",0,t,n),this.createRequest("-",0,t,n),this.createRequest("_",0,t,n),this.createRequest("i",0,t,n),this.createRequest("l",0,t,n),this.createRequest("m",0,t,n),this.createRequest("|",1,t,n),this.createRequest("_",1,t,n),this.createRequest("i",1,t,n),this.createRequest("l",1,t,n),this.createRequest("m",1,t,n),this.createRequest("n",1,t,n),this.createRequest("|",2,t,n),this.createRequest("_",2,t,n),this.createRequest("i",2,t,n),this.createRequest("l",2,t,n),this.createRequest("m",2,t,n),this.createRequest("n",2,t,n),zp(e,t);for(var y=Math.max(s.width,a.width,u.width,l.width,c.width,h.width,d.width,f.width,p.width,g.width),b=e.fontFeatureSettings===F.OFF,C=n[0].width,w=1,S=n.length;b&&w<S;w++){var L=C-n[w].width;if(L<-.001||L>.001){b=!1;break}}var N=!0;b&&v.width!==C&&(N=!1),v.width>m.width&&(N=!1);var D=On()>2e3;return new Ra({zoomLevel:kn(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:b,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:o.width,canUseHalfwidthRightwardsArrow:N,spaceWidth:r.width,middotWidth:_.width,maxDigitWidth:y},D)},t.INSTANCE=new t,t}(Me),Zp=function(e){function t(t,n,i,o){void 0===i&&(i=null);var r=e.call(this,t,n)||this;return r.accessibilityService=o,r._elementSizeObserver=r._register(new Up(i,n.dimension,(function(){return r._onReferenceDomElementSizeChanged()}))),r._register(Yp.INSTANCE.onDidChange((function(){return r._onCSSBasedConfigurationChanged()}))),r._validatedOptions.get(9)&&r._elementSizeObserver.startObserving(),r._register(Tn((function(e){return r._recomputeOptions()}))),r._register(r.accessibilityService.onDidChangeScreenReaderOptimized((function(){return r._recomputeOptions()}))),r._recomputeOptions(),r}return Kp(t,e),t.applyFontInfoSlow=function(e,t){e.style.fontFamily=t.getMassagedFontFamily(),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"},t.applyFontInfo=function(e,t){e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)},t.prototype._onReferenceDomElementSizeChanged=function(){this._recomputeOptions()},t.prototype._onCSSBasedConfigurationChanged=function(){this._recomputeOptions()},t.prototype.observeReferenceElement=function(e){this._elementSizeObserver.observe(e)},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getExtraEditorClassName=function(){var e="";return Bn||Hn||(e+="no-user-select "),s["e"]&&(e+="mac "),e},t.prototype._getEnvConfiguration=function(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:Wn||Fn,pixelRatio:Mn(),zoomLevel:kn(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}},t.prototype.readConfiguration=function(e){return Yp.INSTANCE.readConfiguration(e)},t}(qd),Xp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$p=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{u(i.next(e))}catch(t){r(t)}}function a(e){try{u(i["throw"](e))}catch(t){r(t)}}function u(e){e.done?n(e.value):o(e.value).then(s,a)}u((i=i.apply(e,t||[])).next())}))},Qp=function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return u([e,t])}}function u(r){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(o=2&r[0]?i["return"]:r[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(a){r=[6,a],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}},Jp=function(e){function t(t,n,i,o,r){void 0===n&&(n=""),void 0===i&&(i=""),void 0===o&&(o=!0);var s=e.call(this)||this;return s._onDidChange=s._register(new qe),s.onDidChange=s._onDidChange.event,s._enabled=!0,s._checked=!1,s._id=t,s._label=n,s._cssClass=i,s._enabled=o,s._actionCallback=r,s}return Xp(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){return this._label},set:function(e){this._setLabel(e)},enumerable:!0,configurable:!0}),t.prototype._setLabel=function(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))},Object.defineProperty(t.prototype,"tooltip",{get:function(){return this._tooltip||""},set:function(e){this._setTooltip(e)},enumerable:!0,configurable:!0}),t.prototype._setTooltip=function(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))},Object.defineProperty(t.prototype,"class",{get:function(){return this._cssClass},set:function(e){this._setClass(e)},enumerable:!0,configurable:!0}),t.prototype._setClass=function(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))},Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._setEnabled(e)},enumerable:!0,configurable:!0}),t.prototype._setEnabled=function(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))},Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(e){this._setChecked(e)},enumerable:!0,configurable:!0}),t.prototype._setChecked=function(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))},t.prototype.run=function(e,t){return this._actionCallback?this._actionCallback(e):Promise.resolve(!0)},t}(Me),eg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onDidBeforeRun=t._register(new qe),t.onDidBeforeRun=t._onDidBeforeRun.event,t._onDidRun=t._register(new qe),t.onDidRun=t._onDidRun.event,t}return Xp(t,e),t.prototype.run=function(e,t){return $p(this,void 0,void 0,(function(){var n,i;return Qp(this,(function(o){switch(o.label){case 0:if(!e.enabled)return[2,Promise.resolve(null)];this._onDidBeforeRun.fire({action:e}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.runAction(e,t)];case 2:return n=o.sent(),this._onDidRun.fire({action:e,result:n}),[3,4];case 3:return i=o.sent(),this._onDidRun.fire({action:e,error:i}),[3,4];case 4:return[2]}}))}))},t.prototype.runAction=function(e,t){var n=t?e.run(t):e.run();return Promise.resolve(n)},t}(Me),tg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ng=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},ig=function(e,t){return function(n,i){t(n,i,e)}},og=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i};function rg(e){return void 0!==e.command}var sg,ag=Nn("menuService"),ug=new(function(){function e(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new qe,this.onDidChangeMenu=this._onDidChangeMenu.event}return e.prototype.addCommand=function(e){var t=this;return this._commands.set(e.id,e),this._onDidChangeMenu.fire(0),{dispose:function(){t._commands.delete(e.id)&&t._onDidChangeMenu.fire(0)}}},e.prototype.getCommand=function(e){return this._commands.get(e)},e.prototype.getCommands=function(){var e=new Map;return this._commands.forEach((function(t,n){return e.set(n,t)})),e},e.prototype.appendMenuItem=function(e,t){var n=this,i=this._menuItems.get(e);return i?i.push(t):(i=[t],this._menuItems.set(e,i)),this._onDidChangeMenu.fire(e),{dispose:function(){var o=i.indexOf(t);o>=0&&(i.splice(o,1),n._onDidChangeMenu.fire(e))}}},e.prototype.getMenuItems=function(e){var t=(this._menuItems.get(e)||[]).slice(0);return 0===e&&this._appendImplicitItems(t),t},e.prototype._appendImplicitItems=function(e){for(var t=new Set,n=e.filter((function(e){return rg(e)})),i=0,o=n;i<o.length;i++){var r=o[i],s=r.command,a=r.alt;t.add(s.id),a&&t.add(a.id)}this._commands.forEach((function(n,i){t.has(i)||e.push({command:n})}))},e}()),lg=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o._commandService=i,o}return tg(t,e),t.prototype.run=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._commandService).executeCommand.apply(e,og([this.id],t))},t=ng([ig(2,ua)],t),t}(Jp),cg=function(e){function t(t){var n=this;return n="string"===typeof t.title?e.call(this,"",t.title,"submenu")||this:e.call(this,"",t.title.value,"submenu")||this,n.item=t,n}return tg(t,e),t}(Jp),hg=function(e){function t(n,i,o,r,s){var a=this;return a="string"===typeof n.title?e.call(this,n.id,n.title,s)||this:e.call(this,n.id,n.title.value,s)||this,a._cssClass=void 0,a._enabled=!n.precondition||r.contextMatchesRules(n.precondition),a._checked=Boolean(n.toggled&&r.contextMatchesRules(n.toggled)),a._options=o||{},a.item=n,a.alt=i?new t(i,void 0,a._options,r,s):void 0,a}return tg(t,e),t.prototype.dispose=function(){this.alt&&this.alt.dispose(),e.prototype.dispose.call(this)},t.prototype.run=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=[];return this._options.arg&&(i=og(i,[this._options.arg])),this._options.shouldForwardArgs&&(i=og(i,t)),e.prototype.run.apply(this,i)},t=ng([ig(3,Ff),ig(4,ua)],t),t}(lg),dg=Nn("telemetryService"),fg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),pg=function(){function e(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}return e.prototype.register=function(){var e=this;if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){var t=this._kbOpts.kbExpr;this.precondition&&(t=t?Df.and(t,this.precondition):this.precondition),Hf.registerCommandAndKeybindingRule({id:this.id,handler:function(t,n){return e.runCommand(t,n)},weight:this._kbOpts.weight,when:t,primary:this._kbOpts.primary,secondary:this._kbOpts.secondary,win:this._kbOpts.win,linux:this._kbOpts.linux,mac:this._kbOpts.mac,description:this._description})}else la.registerCommand({id:this.id,handler:function(t,n){return e.runCommand(t,n)},description:this._description})},e.prototype._registerMenuItem=function(e){ug.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title},when:e.when,order:e.order})},e}(),gg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fg(t,e),t.bindToContribution=function(e){return function(t){function n(e){var n=t.call(this,e)||this;return n._callback=e.handler,n}return fg(n,t),n.prototype.runEditorCommand=function(t,n,i){var o=e(n);o&&this._callback(e(n),i)},n}(t)},t.prototype.runCommand=function(e,t){var n=this,i=e.get(En),o=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(o)return o.invokeWithinContext((function(e){var i=e.get(Ff);if(i.contextMatchesRules(Ys(n.precondition)))return n.runEditorCommand(e,o,t)}))},t}(pg),mg=function(e){function t(n){var i=e.call(this,t.convertOptions(n))||this;return i.label=n.label,i.alias=n.alias,i}return fg(t,e),t.convertOptions=function(e){var t;function n(t){return t.menuId||(t.menuId=7),t.title||(t.title=e.label),t.when=Df.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push.apply(t,e.contextMenuOpts.map(n)):e.contextMenuOpts&&t.push(n(e.contextMenuOpts)),e.menuOpts=t,e},t.prototype.runEditorCommand=function(e,t,n){return this.reportTelemetry(e,t),this.run(e,t,n||{})},t.prototype.reportTelemetry=function(e,t){e.get(dg).publicLog2("editorActionInvoked",{name:this.label,id:this.id})},t}(gg);function vg(e){return bg.INSTANCE.registerEditorCommand(e),e}function _g(e){bg.INSTANCE.registerEditorAction(new e)}(function(e){function t(e){return bg.INSTANCE.getEditorCommand(e)}function n(){return bg.INSTANCE.getEditorActions()}function i(){return bg.INSTANCE.getEditorContributions()}function o(e){return bg.INSTANCE.getEditorContributions().filter((function(t){return e.indexOf(t.id)>=0}))}function r(){return bg.INSTANCE.getDiffEditorContributions()}e.getEditorCommand=t,e.getEditorActions=n,e.getEditorContributions=i,e.getSomeEditorContributions=o,e.getDiffEditorContributions=r})(sg||(sg={}));var yg={EditorCommonContributions:"editor.contributions"},bg=function(){function e(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}return e.prototype.registerEditorContribution=function(e,t){this.editorContributions.push({id:e,ctor:t})},e.prototype.getEditorContributions=function(){return this.editorContributions.slice(0)},e.prototype.getDiffEditorContributions=function(){return this.diffEditorContributions.slice(0)},e.prototype.registerEditorAction=function(e){e.register(),this.editorActions.push(e)},e.prototype.getEditorActions=function(){return this.editorActions.slice(0)},e.prototype.registerEditorCommand=function(e){e.register(),this.editorCommands[e.id]=e},e.prototype.getEditorCommand=function(e){return this.editorCommands[e]||null},e.INSTANCE=new e,e}();pd.add(yg.EditorCommonContributions,bg.INSTANCE);var Cg=function(){function e(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._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none"}return e.prototype.setMaxWidth=function(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")},e.prototype.setWidth=function(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")},e.prototype.setHeight=function(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")},e.prototype.setTop=function(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")},e.prototype.unsetTop=function(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")},e.prototype.setLeft=function(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")},e.prototype.setBottom=function(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")},e.prototype.setRight=function(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")},e.prototype.setFontFamily=function(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)},e.prototype.setFontWeight=function(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)},e.prototype.setFontSize=function(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")},e.prototype.setFontFeatureSettings=function(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)},e.prototype.setLineHeight=function(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")},e.prototype.setLetterSpacing=function(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")},e.prototype.setClassName=function(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)},e.prototype.toggleClassName=function(e,t){to(this.domNode,e,t),this._className=this.domNode.className},e.prototype.setDisplay=function(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)},e.prototype.setPosition=function(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)},e.prototype.setVisibility=function(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)},e.prototype.setBackgroundColor=function(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)},e.prototype.setLayerHinting=function(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")},e.prototype.setContain=function(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)},e.prototype.setAttribute=function(e,t){this.domNode.setAttribute(e,t)},e.prototype.removeAttribute=function(e){this.domNode.removeAttribute(e)},e.prototype.appendChild=function(e){this.domNode.appendChild(e.domNode)},e.prototype.removeChild=function(e){this.domNode.removeChild(e.domNode)},e}();function wg(e){return new Cg(e)}var Sg=0;function Lg(){var e="$memoize"+Sg++,t=void 0,n=function(n,i,o){var r=null,s=null;if("function"===typeof o.value?(r="value",s=o.value,0!==s.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"===typeof o.get&&(r="get",s=o.get),!s)throw new Error("not supported");var a=e+":"+i;o[r]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t=this,this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!0,enumerable:!1,writable:!0,value:s.apply(this,e)}),this[a]}};return n.clear=function(){"undefined"!==typeof t&&Object.getOwnPropertyNames(t).forEach((function(n){0===n.indexOf(e)&&delete t[n]}))},n}function Ng(e,t,n){return Lg()(e,t,n)}var Dg,Eg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xg=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};(function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"})(Dg||(Dg={}));var kg=function(e){function t(){var t=e.call(this)||this;return t.dispatched=!1,t.activeTouches={},t.handle=null,t.targets=[],t.ignoreTargets=[],t._lastSetTapCountTime=0,t._register(io(document,"touchstart",(function(e){return t.onTouchStart(e)}))),t._register(io(document,"touchend",(function(e){return t.onTouchEnd(e)}))),t._register(io(document,"touchmove",(function(e){return t.onTouchMove(e)}))),t}return Eg(t,e),t.addTarget=function(e){return t.isTouchDevice()?(t.INSTANCE||(t.INSTANCE=new t),t.INSTANCE.targets.push(e),{dispose:function(){t.INSTANCE.targets=t.INSTANCE.targets.filter((function(t){return t!==e}))}}):Me.None},t.ignoreTarget=function(e){return t.isTouchDevice()?(t.INSTANCE||(t.INSTANCE=new t),t.INSTANCE.ignoreTargets.push(e),{dispose:function(){t.INSTANCE.ignoreTargets=t.INSTANCE.ignoreTargets.filter((function(t){return t!==e}))}}):Me.None},t.isTouchDevice=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0},t.prototype.dispose=function(){this.handle&&(this.handle.dispose(),this.handle=null),e.prototype.dispose.call(this)},t.prototype.onTouchStart=function(e){var t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(var n=0,i=e.targetTouches.length;n<i;n++){var o=e.targetTouches.item(n);this.activeTouches[o.identifier]={id:o.identifier,initialTarget:o.target,initialTimeStamp:t,initialPageX:o.pageX,initialPageY:o.pageY,rollingTimestamps:[t],rollingPageX:[o.pageX],rollingPageY:[o.pageY]};var r=this.newGestureEvent(Dg.Start,o.target);r.pageX=o.pageX,r.pageY=o.pageY,this.dispatchEvent(r)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)},t.prototype.onTouchEnd=function(e){for(var n=Date.now(),i=Object.keys(this.activeTouches).length,o=function(o,s){var a=e.changedTouches.item(o);if(!r.activeTouches.hasOwnProperty(String(a.identifier)))return console.warn("move of an UNKNOWN touch",a),"continue";var u=r.activeTouches[a.identifier],l=Date.now()-u.initialTimeStamp;if(l<t.HOLD_DELAY&&Math.abs(u.initialPageX-yi(u.rollingPageX))<30&&Math.abs(u.initialPageY-yi(u.rollingPageY))<30){var c=r.newGestureEvent(Dg.Tap,u.initialTarget);c.pageX=yi(u.rollingPageX),c.pageY=yi(u.rollingPageY),r.dispatchEvent(c)}else if(l>=t.HOLD_DELAY&&Math.abs(u.initialPageX-yi(u.rollingPageX))<30&&Math.abs(u.initialPageY-yi(u.rollingPageY))<30){c=r.newGestureEvent(Dg.Contextmenu,u.initialTarget);c.pageX=yi(u.rollingPageX),c.pageY=yi(u.rollingPageY),r.dispatchEvent(c)}else if(1===i){var h=yi(u.rollingPageX),d=yi(u.rollingPageY),f=yi(u.rollingTimestamps)-u.rollingTimestamps[0],p=h-u.rollingPageX[0],g=d-u.rollingPageY[0],m=r.targets.filter((function(e){return u.initialTarget instanceof Node&&e.contains(u.initialTarget)}));r.inertia(m,n,Math.abs(p)/f,p>0?1:-1,h,Math.abs(g)/f,g>0?1:-1,d)}r.dispatchEvent(r.newGestureEvent(Dg.End,u.initialTarget)),delete r.activeTouches[a.identifier]},r=this,s=0,a=e.changedTouches.length;s<a;s++)o(s,a);this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)},t.prototype.newGestureEvent=function(e,t){var n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n},t.prototype.dispatchEvent=function(e){var n=this;if(e.type===Dg.Tap){var i=(new Date).getTime(),o=0;o=i-this._lastSetTapCountTime>t.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=i,e.tapCount=o}else e.type!==Dg.Change&&e.type!==Dg.Contextmenu||(this._lastSetTapCountTime=0);for(var r=0;r<this.ignoreTargets.length;r++)if(e.initialTarget instanceof Node&&this.ignoreTargets[r].contains(e.initialTarget))return;this.targets.forEach((function(t){e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),n.dispatched=!0)}))},t.prototype.inertia=function(e,n,i,o,r,s,a,u){var l=this;this.handle=co((function(){var c=Date.now(),h=c-n,d=0,f=0,p=!0;i+=t.SCROLL_FRICTION*h,s+=t.SCROLL_FRICTION*h,i>0&&(p=!1,d=o*i*h),s>0&&(p=!1,f=a*s*h);var g=l.newGestureEvent(Dg.Change);g.translationX=d,g.translationY=f,e.forEach((function(e){return e.dispatchEvent(g)})),p||l.inertia(e,c,i,o,r+d,s,a,u+f)}))},t.prototype.onTouchMove=function(e){for(var t=Date.now(),n=0,i=e.changedTouches.length;n<i;n++){var o=e.changedTouches.item(n);if(this.activeTouches.hasOwnProperty(String(o.identifier))){var r=this.activeTouches[o.identifier],s=this.newGestureEvent(Dg.Change,r.initialTarget);s.translationX=o.pageX-yi(r.rollingPageX),s.translationY=o.pageY-yi(r.rollingPageY),s.pageX=o.pageX,s.pageY=o.pageY,this.dispatchEvent(s),r.rollingPageX.length>3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(o.pageX),r.rollingPageY.push(o.pageY),r.rollingTimestamps.push(t)}else console.warn("end of an UNKNOWN touch",o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)},t.SCROLL_FRICTION=-.005,t.HOLD_DELAY=700,t.CLEAR_TAP_COUNT_TIME=400,xg([Ng],t,"isTouchDevice",null),t}(Me);function Og(e,t){var n=new si(t);return n.preventDefault(),{leftButton:n.leftButton,buttons:n.buttons,posx:n.posx,posy:n.posy}}var Tg=function(){function e(){this._hooks=new Te,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}return e.prototype.dispose=function(){this.stopMonitoring(!1),this._hooks.dispose()},e.prototype.stopMonitoring=function(e){if(this.isMonitoring()){this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;var t=this._onStopCallback;this._onStopCallback=null,e&&t&&t()}},e.prototype.isMonitoring=function(){return!!this._mouseMoveEventMerger},e.prototype.startMonitoring=function(e,t,n,i,o){var r=this;if(!this.isMonitoring()){this._mouseMoveEventMerger=n,this._mouseMoveCallback=i,this._onStopCallback=o;var a=oi.getSameOriginWindowChain(),u=s["c"]&&Bi.pointerEvents?"pointermove":"mousemove",l=s["c"]&&Bi.pointerEvents?"pointerup":"mouseup",c=a.map((function(e){return e.window.document})),h=Ao(e);h&&c.unshift(h);for(var d=0,f=c;d<f.length;d++){var p=f[d];this._hooks.add(_o(p,u,(function(e){An||e.buttons===t?r._mouseMoveCallback(e):r.stopMonitoring(!0)}),(function(e,t){return r._mouseMoveEventMerger(e,t)}))),this._hooks.add(io(p,l,(function(e){return r.stopMonitoring(!0)})))}if(oi.hasDifferentOriginAncestor()){var g=a[a.length-1];this._hooks.add(io(g.window.document,"mouseout",(function(e){var t=new si(e);"html"===t.target.tagName.toLowerCase()&&r.stopMonitoring(!0)}))),this._hooks.add(io(g.window.document,"mouseover",(function(e){var t=new si(e);"html"===t.target.tagName.toLowerCase()&&r.stopMonitoring(!0)}))),this._hooks.add(io(g.window.document.body,"mouseleave",(function(e){r.stopMonitoring(!0)})))}}},e}(),Mg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ig=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.toClientCoordinates=function(){return new Ag(this.x-No.scrollX,this.y-No.scrollY)},e}(),Ag=function(){function e(e,t){this.clientX=e,this.clientY=t}return e.prototype.toPageCoordinates=function(){return new Ig(this.clientX+No.scrollX,this.clientY+No.scrollY)},e}(),Pg=function(){function e(e,t,n,i){this.x=e,this.y=t,this.width=n,this.height=i}return e}();function Rg(e){var t=Lo(e);return new Pg(t.left,t.top,t.width,t.height)}var Fg=function(e){function t(t,n){var i=e.call(this,t)||this;return i.pos=new Ig(i.posx,i.posy),i.editorPos=Rg(n),i}return Mg(t,e),t}(si),Wg=function(){function e(e){this._editorViewDomNode=e}return e.prototype._create=function(e){return new Fg(e,this._editorViewDomNode)},e.prototype.onContextMenu=function(e,t){var n=this;return io(e,"contextmenu",(function(e){t(n._create(e))}))},e.prototype.onMouseUp=function(e,t){var n=this;return io(e,"mouseup",(function(e){t(n._create(e))}))},e.prototype.onMouseDown=function(e,t){var n=this;return io(e,"mousedown",(function(e){t(n._create(e))}))},e.prototype.onMouseLeave=function(e,t){var n=this;return ao(e,(function(e){t(n._create(e))}))},e.prototype.onMouseMoveThrottled=function(e,t,n,i){var o=this,r=function(e,t){return n(e,o._create(t))};return _o(e,"mousemove",t,r,i)},e}(),Vg=function(){function e(e){this._editorViewDomNode=e}return e.prototype._create=function(e){return new Fg(e,this._editorViewDomNode)},e.prototype.onPointerUp=function(e,t){var n=this;return io(e,"pointerup",(function(e){t(n._create(e))}))},e.prototype.onPointerDown=function(e,t){var n=this;return io(e,"pointerdown",(function(e){t(n._create(e))}))},e.prototype.onPointerLeave=function(e,t){var n=this;return uo(e,(function(e){t(n._create(e))}))},e.prototype.onPointerMoveThrottled=function(e,t,n,i){var o=this,r=function(e,t){return n(e,o._create(t))};return _o(e,"pointermove",t,r,i)},e}(),Bg=function(e){function t(t){var n=e.call(this)||this;return n._editorViewDomNode=t,n._globalMouseMoveMonitor=n._register(new Tg),n._keydownListener=null,n}return Mg(t,e),t.prototype.startMonitoring=function(e,t,n,i,o){var r=this;this._keydownListener=so(document,"keydown",(function(e){var t=e.toKeybinding();t.isModifierKey()||r._globalMouseMoveMonitor.stopMonitoring(!0)}),!0);var s=function(e,t){return n(e,new Fg(t,r._editorViewDomNode))};this._globalMouseMoveMonitor.startMonitoring(e,t,s,i,(function(){r._keydownListener.dispose(),o()}))},t}(Me),Hg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),zg=function(e){function t(){var t=e.call(this)||this;return t._shouldRender=!0,t}return Hg(t,e),t.prototype.shouldRender=function(){return this._shouldRender},t.prototype.forceShouldRender=function(){this._shouldRender=!0},t.prototype.setShouldRender=function(){this._shouldRender=!0},t.prototype.onDidRender=function(){this._shouldRender=!1},t.prototype.onConfigurationChanged=function(e){return!1},t.prototype.onContentSizeChanged=function(e){return!1},t.prototype.onCursorStateChanged=function(e){return!1},t.prototype.onDecorationsChanged=function(e){return!1},t.prototype.onFlushed=function(e){return!1},t.prototype.onFocusChanged=function(e){return!1},t.prototype.onLanguageConfigurationChanged=function(e){return!1},t.prototype.onLineMappingChanged=function(e){return!1},t.prototype.onLinesChanged=function(e){return!1},t.prototype.onLinesDeleted=function(e){return!1},t.prototype.onLinesInserted=function(e){return!1},t.prototype.onRevealRangeRequest=function(e){return!1},t.prototype.onScrollChanged=function(e){return!1},t.prototype.onThemeChanged=function(e){return!1},t.prototype.onTokensChanged=function(e){return!1},t.prototype.onTokensColorsChanged=function(e){return!1},t.prototype.onZonesChanged=function(e){return!1},t.prototype.handleEvents=function(e){for(var t=!1,n=0,i=e.length;n<i;n++){var o=e[n];switch(o.type){case 1:this.onConfigurationChanged(o)&&(t=!0);break;case 2:this.onContentSizeChanged(o)&&(t=!0);break;case 3:this.onCursorStateChanged(o)&&(t=!0);break;case 4:this.onDecorationsChanged(o)&&(t=!0);break;case 5:this.onFlushed(o)&&(t=!0);break;case 6:this.onFocusChanged(o)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(o)&&(t=!0);break;case 8:this.onLineMappingChanged(o)&&(t=!0);break;case 9:this.onLinesChanged(o)&&(t=!0);break;case 10:this.onLinesDeleted(o)&&(t=!0);break;case 11:this.onLinesInserted(o)&&(t=!0);break;case 12:this.onRevealRangeRequest(o)&&(t=!0);break;case 13:this.onScrollChanged(o)&&(t=!0);break;case 15:this.onTokensChanged(o)&&(t=!0);break;case 14:this.onThemeChanged(o)&&(t=!0);break;case 16:this.onTokensColorsChanged(o)&&(t=!0);break;case 17:this.onZonesChanged(o)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(o)}}t&&(this._shouldRender=!0)},t}(Me),jg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ug=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._context.addEventHandler(n),n}return jg(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t}(zg),Kg=function(){function e(){}return e.write=function(e,t){e.setAttribute("data-mprt",String(t))},e.read=function(e){var t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)},e.collect=function(e,t){var n=[],i=0;while(e&&e!==document.body){if(e===t)break;e.nodeType===e.ELEMENT_NODE&&(n[i++]=this.read(e)),e=e.parentElement}for(var o=new Uint8Array(i),r=0;r<i;r++)o[r]=n[i-r-1];return o},e}(),qg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Gg=function(){function e(e,t){this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;var n=this._viewLayout.getCurrentViewport();this.scrollTop=n.top,this.scrollLeft=n.left,this.viewportWidth=n.width,this.viewportHeight=n.height}return e.prototype.getScrolledTopFromAbsoluteTop=function(e){return e-this.scrollTop},e.prototype.getVerticalOffsetForLineNumber=function(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)},e.prototype.getDecorationsInViewport=function(){return this.viewportData.getDecorationsInViewport()},e}(),Yg=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o._viewLines=i,o}return qg(t,e),t.prototype.linesVisibleRangesForRange=function(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)},t.prototype.visibleRangeForPosition=function(e){return this._viewLines.visibleRangeForPosition(e)},t}(Gg),Zg=function(){function e(e,t,n){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=n}return e}(),Xg=function(){function e(e,t){this.left=Math.round(e),this.width=Math.round(t)}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e}(),$g=function(){function e(e,t){this.outsideRenderedLine=e,this.left=Math.round(t)}return e}(),Qg=function(){function e(e,t){this.outsideRenderedLine=e,this.ranges=t}return e}(),Jg=function(){function e(e,t){this.left=e,this.width=t}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e.compare=function(e,t){return e.left-t.left},e}(),em=function(){function e(){}return e._createRange=function(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange},e._detachRange=function(e,t){e.selectNodeContents(t)},e._readClientRects=function(e,t,n,i,o){var r=this._createRange();try{return r.setStart(e,t),r.setEnd(n,i),r.getClientRects()}catch(s){return null}finally{this._detachRange(r,o)}},e._mergeAdjacentRanges=function(e){if(1===e.length)return[new Xg(e[0].left,e[0].width)];e.sort(Jg.compare);for(var t=[],n=0,i=e[0].left,o=e[0].width,r=1,s=e.length;r<s;r++){var a=e[r],u=a.left,l=a.width;i+o+.9>=u?o=Math.max(o,u+l-i):(t[n++]=new Xg(i,o),i=u,o=l)}return t[n++]=new Xg(i,o),t},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var n=[],i=0,o=e.length;i<o;i++){var r=e[i];n[i]=new Jg(Math.max(0,r.left-t),r.width)}return this._mergeAdjacentRanges(n)},e.readHorizontalRanges=function(e,t,n,i,o,r,s){var a=0,u=e.children.length-1;if(a>u)return null;t=Math.min(u,Math.max(a,t)),i=Math.min(u,Math.max(a,i)),t!==i&&i>0&&0===o&&(i--,o=1073741824);var l=e.children[t].firstChild,c=e.children[i].firstChild;if(l&&c||(!l&&0===n&&t>0&&(l=e.children[t-1].firstChild,n=1073741824),!c&&0===o&&i>0&&(c=e.children[i-1].firstChild,o=1073741824)),!l||!c)return null;n=Math.min(l.textContent.length,Math.max(0,n)),o=Math.min(c.textContent.length,Math.max(0,o));var h=this._readClientRects(l,n,c,o,s);return this._createHorizontalRangesFromClientRects(h,r)},e}(),tm=Nn("themeService");function nm(e){return{id:e}}var im="dark",om="hc";function rm(e){switch(e){case im:return"vs-dark";case om:return"hc-black";default:return"vs"}}var sm={ThemingContribution:"base.contributions.theming"},am=function(){function e(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new qe}return e.prototype.onThemeChange=function(e){var t=this;return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),ke((function(){var n=t.themingParticipants.indexOf(e);t.themingParticipants.splice(n,1)}))},e.prototype.getThemingParticipants=function(){return this.themingParticipants},e}(),um=new am;function lm(e){return um.onThemeChange(e)}pd.add(sm.ThemingContribution,um);var cm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),hm=function(){return!!s["f"]||!(s["d"]||Fn||Bn)}(),dm=Rn,fm=function(){function e(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}return Object.defineProperty(e.prototype,"clientRectDeltaLeft",{get:function(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft},enumerable:!0,configurable:!0}),e}(),pm=function(){function e(e,t){this.themeType=t;var n=e.options,i=n.get(34);this.renderWhitespace=n.get(74),this.renderControlCharacters=n.get(69),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.useMonospaceOptimizations=i.isMonospace&&!n.get(23),this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(49),this.stopRenderingLineAfter=n.get(88),this.fontLigatures=n.get(35)}return e.prototype.equals=function(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures},e}(),gm=function(){function e(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}return e.prototype.getDomNode=function(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null},e.prototype.setDomNode=function(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=wg(e)},e.prototype.onContentChanged=function(){this._isMaybeInvalid=!0},e.prototype.onTokensChanged=function(){this._isMaybeInvalid=!0},e.prototype.onDecorationsChanged=function(){this._isMaybeInvalid=!0},e.prototype.onOptionsChanged=function(e){this._isMaybeInvalid=!0,this._options=e},e.prototype.onSelectionChanged=function(){return!(!dm&&this._options.themeType!==om&&"selection"!==this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)},e.prototype.renderLine=function(t,n,i,o){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;var r=i.getViewLineRenderingData(t),s=this._options,a=dh.filter(r.inlineDecorations,t,r.minColumn,r.maxColumn),u=null;if(dm||s.themeType===om||"selection"===this._options.renderWhitespace)for(var l=i.selections,c=0,h=l;c<h.length;c++){var d=h[c];if(!(d.endLineNumber<t||d.startLineNumber>t)){var f=d.startLineNumber===t?d.startColumn:r.minColumn,p=d.endLineNumber===t?d.endColumn:r.maxColumn;f<p&&("selection"!==this._options.renderWhitespace?a.push(new dh(f,p,"inline-selected-text",0)):(u||(u=[]),u.push(new vh(f-1,p-1))))}}var g=new _h(s.useMonospaceOptimizations,s.canUseHalfwidthRightwardsArrow,r.content,r.continuesWithWrappedLine,r.isBasicASCII,r.containsRTL,r.minColumn-1,r.tokens,a,r.tabSize,r.startVisibleColumn,s.spaceWidth,s.middotWidth,s.stopRenderingLineAfter,s.renderWhitespace,s.renderControlCharacters,s.fontLigatures!==F.OFF,u);if(this._renderedViewLine&&this._renderedViewLine.input.equals(g))return!1;o.appendASCIIString('<div style="top:'),o.appendASCIIString(String(n)),o.appendASCIIString("px;height:"),o.appendASCIIString(String(this._options.lineHeight)),o.appendASCIIString('px;" class="'),o.appendASCIIString(e.CLASS_NAME),o.appendASCIIString('">');var m=Ch(g,o);o.appendASCIIString("</div>");var v=null;return hm&&r.isBasicASCII&&s.useMonospaceOptimizations&&0===m.containsForeignElements&&r.content.length<300&&g.lineTokens.getCount()<100&&(v=new mm(this._renderedViewLine?this._renderedViewLine.domNode:null,g,m.characterMapping)),v||(v=ym(this._renderedViewLine?this._renderedViewLine.domNode:null,g,m.characterMapping,m.containsRTL,m.containsForeignElements)),this._renderedViewLine=v,!0},e.prototype.layoutLine=function(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))},e.prototype.getWidth=function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0},e.prototype.getWidthIsFast=function(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()},e.prototype.getVisibleRangesForRange=function(e,t,n){if(!this._renderedViewLine)return null;e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));var i=0|this._renderedViewLine.input.stopRenderingLineAfter,o=!1;-1!==i&&e>i+1&&t>i+1&&(o=!0),-1!==i&&e>i+1&&(e=i+1),-1!==i&&t>i+1&&(t=i+1);var r=this._renderedViewLine.getVisibleRangesForRange(e,t,n);return r&&r.length>0?new Qg(o,r):null},e.prototype.getColumnOfNodeOffset=function(e,t,n){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,n):1},e.CLASS_NAME="view-line",e}(),mm=function(){function e(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth}return e.prototype.getWidth=function(){return this._getCharPosition(this._characterMapping.length)},e.prototype.getWidthIsFast=function(){return!0},e.prototype.getVisibleRangesForRange=function(e,t,n){var i=this._getCharPosition(e),o=this._getCharPosition(t);return[new Xg(i,o-i)]},e.prototype._getCharPosition=function(e){var t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])},e.prototype.getColumnOfNodeOffset=function(e,t,n){var i=t.textContent.length,o=-1;while(t)t=t.previousSibling,o++;var r=this._characterMapping.partDataToCharOffset(o,i,n);return r+1},e}(),vm=function(){function e(e,t,n,i,o){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(var r=0,s=this._characterMapping.length;r<=s;r++)this._pixelOffsetCache[r]=-1}}return e.prototype._getReadingTarget=function(e){return e.domNode.firstChild},e.prototype.getWidth=function(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0},e.prototype.getWidthIsFast=function(){return-1!==this._cachedWidth},e.prototype.getVisibleRangesForRange=function(e,t,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){var i=this._readPixelOffset(this.domNode,e,n);if(-1===i)return null;var o=this._readPixelOffset(this.domNode,t,n);return-1===o?null:[new Xg(i,o-i)]}return this._readVisibleRangesForRange(this.domNode,e,t,n)},e.prototype._readVisibleRangesForRange=function(e,t,n,i){if(t===n){var o=this._readPixelOffset(e,t,i);return-1===o?null:[new Xg(o,0)]}return this._readRawVisibleRangesForRange(e,t,n,i)},e.prototype._readPixelOffset=function(e,t,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();var i=this._getReadingTarget(e);return i.firstChild?i.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){var o=this._pixelOffsetCache[t];if(-1!==o)return o;var r=this._actualReadPixelOffset(e,t,n);return this._pixelOffsetCache[t]=r,r}return this._actualReadPixelOffset(e,t,n)},e.prototype._actualReadPixelOffset=function(e,t,n){if(0===this._characterMapping.length){var i=em.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.endNode);return i&&0!==i.length?i[0].left:-1}if(t===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var o=this._characterMapping.charOffsetToPartData(t-1),r=yh.getPartIndex(o),s=yh.getCharIndex(o),a=em.readHorizontalRanges(this._getReadingTarget(e),r,s,r,s,n.clientRectDeltaLeft,n.endNode);return a&&0!==a.length?a[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,n,i){if(1===t&&n===this._characterMapping.length)return[new Xg(0,this.getWidth())];var o=this._characterMapping.charOffsetToPartData(t-1),r=yh.getPartIndex(o),s=yh.getCharIndex(o),a=this._characterMapping.charOffsetToPartData(n-1),u=yh.getPartIndex(a),l=yh.getCharIndex(a);return em.readHorizontalRanges(this._getReadingTarget(e),r,s,u,l,i.clientRectDeltaLeft,i.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,n){var i=t.textContent.length,o=-1;while(t)t=t.previousSibling,o++;var r=this._characterMapping.partDataToCharOffset(o,i,n);return r+1},e}(),_m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cm(t,e),t.prototype._readVisibleRangesForRange=function(t,n,i,o){var r=e.prototype._readVisibleRangesForRange.call(this,t,n,i,o);if(!r||0===r.length||n===i||1===n&&i===this._characterMapping.length)return r;if(!this.input.containsRTL){var s=this._readPixelOffset(t,i,o);if(-1!==s){var a=r[r.length-1];a.left<s&&(a.width=s-a.left)}}return r},t}(vm),ym=function(){return Wn?bm:Cm}();function bm(e,t,n,i,o){return new _m(e,t,n,i,o)}function Cm(e,t,n,i,o){return new vm(e,t,n,i,o)}var wm=function(){function e(e,t){this.beforeVersionId=e,this.beforeCursorState=t,this.afterCursorState=null,this.afterVersionId=-1,this.editOperations=[]}return e.prototype.undo=function(e){for(var t=this.editOperations.length-1;t>=0;t--)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e.prototype.redo=function(e){for(var t=0;t<this.editOperations.length;t++)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e}();function Sm(e){var t=e.getEOL();return"\n"===t?0:1}var Lm=function(){function e(e,t){this.beforeVersionId=e,this.beforeCursorState=null,this.afterCursorState=null,this.afterVersionId=-1,this.eol=t}return e.prototype.undo=function(e){var t=Sm(e);e.setEOL(this.eol),this.eol=t},e.prototype.redo=function(e){var t=Sm(e);e.setEOL(this.eol),this.eol=t},e}(),Nm=function(){function e(e){this.model=e,this.currentOpenStackElement=null,this.past=[],this.future=[]}return e.prototype.pushStackElement=function(){null!==this.currentOpenStackElement&&(this.past.push(this.currentOpenStackElement),this.currentOpenStackElement=null)},e.prototype.clear=function(){this.currentOpenStackElement=null,this.past=[],this.future=[]},e.prototype.pushEOL=function(e){this.future=[],this.currentOpenStackElement&&this.pushStackElement();var t=Sm(this.model),n=new Lm(this.model.getAlternativeVersionId(),t);this.model.setEOL(e),n.afterVersionId=this.model.getVersionId(),this.currentOpenStackElement=n,this.pushStackElement()},e.prototype.pushEditOperation=function(t,n,i){this.future=[];var o=null;this.currentOpenStackElement&&(this.currentOpenStackElement instanceof wm?o=this.currentOpenStackElement:this.pushStackElement()),this.currentOpenStackElement||(o=new wm(this.model.getAlternativeVersionId(),t),this.currentOpenStackElement=o);var r={operations:this.model.applyEdits(n)};return o.editOperations.push(r),o.afterCursorState=e._computeCursorState(i,r.operations),o.afterVersionId=this.model.getVersionId(),o.afterCursorState},e._computeCursorState=function(e,t){try{return e?e(t):null}catch(n){return ge(n),null}},e.prototype.undo=function(){if(this.pushStackElement(),this.past.length>0){var e=this.past.pop();try{e.undo(this.model)}catch(t){return ge(t),this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.canUndo=function(){return this.past.length>0||null!==this.currentOpenStackElement},e.prototype.redo=function(){if(this.future.length>0){var e=this.future.pop();try{e.redo(this.model)}catch(t){return ge(t),this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e.prototype.canRedo=function(){return this.future.length>0},e}(),Dm=function(){function e(){this.spacesDiff=0,this.looksLikeAlignment=!1}return e}();function Em(e,t,n,i,o){var r;for(o.spacesDiff=0,o.looksLikeAlignment=!1,r=0;r<t&&r<i;r++){var s=e.charCodeAt(r),a=n.charCodeAt(r);if(s!==a)break}for(var u=0,l=0,c=r;c<t;c++){s=e.charCodeAt(c);32===s?u++:l++}var h=0,d=0;for(c=r;c<i;c++){a=n.charCodeAt(c);32===a?h++:d++}if(!(u>0&&l>0)&&!(h>0&&d>0)){var f=Math.abs(l-d),p=Math.abs(u-h);if(0===f)return o.spacesDiff=p,void(p>0&&0<=h-1&&h-1<e.length&&h<n.length&&32!==n.charCodeAt(h)&&32===e.charCodeAt(h-1)&&44===e.charCodeAt(e.length-1)&&(o.looksLikeAlignment=!0));p%f!==0||(o.spacesDiff=p/f)}}function xm(e,t,n){for(var i=Math.min(e.getLineCount(),1e4),o=0,r=0,s="",a=0,u=[2,4,6,8,3,5,7],l=8,c=[0,0,0,0,0,0,0,0,0],h=new Dm,d=1;d<=i;d++){for(var f=e.getLineLength(d),p=e.getLineContent(d),g=f<=65536,m=!1,v=0,_=0,y=0,b=0,C=f;b<C;b++){var w=g?p.charCodeAt(b):e.getLineCharCode(d,b);if(9===w)y++;else{if(32!==w){m=!0,v=b;break}_++}}if(m&&(y>0?o++:_>1&&r++,Em(s,a,p,v,h),!h.looksLikeAlignment||n&&t===h.spacesDiff)){var S=h.spacesDiff;S<=l&&c[S]++,s=p,a=v}}var L=n;o!==r&&(L=o<r);var N=t;if(L){var D=L?0:.1*i;u.forEach((function(e){var t=c[e];t>D&&(D=t,N=e)})),4===N&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(N=2)}return{insertSpaces:L,tabSize:N}}function km(e){return(1&e.metadata)>>>0}function Om(e,t){e.metadata=254&e.metadata|t<<0}function Tm(e){return(2&e.metadata)>>>1===1}function Mm(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function Im(e){return(4&e.metadata)>>>2===1}function Am(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function Pm(e){return(8&e.metadata)>>>3===1}function Rm(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function Fm(e){return(48&e.metadata)>>>4}function Wm(e,t){e.metadata=207&e.metadata|t<<4}function Vm(e){return(64&e.metadata)>>>6===1}function Bm(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}var Hm=function(){function e(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,Om(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,Am(this,!1),Wm(this,1),Rm(this,!1),Bm(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,Mm(this,!1)}return e.prototype.reset=function(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;Am(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),Wm(this,this.options.stickiness),Rm(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),Bm(this,this.options.collapseOnReplaceEdit)},e.prototype.setCachedOffsets=function(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),zm=new Hm(null,0,0);zm.parent=zm,zm.left=zm,zm.right=zm,Om(zm,0);var jm=function(){function e(){this.root=zm,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,t,n,i,o){return this.root===zm?[]:Qm(this,e,t,n,i,o)},e.prototype.search=function(e,t,n){return this.root===zm?[]:$m(this,e,t,n)},e.prototype.collectNodesFromOwner=function(e){return Zm(this,e)},e.prototype.collectNodesPostOrder=function(){return Xm(this)},e.prototype.insert=function(e){Jm(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){tv(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){var n=e,i=0;while(e!==this.root)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;var o=n.start+i,r=n.end+i;n.setCachedOffsets(o,r,t)},e.prototype.acceptReplace=function(e,t,n,i){for(var o=Gm(this,e,e+t),r=0,s=o.length;r<s;r++){var a=o[r];tv(this,a)}this._normalizeDeltaIfNecessary(),Ym(this,e,e+t,n),this._normalizeDeltaIfNecessary();for(r=0,s=o.length;r<s;r++){a=o[r];a.start=a.cachedAbsoluteStart,a.end=a.cachedAbsoluteEnd,qm(a,e,e+t,n,i),a.maxEnd=a.end,Jm(this,a)}this._normalizeDeltaIfNecessary()},e.prototype._normalizeDeltaIfNecessary=function(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,Um(this))},e}();function Um(e){var t=e.root,n=0;while(t!==zm)t.left===zm||Tm(t.left)?t.right===zm||Tm(t.right)?(t.start=n+t.start,t.end=n+t.end,t.delta=0,av(t),Mm(t,!0),Mm(t.left,!1),Mm(t.right,!1),t===t.parent.right&&(n-=t.parent.delta),t=t.parent):(n+=t.delta,t=t.right):t=t.left;Mm(e.root,!1)}function Km(e,t,n,i){return e<n||!(e>n)&&(1!==i&&(2===i||t))}function qm(e,t,n,i,o){var r=Fm(e),s=0===r||2===r,a=1===r||2===r,u=n-t,l=i,c=Math.min(u,l),h=e.start,d=!1,f=e.end,p=!1;t<=h&&f<=n&&Vm(e)&&(e.start=t,d=!0,e.end=t,p=!0);var g=o?1:u>0?2:0;if(!d&&Km(h,s,t,g)&&(d=!0),!p&&Km(f,a,t,g)&&(p=!0),c>0&&!o){g=u>l?2:0;!d&&Km(h,s,t+c,g)&&(d=!0),!p&&Km(f,a,t+c,g)&&(p=!0)}g=o?1:0;!d&&Km(h,s,n,g)&&(e.start=t+l,d=!0),!p&&Km(f,a,n,g)&&(e.end=t+l,p=!0);var m=l-u;d||(e.start=Math.max(0,h+m)),p||(e.end=Math.max(0,f+m)),e.start>e.end&&(e.end=e.start)}function Gm(e,t,n){var i=e.root,o=0,r=0,s=0,a=0,u=[],l=0;while(i!==zm)if(Tm(i))Mm(i.left,!1),Mm(i.right,!1),i===i.parent.right&&(o-=i.parent.delta),i=i.parent;else{if(!Tm(i.left)){if(r=o+i.maxEnd,r<t){Mm(i,!0);continue}if(i.left!==zm){i=i.left;continue}}s=o+i.start,s>n?Mm(i,!0):(a=o+i.end,a>=t&&(i.setCachedOffsets(s,a,0),u[l++]=i),Mm(i,!0),i.right===zm||Tm(i.right)||(o+=i.delta,i=i.right))}return Mm(e.root,!1),u}function Ym(e,t,n,i){var o=e.root,r=0,s=0,a=0,u=i-(n-t);while(o!==zm)if(Tm(o))Mm(o.left,!1),Mm(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),av(o),o=o.parent;else{if(!Tm(o.left)){if(s=r+o.maxEnd,s<t){Mm(o,!0);continue}if(o.left!==zm){o=o.left;continue}}a=r+o.start,a>n?(o.start+=u,o.end+=u,o.delta+=u,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),Mm(o,!0)):(Mm(o,!0),o.right===zm||Tm(o.right)||(r+=o.delta,o=o.right))}Mm(e.root,!1)}function Zm(e,t){var n=e.root,i=[],o=0;while(n!==zm)Tm(n)?(Mm(n.left,!1),Mm(n.right,!1),n=n.parent):n.left===zm||Tm(n.left)?(n.ownerId===t&&(i[o++]=n),Mm(n,!0),n.right===zm||Tm(n.right)||(n=n.right)):n=n.left;return Mm(e.root,!1),i}function Xm(e){var t=e.root,n=[],i=0;while(t!==zm)Tm(t)?(Mm(t.left,!1),Mm(t.right,!1),t=t.parent):t.left===zm||Tm(t.left)?t.right===zm||Tm(t.right)?(n[i++]=t,Mm(t,!0)):t=t.right:t=t.left;return Mm(e.root,!1),n}function $m(e,t,n,i){var o=e.root,r=0,s=0,a=0,u=[],l=0;while(o!==zm)if(Tm(o))Mm(o.left,!1),Mm(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;else if(o.left===zm||Tm(o.left)){s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,i);var c=!0;t&&o.ownerId&&o.ownerId!==t&&(c=!1),n&&Im(o)&&(c=!1),c&&(u[l++]=o),Mm(o,!0),o.right===zm||Tm(o.right)||(r+=o.delta,o=o.right)}else o=o.left;return Mm(e.root,!1),u}function Qm(e,t,n,i,o,r){var s=e.root,a=0,u=0,l=0,c=0,h=[],d=0;while(s!==zm)if(Tm(s))Mm(s.left,!1),Mm(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!Tm(s.left)){if(u=a+s.maxEnd,u<t){Mm(s,!0);continue}if(s.left!==zm){s=s.left;continue}}if(l=a+s.start,l>n)Mm(s,!0);else{if(c=a+s.end,c>=t){s.setCachedOffsets(l,c,r);var f=!0;i&&s.ownerId&&s.ownerId!==i&&(f=!1),o&&Im(s)&&(f=!1),f&&(h[d++]=s)}Mm(s,!0),s.right===zm||Tm(s.right)||(a+=s.delta,s=s.right)}}return Mm(e.root,!1),h}function Jm(e,t){if(e.root===zm)return t.parent=zm,t.left=zm,t.right=zm,Om(t,0),e.root=t,e.root;ev(e,t),uv(t.parent);var n=t;while(n!==e.root&&1===km(n.parent))if(n.parent===n.parent.parent.left){var i=n.parent.parent.right;1===km(i)?(Om(n.parent,0),Om(i,0),Om(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&(n=n.parent,ov(e,n)),Om(n.parent,0),Om(n.parent.parent,1),rv(e,n.parent.parent))}else{i=n.parent.parent.left;1===km(i)?(Om(n.parent,0),Om(i,0),Om(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&(n=n.parent,rv(e,n)),Om(n.parent,0),Om(n.parent.parent,1),ov(e,n.parent.parent))}return Om(e.root,0),t}function ev(e,t){var n=0,i=e.root,o=t.start,r=t.end;while(1){var s=lv(o,r,i.start+n,i.end+n);if(s<0){if(i.left===zm){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===zm){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}}t.parent=i,t.left=zm,t.right=zm,Om(t,1)}function tv(e,t){var n,i;if(t.left===zm?(n=t.right,i=t,n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===zm?(n=t.left,i=t):(i=nv(t.right),n=i.right,n.start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,Om(n,0),t.detach(),iv(),av(n),void(e.root.parent=zm);var o,r=1===km(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,Om(i,km(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==zm&&(i.left.parent=i),i.right!==zm&&(i.right.parent=i)),t.detach(),r)return uv(n.parent),i!==t&&(uv(i),uv(i.parent)),void iv();uv(n),uv(n.parent),i!==t&&(uv(i),uv(i.parent));while(n!==e.root&&0===km(n))n===n.parent.left?(o=n.parent.right,1===km(o)&&(Om(o,0),Om(n.parent,1),ov(e,n.parent),o=n.parent.right),0===km(o.left)&&0===km(o.right)?(Om(o,1),n=n.parent):(0===km(o.right)&&(Om(o.left,0),Om(o,1),rv(e,o),o=n.parent.right),Om(o,km(n.parent)),Om(n.parent,0),Om(o.right,0),ov(e,n.parent),n=e.root)):(o=n.parent.left,1===km(o)&&(Om(o,0),Om(n.parent,1),rv(e,n.parent),o=n.parent.left),0===km(o.left)&&0===km(o.right)?(Om(o,1),n=n.parent):(0===km(o.left)&&(Om(o.right,0),Om(o,1),ov(e,o),o=n.parent.left),Om(o,km(n.parent)),Om(n.parent,0),Om(o.left,0),rv(e,n.parent),n=e.root));Om(n,0),iv()}function nv(e){while(e.left!==zm)e=e.left;return e}function iv(){zm.parent=zm,zm.delta=0,zm.start=0,zm.end=0}function ov(e,t){var n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==zm&&(n.left.parent=t),n.parent=t.parent,t.parent===zm?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,av(t),av(n)}function rv(e,t){var n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==zm&&(n.right.parent=t),n.parent=t.parent,t.parent===zm?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,av(t),av(n)}function sv(e){var t=e.end;if(e.left!==zm){var n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==zm){var i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function av(e){e.maxEnd=sv(e)}function uv(e){while(e!==zm){var t=sv(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function lv(e,t,n,i){return e===n?t-i:e-n}var cv=function(){function e(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}return e.prototype.next=function(){if(this.right!==hv)return dv(this.right);var e=this;while(e.parent!==hv){if(e.parent.left===e)break;e=e.parent}return e.parent===hv?hv:e.parent},e.prototype.prev=function(){if(this.left!==hv)return fv(this.left);var e=this;while(e.parent!==hv){if(e.parent.right===e)break;e=e.parent}return e.parent===hv?hv:e.parent},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),hv=new cv(null,0);function dv(e){while(e.left!==hv)e=e.left;return e}function fv(e){while(e.right!==hv)e=e.right;return e}function pv(e){return e===hv?0:e.size_left+e.piece.length+pv(e.right)}function gv(e){return e===hv?0:e.lf_left+e.piece.lineFeedCnt+gv(e.right)}function mv(){hv.parent=hv}function vv(e,t){var n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==hv&&(n.left.parent=t),n.parent=t.parent,t.parent===hv?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function _v(e,t){var n=t.left;t.left=n.right,n.right!==hv&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===hv?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function yv(e,t){var n,i;if(t.left===hv?(i=t,n=i.right):t.right===hv?(i=t,n=i.left):(i=dv(t.right),n=i.right),i===e.root)return e.root=n,n.color=0,t.detach(),mv(),void(e.root.parent=hv);var o=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,wv(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,wv(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==hv&&(i.left.parent=i),i.right!==hv&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,wv(e,i)),t.detach(),n.parent.left===n){var r=pv(n),s=gv(n);if(r!==n.parent.size_left||s!==n.parent.lf_left){var a=r-n.parent.size_left,u=s-n.parent.lf_left;n.parent.size_left=r,n.parent.lf_left=s,Cv(e,n.parent,a,u)}}if(wv(e,n.parent),o)mv();else{var l;while(n!==e.root&&0===n.color)n===n.parent.left?(l=n.parent.right,1===l.color&&(l.color=0,n.parent.color=1,vv(e,n.parent),l=n.parent.right),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.right.color&&(l.left.color=0,l.color=1,_v(e,l),l=n.parent.right),l.color=n.parent.color,n.parent.color=0,l.right.color=0,vv(e,n.parent),n=e.root)):(l=n.parent.left,1===l.color&&(l.color=0,n.parent.color=1,_v(e,n.parent),l=n.parent.left),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.left.color&&(l.right.color=0,l.color=1,vv(e,l),l=n.parent.left),l.color=n.parent.color,n.parent.color=0,l.left.color=0,_v(e,n.parent),n=e.root));n.color=0,mv()}}function bv(e,t){wv(e,t);while(t!==e.root&&1===t.parent.color)if(t.parent===t.parent.parent.left){var n=t.parent.parent.right;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,vv(e,t)),t.parent.color=0,t.parent.parent.color=1,_v(e,t.parent.parent))}else{n=t.parent.parent.left;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,_v(e,t)),t.parent.color=0,t.parent.parent.color=1,vv(e,t.parent.parent))}e.root.color=0}function Cv(e,t,n,i){while(t!==e.root&&t!==hv)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function wv(e,t){var n=0,i=0;if(t!==e.root){if(0===n){while(t!==e.root&&t===t.parent.right)t=t.parent;if(t===e.root)return;t=t.parent,n=pv(t.left)-t.size_left,i=gv(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i}while(t!==e.root&&(0!==n||0!==i))t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}hv.parent=hv,hv.left=hv,hv.right=hv,hv.color=0;var Sv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Lv=function(e){function t(t){for(var n=e.call(this,0)||this,i=0,o=t.length;i<o;i++)n.set(t.charCodeAt(i),2);return n.set(32,1),n.set(9,1),n}return Sv(t,e),t}(Cc);function Nv(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e(n)),t[n]}}var Dv=Nv((function(e){return new Lv(e)})),Ev=999,xv=function(){function e(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i}return e.prototype.parseSearchRequest=function(){if(""===this.searchString)return null;var e;e=this.isRegex?kv(this.searchString):this.searchString.indexOf("\n")>=0;var t=null;try{t=vr(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(i){return null}if(!t)return null;var n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new Ov(t,this.wordSeparators?Dv(this.wordSeparators):null,n?this.searchString:null)},e}();function kv(e){if(!e||0===e.length)return!1;for(var t=0,n=e.length;t<n;t++){var i=e.charCodeAt(t);if(92===i){if(t++,t>=n)break;var o=e.charCodeAt(t);if(110===o||114===o||87===o||119===o)return!0}}return!1}var Ov=function(){function e(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}return e}();function Tv(e,t,n){if(!n)return new ja(e,null);for(var i=[],o=0,r=t.length;o<r;o++)i[o]=t[o];return new ja(e,i)}var Mv=function(){function e(e){for(var t=[],n=0,i=0,o=e.length;i<o;i++)10===e.charCodeAt(i)&&(t[n++]=i);this._lineFeedsOffsets=t}return e.prototype.findLineFeedCountBeforeOffset=function(e){var t=this._lineFeedsOffsets,n=0,i=t.length-1;if(-1===i)return 0;if(e<=t[0])return 0;while(n<i){var o=n+((i-n)/2>>0);t[o]>=e?i=o-1:t[o+1]>=e?(n=o,i=o):n=o+1}return n+1},e}(),Iv=function(){function e(){}return e.findMatches=function(e,t,n,i,o){var r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,n,new Fv(r.wordSeparators,r.regex),i,o):this._doFindMatchesLineByLine(e,n,r,i,o):[]},e._getMultilineMatchRange=function(e,t,n,i,o,r){var s,a,u=0;if(i?(u=i.findLineFeedCountBeforeOffset(o),s=t+o+u):s=t+o,i){var l=i.findLineFeedCountBeforeOffset(o+r.length),c=l-u;a=s+r.length+c}else a=s+r.length;var h=e.getPositionAt(s),d=e.getPositionAt(a);return new pn(h.lineNumber,h.column,d.lineNumber,d.column)},e._doFindMatchesMultiline=function(e,t,n,i,o){var r,s=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),u="\r\n"===e.getEOL()?new Mv(a):null,l=[],c=0;n.reset(0);while(r=n.next(a))if(l[c++]=Tv(this._getMultilineMatchRange(e,s,a,u,r.index,r[0]),r,i),c>=o)return l;return l},e._doFindMatchesLineByLine=function(e,t,n,i,o){var r=[],s=0;if(t.startLineNumber===t.endLineNumber){var a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,r,i,o),r}var u=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,u,t.startLineNumber,t.startColumn-1,s,r,i,o);for(var l=t.startLineNumber+1;l<t.endLineNumber&&s<o;l++)s=this._findMatchesInLine(n,e.getLineContent(l),l,0,s,r,i,o);if(s<o){var c=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);s=this._findMatchesInLine(n,c,t.endLineNumber,0,s,r,i,o)}return r},e._findMatchesInLine=function(e,t,n,i,o,r,s,a){var u=e.wordSeparators;if(!s&&e.simpleSearch){var l=e.simpleSearch,c=l.length,h=t.length,d=-c;while(-1!==(d=t.indexOf(l,d+c)))if((!u||Rv(u,t,h,d,c))&&(r[o++]=new ja(new pn(n,d+1+i,n,d+1+c+i),null),o>=a))return o;return o}var f,p=new Fv(e.wordSeparators,e.regex);p.reset(0);do{if(f=p.next(t),f&&(r[o++]=Tv(new pn(n,f.index+1+i,n,f.index+1+f[0].length+i),f,s),o>=a))return o}while(f);return o},e.findNextMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new Fv(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,n,r,i):this._doFindNextMatchLineByLine(e,n,r,i)},e._doFindNextMatchMultiline=function(e,t,n,i){var o=new fn(t.lineNumber,1),r=e.getOffsetAt(o),s=e.getLineCount(),a=e.getValueInRange(new pn(o.lineNumber,o.column,s,e.getLineMaxColumn(s)),1),u="\r\n"===e.getEOL()?new Mv(a):null;n.reset(t.column-1);var l=n.next(a);return l?Tv(this._getMultilineMatchRange(e,r,a,u,l.index,l[0]),l,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new fn(1,1),n,i):null},e._doFindNextMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(n,s,r,t.column,i);if(a)return a;for(var u=1;u<=o;u++){var l=(r+u-1)%o,c=e.getLineContent(l+1),h=this._findFirstMatchInLine(n,c,l+1,1,i);if(h)return h}return null},e._findFirstMatchInLine=function(e,t,n,i,o){e.reset(i-1);var r=e.next(t);return r?Tv(new pn(n,r.index+1,n,r.index+1+r[0].length),r,o):null},e.findPreviousMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new Fv(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,n,r,i):this._doFindPreviousMatchLineByLine(e,n,r,i)},e._doFindPreviousMatchMultiline=function(e,t,n,i){var o=this._doFindMatchesMultiline(e,new pn(1,1,t.lineNumber,t.column),n,i,10*Ev);if(o.length>0)return o[o.length-1];var r=e.getLineCount();return t.lineNumber!==r||t.column!==e.getLineMaxColumn(r)?this._doFindPreviousMatchMultiline(e,new fn(r,e.getLineMaxColumn(r)),n,i):null},e._doFindPreviousMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(n,s,r,i);if(a)return a;for(var u=1;u<=o;u++){var l=(o+r-u-1)%o,c=e.getLineContent(l+1),h=this._findLastMatchInLine(n,c,l+1,i);if(h)return h}return null},e._findLastMatchInLine=function(e,t,n,i){var o,r=null;e.reset(0);while(o=e.next(t))r=Tv(new pn(n,o.index+1,n,o.index+1+o[0].length),o,i);return r},e}();function Av(e,t,n,i,o){if(0===i)return!0;var r=t.charCodeAt(i-1);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){var s=t.charCodeAt(i);if(0!==e.get(s))return!0}return!1}function Pv(e,t,n,i,o){if(i+o===n)return!0;var r=t.charCodeAt(i+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){var s=t.charCodeAt(i+o-1);if(0!==e.get(s))return!0}return!1}function Rv(e,t,n,i,o){return Av(e,t,n,i,o)&&Pv(e,t,n,i,o)}var Fv=function(){function e(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}return e.prototype.reset=function(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0},e.prototype.next=function(e){var t,n=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===n)return null;if(t=this._searchRegex.exec(e),!t)return null;var i=t.index,o=t[0].length;if(i===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=o,!this._wordSeparators||Rv(this._wordSeparators,e,n,i,o))return t}while(t);return null},e}(),Wv=65535;function Vv(e){var t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}var Bv=function(){function e(e,t,n,i,o){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=o}return e}();function Hv(e,t){void 0===t&&(t=!0);for(var n=[0],i=1,o=0,r=e.length;o<r;o++){var s=e.charCodeAt(o);13===s?o+1<r&&10===e.charCodeAt(o+1)?(n[i++]=o+2,o++):n[i++]=o+1:10===s&&(n[i++]=o+1)}return t?Vv(n):n}function zv(e,t){e.length=0,e[0]=0;for(var n=1,i=0,o=0,r=0,s=!0,a=0,u=t.length;a<u;a++){var l=t.charCodeAt(a);13===l?a+1<u&&10===t.charCodeAt(a+1)?(r++,e[n++]=a+2,a++):(i++,e[n++]=a+1):10===l?(o++,e[n++]=a+1):s&&9!==l&&(l<32||l>126)&&(s=!1)}var c=new Bv(Vv(e),i,o,r,s);return e.length=0,c}var jv=function(){function e(e,t,n,i,o){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=i,this.length=o}return e}(),Uv=function(){function e(e,t){this.buffer=e,this.lineStarts=t}return e}(),Kv=function(){function e(e){this._limit=e,this._cache=[]}return e.prototype.get=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber<e&&n.nodeStartLineNumber+n.node.piece.lineFeedCnt>=e)return n}return null},e.prototype.set=function(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)},e.prototype.valdiate=function(e){for(var t=!1,n=this._cache,i=0;i<n.length;i++){var o=n[i];(null===o.node.parent||o.nodeStartOffset>=e)&&(n[i]=null,t=!0)}if(t){for(var r=[],s=0,a=n;s<a.length;s++){var u=a[s];null!==u&&r.push(u)}this._cache=r}},e}(),qv=function(){function e(e,t,n){this.create(e,t,n)}return e.prototype.create=function(e,t,n){this._buffers=[new Uv("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=hv,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;for(var i=null,o=0,r=e.length;o<r;o++)if(e[o].buffer.length>0){e[o].lineStarts||(e[o].lineStarts=Hv(e[o].buffer));var s=new jv(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),i=this.rbInsertRight(i,s)}this._searchCache=new Kv(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var t=this,n=Wv,i=n-Math.floor(n/3),o=2*i,r="",s=0,a=[];if(this.iterate(this.root,(function(n){var u=t.getNodeContent(n),l=u.length;if(s<=i||s+l<o)return r+=u,s+=l,!0;var c=r.replace(/\r\n|\r|\n/g,e);return a.push(new Uv(c,Hv(c))),r=u,s=l,!0})),s>0){var u=r.replace(/\r\n|\r|\n/g,e);a.push(new Uv(u,Hv(u)))}this.create(a,e,!0)},e.prototype.getEOL=function(){return this._EOL},e.prototype.setEOL=function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)},e.prototype.getOffsetAt=function(e,t){var n=0,i=this.root;while(i!==hv)if(i.left!==hv&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e){n+=i.size_left;var o=this.getAccumulatedValue(i,e-i.lf_left-2);return n+(o+t-1)}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);var t=this.root,n=0,i=e;while(t!==hv)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var o=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+o.index,0===o.index){var r=this.getOffsetAt(n+1,1),s=i-r;return new fn(n+1,s+1)}return new fn(n+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===hv){r=this.getOffsetAt(n+1,1),s=i-e-r;return new fn(n+1,s+1)}t=t.right}return new fn(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){var n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(o+e.remainder,o+t.remainder)}var r=e.node,s=this._buffers[r.piece.bufferIndex].buffer,a=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start),u=s.substring(a+e.remainder,a+r.piece.length);r=r.next();while(r!==hv){var l=this._buffers[r.piece.bufferIndex].buffer,c=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);if(r===t.node){u+=l.substring(c,c+t.remainder);break}u+=l.substr(c,r.piece.length),r=r.next()}return u},e.prototype.getLinesContent=function(){var e=this,t=[],n=0,i="",o=!1;return this.iterate(this.root,(function(r){if(r===hv)return!0;var s=r.piece,a=s.length;if(0===a)return!0;var u=e._buffers[s.bufferIndex].buffer,l=e._buffers[s.bufferIndex].lineStarts,c=s.start.line,h=s.end.line,d=l[c]+s.start.column;if(o&&(10===u.charCodeAt(d)&&(d++,a--),t[n++]=i,i="",o=!1,0===a))return!0;if(c===h)return e._EOLNormalized||13!==u.charCodeAt(d+a-1)?i+=u.substr(d,a):(o=!0,i+=u.substr(d,a-1)),!0;i+=e._EOLNormalized?u.substring(d,Math.max(d,l[c+1]-e._EOLLength)):u.substring(d,l[c+1]).replace(/(\r\n|\r|\n)$/,""),t[n++]=i;for(var f=c+1;f<h;f++)i=e._EOLNormalized?u.substring(l[f],l[f+1]-e._EOLLength):u.substring(l[f],l[f+1]).replace(/(\r\n|\r|\n)$/,""),t[n++]=i;return e._EOLNormalized||13!==u.charCodeAt(l[h]+s.end.column-1)?i=u.substr(l[h],s.end.column):(o=!0,0===s.end.column?n--:i=u.substr(l[h],s.end.column-1)),!0})),o&&(t[n++]=i,i=""),t[n++]=i,t},e.prototype.getLength=function(){return this._length},e.prototype.getLineCount=function(){return this._lineCnt},e.prototype.getLineContent=function(e){return this._lastVisitedLine.lineNumber===e?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)},e.prototype.getLineCharCode=function(e,t){var n=this.nodeAt2(e,t+1);if(n.remainder===n.node.piece.length){var i=n.node.next();if(!i)return 0;var o=this._buffers[i.piece.bufferIndex],r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o.buffer.charCodeAt(r)}o=this._buffers[n.node.piece.bufferIndex],r=this.offsetInBuffer(n.node.piece.bufferIndex,n.node.piece.start);var s=r+n.remainder;return o.buffer.charCodeAt(s)},e.prototype.getLineLength=function(e){if(e===this.getLineCount()){var t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength},e.prototype.findMatchesInNode=function(e,t,n,i,o,r,s,a,u,l,c){var h,d,f,p=this._buffers[e.piece.bufferIndex],g=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),m=this.offsetInBuffer(e.piece.bufferIndex,o),v=this.offsetInBuffer(e.piece.bufferIndex,r),_={line:0,column:0};t._wordSeparators?(d=p.buffer.substring(m,v),f=function(e){return e+m},t.reset(-1)):(d=p.buffer,f=function(e){return e},t.reset(m));do{if(h=t.next(d),h){if(f(h.index)>=v)return l;this.positionInBuffer(e,f(h.index)-g,_);var y=this.getLineFeedCnt(e.piece.bufferIndex,o,_),b=_.line===o.line?_.column-o.column+i:_.column+1,C=b+h[0].length;if(c[l++]=Tv(new pn(n+y,b,n+y,C),h,a),f(h.index)+h[0].length>=v)return l;if(l>=u)return l}}while(h);return l},e.prototype.findMatchesLineByLine=function(e,t,n,i){var o=[],r=0,s=new Fv(t.wordSeparators,t.regex),a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];var u=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===u)return[];var l=this.positionInBuffer(a.node,a.remainder),c=this.positionInBuffer(u.node,u.remainder);if(a.node===u.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,l,c,t,n,i,r,o),o;var h=e.startLineNumber,d=a.node;while(d!==u.node){var f=this.getLineFeedCnt(d.piece.bufferIndex,l,d.piece.end);if(f>=1){var p=this._buffers[d.piece.bufferIndex].lineStarts,g=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),m=p[l.line+f],v=h===e.startLineNumber?e.startColumn:1;if(r=this.findMatchesInNode(d,s,h,v,l,this.positionInBuffer(d,m-g),t,n,i,r,o),r>=i)return o;h+=f}var _=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){var y=this.getLineContent(h).substring(_,e.endColumn-1);return r=this._findMatchesInLine(t,s,y,e.endLineNumber,_,r,o,n,i),o}if(r=this._findMatchesInLine(t,s,this.getLineContent(h).substr(_),h,_,r,o,n,i),r>=i)return o;h++,a=this.nodeAt2(h,1),d=a.node,l=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){var b=h===e.startLineNumber?e.startColumn-1:0;y=this.getLineContent(h).substring(b,e.endColumn-1);return r=this._findMatchesInLine(t,s,y,e.endLineNumber,b,r,o,n,i),o}var C=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(u.node,s,h,C,l,c,t,n,i,r,o),o},e.prototype._findMatchesInLine=function(e,t,n,i,o,r,s,a,u){var l,c=e.wordSeparators;if(!a&&e.simpleSearch){var h=e.simpleSearch,d=h.length,f=n.length,p=-d;while(-1!==(p=n.indexOf(h,p+d)))if((!c||Rv(c,n,f,p,d))&&(s[r++]=new ja(new pn(i,p+1+o,i,p+1+d+o),null),r>=u))return r;return r}t.reset(0);do{if(l=t.next(n),l&&(s[r++]=Tv(new pn(i,l.index+1+o,i,l.index+1+l[0].length+o),l,a),r>=u))return r}while(l);return r},e.prototype.insert=function(e,t,n){if(void 0===n&&(n=!1),this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==hv){var i=this.nodeAt(e),o=i.node,r=i.remainder,s=i.nodeStartOffset,a=o.piece,u=a.bufferIndex,l=this.positionInBuffer(o,r);if(0===o.piece.bufferIndex&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.length<Wv)return this.appendToNode(o,t),void this.computeBufferMetadata();if(s===e)this.insertContentToNodeLeft(t,o),this._searchCache.valdiate(e);else if(s+o.piece.length>e){var c=[],h=new jv(a.bufferIndex,l,a.end,this.getLineFeedCnt(a.bufferIndex,l,a.end),this.offsetInBuffer(u,a.end)-this.offsetInBuffer(u,l));if(this.shouldCheckCRLF()&&this.endWithCR(t)){var d=this.nodeCharCodeAt(o,r);if(10===d){var f={line:h.start.line+1,column:0};h=new jv(h.bufferIndex,f,h.end,this.getLineFeedCnt(h.bufferIndex,f,h.end),h.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){var p=this.nodeCharCodeAt(o,r-1);if(13===p){var g=this.positionInBuffer(o,r-1);this.deleteNodeTail(o,g),t="\r"+t,0===o.piece.length&&c.push(o)}else this.deleteNodeTail(o,l)}else this.deleteNodeTail(o,l);var m=this.createNewPieces(t);h.length>0&&this.rbInsertRight(o,h);for(var v=o,_=0;_<m.length;_++)v=this.rbInsertRight(v,m[_]);this.deleteNodes(c)}else this.insertContentToNodeRight(t,o)}else{var y=this.createNewPieces(t);for(o=this.rbInsertLeft(null,y[0]),_=1;_<y.length;_++)o=this.rbInsertRight(o,y[_])}this.computeBufferMetadata()},e.prototype.delete=function(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",!(t<=0||this.root===hv)){var n=this.nodeAt(e),i=this.nodeAt(e+t),o=n.node,r=i.node;if(o===r){var s=this.positionInBuffer(o,n.remainder),a=this.positionInBuffer(o,i.remainder);if(n.nodeStartOffset===e){if(t===o.piece.length){var u=o.next();return yv(this,o),this.validateCRLFWithPrevNode(u),void this.computeBufferMetadata()}return this.deleteNodeHead(o,a),this._searchCache.valdiate(e),this.validateCRLFWithPrevNode(o),void this.computeBufferMetadata()}return n.nodeStartOffset+o.piece.length===e+t?(this.deleteNodeTail(o,s),this.validateCRLFWithNextNode(o),void this.computeBufferMetadata()):(this.shrinkNode(o,s,a),void this.computeBufferMetadata())}var l=[],c=this.positionInBuffer(o,n.remainder);this.deleteNodeTail(o,c),this._searchCache.valdiate(e),0===o.piece.length&&l.push(o);var h=this.positionInBuffer(r,i.remainder);this.deleteNodeHead(r,h),0===r.piece.length&&l.push(r);for(var d=o.next(),f=d;f!==hv&&f!==r;f=f.next())l.push(f);var p=0===o.piece.length?o.prev():o;this.deleteNodes(l),this.validateCRLFWithNextNode(p),this.computeBufferMetadata()}},e.prototype.insertContentToNodeLeft=function(e,t){var n=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){var i=t.piece,o={line:i.start.line+1,column:0},r=new jv(i.bufferIndex,o,i.end,this.getLineFeedCnt(i.bufferIndex,o,i.end),i.length-1);t.piece=r,e+="\n",Cv(this,t,-1,-1),0===t.piece.length&&n.push(t)}for(var s=this.createNewPieces(e),a=this.rbInsertLeft(t,s[s.length-1]),u=s.length-2;u>=0;u--)a=this.rbInsertLeft(a,s[u]);this.validateCRLFWithPrevNode(a),this.deleteNodes(n)},e.prototype.insertContentToNodeRight=function(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i,r=1;r<n.length;r++)o=this.rbInsertRight(o,n[r]);this.validateCRLFWithPrevNode(i)},e.prototype.positionInBuffer=function(e,t,n){var i=e.piece,o=e.piece.bufferIndex,r=this._buffers[o].lineStarts,s=r[i.start.line]+i.start.column,a=s+t,u=i.start.line,l=i.end.line,c=0,h=0,d=0;while(u<=l){if(c=u+(l-u)/2|0,d=r[c],c===l)break;if(h=r[c+1],a<d)l=c-1;else{if(!(a>=h))break;u=c+1}}return n?(n.line=c,n.column=a-d,null):{line:c,column:a-d}},e.prototype.getLineFeedCnt=function(e,t,n){if(0===n.column)return n.line-t.line;var i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;var o=i[n.line+1],r=i[n.line]+n.column;if(o>r+1)return n.line-t.line;var s=r-1,a=this._buffers[e].buffer;return 13===a.charCodeAt(s)?n.line-t.line+1:n.line-t.line},e.prototype.offsetInBuffer=function(e,t){var n=this._buffers[e].lineStarts;return n[t.line]+t.column},e.prototype.deleteNodes=function(e){for(var t=0;t<e.length;t++)yv(this,e[t])},e.prototype.createNewPieces=function(e){if(e.length>Wv){var t=[];while(e.length>Wv){var n=e.charCodeAt(Wv-1),i=void 0;13===n||n>=55296&&n<=56319?(i=e.substring(0,Wv-1),e=e.substring(Wv-1)):(i=e.substring(0,Wv),e=e.substring(Wv));var o=Hv(i);t.push(new jv(this._buffers.length,{line:0,column:0},{line:o.length-1,column:i.length-o[o.length-1]},o.length-1,i.length)),this._buffers.push(new Uv(i,o))}var r=Hv(e);return t.push(new jv(this._buffers.length,{line:0,column:0},{line:r.length-1,column:e.length-r[r.length-1]},r.length-1,e.length)),this._buffers.push(new Uv(e,r)),t}var s=this._buffers[0].buffer.length,a=Hv(e,!1),u=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===s&&0!==s&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},u=this._lastChangeBufferPos;for(var l=0;l<a.length;l++)a[l]+=s+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(a.slice(1)),this._buffers[0].buffer+="_"+e,s+=1}else{if(0!==s)for(l=0;l<a.length;l++)a[l]+=s;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(a.slice(1)),this._buffers[0].buffer+=e}var c=this._buffers[0].buffer.length,h=this._buffers[0].lineStarts.length-1,d=c-this._buffers[0].lineStarts[h],f={line:h,column:d},p=new jv(0,u,f,this.getLineFeedCnt(0,u,f),c-s);return this._lastChangeBufferPos=f,[p]},e.prototype.getLineRawContent=function(e,t){void 0===t&&(t=0);var n=this.root,i="",o=this._searchCache.get2(e);if(o){n=o.node;var r=this.getAccumulatedValue(n,e-o.nodeStartLineNumber-1),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(o.nodeStartLineNumber+n.piece.lineFeedCnt!==e){var u=this.getAccumulatedValue(n,e-o.nodeStartLineNumber);return s.substring(a+r,a+u-t)}i=s.substring(a+r,a+n.piece.length)}else{var l=0,c=e;while(n!==hv)if(n.left!==hv&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),u=this.getAccumulatedValue(n,e-n.lf_left-1),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return l+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:l,nodeStartLineNumber:c-(e-1-n.lf_left)}),s.substring(a+r,a+u-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=s.substring(a+r,a+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,l+=n.size_left+n.piece.length,n=n.right}}n=n.next();while(n!==hv){s=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){u=this.getAccumulatedValue(n,0),a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=s.substring(a,a+u-t),i}a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=s.substr(a,n.piece.length),n=n.next()}return i},e.prototype.computeBufferMetadata=function(){var e=this.root,t=1,n=0;while(e!==hv)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(r!==o)return{index:r,remainder:0}}return{index:o,remainder:i.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column},e.prototype.deleteNodeTail=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),r=t,s=this.offsetInBuffer(n.bufferIndex,r),a=this.getLineFeedCnt(n.bufferIndex,n.start,r),u=a-i,l=s-o,c=n.length+l;e.piece=new jv(n.bufferIndex,n.start,r,a,c),Cv(this,e,l,u)},e.prototype.deleteNodeHead=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),r=t,s=this.getLineFeedCnt(n.bufferIndex,r,n.end),a=this.offsetInBuffer(n.bufferIndex,r),u=s-i,l=o-a,c=n.length+l;e.piece=new jv(n.bufferIndex,r,n.end,s,c),Cv(this,e,l,u)},e.prototype.shrinkNode=function(e,t,n){var i=e.piece,o=i.start,r=i.end,s=i.length,a=i.lineFeedCnt,u=t,l=this.getLineFeedCnt(i.bufferIndex,i.start,u),c=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new jv(i.bufferIndex,i.start,u,l,c),Cv(this,e,c-s,l-a);var h=new jv(i.bufferIndex,n,r,this.getLineFeedCnt(i.bufferIndex,n,r),this.offsetInBuffer(i.bufferIndex,r)-this.offsetInBuffer(i.bufferIndex,n)),d=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(d)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var o=Hv(t,!1),r=0;r<o.length;r++)o[r]+=i;if(n){var s=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:i-s}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(o.slice(1));var a=this._buffers[0].lineStarts.length-1,u=this._buffers[0].buffer.length-this._buffers[0].lineStarts[a],l={line:a,column:u},c=e.piece.length+t.length,h=e.piece.lineFeedCnt,d=this.getLineFeedCnt(0,e.piece.start,l),f=d-h;e.piece=new jv(e.piece.bufferIndex,e.piece.start,l,d,c),this._lastChangeBufferPos=l,Cv(this,e,t.length,f)},e.prototype.nodeAt=function(e){var t=this.root,n=this._searchCache.get(e);if(n)return{node:n.node,nodeStartOffset:n.nodeStartOffset,remainder:e-n.nodeStartOffset};var i=0;while(t!==hv)if(t.size_left>e)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;var o={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(o),o}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){var n=this.root,i=0;while(n!==hv)if(n.left!==hv&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var o=this.getAccumulatedValue(n,e-n.lf_left-2),r=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,r),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){o=this.getAccumulatedValue(n,e-n.lf_left-2);if(o+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i};t-=n.piece.length-o;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}n=n.next();while(n!==hv){if(n.piece.lineFeedCnt>0){r=this.getAccumulatedValue(n,0);var s=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,r),nodeStartOffset:s}}if(n.piece.length>=t-1){var a=this.offsetOfNode(n);return{node:n,remainder:t-1,nodeStartOffset:a}}t-=n.piece.length,n=n.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)},e.prototype.offsetOfNode=function(e){if(!e)return 0;var t=e.size_left;while(e!==this.root)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t},e.prototype.shouldCheckCRLF=function(){return!(this._EOLNormalized&&"\n"===this._EOL)},e.prototype.startWithLF=function(e){if("string"===typeof e)return 10===e.charCodeAt(0);if(e===hv||0===e.piece.lineFeedCnt)return!1;var t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;if(i===n.length-1)return!1;var r=n[i+1];return!(r>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)},e.prototype.endWithCR=function(e){return"string"===typeof e?13===e.charCodeAt(e.length-1):e!==hv&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)},e.prototype.validateCRLFWithPrevNode=function(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}},e.prototype.validateCRLFWithNextNode=function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}},e.prototype.fixCRLF=function(e,t){var n,i=[],o=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new jv(e.piece.bufferIndex,e.piece.start,n,s,r),Cv(this,e,-1,-1),0===e.piece.length&&i.push(e);var a={line:t.piece.start.line+1,column:0},u=t.piece.length-1,l=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new jv(t.piece.bufferIndex,a,t.piece.end,l,u),Cv(this,t,-1,-1),0===t.piece.length&&i.push(t);var c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(var h=0;h<i.length;h++)yv(this,i[h])},e.prototype.adjustCarriageReturnFromNext=function(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var n=t.next();if(this.startWithLF(n)){if(e+="\n",1===n.piece.length)yv(this,n);else{var i=n.piece,o={line:i.start.line+1,column:0},r=i.length-1,s=this.getLineFeedCnt(i.bufferIndex,o,i.end);n.piece=new jv(i.bufferIndex,o,i.end,s,r),Cv(this,n,-1,-1)}return!0}}return!1},e.prototype.iterate=function(e,t){if(e===hv)return t(hv);var n=this.iterate(e.left,t);return n?t(e)&&this.iterate(e.right,t):n},e.prototype.getNodeContent=function(e){if(e===hv)return"";var t,n=this._buffers[e.piece.bufferIndex],i=e.piece,o=this.offsetInBuffer(i.bufferIndex,i.start),r=this.offsetInBuffer(i.bufferIndex,i.end);return t=n.buffer.substring(o,r),t},e.prototype.rbInsertRight=function(e,t){var n=new cv(t,1);n.left=hv,n.right=hv,n.parent=hv,n.size_left=0,n.lf_left=0;var i=this.root;if(i===hv)this.root=n,n.color=0;else if(e.right===hv)e.right=n,n.parent=e;else{var o=dv(e.right);o.left=n,n.parent=o}return bv(this,n),n},e.prototype.rbInsertLeft=function(e,t){var n=new cv(t,1);if(n.left=hv,n.right=hv,n.parent=hv,n.size_left=0,n.lf_left=0,this.root===hv)this.root=n,n.color=0;else if(e.left===hv)e.left=n,n.parent=e;else{var i=fv(e.left);i.right=n,n.parent=i}return bv(this,n),n},e}(),Gv=function(){function e(e,t,n,i,o,r){this._BOM=t,this._mightContainNonBasicASCII=!o,this._mightContainRTL=i,this._pieceTree=new qv(e,n,r)}return e.prototype.mightContainRTL=function(){return this._mightContainRTL},e.prototype.mightContainNonBasicASCII=function(){return this._mightContainNonBasicASCII},e.prototype.getBOM=function(){return this._BOM},e.prototype.getEOL=function(){return this._pieceTree.getEOL()},e.prototype.getOffsetAt=function(e,t){return this._pieceTree.getOffsetAt(e,t)},e.prototype.getPositionAt=function(e){return this._pieceTree.getPositionAt(e)},e.prototype.getRangeAt=function(e,t){var n=e+t,i=this.getPositionAt(e),o=this.getPositionAt(n);return new pn(i.lineNumber,i.column,o.lineNumber,o.column)},e.prototype.getValueInRange=function(e,t){if(void 0===t&&(t=0),e.isEmpty())return"";var n=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,n)},e.prototype.getValueLengthInRange=function(e,t){if(void 0===t&&(t=0),e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;var n=this.getOffsetAt(e.startLineNumber,e.startColumn),i=this.getOffsetAt(e.endLineNumber,e.endColumn);return i-n},e.prototype.getCharacterCountInRange=function(e,t){if(void 0===t&&(t=0),this._mightContainNonBasicASCII){for(var n=0,i=e.startLineNumber,o=e.endLineNumber,r=i;r<=o;r++)for(var s=this.getLineContent(r),a=r===i?e.startColumn-1:0,u=r===o?e.endColumn-1:s.length,l=a;l<u;l++)Tr(s.charCodeAt(l))?(n+=1,l+=1):n+=1;return n+=this._getEndOfLine(t).length*(o-i),n}return this.getValueLengthInRange(e,t)},e.prototype.getLength=function(){return this._pieceTree.getLength()},e.prototype.getLineCount=function(){return this._pieceTree.getLineCount()},e.prototype.getLinesContent=function(){return this._pieceTree.getLinesContent()},e.prototype.getLineContent=function(e){return this._pieceTree.getLineContent(e)},e.prototype.getLineCharCode=function(e,t){return this._pieceTree.getLineCharCode(e,t)},e.prototype.getLineLength=function(e){return this._pieceTree.getLineLength(e)},e.prototype.getLineFirstNonWhitespaceColumn=function(e){var t=br(this.getLineContent(e));return-1===t?0:t+1},e.prototype.getLineLastNonWhitespaceColumn=function(e){var t=wr(this.getLineContent(e));return-1===t?0:t+2},e.prototype._getEndOfLine=function(e){switch(e){case 1:return"\n";case 2:return"\r\n";case 0:return this.getEOL()}throw new Error("Unknown EOL preference")},e.prototype.setEOL=function(e){this._pieceTree.setEOL(e)},e.prototype.applyEdits=function(t,n){for(var i=this._mightContainRTL,o=this._mightContainNonBasicASCII,r=!0,s=[],a=0;a<t.length;a++){var u=t[a];r&&u._isTracked&&(r=!1);var l=u.range;!i&&u.text&&(i=Wr(u.text)),!o&&u.text&&(o=!zr(u.text)),s[a]={sortIndex:a,identifier:u.identifier||null,range:l,rangeOffset:this.getOffsetAt(l.startLineNumber,l.startColumn),rangeLength:this.getValueLengthInRange(l),lines:u.text?u.text.split(/\r\n|\r|\n/):null,forceMoveMarkers:Boolean(u.forceMoveMarkers),isAutoWhitespaceEdit:u.isAutoWhitespaceEdit||!1}}s.sort(e._sortOpsAscending);for(var c=!1,h=(a=0,s.length-1);a<h;a++){var d=s[a].range.getEndPosition(),f=s[a+1].range.getStartPosition();if(f.isBeforeOrEqual(d)){if(f.isBefore(d))throw new Error("Overlapping ranges are not allowed!");c=!0}}r&&(s=this._reduceOperations(s));var p=e._getInverseEditRanges(s),g=[];for(a=0;a<s.length;a++){u=s[a];var m=p[a];if(n&&u.isAutoWhitespaceEdit&&u.range.isEmpty())for(var v=m.startLineNumber;v<=m.endLineNumber;v++){var _="";v===m.startLineNumber&&(_=this.getLineContent(u.range.startLineNumber),-1!==br(_))||g.push({lineNumber:v,oldContent:_})}}var y=[];for(a=0;a<s.length;a++){u=s[a],m=p[a];y[a]={sortIndex:u.sortIndex,identifier:u.identifier,range:m,text:this.getValueInRange(u.range),forceMoveMarkers:u.forceMoveMarkers}}c||y.sort((function(e,t){return e.sortIndex-t.sortIndex})),this._mightContainRTL=i,this._mightContainNonBasicASCII=o;var b=this._doApplyEdits(s),C=null;if(n&&g.length>0){g.sort((function(e,t){return t.lineNumber-e.lineNumber})),C=[];a=0;for(var w=g.length;a<w;a++){v=g[a].lineNumber;if(!(a>0&&g[a-1].lineNumber===v)){var S=g[a].oldContent,L=this.getLineContent(v);0!==L.length&&L!==S&&-1===br(L)&&C.push(v)}}}return new Ua(y,b,C)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){for(var t=!1,n=e[0].range,i=e[e.length-1].range,o=new pn(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn),r=n.startLineNumber,s=n.startColumn,a=[],u=0,l=e.length;u<l;u++){var c=e[u],h=c.range;t=t||c.forceMoveMarkers;for(var d=r;d<h.startLineNumber;d++)d===r?a.push(this.getLineContent(d).substring(s-1)):(a.push("\n"),a.push(this.getLineContent(d)));if(h.startLineNumber===r?a.push(this.getLineContent(h.startLineNumber).substring(s-1,h.startColumn-1)):(a.push("\n"),a.push(this.getLineContent(h.startLineNumber).substring(0,h.startColumn-1))),c.lines)for(var f=0,p=c.lines.length;f<p;f++)0!==f&&a.push("\n"),a.push(c.lines[f]);r=c.range.endLineNumber,s=c.range.endColumn}return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),lines:a.join("").split("\n"),forceMoveMarkers:t,isAutoWhitespaceEdit:!1}},e.prototype._doApplyEdits=function(t){t.sort(e._sortOpsDescending);for(var n=[],i=0;i<t.length;i++){var o=t[i],r=o.range.startLineNumber,s=o.range.startColumn,a=o.range.endLineNumber,u=o.range.endColumn;if(r!==a||s!==u||o.lines&&0!==o.lines.length){var l=a-r,c=o.lines?o.lines.length-1:0,h=Math.min(l,c),d=o.lines?o.lines.join(this.getEOL()):"";if(d?(this._pieceTree.delete(o.rangeOffset,o.rangeLength),this._pieceTree.insert(o.rangeOffset,d,!0)):this._pieceTree.delete(o.rangeOffset,o.rangeLength),h<c){for(var f=[],p=h+1;p<=c;p++)f.push(o.lines[p]);f[f.length-1]=this.getLineContent(r+c-1)}var g=new pn(r,s,a,u);n.push({range:g,rangeLength:o.rangeLength,text:d,rangeOffset:o.rangeOffset,forceMoveMarkers:o.forceMoveMarkers})}}return n},e.prototype.findMatchesLineByLine=function(e,t,n,i){return this._pieceTree.findMatchesLineByLine(e,t,n,i)},e._getInverseEditRanges=function(e){for(var t=[],n=0,i=0,o=null,r=0,s=e.length;r<s;r++){var a=e[r],u=void 0,l=void 0;o?o.range.endLineNumber===a.range.startLineNumber?(u=n,l=i+(a.range.startColumn-o.range.endColumn)):(u=n+(a.range.startLineNumber-o.range.endLineNumber),l=a.range.startColumn):(u=a.range.startLineNumber,l=a.range.startColumn);var c=void 0;if(a.lines&&a.lines.length>0){var h=a.lines.length,d=a.lines[0],f=a.lines[h-1];c=1===h?new pn(u,l,u,l+d.length):new pn(u,l,u+h-1,f.length+1)}else c=new pn(u,l,u,l);n=c.endLineNumber,i=c.endColumn,t.push(c),o=a}return t},e._sortOpsAscending=function(e,t){var n=pn.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n},e._sortOpsDescending=function(e,t){var n=pn.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n},e}(),Yv=function(){function e(e,t,n,i,o,r,s,a){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=o,this._containsRTL=r,this._isBasicASCII=s,this._normalizeEOL=a}return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var i=0,o=n.length;i<o;i++){var r=n[i].buffer.replace(/\r\n|\r|\n/g,t),s=Hv(r);n[i]=new Uv(r,s)}return new Gv(n,this._bom,t,this._containsRTL,this._isBasicASCII,this._normalizeEOL)},e}(),Zv=function(){function e(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.isBasicASCII=!0}return e.prototype.acceptChunk=function(e){if(0!==e.length){0===this.chunks.length&&Gr(e)&&(this.BOM=qr,e=e.substr(1));var t=e.charCodeAt(e.length-1);13===t||t>=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)}},e.prototype._acceptChunk1=function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))},e.prototype._acceptChunk2=function(e){var t=zv(this._tmpLineStarts,e);this.chunks.push(new Uv(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=Wr(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new Yv(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.isBasicASCII,e)},e.prototype._finish=function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=Hv(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}(),Xv=function(){function e(){this.changeType=1}return e}(),$v=function(){function e(e,t){this.changeType=2,this.lineNumber=e,this.detail=t}return e}(),Qv=function(){function e(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}return e}(),Jv=function(){function e(e,t,n){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}return e}(),e_=function(){function e(){this.changeType=5}return e}(),t_=function(){function e(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i}return e.prototype.containsEvent=function(e){for(var t=0,n=this.changes.length;t<n;t++){var i=this.changes[t];if(i.changeType===e)return!0}return!1},e.merge=function(t,n){var i=[].concat(t.changes).concat(n.changes),o=n.versionId,r=t.isUndoing||n.isUndoing,s=t.isRedoing||n.isRedoing;return new e(i,o,r,s)},e}(),n_=function(){function e(e,t){this.rawContentChangedEvent=e,this.contentChangedEvent=t}return e.prototype.merge=function(t){var n=t_.merge(this.rawContentChangedEvent,t.rawContentChangedEvent),i=e._mergeChangeEvents(this.contentChangedEvent,t.contentChangedEvent);return new e(n,i)},e._mergeChangeEvents=function(e,t){var n=[].concat(e.changes).concat(t.changes),i=t.eol,o=t.versionId,r=e.isUndoing||t.isUndoing,s=e.isRedoing||t.isRedoing,a=e.isFlush||t.isFlush;return{changes:n,eol:i,versionId:o,isUndoing:r,isRedoing:s,isFlush:a}},e}();function i_(e){for(var t=0,n=0,i=0,o=0,r=e.length;o<r;o++){var s=e.charCodeAt(o);13===s?(0===t&&(n=o),t++,o+1<r&&10===e.charCodeAt(o+1)&&o++,i=o+1):10===s&&(0===t&&(n=o),t++,i=o+1)}return 0===t&&(n=e.length),[t,n,e.length-i]}function o_(e){return(16384|e<<0|2<<23)>>>0}var r_=new Uint32Array(0).buffer,s_=function(){function e(){this.tokens=[]}return e.prototype.add=function(e,t){if(this.tokens.length>0){var n=this.tokens[this.tokens.length-1],i=n.startLineNumber+n.tokens.length-1;if(i+1===e)return void n.tokens.push(t)}this.tokens.push(new c_(e,[t]))},e}(),a_=function(){function e(e){this._tokens=e,this._tokenCount=e.length/4}return e.prototype.getMaxDeltaLine=function(){var e=this.getTokenCount();return 0===e?-1:this.getDeltaLine(e-1)},e.prototype.getTokenCount=function(){return this._tokenCount},e.prototype.getDeltaLine=function(e){return this._tokens[4*e]},e.prototype.getStartCharacter=function(e){return this._tokens[4*e+1]},e.prototype.getEndCharacter=function(e){return this._tokens[4*e+2]},e.prototype.getMetadata=function(e){return this._tokens[4*e+3]},e.prototype.clear=function(){this._tokenCount=0},e.prototype.acceptDeleteRange=function(e,t,n,i,o){for(var r=this._tokens,s=this._tokenCount,a=i-t,u=0,l=!1,c=0;c<s;c++){var h=4*c,d=r[h],f=r[h+1],p=r[h+2],g=r[h+3];if(d<t||d===t&&p<=n)u++;else{if(d===t&&f<n)d===i&&p>o?p-=o-n:p=n;else if(d===t&&f===n){if(!(d===i&&p>o)){l=!0;continue}p-=o-n}else if(d<i||d===i&&f<o){if(!(d===i&&p>o)){l=!0;continue}d===t?(f=n,p=f+(p-o)):(f=0,p=f+(p-o))}else if(d>i){if(0===a&&!l){u=s;break}d-=a}else{if(!(d===i&&f>=o))throw new Error("Not possible!");e&&0===d&&(f+=e,p+=e),d-=a,f-=o-n,p-=o-n}var m=4*u;r[m]=d,r[m+1]=f,r[m+2]=p,r[m+3]=g,u++}}this._tokenCount=u},e.prototype.acceptInsertText=function(e,t,n,i,o,r){for(var s=0===n&&1===i&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),a=this._tokens,u=this._tokenCount,l=0;l<u;l++){var c=4*l,h=a[c],d=a[c+1],f=a[c+2];if(!(h<e||h===e&&f<t)){if(h===e&&f===t){if(!s)continue;f+=1}else if(h===e&&d<t&&t<f)0===n?f+=i:f=t;else{if(h===e&&d===t&&s)continue;if(h===e)if(h+=n,0===n)d+=i,f+=i;else{var p=f-d;d=o+(d-t),f=d+p}else h+=n}a[c]=h,a[c+1]=d,a[c+2]=f}}},e}(),u_=function(){function e(e,t,n){this._actual=e,this._startTokenIndex=t,this._endTokenIndex=n}return e.prototype.getCount=function(){return this._endTokenIndex-this._startTokenIndex+1},e.prototype.getStartCharacter=function(e){return this._actual.getStartCharacter(this._startTokenIndex+e)},e.prototype.getEndCharacter=function(e){return this._actual.getEndCharacter(this._startTokenIndex+e)},e.prototype.getMetadata=function(e){return this._actual.getMetadata(this._startTokenIndex+e)},e}(),l_=function(){function e(e,t){this.startLineNumber=e,this.tokens=t,this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}return e.prototype._updateEndLineNumber=function(){this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()},e.prototype.getLineTokens=function(t){if(this.startLineNumber<=t&&t<=this.endLineNumber){var n=e._findTokensWithLine(this.tokens,t-this.startLineNumber);if(n){var i=n[0],o=n[1];return new u_(this.tokens,i,o)}}return null},e._findTokensWithLine=function(e,t){var n=0,i=e.getTokenCount()-1;while(n<i){var o=n+Math.floor((i-n)/2),r=e.getDeltaLine(o);if(r<t)n=o+1;else{if(!(r>t)){var s=o;while(s>n&&e.getDeltaLine(s-1)===t)s--;var a=o;while(a<i&&e.getDeltaLine(a+1)===t)a++;return[s,a]}i=o-1}}return e.getDeltaLine(n)===t?[n,n]:null},e.prototype.applyEdit=function(e,t){var n=i_(t),i=n[0],o=n[1],r=n[2];this.acceptEdit(e,i,o,r,t.length>0?t.charCodeAt(0):0)},e.prototype.acceptEdit=function(e,t,n,i,o){this._acceptDeleteRange(e),this._acceptInsertText(new fn(e.startLineNumber,e.startColumn),t,n,i,o),this._updateEndLineNumber()},e.prototype._acceptDeleteRange=function(e){if(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn){var t=e.startLineNumber-this.startLineNumber,n=e.endLineNumber-this.startLineNumber;if(n<0){var i=n-t;this.startLineNumber-=i}else{var o=this.tokens.getMaxDeltaLine();if(!(t>=o+1)){if(t<0&&n>=o+1)return this.startLineNumber=0,void this.tokens.clear();if(t<0){var r=-t;this.startLineNumber-=r,this.tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this.tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}}},e.prototype._acceptInsertText=function(e,t,n,i,o){if(0!==t||0!==n){var r=e.lineNumber-this.startLineNumber;if(r<0)this.startLineNumber+=t;else{var s=this.tokens.getMaxDeltaLine();r>=s+1||this.tokens.acceptInsertText(r,e.column-1,t,n,i,o)}}},e}(),c_=function(){function e(e,t){this.startLineNumber=e,this.tokens=t}return e}();function h_(e){return e instanceof Uint32Array?e:new Uint32Array(e)}var d_=function(){function e(){this._pieces=[]}return e.prototype.flush=function(){this._pieces=[]},e.prototype.set=function(e){this._pieces=e||[]},e.prototype.addSemanticTokens=function(t,n){var i=this._pieces;if(0===i.length)return n;var o=e._findFirstPieceWithLine(i,t),r=this._pieces[o].getLineTokens(t);if(!r)return n;for(var s=n.getCount(),a=r.getCount(),u=0,l=[],c=0,h=0;h<a;h++){var d=r.getStartCharacter(h),f=r.getEndCharacter(h),p=r.getMetadata(h),g=((1&p?2048:0)|(2&p?4096:0)|(4&p?8192:0)|(8&p?8372224:0)|(16&p?4286578688:0))>>>0,m=~g>>>0;while(u<s&&n.getEndOffset(u)<=d)l[c++]=n.getEndOffset(u),l[c++]=n.getMetadata(u),u++;u<s&&n.getStartOffset(u)<d&&(l[c++]=d,l[c++]=n.getMetadata(u));while(u<s&&n.getEndOffset(u)<f)l[c++]=n.getEndOffset(u),l[c++]=n.getMetadata(u)&m|p&g,u++;if(u<s&&n.getEndOffset(u)===f)l[c++]=n.getEndOffset(u),l[c++]=n.getMetadata(u)&m|p&g,u++;else{var v=Math.min(Math.max(0,u-1),s-1);l[c++]=f,l[c++]=n.getMetadata(v)&m|p&g}}while(u<s)l[c++]=n.getEndOffset(u),l[c++]=n.getMetadata(u),u++;return new uh(new Uint32Array(l),n.getLineContent())},e._findFirstPieceWithLine=function(e,t){var n=0,i=e.length-1;while(n<i){var o=n+Math.floor((i-n)/2);if(e[o].endLineNumber<t)n=o+1;else{if(!(e[o].startLineNumber>t)){while(o>n&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber)o--;return o}i=o-1}}return n},e.prototype.acceptEdit=function(e,t,n,i,o){for(var r=0,s=this._pieces;r<s.length;r++){var a=s[r];a.acceptEdit(e,t,n,i,o)}},e}(),f_=function(){function e(){this._lineTokens=[],this._len=0}return e.prototype.flush=function(){this._lineTokens=[],this._len=0},e.prototype.getTokens=function(e,t,n){var i=null;if(t<this._len&&(i=this._lineTokens[t]),null!==i&&i!==r_)return new uh(h_(i),n);var o=new Uint32Array(2);return o[0]=n.length,o[1]=o_(e),new uh(o,n)},e._massageTokens=function(e,t,n){var i=n?h_(n):null;if(0===t){var o=!1;if(i&&i.length>1&&(o=Tu.getLanguageId(i[1])!==e),!o)return r_}if(!i||0===i.length){var r=new Uint32Array(2);return r[0]=t,r[1]=o_(e),r.buffer}return i[i.length-2]=t,0===i.byteOffset&&i.byteLength===i.buffer.byteLength?i.buffer:i},e.prototype._ensureLine=function(e){while(e>=this._len)this._lineTokens[this._len]=null,this._len++},e.prototype._deleteLines=function(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)},e.prototype._insertLines=function(e,t){if(0!==t){for(var n=[],i=0;i<t;i++)n[i]=null;this._lineTokens=Fi(this._lineTokens,e,n),this._len+=t}},e.prototype.setTokens=function(t,n,i,o){var r=e._massageTokens(t,i,o);this._ensureLine(n),this._lineTokens[n]=r},e.prototype.acceptEdit=function(e,t,n){this._acceptDeleteRange(e),this._acceptInsertText(new fn(e.startLineNumber,e.startColumn),t,n)},e.prototype._acceptDeleteRange=function(t){var n=t.startLineNumber-1;if(!(n>=this._len))if(t.startLineNumber!==t.endLineNumber){this._lineTokens[n]=e._deleteEnding(this._lineTokens[n],t.startColumn-1);var i=t.endLineNumber-1,o=null;i<this._len&&(o=e._deleteBeginning(this._lineTokens[i],t.endColumn-1)),this._lineTokens[n]=e._append(this._lineTokens[n],o),this._deleteLines(t.startLineNumber,t.endLineNumber-t.startLineNumber)}else{if(t.startColumn===t.endColumn)return;this._lineTokens[n]=e._delete(this._lineTokens[n],t.startColumn-1,t.endColumn-1)}},e.prototype._acceptInsertText=function(t,n,i){if(0!==n||0!==i){var o=t.lineNumber-1;o>=this._len||(0!==n?(this._lineTokens[o]=e._deleteEnding(this._lineTokens[o],t.column-1),this._lineTokens[o]=e._insert(this._lineTokens[o],t.column-1,i),this._insertLines(t.lineNumber,n)):this._lineTokens[o]=e._insert(this._lineTokens[o],t.column-1,i))}},e._deleteBeginning=function(t,n){return null===t||t===r_?t:e._delete(t,0,n)},e._deleteEnding=function(t,n){if(null===t||t===r_)return t;var i=h_(t),o=i[i.length-2];return e._delete(t,n,o)},e._delete=function(e,t,n){if(null===e||e===r_||t===n)return e;var i=h_(e),o=i.length>>>1;if(0===t&&i[i.length-2]===n)return r_;var r,s,a=uh.findIndexInTokensArray(i,t),u=a>0?i[a-1<<1]:0,l=i[a<<1];if(n<l){for(var c=n-t,h=a;h<o;h++)i[h<<1]-=c;return e}u!==t?(i[a<<1]=t,r=a+1<<1,s=t):(r=a<<1,s=u);for(var d=n-t,f=a+1;f<o;f++){var p=i[f<<1]-d;p>s&&(i[r++]=p,i[r++]=i[1+(f<<1)],s=p)}if(r===i.length)return e;var g=new Uint32Array(r);return g.set(i.subarray(0,r),0),g.buffer},e._append=function(e,t){if(t===r_)return e;if(e===r_)return t;if(null===e)return e;if(null===t)return null;var n=h_(e),i=h_(t),o=i.length>>>1,r=new Uint32Array(n.length+i.length);r.set(n,0);for(var s=n.length,a=n[n.length-2],u=0;u<o;u++)r[s++]=i[u<<1]+a,r[s++]=i[1+(u<<1)];return r.buffer},e._insert=function(e,t,n){if(null===e||e===r_)return e;var i=h_(e),o=i.length>>>1,r=uh.findIndexInTokensArray(i,t);if(r>0){var s=i[r-1<<1];s===t&&r--}for(var a=r;a<o;a++)i[a<<1]+=n;return e},e}(),p_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),g_=function(){function e(){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0}return e.prototype._reset=function(e){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0,e&&this._setBeginState(0,e)},e.prototype.flush=function(e){this._reset(e)},Object.defineProperty(e.prototype,"invalidLineStartIndex",{get:function(){return this._invalidLineStartIndex},enumerable:!0,configurable:!0}),e.prototype._invalidateLine=function(e){e<this._len&&(this._valid[e]=!1),e<this._invalidLineStartIndex&&(this._invalidLineStartIndex=e)},e.prototype._isValid=function(e){return e<this._len&&this._valid[e]},e.prototype.getBeginState=function(e){return e<this._len?this._beginState[e]:null},e.prototype._ensureLine=function(e){while(e>=this._len)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++},e.prototype._deleteLines=function(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)},e.prototype._insertLines=function(e,t){if(0!==t){for(var n=[],i=[],o=0;o<t;o++)n[o]=null,i[o]=!1;this._beginState=Fi(this._beginState,e,n),this._valid=Fi(this._valid,e,i),this._len+=t}},e.prototype._setValid=function(e,t){this._ensureLine(e),this._valid[e]=t},e.prototype._setBeginState=function(e,t){this._ensureLine(e),this._beginState[e]=t},e.prototype.setEndState=function(e,t,n){if(this._setValid(t,!0),this._invalidLineStartIndex=t+1,t!==e-1){var i=this.getBeginState(t+1);if(null===i||!n.equals(i))return this._setBeginState(t+1,n),void this._invalidateLine(t+1);var o=t+1;while(o<e){if(!this._isValid(o))break;o++}this._invalidLineStartIndex=o}},e.prototype.setFakeTokens=function(e){this._setValid(e,!1)},e.prototype.applyEdits=function(e,t){for(var n=e.endLineNumber-e.startLineNumber,i=t,o=Math.min(n,i),r=o;r>=0;r--)this._invalidateLine(e.startLineNumber+r-1);this._acceptDeleteRange(e),this._acceptInsertText(new fn(e.startLineNumber,e.startColumn),t)},e.prototype._acceptDeleteRange=function(e){var t=e.startLineNumber-1;t>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)},e.prototype._acceptInsertText=function(e,t){var n=e.lineNumber-1;n>=this._len||this._insertLines(e.lineNumber,t)},e}(),m_=function(e){function t(t){var n=e.call(this)||this;return n._isDisposed=!1,n._textModel=t,n._tokenizationStateStore=new g_,n._tokenizationSupport=null,n._register(il.onDidChange((function(e){var t=n._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(n._resetTokenizationState(),n._textModel.clearTokens())}))),n._register(n._textModel.onDidChangeRawContentFast((function(e){e.containsEvent(1)&&n._resetTokenizationState()}))),n._register(n._textModel.onDidChangeContentFast((function(e){for(var t=0,i=e.changes.length;t<i;t++){var o=e.changes[t],r=i_(o.text)[0];n._tokenizationStateStore.applyEdits(o.range,r)}n._beginBackgroundTokenization()}))),n._register(n._textModel.onDidChangeAttached((function(){n._beginBackgroundTokenization()}))),n._register(n._textModel.onDidChangeLanguage((function(){n._resetTokenizationState(),n._textModel.clearTokens()}))),n._resetTokenizationState(),n}return p_(t,e),t.prototype.dispose=function(){this._isDisposed=!0,e.prototype.dispose.call(this)},t.prototype._resetTokenizationState=function(){var e=v_(this._textModel),t=e[0],n=e[1];this._tokenizationSupport=t,this._tokenizationStateStore.flush(n),this._beginBackgroundTokenization()},t.prototype._beginBackgroundTokenization=function(){var e=this;this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&s["i"]((function(){e._isDisposed||e._revalidateTokensNow()}))},t.prototype._revalidateTokensNow=function(e){void 0===e&&(e=this._textModel.getLineCount());var t=1,n=new s_,i=zc.create(!1);while(this._hasLinesToTokenize()){if(i.elapsed()>t)break;var o=this._tokenizeOneInvalidLine(n);if(o>=e)break}this._beginBackgroundTokenization(),this._textModel.setTokens(n.tokens)},t.prototype.tokenizeViewport=function(e,t){var n=new s_;this._tokenizeViewport(n,e,t),this._textModel.setTokens(n.tokens)},t.prototype.reset=function(){this._resetTokenizationState(),this._textModel.clearTokens()},t.prototype.forceTokenization=function(e){var t=new s_;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)},t.prototype.isCheapToTokenize=function(e){if(!this._tokenizationSupport)return!0;var t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e<t||this._textModel.getLineLength(e)<2048)},t.prototype._hasLinesToTokenize=function(){return!!this._tokenizationSupport&&this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount()},t.prototype._tokenizeOneInvalidLine=function(e){if(!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;var t=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t),t},t.prototype._updateTokensUntilLine=function(e,t){if(this._tokenizationSupport)for(var n=this._textModel.getLanguageIdentifier(),i=this._textModel.getLineCount(),o=t-1,r=this._tokenizationStateStore.invalidLineStartIndex;r<=o;r++){var s=this._textModel.getLineContent(r+1),a=this._tokenizationStateStore.getBeginState(r),u=__(n,this._tokenizationSupport,s,a);e.add(r+1,u.tokens),this._tokenizationStateStore.setEndState(i,r,u.endState),r=this._tokenizationStateStore.invalidLineStartIndex-1}},t.prototype._tokenizeViewport=function(e,t,n){if(this._tokenizationSupport&&!(n<=this._tokenizationStateStore.invalidLineStartIndex))if(t<=this._tokenizationStateStore.invalidLineStartIndex)this._updateTokensUntilLine(e,n);else{for(var i=this._textModel.getLineFirstNonWhitespaceColumn(t),o=[],r=null,s=t-1;i>0&&s>=1;s--){var a=this._textModel.getLineFirstNonWhitespaceColumn(s);if(0!==a&&a<i){if(r=this._tokenizationStateStore.getBeginState(s-1),r)break;o.push(this._textModel.getLineContent(s)),i=a}}r||(r=this._tokenizationSupport.getInitialState());var u=this._textModel.getLanguageIdentifier(),l=r;for(s=o.length-1;s>=0;s--){var c=__(u,this._tokenizationSupport,o[s],l);l=c.endState}for(var h=t;h<=n;h++){var d=this._textModel.getLineContent(h);c=__(u,this._tokenizationSupport,d,l);e.add(h,c.tokens),this._tokenizationStateStore.setFakeTokens(h-1),l=c.endState}}},t}(Me);function v_(e){var t=e.getLanguageIdentifier(),n=e.isTooLargeForTokenization()?null:il.get(t.language),i=null;if(n)try{i=n.getInitialState()}catch(o){ge(o),n=null}return[n,i]}function __(e,t,n,i){var o=null;if(t)try{o=t.tokenize2(n,i.clone(),0)}catch(r){ge(r)}return o||(o=ll(e.id,n,i,0)),uh.convertToEndOffset(o.tokens,n.length),o}function y_(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}var b_=function(){function e(e,t,n,i){void 0===i&&(i=1),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,n)),this.a=y_(Math.max(Math.min(1,i),0),3)}return e.equals=function(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a},e}(),C_=function(){function e(e,t,n,i){this.h=0|Math.max(Math.min(360,e),0),this.s=y_(Math.max(Math.min(1,t),0),3),this.l=y_(Math.max(Math.min(1,n),0),3),this.a=y_(Math.max(Math.min(1,i),0),3)}return e.equals=function(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a},e.fromRGBA=function(t){var n=t.r/255,i=t.g/255,o=t.b/255,r=t.a,s=Math.max(n,i,o),a=Math.min(n,i,o),u=0,l=0,c=(a+s)/2,h=s-a;if(h>0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case n:u=(i-o)/h+(i<o?6:0);break;case i:u=(o-n)/h+2;break;case o:u=(n-i)/h+4;break}u*=60,u=Math.round(u)}return new e(u,l,c,r)},e._hue2rgb=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},e.toRGBA=function(t){var n,i,o,r=t.h/360,s=t.s,a=t.l,u=t.a;if(0===s)n=i=o=a;else{var l=a<.5?a*(1+s):a+s-a*s,c=2*a-l;n=e._hue2rgb(c,l,r+1/3),i=e._hue2rgb(c,l,r),o=e._hue2rgb(c,l,r-1/3)}return new b_(Math.round(255*n),Math.round(255*i),Math.round(255*o),u)},e}(),w_=function(){function e(e,t,n,i){this.h=0|Math.max(Math.min(360,e),0),this.s=y_(Math.max(Math.min(1,t),0),3),this.v=y_(Math.max(Math.min(1,n),0),3),this.a=y_(Math.max(Math.min(1,i),0),3)}return e.equals=function(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a},e.fromRGBA=function(t){var n,i=t.r/255,o=t.g/255,r=t.b/255,s=Math.max(i,o,r),a=Math.min(i,o,r),u=s-a,l=0===s?0:u/s;return n=0===u?0:s===i?((o-r)/u%6+6)%6:s===o?(r-i)/u+2:(i-o)/u+4,new e(Math.round(60*n),l,s,t.a)},e.toRGBA=function(e){var t=e.h,n=e.s,i=e.v,o=e.a,r=i*n,s=r*(1-Math.abs(t/60%2-1)),a=i-r,u=[0,0,0],l=u[0],c=u[1],h=u[2];return t<60?(l=r,c=s):t<120?(l=s,c=r):t<180?(c=r,h=s):t<240?(c=s,h=r):t<300?(l=s,h=r):t<360&&(l=r,h=s),l=Math.round(255*(l+a)),c=Math.round(255*(c+a)),h=Math.round(255*(h+a)),new b_(l,c,h,o)},e}(),S_=function(){function e(e){if(!e)throw new Error("Color needs a value");if(e instanceof b_)this.rgba=e;else if(e instanceof C_)this._hsla=e,this.rgba=C_.toRGBA(e);else{if(!(e instanceof w_))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=w_.toRGBA(e)}}return e.fromHex=function(t){return e.Format.CSS.parseHex(t)||e.red},Object.defineProperty(e.prototype,"hsla",{get:function(){return this._hsla?this._hsla:C_.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hsva",{get:function(){return this._hsva?this._hsva:w_.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),e.prototype.equals=function(e){return!!e&&b_.equals(this.rgba,e.rgba)&&C_.equals(this.hsla,e.hsla)&&w_.equals(this.hsva,e.hsva)},e.prototype.getRelativeLuminance=function(){var t=e._relativeLuminanceForComponent(this.rgba.r),n=e._relativeLuminanceForComponent(this.rgba.g),i=e._relativeLuminanceForComponent(this.rgba.b),o=.2126*t+.7152*n+.0722*i;return y_(o,4)},e._relativeLuminanceForComponent=function(e){var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)},e.prototype.isLighter=function(){var e=(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3;return e>=128},e.prototype.isLighterThan=function(e){var t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t>n},e.prototype.isDarkerThan=function(e){var t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t<n},e.prototype.lighten=function(t){return new e(new C_(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*t,this.hsla.a))},e.prototype.darken=function(t){return new e(new C_(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*t,this.hsla.a))},e.prototype.transparent=function(t){var n=this.rgba,i=n.r,o=n.g,r=n.b,s=n.a;return new e(new b_(i,o,r,s*t))},e.prototype.isTransparent=function(){return 0===this.rgba.a},e.prototype.isOpaque=function(){return 1===this.rgba.a},e.prototype.opposite=function(){return new e(new b_(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))},e.prototype.toString=function(){return""+e.Format.CSS.format(this)},e.getLighterColor=function(e,t,n){if(e.isLighterThan(t))return e;n=n||.5;var i=e.getRelativeLuminance(),o=t.getRelativeLuminance();return n=n*(o-i)/o,e.lighten(n)},e.getDarkerColor=function(e,t,n){if(e.isDarkerThan(t))return e;n=n||.5;var i=e.getRelativeLuminance(),o=t.getRelativeLuminance();return n=n*(i-o)/i,e.darken(n)},e.white=new e(new b_(255,255,255,1)),e.black=new e(new b_(0,0,0,1)),e.red=new e(new b_(255,0,0,1)),e.blue=new e(new b_(0,0,255,1)),e.cyan=new e(new b_(0,255,255,1)),e.lightgrey=new e(new b_(211,211,211,1)),e.transparent=new e(new b_(0,0,0,0)),e}();(function(e){(function(t){(function(t){function n(t){return 1===t.rgba.a?"rgb("+t.rgba.r+", "+t.rgba.g+", "+t.rgba.b+")":e.Format.CSS.formatRGBA(t)}function i(e){return"rgba("+e.rgba.r+", "+e.rgba.g+", "+e.rgba.b+", "+ +e.rgba.a.toFixed(2)+")"}function o(t){return 1===t.hsla.a?"hsl("+t.hsla.h+", "+(100*t.hsla.s).toFixed(2)+"%, "+(100*t.hsla.l).toFixed(2)+"%)":e.Format.CSS.formatHSLA(t)}function r(e){return"hsla("+e.hsla.h+", "+(100*e.hsla.s).toFixed(2)+"%, "+(100*e.hsla.l).toFixed(2)+"%, "+e.hsla.a.toFixed(2)+")"}function s(e){var t=e.toString(16);return 2!==t.length?"0"+t:t}function a(e){return"#"+s(e.rgba.r)+s(e.rgba.g)+s(e.rgba.b)}function u(t,n){return void 0===n&&(n=!1),n&&1===t.rgba.a?e.Format.CSS.formatHex(t):"#"+s(t.rgba.r)+s(t.rgba.g)+s(t.rgba.b)+s(Math.round(255*t.rgba.a))}function l(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)}function c(t){var n=t.length;if(0===n)return null;if(35!==t.charCodeAt(0))return null;if(7===n){var i=16*h(t.charCodeAt(1))+h(t.charCodeAt(2)),o=16*h(t.charCodeAt(3))+h(t.charCodeAt(4)),r=16*h(t.charCodeAt(5))+h(t.charCodeAt(6));return new e(new b_(i,o,r,1))}if(9===n){i=16*h(t.charCodeAt(1))+h(t.charCodeAt(2)),o=16*h(t.charCodeAt(3))+h(t.charCodeAt(4)),r=16*h(t.charCodeAt(5))+h(t.charCodeAt(6));var s=16*h(t.charCodeAt(7))+h(t.charCodeAt(8));return new e(new b_(i,o,r,s/255))}if(4===n){i=h(t.charCodeAt(1)),o=h(t.charCodeAt(2)),r=h(t.charCodeAt(3));return new e(new b_(16*i+i,16*o+o,16*r+r))}if(5===n){i=h(t.charCodeAt(1)),o=h(t.charCodeAt(2)),r=h(t.charCodeAt(3)),s=h(t.charCodeAt(4));return new e(new b_(16*i+i,16*o+o,16*r+r,(16*s+s)/255))}return null}function h(e){switch(e){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}t.formatRGB=n,t.formatRGBA=i,t.formatHSL=o,t.formatHSLA=r,t.formatHex=a,t.formatHexA=u,t.format=l,t.parseHex=c})(t.CSS||(t.CSS={}))})(e.Format||(e.Format={}))})(S_||(S_={}));var L_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function N_(){return new Zv}function D_(e){var t=N_();return t.acceptChunk(e),t.finish()}function E_(e,t){var n="string"===typeof e?D_(e):e;return n.create(t)}var x_=0,k_=999,O_=1e4,T_=function(){throw new Error("Invalid change accessor")},M_=function(e){function t(n,i,o,r){void 0===r&&(r=null);var s=e.call(this)||this;s._onWillDispose=s._register(new qe),s.onWillDispose=s._onWillDispose.event,s._onDidChangeDecorations=s._register(new H_),s.onDidChangeDecorations=s._onDidChangeDecorations.event,s._onDidChangeLanguage=s._register(new qe),s.onDidChangeLanguage=s._onDidChangeLanguage.event,s._onDidChangeLanguageConfiguration=s._register(new qe),s.onDidChangeLanguageConfiguration=s._onDidChangeLanguageConfiguration.event,s._onDidChangeTokens=s._register(new qe),s.onDidChangeTokens=s._onDidChangeTokens.event,s._onDidChangeOptions=s._register(new qe),s.onDidChangeOptions=s._onDidChangeOptions.event,s._onDidChangeAttached=s._register(new qe),s.onDidChangeAttached=s._onDidChangeAttached.event,s._eventEmitter=s._register(new z_),x_++,s.id="$model"+x_,s.isForSimpleWidget=i.isForSimpleWidget,s._associatedResource="undefined"===typeof r||null===r?wt.parse("inmemory://model/"+x_):r,s._attachedEditorCount=0,s._buffer=E_(n,i.defaultEOL),s._options=t.resolveOptions(s._buffer,i);var a=s._buffer.getLineCount(),u=s._buffer.getValueLengthInRange(new pn(1,1,a,s._buffer.getLineLength(a)+1),0);return i.largeFileOptimizations?s._isTooLargeForTokenization=u>t.LARGE_FILE_SIZE_THRESHOLD||a>t.LARGE_FILE_LINE_COUNT_THRESHOLD:s._isTooLargeForTokenization=!1,s._isTooLargeForSyncing=u>t.MODEL_SYNC_LIMIT,s._versionId=1,s._alternativeVersionId=1,s._isDisposed=!1,s._isDisposing=!1,s._languageIdentifier=o||al,s._languageRegistryListener=Zl.onDidChange((function(e){e.languageIdentifier.id===s._languageIdentifier.id&&s._onDidChangeLanguageConfiguration.fire({})})),s._instanceId=Yr(x_),s._lastDecorationId=0,s._decorations=Object.create(null),s._decorationsTree=new I_,s._commandManager=new Nm(s),s._isUndoing=!1,s._isRedoing=!1,s._trimAutoWhitespaceLines=null,s._tokens=new f_,s._tokens2=new d_,s._tokenization=new m_(s),s}return L_(t,e),t.createFromString=function(e,n,i,o){return void 0===n&&(n=t.DEFAULT_CREATION_OPTIONS),void 0===i&&(i=null),void 0===o&&(o=null),new t(e,n,i,o)},t.resolveOptions=function(e,t){if(t.detectIndentation){var n=xm(e,t.tabSize,t.insertSpaces);return new za({tabSize:n.tabSize,indentSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new za({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})},t.prototype.onDidChangeRawContentFast=function(e){return this._eventEmitter.fastEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeRawContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeContentFast=function(e){return this._eventEmitter.fastEvent((function(t){return e(t.contentChangedEvent)}))},t.prototype.onDidChangeContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.contentChangedEvent)}))},t.prototype.dispose=function(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,e.prototype.dispose.call(this),this._isDisposing=!1},t.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!")},t.prototype._emitContentChangedEvent=function(e,t){this._isDisposing||this._eventEmitter.fire(new n_(e,t))},t.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=E_(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}},t.prototype._createContentChanged2=function(e,t,n,i,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}},t.prototype.setValueFromTextBuffer=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),o=this.getLineMaxColumn(i);this._buffer=e,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new I_,this._commandManager=new Nm(this),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new t_([new Xv],this._versionId,!1,!1),this._createContentChanged2(new pn(1,1,i,o),0,n,this.getValue(),!1,!1,!0))}},t.prototype.setEOL=function(e){this._assertNotDisposed();var t=1===e?"\r\n":"\n";if(this._buffer.getEOL()!==t){var n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new t_([new e_],this._versionId,!1,!1),this._createContentChanged2(new pn(1,1,o,r),0,i,this.getValue(),!1,!1,!1))}},t.prototype._onBeforeEOLChange=function(){var e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)},t.prototype._onAfterEOLChange=function(){for(var e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder(),n=0,i=t.length;n<i;n++){var o=t[n],r=o.cachedAbsoluteStart-o.start,s=this._buffer.getOffsetAt(o.range.startLineNumber,o.range.startColumn),a=this._buffer.getOffsetAt(o.range.endLineNumber,o.range.endColumn);o.cachedAbsoluteStart=s,o.cachedAbsoluteEnd=a,o.cachedVersionId=e,o.start=s-r,o.end=a-r,av(o)}},t.prototype.onBeforeAttached=function(){this._attachedEditorCount++,1===this._attachedEditorCount&&this._onDidChangeAttached.fire(void 0)},t.prototype.onBeforeDetached=function(){this._attachedEditorCount--,0===this._attachedEditorCount&&this._onDidChangeAttached.fire(void 0)},t.prototype.isAttachedToEditor=function(){return this._attachedEditorCount>0},t.prototype.getAttachedEditorCount=function(){return this._attachedEditorCount},t.prototype.isTooLargeForSyncing=function(){return this._isTooLargeForSyncing},t.prototype.isTooLargeForTokenization=function(){return this._isTooLargeForTokenization},t.prototype.isDisposed=function(){return this._isDisposed},t.prototype.isDominatedByLongLines=function(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;for(var e=0,t=0,n=this._buffer.getLineCount(),i=1;i<=n;i++){var o=this._buffer.getLineLength(i);o>=O_?t+=o:e+=o}return t>e},Object.defineProperty(t.prototype,"uri",{get:function(){return this._associatedResource},enumerable:!0,configurable:!0}),t.prototype.getOptions=function(){return this._assertNotDisposed(),this._options},t.prototype.getFormattingOptions=function(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}},t.prototype.updateOptions=function(e){this._assertNotDisposed();var t="undefined"!==typeof e.tabSize?e.tabSize:this._options.tabSize,n="undefined"!==typeof e.indentSize?e.indentSize:this._options.indentSize,i="undefined"!==typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o="undefined"!==typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=new za({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o});if(!this._options.equals(r)){var s=this._options.createChangeEvent(r);this._options=r,this._onDidChangeOptions.fire(s)}},t.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var n=xm(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})},t._normalizeIndentationFromWhitespace=function(e,t,n){for(var i=0,o=0;o<e.length;o++)"\t"===e.charAt(o)?i+=t:i++;var r="";if(!n){var s=Math.floor(i/t);i%=t;for(o=0;o<s;o++)r+="\t"}for(o=0;o<i;o++)r+=" ";return r},t.normalizeIndentation=function(e,n,i){var o=br(e);return-1===o&&(o=e.length),t._normalizeIndentationFromWhitespace(e.substring(0,o),n,i)+e.substring(o)},t.prototype.normalizeIndentation=function(e){return this._assertNotDisposed(),t.normalizeIndentation(e,this._options.indentSize,this._options.insertSpaces)},t.prototype.getVersionId=function(){return this._assertNotDisposed(),this._versionId},t.prototype.mightContainRTL=function(){return this._buffer.mightContainRTL()},t.prototype.mightContainNonBasicASCII=function(){return this._buffer.mightContainNonBasicASCII()},t.prototype.getAlternativeVersionId=function(){return this._assertNotDisposed(),this._alternativeVersionId},t.prototype.getOffsetAt=function(e){this._assertNotDisposed();var t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)},t.prototype.getPositionAt=function(e){this._assertNotDisposed();var t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)},t.prototype._increaseVersionId=function(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId},t.prototype._overwriteAlternativeVersionId=function(e){this._alternativeVersionId=e},t.prototype.getValue=function(e,t){void 0===t&&(t=!1),this._assertNotDisposed();var n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._buffer.getBOM()+i:i},t.prototype.getValueLength=function(e,t){void 0===t&&(t=!1),this._assertNotDisposed();var n=this.getFullModelRange(),i=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+i:i},t.prototype.getValueInRange=function(e,t){return void 0===t&&(t=0),this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)},t.prototype.getValueLengthInRange=function(e,t){return void 0===t&&(t=0),this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)},t.prototype.getCharacterCountInRange=function(e,t){return void 0===t&&(t=0),this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)},t.prototype.getLineCount=function(){return this._assertNotDisposed(),this._buffer.getLineCount()},t.prototype.getLineContent=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)},t.prototype.getLineLength=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)},t.prototype.getLinesContent=function(){return this._assertNotDisposed(),this._buffer.getLinesContent()},t.prototype.getEOL=function(){return this._assertNotDisposed(),this._buffer.getEOL()},t.prototype.getLineMinColumn=function(e){return this._assertNotDisposed(),1},t.prototype.getLineMaxColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1},t.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)},t.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)},t.prototype._validateRangeRelaxedNoAllocations=function(e){var t,n,i=this._buffer.getLineCount(),o=e.startLineNumber,r=e.startColumn;if(o<1)t=1,n=1;else if(o>i)t=i,n=this.getLineMaxColumn(t);else if(t=0|o,r<=1)n=1;else{var s=this.getLineMaxColumn(t);n=r>=s?s:0|r}var a,u,l=e.endLineNumber,c=e.endColumn;if(l<1)a=1,u=1;else if(l>i)a=i,u=this.getLineMaxColumn(a);else if(a=0|l,c<=1)u=1;else{s=this.getLineMaxColumn(a);u=c>=s?s:0|c}return o===t&&r===n&&l===a&&c===u&&e instanceof pn&&!(e instanceof mn)?e:new pn(t,n,a,u)},t.prototype._isValidPosition=function(e,t,n){if("number"!==typeof e||"number"!==typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;var i=this._buffer.getLineCount();if(e>i)return!1;if(1===t)return!0;var o=this.getLineMaxColumn(e);if(t>o)return!1;if(1===n){var r=this._buffer.getLineCharCode(e,t-2);if(Tr(r))return!1}return!0},t.prototype._validatePosition=function(e,t,n){var i=Math.floor("number"!==typeof e||isNaN(e)?1:e),o=Math.floor("number"!==typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(i<1)return new fn(1,1);if(i>r)return new fn(r,this.getLineMaxColumn(r));if(o<=1)return new fn(i,1);var s=this.getLineMaxColumn(i);if(o>=s)return new fn(i,s);if(1===n){var a=this._buffer.getLineCharCode(i,o-2);if(Tr(a))return new fn(i,o-1)}return new fn(i,o)},t.prototype.validatePosition=function(e){var t=1;return this._assertNotDisposed(),e instanceof fn&&this._isValidPosition(e.lineNumber,e.column,t)?e:this._validatePosition(e.lineNumber,e.column,t)},t.prototype._isValidRange=function(e,t){var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(n,i,0))return!1;if(!this._isValidPosition(o,r,0))return!1;if(1===t){var s=i>1?this._buffer.getLineCharCode(n,i-2):0,a=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,u=Tr(s),l=Tr(a);return!u&&!l}return!0},t.prototype.validateRange=function(e){var t=1;if(this._assertNotDisposed(),e instanceof pn&&!(e instanceof mn)&&this._isValidRange(e,t))return e;var n=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),o=n.lineNumber,r=n.column,s=i.lineNumber,a=i.column;if(1===t){var u=r>1?this._buffer.getLineCharCode(o,r-2):0,l=a>1&&a<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,a-2):0,c=Tr(u),h=Tr(l);return c||h?o===s&&r===a?new pn(o,r-1,s,a-1):c&&h?new pn(o,r-1,s,a+1):c?new pn(o,r-1,s,a):new pn(o,r,s,a+1):new pn(o,r,s,a)}return new pn(o,r,s,a)},t.prototype.modifyPosition=function(e,t){this._assertNotDisposed();var n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))},t.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new pn(1,1,e,this.getLineMaxColumn(e))},t.prototype.findMatchesLineByLine=function(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)},t.prototype.findMatches=function(e,t,n,i,o,r,s){var a;if(void 0===s&&(s=k_),this._assertNotDisposed(),a=pn.isIRange(t)?this.validateRange(t):this.getFullModelRange(),!n&&e.indexOf("\n")<0){var u=new xv(e,n,i,o),l=u.parseSearchRequest();return l?this.findMatchesLineByLine(a,l,r,s):[]}return Iv.findMatches(this,new xv(e,n,i,o),a,r,s)},t.prototype.findNextMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){var a=new xv(e,n,i,o),u=a.parseSearchRequest();if(!u)return null;var l=this.getLineCount(),c=new pn(s.lineNumber,s.column,l,this.getLineMaxColumn(l)),h=this.findMatchesLineByLine(c,u,r,1);return Iv.findNextMatch(this,new xv(e,n,i,o),s,r),h.length>0?h[0]:(c=new pn(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),h=this.findMatchesLineByLine(c,u,r,1),h.length>0?h[0]:null)}return Iv.findNextMatch(this,new xv(e,n,i,o),s,r)},t.prototype.findPreviousMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);return Iv.findPreviousMatch(this,new xv(e,n,i,o),s,r)},t.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},t.prototype.pushEOL=function(e){var t="\n"===this.getEOL()?0:1;if(t!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype.pushEditOperations=function(e,t,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._pushEditOperations=function(e,t,n){var i=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var o=t.map((function(e){return{range:i.validateRange(e.range),text:e.text}})),r=!0,s=0,a=e.length;s<a;s++){for(var u=e[s],l=!1,c=0,h=o.length;c<h;c++){var d=o[c].range,f=d.startLineNumber>u.endLineNumber,p=u.startLineNumber>d.endLineNumber;if(!f&&!p){l=!0;break}}if(!l){r=!1;break}}if(r)for(s=0,a=this._trimAutoWhitespaceLines.length;s<a;s++){var g=this._trimAutoWhitespaceLines[s],m=this.getLineMaxColumn(g),v=!0;for(c=0,h=o.length;c<h;c++){d=o[c].range;var _=o[c].text;if(!(g<d.startLineNumber||g>d.endLineNumber)&&(!(g===d.startLineNumber&&d.startColumn===m&&d.isEmpty()&&_&&_.length>0&&"\n"===_.charAt(0))&&!(g===d.startLineNumber&&1===d.startColumn&&d.isEmpty()&&_&&_.length>0&&"\n"===_.charAt(_.length-1)))){v=!1;break}}v&&t.push({range:new pn(g,1,g,m),text:null})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,n)},t.prototype.applyEdits=function(e){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._applyEdits(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._applyEdits=function(e){for(var t=0,n=e.length;t<n;t++)e[t].range=this.validateRange(e[t].range);var i=this._buffer.getLineCount(),o=this._buffer.applyEdits(e,this._options.trimAutoWhitespace),r=this._buffer.getLineCount(),s=o.changes;if(this._trimAutoWhitespaceLines=o.trimAutoWhitespaceLineNumbers,0!==s.length){var a=[],u=i;for(t=0,n=s.length;t<n;t++){var l=s[t],c=i_(l.text),h=c[0],d=c[1],f=c[2];this._tokens.acceptEdit(l.range,h,d),this._tokens2.acceptEdit(l.range,h,d,f,l.text.length>0?l.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(l.rangeOffset,l.rangeLength,l.text.length,l.forceMoveMarkers);for(var p=l.range.startLineNumber,g=l.range.endLineNumber,m=g-p,v=h,_=Math.min(m,v),y=v-m,b=_;b>=0;b--){var C=p+b,w=r-u-y+C;a.push(new $v(C,this.getLineContent(w)))}if(_<m){var S=p+_;a.push(new Qv(S+1,g))}if(_<v){for(var L=p+_,N=v-_,D=r-u-N+L+1,E=[],x=0;x<N;x++){var k=D+x;E[k-D]=this.getLineContent(k)}a.push(new Jv(L+1,p+v,E))}u+=y}this._increaseVersionId(),this._emitContentChangedEvent(new t_(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return o.reverseEdits},t.prototype._undo=function(){this._isUndoing=!0;var e=this._commandManager.undo();return this._isUndoing=!1,e?(this._overwriteAlternativeVersionId(e.recordedVersionId),e.selections):null},t.prototype.undo=function(){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._undo()}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype.canUndo=function(){return this._commandManager.canUndo()},t.prototype._redo=function(){this._isRedoing=!0;var e=this._commandManager.redo();return this._isRedoing=!1,e?(this._overwriteAlternativeVersionId(e.recordedVersionId),e.selections):null},t.prototype.redo=function(){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._redo()}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype.canRedo=function(){return this._commandManager.canRedo()},t.prototype.changeDecorations=function(e,t){void 0===t&&(t=0),this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._changeDecorations=function(e,t){var n=this,i={addDecoration:function(t,i){return n._onDidChangeDecorations.fire(),n._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0]},changeDecoration:function(e,t){n._onDidChangeDecorations.fire(),n._changeDecorationImpl(e,t)},changeDecorationOptions:function(e,t){n._onDidChangeDecorations.fire(),n._changeDecorationOptionsImpl(e,B_(t))},removeDecoration:function(t){n._onDidChangeDecorations.fire(),n._deltaDecorationsImpl(e,[t],[])},deltaDecorations:function(t,i){return 0===t.length&&0===i.length?[]:(n._onDidChangeDecorations.fire(),n._deltaDecorationsImpl(e,t,i))}},o=null;try{o=t(i)}catch(r){ge(r)}return i.addDecoration=T_,i.changeDecoration=T_,i.changeDecorationOptions=T_,i.removeDecoration=T_,i.deltaDecorations=T_,o},t.prototype.deltaDecorations=function(e,t,n){if(void 0===n&&(n=0),this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._getTrackedRange=function(e){return this.getDecorationRange(e)},t.prototype._setTrackedRange=function(e,t,n){var i=e?this._decorations[e]:null;if(!i)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:V_[n]}])[0]:null;if(!t)return this._decorationsTree.delete(i),delete this._decorations[i.id],null;var o=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),s=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(i),i.reset(this.getVersionId(),r,s,o),i.setOptions(V_[n]),this._decorationsTree.insert(i),i.id},t.prototype.removeAllDecorationsWithOwnerId=function(e){if(!this._isDisposed)for(var t=this._decorationsTree.collectNodesFromOwner(e),n=0,i=t.length;n<i;n++){var o=t[n];this._decorationsTree.delete(o),delete this._decorations[o.id]}},t.prototype.getDecorationOptions=function(e){var t=this._decorations[e];return t?t.options:null},t.prototype.getDecorationRange=function(e){var t=this._decorations[e];if(!t)return null;var n=this.getVersionId();return t.cachedVersionId!==n&&this._decorationsTree.resolveNode(t,n),null===t.range&&(t.range=this._getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range},t.prototype.getLineDecorations=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=!1),e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)},t.prototype.getLinesDecorations=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new pn(r,1,s,a),n,i)},t.prototype.getDecorationsInRange=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!1);var i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)},t.prototype.getOverviewRulerDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(i)},t.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!1,n);return this._ensureNodesHaveRanges(i)},t.prototype._getDecorationsInRange=function(e,t,n){var i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(i,o,t,n,r);return this._ensureNodesHaveRanges(s)},t.prototype._ensureNodesHaveRanges=function(e){for(var t=0,n=e.length;t<n;t++){var i=e[t];null===i.range&&(i.range=this._getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd))}return e},t.prototype._getRangeAt=function(e,t){return this._buffer.getRangeAt(e,t-e)},t.prototype._changeDecorationImpl=function(e,t){var n=this._decorations[e];if(n){var i=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),r=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),o,r,i),this._decorationsTree.insert(n)}},t.prototype._changeDecorationOptionsImpl=function(e,t){var n=this._decorations[e];if(n){var i=!(!n.options.overviewRuler||!n.options.overviewRuler.color),o=!(!t.overviewRuler||!t.overviewRuler.color);i!==o?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}},t.prototype._deltaDecorationsImpl=function(e,t,n){var i=this.getVersionId(),o=t.length,r=0,s=n.length,a=0,u=new Array(s);while(r<o||a<s){var l=null;if(r<o){do{l=this._decorations[t[r++]]}while(!l&&r<o);l&&this._decorationsTree.delete(l)}if(a<s){if(!l){var c=++this._lastDecorationId,h=this._instanceId+";"+c;l=new Hm(h,0,0),this._decorations[h]=l}var d=n[a],f=this._validateRangeRelaxedNoAllocations(d.range),p=B_(d.options),g=this._buffer.getOffsetAt(f.startLineNumber,f.startColumn),m=this._buffer.getOffsetAt(f.endLineNumber,f.endColumn);l.ownerId=e,l.reset(i,g,m,f),l.setOptions(p),this._decorationsTree.insert(l),u[a]=l.id,a++}else l&&delete this._decorations[l.id]}return u},t.prototype.setLineTokens=function(e,t){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokens.setTokens(this._languageIdentifier.id,e-1,this._buffer.getLineLength(e),t)},t.prototype.setTokens=function(e){if(0!==e.length){for(var t=[],n=0,i=e.length;n<i;n++){var o=e[n];t.push({fromLineNumber:o.startLineNumber,toLineNumber:o.startLineNumber+o.tokens.length-1});for(var r=0,s=o.tokens.length;r<s;r++)this.setLineTokens(o.startLineNumber+r,o.tokens[r])}this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,ranges:t})}},t.prototype.setSemanticTokens=function(e){this._tokens2.set(e),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})},t.prototype.tokenizeViewport=function(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)},t.prototype.clearTokens=function(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})},t.prototype._emitModelTokensChangedEvent=function(e){this._isDisposing||this._onDidChangeTokens.fire(e)},t.prototype.resetTokenization=function(){this._tokenization.reset()},t.prototype.forceTokenization=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)},t.prototype.isCheapToTokenize=function(e){return this._tokenization.isCheapToTokenize(e)},t.prototype.tokenizeIfCheap=function(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)},t.prototype.getLineTokens=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)},t.prototype._getLineTokens=function(e){var t=this.getLineContent(e),n=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,n)},t.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},t.prototype.getModeId=function(){return this._languageIdentifier.language},t.prototype.setMode=function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}},t.prototype.getLanguageIdAtPosition=function(e,t){var n=this.validatePosition(new fn(e,t)),i=this.getLineTokens(n.lineNumber);return i.getLanguageId(i.findTokenIndexAtOffset(n.column-1))},t.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var n=this.validatePosition(e),i=this.getLineContent(n.lineNumber),o=this._getLineTokens(n.lineNumber),r=o.findTokenIndexAtOffset(n.column-1),s=t._findLanguageBoundaries(o,r),a=s[0],u=s[1],l=f(n.column,Zl.getWordDefinition(o.getLanguageId(r)),i.substring(a,u),a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(r>0&&a===n.column-1){var c=t._findLanguageBoundaries(o,r-1),h=c[0],d=c[1],p=f(n.column,Zl.getWordDefinition(o.getLanguageId(r-1)),i.substring(h,d),h);if(p&&p.startColumn<=e.column&&e.column<=p.endColumn)return p}return null},t._findLanguageBoundaries=function(e,t){for(var n=e.getLanguageId(t),i=0,o=t;o>=0&&e.getLanguageId(o)===n;o--)i=e.getStartOffset(o);for(var r=e.getLineContent().length,s=(o=t,e.getCount());o<s&&e.getLanguageId(o)===n;o++)r=e.getEndOffset(o);return[i,r]},t.prototype.getWordUntilPosition=function(e){var t=this.getWordAtPosition(e);return t?{word:t.word.substr(0,e.column-t.startColumn),startColumn:t.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}},t.prototype.findMatchingBracketUp=function(e,t){var n=e.toLowerCase(),i=this.validatePosition(t),o=this._getLineTokens(i.lineNumber),r=o.getLanguageId(o.findTokenIndexAtOffset(i.column-1)),s=Zl.getBracketsSupport(r);if(!s)return null;var a=s.textIsBracket[n];return a?this._findMatchingBracketUp(a,i):null},t.prototype.matchBracket=function(e){return this._matchBracket(this.validatePosition(e))},t.prototype._matchBracket=function(e){var t=e.lineNumber,n=this._getLineTokens(t),i=n.getCount(),o=this._buffer.getLineContent(t),r=n.findTokenIndexAtOffset(e.column-1);if(r<0)return null;var s=Zl.getBracketsSupport(n.getLanguageId(r));if(s&&!El(n.getStandardTokenType(r))){for(var a=Math.max(0,e.column-1-s.maxBracketLength),u=r-1;u>=0;u--){var l=n.getEndOffset(u);if(l<=a)break;El(n.getStandardTokenType(u))&&(a=l)}var c=Math.min(o.length,e.column-1+s.maxBracketLength),h=null;while(1){var d=zl.findNextBracketInRange(s.forwardRegex,t,o,a,c);if(!d)break;if(d.startColumn<=e.column&&e.column<=d.endColumn){var f=o.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),p=this._matchFoundBracket(d,s.textIsBracket[f],s.textIsOpenBracket[f]);p&&(h=p)}a=d.endColumn-1}if(h)return h}if(r>0&&n.getStartOffset(r)===e.column-1){var g=r-1,m=Zl.getBracketsSupport(n.getLanguageId(g));if(m&&!El(n.getStandardTokenType(g))){for(a=Math.max(0,e.column-1-m.maxBracketLength),c=Math.min(o.length,e.column-1+m.maxBracketLength),u=g+1;u<i;u++){var v=n.getStartOffset(u);if(v>=c)break;El(n.getStandardTokenType(u))&&(c=v)}d=zl.findPrevBracketInRange(m.reversedRegex,t,o,a,c);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn){f=o.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),p=this._matchFoundBracket(d,m.textIsBracket[f],m.textIsOpenBracket[f]);if(p)return p}}}return null},t.prototype._matchFoundBracket=function(e,t,n){if(!t)return null;if(n){var i=this._findMatchingBracketDown(t,e.getEndPosition());if(i)return[e,i]}else{i=this._findMatchingBracketUp(t,e.getStartPosition());if(i)return[e,i]}return null},t.prototype._findMatchingBracketUp=function(e,t){for(var n=e.languageIdentifier.id,i=e.reversedRegex,o=-1,r=function(t,n,r,s){while(1){var a=zl.findPrevBracketInRange(i,t,n,r,s);if(!a)break;var u=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return a;s=a.startColumn-1}return null},s=t.lineNumber;s>=1;s--){var a=this._getLineTokens(s),u=a.getCount(),l=this._buffer.getLineContent(s),c=u-1,h=l.length,d=l.length;s===t.lineNumber&&(c=a.findTokenIndexAtOffset(t.column-1),h=t.column-1,d=t.column-1);for(var f=!0;c>=0;c--){var p=a.getLanguageId(c)===n&&!El(a.getStandardTokenType(c));if(p)f?h=a.getStartOffset(c):(h=a.getStartOffset(c),d=a.getEndOffset(c));else if(f&&h!==d){var g=r(s,l,h,d);if(g)return g}f=p}if(f&&h!==d){g=r(s,l,h,d);if(g)return g}}return null},t.prototype._findMatchingBracketDown=function(e,t){for(var n=e.languageIdentifier.id,i=e.forwardRegex,o=1,r=function(t,n,r,s){while(1){var a=zl.findNextBracketInRange(i,t,n,r,s);if(!a)break;var u=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return a;r=a.endColumn-1}return null},s=this.getLineCount(),a=t.lineNumber;a<=s;a++){var u=this._getLineTokens(a),l=u.getCount(),c=this._buffer.getLineContent(a),h=0,d=0,f=0;a===t.lineNumber&&(h=u.findTokenIndexAtOffset(t.column-1),d=t.column-1,f=t.column-1);for(var p=!0;h<l;h++){var g=u.getLanguageId(h)===n&&!El(u.getStandardTokenType(h));if(g)p?f=u.getEndOffset(h):(d=u.getStartOffset(h),f=u.getEndOffset(h));else if(p&&d!==f){var m=r(a,c,d,f);if(m)return m}p=g}if(p&&d!==f){m=r(a,c,d,f);if(m)return m}}return null},t.prototype.findPrevBracket=function(e){for(var t=this.validatePosition(e),n=-1,i=null,o=t.lineNumber;o>=1;o--){var r=this._getLineTokens(o),s=r.getCount(),a=this._buffer.getLineContent(o),u=s-1,l=a.length,c=a.length;if(o===t.lineNumber){u=r.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;var h=r.getLanguageId(u);n!==h&&(n=h,i=Zl.getBracketsSupport(n))}for(var d=!0;u>=0;u--){h=r.getLanguageId(u);if(n!==h){if(i&&d&&l!==c){var f=zl.findPrevBracketInRange(i.reversedRegex,o,a,l,c);if(f)return this._toFoundBracket(i,f);d=!1}n=h,i=Zl.getBracketsSupport(n)}var p=!!i&&!El(r.getStandardTokenType(u));if(p)d?l=r.getStartOffset(u):(l=r.getStartOffset(u),c=r.getEndOffset(u));else if(i&&d&&l!==c){f=zl.findPrevBracketInRange(i.reversedRegex,o,a,l,c);if(f)return this._toFoundBracket(i,f)}d=p}if(i&&d&&l!==c){f=zl.findPrevBracketInRange(i.reversedRegex,o,a,l,c);if(f)return this._toFoundBracket(i,f)}}return null},t.prototype.findNextBracket=function(e){for(var t=this.validatePosition(e),n=this.getLineCount(),i=-1,o=null,r=t.lineNumber;r<=n;r++){var s=this._getLineTokens(r),a=s.getCount(),u=this._buffer.getLineContent(r),l=0,c=0,h=0;if(r===t.lineNumber){l=s.findTokenIndexAtOffset(t.column-1),c=t.column-1,h=t.column-1;var d=s.getLanguageId(l);i!==d&&(i=d,o=Zl.getBracketsSupport(i))}for(var f=!0;l<a;l++){d=s.getLanguageId(l);if(i!==d){if(o&&f&&c!==h){var p=zl.findNextBracketInRange(o.forwardRegex,r,u,c,h);if(p)return this._toFoundBracket(o,p);f=!1}i=d,o=Zl.getBracketsSupport(i)}var g=!!o&&!El(s.getStandardTokenType(l));if(g)f?h=s.getEndOffset(l):(c=s.getStartOffset(l),h=s.getEndOffset(l));else if(o&&f&&c!==h){p=zl.findNextBracketInRange(o.forwardRegex,r,u,c,h);if(p)return this._toFoundBracket(o,p)}f=g}if(o&&f&&c!==h){p=zl.findNextBracketInRange(o.forwardRegex,r,u,c,h);if(p)return this._toFoundBracket(o,p)}}return null},t.prototype.findEnclosingBrackets=function(e,t){var n=this;void 0===t&&(t=1073741824);for(var i=this.validatePosition(e),o=this.getLineCount(),r=new Map,s=[],a=function(e,t){if(!r.has(e)){for(var n=[],i=0,o=t?t.brackets.length:0;i<o;i++)n[i]=0;r.set(e,n)}s=r.get(e)},u=function(e,t,i,o,r){while(1){var a=zl.findNextBracketInRange(e.forwardRegex,t,i,o,r);if(!a)break;var u=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),l=e.textIsBracket[u];if(l&&(l.isOpen(u)?s[l.index]++:l.isClose(u)&&s[l.index]--,-1===s[l.index]))return n._matchFoundBracket(a,l,!1);o=a.endColumn-1}return null},l=-1,c=null,h=Date.now(),d=i.lineNumber;d<=o;d++){var f=Date.now()-h;if(f>t)return null;var p=this._getLineTokens(d),g=p.getCount(),m=this._buffer.getLineContent(d),v=0,_=0,y=0;if(d===i.lineNumber){v=p.findTokenIndexAtOffset(i.column-1),_=i.column-1,y=i.column-1;var b=p.getLanguageId(v);l!==b&&(l=b,c=Zl.getBracketsSupport(l),a(l,c))}for(var C=!0;v<g;v++){b=p.getLanguageId(v);if(l!==b){if(c&&C&&_!==y){var w=u(c,d,m,_,y);if(w)return w;C=!1}l=b,c=Zl.getBracketsSupport(l),a(l,c)}var S=!!c&&!El(p.getStandardTokenType(v));if(S)C?y=p.getEndOffset(v):(_=p.getStartOffset(v),y=p.getEndOffset(v));else if(c&&C&&_!==y){w=u(c,d,m,_,y);if(w)return w}C=S}if(c&&C&&_!==y){w=u(c,d,m,_,y);if(w)return w}}return null},t.prototype._toFoundBracket=function(e,t){if(!t)return null;var n=this.getValueInRange(t);n=n.toLowerCase();var i=e.textIsBracket[n];return i?{range:t,open:i.open,close:i.close,isOpen:e.textIsOpenBracket[n]}:null},t.computeIndentLevel=function(e,t){var n=0,i=0,o=e.length;while(i<o){var r=e.charCodeAt(i);if(32===r)n++;else{if(9!==r)break;n=n-n%t+t}i++}return i===o?-1:n},t.prototype._computeIndentLevel=function(e){return t.computeIndentLevel(this._buffer.getLineContent(e+1),this._options.tabSize)},t.prototype.getActiveIndentGuide=function(e,t,n){var i=this;this._assertNotDisposed();var o=this.getLineCount();if(e<1||e>o)throw new Error("Illegal value for lineNumber");for(var r=Zl.getFoldingRules(this._languageIdentifier.id),s=Boolean(r&&r.offSide),a=-2,u=-1,l=-2,c=-1,h=function(e){if(-1!==a&&(-2===a||a>e-1)){a=-1,u=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){a=t,u=n;break}}}if(-2===l){l=-1,c=-1;for(t=e;t<o;t++){var r=i._computeIndentLevel(t);if(r>=0){l=t,c=r;break}}}},d=-2,f=-1,p=-2,g=-1,m=function(e){if(-2===d){d=-1,f=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){d=t,f=n;break}}}if(-1!==p&&(-2===p||p<e-1)){p=-1,g=-1;for(t=e;t<o;t++){var r=i._computeIndentLevel(t);if(r>=0){p=t,g=r;break}}}},v=0,_=!0,y=0,b=!0,C=0,w=0;_||b;w++){var S=e-w,L=e+w;if(0!==w&&(S<1||S<t)&&(_=!1),0!==w&&(L>o||L>n)&&(b=!1),w>5e4&&(_=!1,b=!1),_){var N=void 0,D=this._computeIndentLevel(S-1);if(D>=0?(l=S-1,c=D,N=Math.ceil(D/this._options.indentSize)):(h(S),N=this._getIndentLevelForWhitespaceLine(s,u,c)),0===w){if(v=S,y=L,C=N,0===C)return{startLineNumber:v,endLineNumber:y,indent:C};continue}N>=C?v=S:_=!1}if(b){var E=void 0;D=this._computeIndentLevel(L-1);D>=0?(d=L-1,f=D,E=Math.ceil(D/this._options.indentSize)):(m(L),E=this._getIndentLevelForWhitespaceLine(s,f,g)),E>=C?y=L:b=!1}}return{startLineNumber:v,endLineNumber:y,indent:C}},t.prototype.getLinesIndentGuides=function(e,t){this._assertNotDisposed();var n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");for(var i=Zl.getFoldingRules(this._languageIdentifier.id),o=Boolean(i&&i.offSide),r=new Array(t-e+1),s=-2,a=-1,u=-2,l=-1,c=e;c<=t;c++){var h=c-e,d=this._computeIndentLevel(c-1);if(d>=0)s=c-1,a=d,r[h]=Math.ceil(d/this._options.indentSize);else{if(-2===s){s=-1,a=-1;for(var f=c-2;f>=0;f--){var p=this._computeIndentLevel(f);if(p>=0){s=f,a=p;break}}}if(-1!==u&&(-2===u||u<c-1)){u=-1,l=-1;for(f=c;f<n;f++){p=this._computeIndentLevel(f);if(p>=0){u=f,l=p;break}}}r[h]=this._getIndentLevelForWhitespaceLine(o,a,l)}}return r},t.prototype._getIndentLevelForWhitespaceLine=function(e,t,n){return-1===t||-1===n?0:t<n?1+Math.floor(t/this._options.indentSize):t===n?Math.ceil(n/this._options.indentSize):e?Math.ceil(n/this._options.indentSize):1+Math.floor(n/this._options.indentSize)},t.MODEL_SYNC_LIMIT=52428800,t.LARGE_FILE_SIZE_THRESHOLD=20971520,t.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5,t.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:le.tabSize,indentSize:le.indentSize,insertSpaces:le.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:le.trimAutoWhitespace,largeFileOptimizations:le.largeFileOptimizations},t}(Me),I_=function(){function e(){this._decorationsTree0=new jm,this._decorationsTree1=new jm}return e.prototype.intervalSearch=function(e,t,n,i,o){var r=this._decorationsTree0.intervalSearch(e,t,n,i,o),s=this._decorationsTree1.intervalSearch(e,t,n,i,o);return r.concat(s)},e.prototype.search=function(e,t,n,i){if(n)return this._decorationsTree1.search(e,t,i);var o=this._decorationsTree0.search(e,t,i),r=this._decorationsTree1.search(e,t,i);return o.concat(r)},e.prototype.collectNodesFromOwner=function(e){var t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e);return t.concat(n)},e.prototype.collectNodesPostOrder=function(){var e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder();return e.concat(t)},e.prototype.insert=function(e){Pm(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)},e.prototype.delete=function(e){Pm(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)},e.prototype.resolveNode=function(e,t){Pm(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)},e.prototype.acceptReplace=function(e,t,n,i){this._decorationsTree0.acceptReplace(e,t,n,i),this._decorationsTree1.acceptReplace(e,t,n,i)},e}();function A_(e){return e.replace(/[^a-z0-9\-_]/gi," ")}var P_=function(){function e(e){this.color=e.color||"",this.darkColor=e.darkColor||""}return e}(),R_=function(e){function t(t){var n=e.call(this,t)||this;return n._resolvedColor=null,n.position="number"===typeof t.position?t.position:Wa.Center,n}return L_(t,e),t.prototype.getColor=function(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},t.prototype.invalidateCachedColor=function(){this._resolvedColor=null},t.prototype._resolveColor=function(e,t){if("string"===typeof e)return e;var n=e?t.getColor(e.id):null;return n?n.toString():""},t}(P_),F_=function(e){function t(t){var n=e.call(this,t)||this;return n.position=t.position,n}return L_(t,e),t.prototype.getColor=function(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},t.prototype.invalidateCachedColor=function(){this._resolvedColor=void 0},t.prototype._resolveColor=function(e,t){return"string"===typeof e?S_.fromHex(e):t.getColor(e.id)},t}(P_),W_=function(){function e(e){this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?A_(e.className):null,this.hoverMessage=Zs(e.hoverMessage),this.glyphMarginHoverMessage=Zs(e.glyphMarginHoverMessage),this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new R_(e.overviewRuler):null,this.minimap=e.minimap?new F_(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?A_(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?A_(e.linesDecorationsClassName):null,this.marginClassName=e.marginClassName?A_(e.marginClassName):null,this.inlineClassName=e.inlineClassName?A_(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?A_(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?A_(e.afterContentClassName):null}return e.register=function(t){return new e(t)},e.createDynamic=function(t){return new e(t)},e}();W_.EMPTY=W_.register({});var V_=[W_.register({stickiness:0}),W_.register({stickiness:1}),W_.register({stickiness:2}),W_.register({stickiness:3})];function B_(e){return e instanceof W_?e:W_.createDynamic(e)}var H_=function(e){function t(){var t=e.call(this)||this;return t._actual=t._register(new qe),t.event=t._actual.event,t._deferredCnt=0,t._shouldFire=!1,t}return L_(t,e),t.prototype.beginDeferredEmit=function(){this._deferredCnt++},t.prototype.endDeferredEmit=function(){this._deferredCnt--,0===this._deferredCnt&&this._shouldFire&&(this._shouldFire=!1,this._actual.fire({}))},t.prototype.fire=function(){this._shouldFire=!0},t}(Me),z_=function(e){function t(){var t=e.call(this)||this;return t._fastEmitter=t._register(new qe),t.fastEvent=t._fastEmitter.event,t._slowEmitter=t._register(new qe),t.slowEvent=t._slowEmitter.event,t._deferredCnt=0,t._deferredEvent=null,t}return L_(t,e),t.prototype.beginDeferredEmit=function(){this._deferredCnt++},t.prototype.endDeferredEmit=function(){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){var e=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(e),this._slowEmitter.fire(e)}},t.prototype.fire=function(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))},t}(Me),j_=function(){return!0},U_=function(){return!1},K_=function(e){return" "===e||"\t"===e};function q_(e,t,n){e.has(t)?e.get(t).push(n):e.set(t,[n])}var G_=function(){function e(t,n,i){this._languageIdentifier=t;var o=i.options,r=o.get(107);this.readOnly=o.get(68),this.tabSize=n.tabSize,this.indentSize=n.indentSize,this.insertSpaces=n.insertSpaces,this.lineHeight=o.get(49),this.pageSize=Math.max(1,Math.floor(r.height/this.lineHeight)-2),this.useTabStops=o.get(95),this.wordSeparators=o.get(96),this.emptySelectionClipboard=o.get(25),this.copyWithSyntaxHighlighting=o.get(15),this.multiCursorMergeOverlapping=o.get(58),this.multiCursorPaste=o.get(60),this.autoClosingBrackets=o.get(5),this.autoClosingQuotes=o.get(7),this.autoClosingOvertype=o.get(6),this.autoSurround=o.get(10),this.autoIndent=o.get(8),this.autoClosingPairsOpen2=new Map,this.autoClosingPairsClose2=new Map,this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:e._getShouldAutoClose(t,this.autoClosingQuotes),bracket:e._getShouldAutoClose(t,this.autoClosingBrackets)};var s=e._getAutoClosingPairs(t);if(s)for(var a=0,u=s;a<u.length;a++){var l=u[a];q_(this.autoClosingPairsOpen2,l.open.charAt(l.open.length-1),l),1===l.close.length&&q_(this.autoClosingPairsClose2,l.close,l)}var c=e._getSurroundingPairs(t);if(c)for(var h=0,d=c;h<d.length;h++){l=d[h];this.surroundingPairs[l.open]=l.close}}return e.shouldRecreate=function(e){return e.hasChanged(107)||e.hasChanged(96)||e.hasChanged(25)||e.hasChanged(58)||e.hasChanged(60)||e.hasChanged(5)||e.hasChanged(7)||e.hasChanged(6)||e.hasChanged(10)||e.hasChanged(95)||e.hasChanged(49)||e.hasChanged(68)},Object.defineProperty(e.prototype,"electricChars",{get:function(){if(!this._electricChars){this._electricChars={};var t=e._getElectricCharacters(this._languageIdentifier);if(t)for(var n=0,i=t;n<i.length;n++){var o=i[n];this._electricChars[o]=!0}}return this._electricChars},enumerable:!0,configurable:!0}),e.prototype.normalizeIndentation=function(e){return M_.normalizeIndentation(e,this.indentSize,this.insertSpaces)},e._getElectricCharacters=function(e){try{return Zl.getElectricCharacters(e.id)}catch(t){return ge(t),null}},e._getAutoClosingPairs=function(e){try{return Zl.getAutoClosingPairs(e.id)}catch(t){return ge(t),null}},e._getShouldAutoClose=function(t,n){switch(n){case"beforeWhitespace":return K_;case"languageDefined":return e._getLanguageDefinedShouldAutoClose(t);case"always":return j_;case"never":return U_}},e._getLanguageDefinedShouldAutoClose=function(e){try{var t=Zl.getAutoCloseBeforeSet(e.id);return function(e){return-1!==t.indexOf(e)}}catch(n){return ge(n),U_}},e._getSurroundingPairs=function(e){try{return Zl.getSurroundingPairs(e.id)}catch(t){return ge(t),null}},e}(),Y_=function(){function e(t,n,i,o){this.selectionStart=t,this.selectionStartLeftoverVisibleColumns=n,this.position=i,this.leftoverVisibleColumns=o,this.selection=e._computeSelection(this.selectionStart,this.position)}return e.prototype.equals=function(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)},e.prototype.hasSelection=function(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()},e.prototype.move=function(t,n,i,o){return t?new e(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new fn(n,i),o):new e(new pn(n,i,n,i),o,new fn(n,i),o)},e._computeSelection=function(e,t){var n,i,o,r;return e.isEmpty()?(n=e.startLineNumber,i=e.startColumn,o=t.lineNumber,r=t.column):t.isBeforeOrEqual(e.getStartPosition())?(n=e.endLineNumber,i=e.endColumn,o=t.lineNumber,r=t.column):(n=e.startLineNumber,i=e.startColumn,o=t.lineNumber,r=t.column),new mn(n,i,o,r)},e}(),Z_=function(){function e(e,t,n){this.model=t,this.viewModel=n,this.config=new G_(this.model.getLanguageIdentifier(),this.model.getOptions(),e)}return e.prototype.validateViewPosition=function(e,t){return this.viewModel.coordinatesConverter.validateViewPosition(e,t)},e.prototype.validateViewRange=function(e,t){return this.viewModel.coordinatesConverter.validateViewRange(e,t)},e.prototype.convertViewRangeToModelRange=function(e){return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(e)},e.prototype.convertViewPositionToModelPosition=function(e,t){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new fn(e,t))},e.prototype.convertModelPositionToViewPosition=function(e){return this.viewModel.coordinatesConverter.convertModelPositionToViewPosition(e)},e.prototype.convertModelRangeToViewRange=function(e){return this.viewModel.coordinatesConverter.convertModelRangeToViewRange(e)},e.prototype.getCurrentScrollTop=function(){return this.viewModel.viewLayout.getCurrentScrollTop()},e.prototype.getCompletelyVisibleViewRange=function(){return this.viewModel.getCompletelyVisibleViewRange()},e.prototype.getCompletelyVisibleModelRange=function(){var e=this.viewModel.getCompletelyVisibleViewRange();return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(e)},e.prototype.getCompletelyVisibleViewRangeAtScrollTop=function(e){return this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(e)},e.prototype.getVerticalOffsetForViewLine=function(e){return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(e)},e}(),X_=function(){function e(e){this.modelState=e,this.viewState=null}return e}(),$_=function(){function e(e){this.modelState=null,this.viewState=e}return e}(),Q_=function(){function e(e,t){this.modelState=e,this.viewState=t}return e.fromModelState=function(e){return new X_(e)},e.fromViewState=function(e){return new $_(e)},e.fromModelSelection=function(t){var n=t.selectionStartLineNumber,i=t.selectionStartColumn,o=t.positionLineNumber,r=t.positionColumn,s=new Y_(new pn(n,i,n,i),0,new fn(o,r),0);return e.fromModelState(s)},e.fromModelSelections=function(e){for(var t=[],n=0,i=e.length;n<i;n++)t[n]=this.fromModelSelection(e[n]);return t},e.prototype.equals=function(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)},e}(),J_=function(){function e(e,t,n){this.type=e,this.commands=t,this.shouldPushStackElementBefore=n.shouldPushStackElementBefore,this.shouldPushStackElementAfter=n.shouldPushStackElementAfter}return e}(),ey=function(){function e(){}return e.visibleColumnFromColumn=function(t,n,i){var o=t.length,r=n-1<o?n-1:o,s=0,a=0;while(a<r){var u=Ir(t,r,a);if(a+=u>=65536?2:1,9===u)s=e.nextRenderTabStop(s,i);else{var l=Zr(u);while(a<r){var c=Ir(t,r,a),h=Zr(c);if(Xr(l,h))break;a+=c>=65536?2:1,l=h}Ur(u)||Kr(u)?s+=2:s+=1}}return s},e.visibleColumnFromColumn2=function(e,t,n){return this.visibleColumnFromColumn(t.getLineContent(n.lineNumber),n.column,e.tabSize)},e.columnFromVisibleColumn=function(t,n,i){if(n<=0)return 1;var o=t.length,r=0,s=1,a=0;while(a<o){var u=Ir(t,o,a);a+=u>=65536?2:1;var l=void 0;if(9===u)l=e.nextRenderTabStop(r,i);else{var c=Zr(u);while(a<o){var h=Ir(t,o,a),d=Zr(h);if(Xr(c,d))break;a+=h>=65536?2:1,c=d}l=Ur(u)||Kr(u)?r+2:r+1}var f=a+1;if(l>=n){var p=n-r,g=l-n;return g<p?f:s}r=l,s=f}return o+1},e.columnFromVisibleColumn2=function(e,t,n,i){var o=this.columnFromVisibleColumn(t.getLineContent(n),i,e.tabSize),r=t.getLineMinColumn(n);if(o<r)return r;var s=t.getLineMaxColumn(n);return o>s?s:o},e.nextRenderTabStop=function(e,t){return e+t-e%t},e.nextIndentTabStop=function(e,t){return e+t-e%t},e.prevRenderTabStop=function(e,t){return e-1-(e-1)%t},e.prevIndentTabStop=function(e,t){return e-1-(e-1)%t},e}();function ty(e){return"'"===e||'"'===e||"`"===e}var ny=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),iy=function(){function e(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}return e}(),oy=function(){function e(e,t,n,i,o,r){void 0===n&&(n=0),void 0===i&&(i=null),void 0===o&&(o=null),void 0===r&&(r=null),this.element=e,this.type=t,this.mouseColumn=n,this.position=i,!o&&i&&(o=new pn(i.lineNumber,i.column,i.lineNumber,i.column)),this.range=o,this.detail=r}return e._typeToString=function(e){return 1===e?"TEXTAREA":2===e?"GUTTER_GLYPH_MARGIN":3===e?"GUTTER_LINE_NUMBERS":4===e?"GUTTER_LINE_DECORATIONS":5===e?"GUTTER_VIEW_ZONE":6===e?"CONTENT_TEXT":7===e?"CONTENT_EMPTY":8===e?"CONTENT_VIEW_ZONE":9===e?"CONTENT_WIDGET":10===e?"OVERVIEW_RULER":11===e?"SCROLLBAR":12===e?"OVERLAY_WIDGET":"UNKNOWN"},e.toString=function(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+e.detail},e.prototype.toString=function(){return e.toString(this)},e}(),ry=function(){function e(){}return e.isTextArea=function(e){return 2===e.length&&3===e[0]&&6===e[1]},e.isChildOfViewLines=function(e){return e.length>=4&&3===e[0]&&7===e[3]},e.isStrictChildOfViewLines=function(e){return e.length>4&&3===e[0]&&7===e[3]},e.isChildOfScrollableElement=function(e){return e.length>=2&&3===e[0]&&5===e[1]},e.isChildOfMinimap=function(e){return e.length>=2&&3===e[0]&&8===e[1]},e.isChildOfContentWidgets=function(e){return e.length>=4&&3===e[0]&&1===e[3]},e.isChildOfOverflowingContentWidgets=function(e){return e.length>=1&&2===e[0]},e.isChildOfOverlayWidgets=function(e){return e.length>=2&&3===e[0]&&4===e[1]},e}(),sy=function(){function e(e,t,n){this.model=e.model;var i=e.configuration.options;this.layoutInfo=i.get(107),this.viewDomNode=t.viewDomNode,this.lineHeight=i.get(49),this.typicalHalfwidthCharacterWidth=i.get(34).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=t}return e.prototype.getZoneAtCoord=function(t){return e.getZoneAtCoord(this._context,t)},e.getZoneAtCoord=function(e,t){var n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){var i=n.verticalOffset+n.height/2,o=e.model.getLineCount(),r=null,s=void 0,a=null;return n.afterLineNumber!==o&&(a=new fn(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(r=new fn(n.afterLineNumber,e.model.getLineMaxColumn(n.afterLineNumber))),s=null===a?r:null===r?a:t<i?r:a,{viewZoneId:n.id,afterLineNumber:n.afterLineNumber,positionBefore:r,positionAfter:a,position:s}}return null},e.prototype.getFullLineRangeAtCoord=function(e){if(this._context.viewLayout.isAfterLines(e)){var t=this._context.model.getLineCount(),n=this._context.model.getLineMaxColumn(t);return{range:new pn(t,n,t,n),isAfterLines:!0}}var i=this._context.viewLayout.getLineNumberAtVerticalOffset(e),o=this._context.model.getLineMaxColumn(i);return{range:new pn(i,1,i,o),isAfterLines:!1}},e.prototype.getLineNumberAtVerticalOffset=function(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)},e.prototype.isAfterLines=function(e){return this._context.viewLayout.isAfterLines(e)},e.prototype.getVerticalOffsetForLineNumber=function(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)},e.prototype.findAttribute=function(t,n){return e._findAttribute(t,n,this._viewHelper.viewDomNode)},e._findAttribute=function(e,t,n){while(e&&e!==document.body){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===n)return null;e=e.parentNode}return null},e.prototype.getLineWidth=function(e){return this._viewHelper.getLineWidth(e)},e.prototype.visibleRangeForPosition=function(e,t){return this._viewHelper.visibleRangeForPosition(e,t)},e.prototype.getPositionFromDOMInfo=function(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)},e.prototype.getCurrentScrollTop=function(){return this._context.viewLayout.getCurrentScrollTop()},e.prototype.getCurrentScrollLeft=function(){return this._context.viewLayout.getCurrentScrollLeft()},e}(),ay=function(){function e(e,t,n){this.editorPos=t,this.pos=n,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+n.y-t.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+n.x-t.x-e.layoutInfo.contentLeft,this.isInMarginArea=n.x-t.x<e.layoutInfo.contentLeft&&n.x-t.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,hy._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}return e}(),uy=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i)||this;return r._ctx=t,o?(r.target=o,r.targetPath=Kg.collect(o,t.viewDomNode)):(r.target=null,r.targetPath=new Uint8Array(0)),r}return ny(t,e),t.prototype.toString=function(){return"pos("+this.pos.x+","+this.pos.y+"), editorPos("+this.editorPos.x+","+this.editorPos.y+"), mouseVerticalOffset: "+this.mouseVerticalOffset+", mouseContentHorizontalOffset: "+this.mouseContentHorizontalOffset+"\n\ttarget: "+(this.target?this.target.outerHTML:null)},t.prototype.fulfill=function(e,t,n,i){void 0===t&&(t=null),void 0===n&&(n=null),void 0===i&&(i=null);var o=this.mouseColumn;return t&&t.column<this._ctx.model.getLineMaxColumn(t.lineNumber)&&(o=ey.visibleColumnFromColumn(this._ctx.model.getLineContent(t.lineNumber),t.column,this._ctx.model.getOptions().tabSize)+1),new oy(this.target,e,o,t,n,i)},t.prototype.withTarget=function(e){return new t(this._ctx,this.editorPos,this.pos,e)},t}(ay),ly={isAfterLines:!0};function cy(e){return{isAfterLines:!1,horizontalDistanceToText:e}}var hy=function(){function e(e,t){this._context=e,this._viewHelper=t}return e.prototype.mouseTargetIsWidget=function(e){var t=e.target,n=Kg.collect(t,this._viewHelper.viewDomNode);return!(!ry.isChildOfContentWidgets(n)&&!ry.isChildOfOverflowingContentWidgets(n))||!!ry.isChildOfOverlayWidgets(n)},e.prototype.createMouseTarget=function(t,n,i,o){var r=new sy(this._context,this._viewHelper,t),s=new uy(r,n,i,o);try{var a=e._createMouseTarget(r,s,!1);return a}catch(u){return s.fulfill(0)}},e._createMouseTarget=function(t,n,i){if(null===n.target){if(i)return n.fulfill(0);var o=e._doHitTest(t,n);return o.position?e.createMouseTargetFromHitTestPosition(t,n,o.position.lineNumber,o.position.column):this._createMouseTarget(t,n.withTarget(o.hitTarget),!0)}var r=n,s=null;return s=s||e._hitTestContentWidget(t,r),s=s||e._hitTestOverlayWidget(t,r),s=s||e._hitTestMinimap(t,r),s=s||e._hitTestScrollbarSlider(t,r),s=s||e._hitTestViewZone(t,r),s=s||e._hitTestMargin(t,r),s=s||e._hitTestViewCursor(t,r),s=s||e._hitTestTextArea(t,r),s=s||e._hitTestViewLines(t,r,i),s=s||e._hitTestScrollbar(t,r),s||n.fulfill(0)},e._hitTestContentWidget=function(e,t){if(ry.isChildOfContentWidgets(t.targetPath)||ry.isChildOfOverflowingContentWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(9,null,null,n):t.fulfill(0)}return null},e._hitTestOverlayWidget=function(e,t){if(ry.isChildOfOverlayWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(12,null,null,n):t.fulfill(0)}return null},e._hitTestViewCursor=function(e,t){if(t.target)for(var n=e.lastRenderData.lastViewCursorsRenderData,i=0,o=n;i<o.length;i++){var r=o[i];if(t.target===r.domNode)return t.fulfill(6,r.position)}if(t.isInContentArea){n=e.lastRenderData.lastViewCursorsRenderData;for(var s=t.mouseContentHorizontalOffset,a=t.mouseVerticalOffset,u=0,l=n;u<l.length;u++){r=l[u];if(!(s<r.contentLeft)&&!(s>r.contentLeft+r.width)){var c=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(c<=a&&a<=c+r.height)return t.fulfill(6,r.position)}}}return null},e._hitTestViewZone=function(e,t){var n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){var i=t.isInContentArea?8:5;return t.fulfill(i,n.position,null,n)}return null},e._hitTestTextArea=function(e,t){return ry.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition(),o=Math.abs(t.pos.x-t.editorPos.x),r={isAfterLines:n.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.fulfill(2,i,n.range,r):(o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,i,n.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,i,n.range,r)))}return null},e._hitTestViewLines=function(t,n,i){if(!ry.isChildOfViewLines(n.targetPath))return null;if(t.isAfterLines(n.mouseVerticalOffset)){var o=t.model.getLineCount(),r=t.model.getLineMaxColumn(o);return n.fulfill(7,new fn(o,r),void 0,ly)}if(i){if(ry.isStrictChildOfViewLines(n.targetPath)){var s=t.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);if(0===t.model.getLineLength(s)){var a=t.getLineWidth(s),u=cy(n.mouseContentHorizontalOffset-a);return n.fulfill(7,new fn(s,1),void 0,u)}var l=t.getLineWidth(s);if(n.mouseContentHorizontalOffset>=l){u=cy(n.mouseContentHorizontalOffset-l);var c=new fn(s,t.model.getLineMaxColumn(s));return n.fulfill(7,c,void 0,u)}}return n.fulfill(0)}var h=e._doHitTest(t,n);return h.position?e.createMouseTargetFromHitTestPosition(t,n,h.position.lineNumber,h.position.column):this._createMouseTarget(t,n.withTarget(h.hitTarget),!0)},e._hitTestMinimap=function(e,t){if(ry.isChildOfMinimap(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new fn(n,i))}return null},e._hitTestScrollbarSlider=function(e,t){if(ry.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){var i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.model.getLineMaxColumn(i);return t.fulfill(11,new fn(i,o))}}return null},e._hitTestScrollbar=function(e,t){if(ry.isChildOfScrollableElement(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new fn(n,i))}return null},e.prototype.getMouseColumn=function(t,n){var i=this._context.configuration.options,o=i.get(107),r=this._context.viewLayout.getCurrentScrollLeft()+n.x-t.x-o.contentLeft;return e._getMouseColumn(r,i.get(34).typicalHalfwidthCharacterWidth)},e._getMouseColumn=function(e,t){if(e<0)return 1;var n=Math.round(e/t);return n+1},e.createMouseTargetFromHitTestPosition=function(e,t,n,i){var o=new fn(n,i),r=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>r){if(Pn&&1===o.column){var s=cy(t.mouseContentHorizontalOffset-r);return t.fulfill(7,new fn(n,e.model.getLineMaxColumn(n)),void 0,s)}var a=cy(t.mouseContentHorizontalOffset-r);return t.fulfill(7,o,void 0,a)}var u=e.visibleRangeForPosition(n,i);if(!u)return t.fulfill(0,o);var l=u.left;if(t.mouseContentHorizontalOffset===l)return t.fulfill(6,o);var c=[];if(c.push({offset:u.left,column:i}),i>1){var h=e.visibleRangeForPosition(n,i-1);h&&c.push({offset:h.left,column:i-1})}var d=e.model.getLineMaxColumn(n);if(i<d){var f=e.visibleRangeForPosition(n,i+1);f&&c.push({offset:f.left,column:i+1})}c.sort((function(e,t){return e.offset-t.offset}));for(var p=1;p<c.length;p++){var g=c[p-1],m=c[p];if(g.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=m.offset){var v=new pn(n,g.column,n,m.column);return t.fulfill(6,o,v)}}return t.fulfill(6,o)},e._doHitTestWithCaretRangeFromPoint=function(e,t){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.getVerticalOffsetForLineNumber(n),o=i+Math.floor(e.lineHeight/2),r=t.pos.y+(o-t.mouseVerticalOffset);r<=t.editorPos.y&&(r=t.editorPos.y+1),r>=t.editorPos.y+e.layoutInfo.height&&(r=t.editorPos.y+e.layoutInfo.height-1);var s=new Ig(t.pos.x,r),a=this._actualDoHitTestWithCaretRangeFromPoint(e,s.toClientCoordinates());return a.position?a:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())},e._actualDoHitTestWithCaretRangeFromPoint=function(e,t){var n,i=Ao(e.viewDomNode);if(n=i?"undefined"===typeof i.caretRangeFromPoint?dy(i,t.clientX,t.clientY):i.caretRangeFromPoint(t.clientX,t.clientY):document.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return{position:null,hitTarget:null};var o=n.startContainer,r=null;if(o.nodeType===o.TEXT_NODE){var s=o.parentNode,a=s?s.parentNode:null,u=a?a.parentNode:null,l=u&&u.nodeType===u.ELEMENT_NODE?u.className:null;if(l===gm.CLASS_NAME){var c=e.getPositionFromDOMInfo(s,n.startOffset);return{position:c,hitTarget:null}}r=o.parentNode}else if(o.nodeType===o.ELEMENT_NODE){s=o.parentNode,a=s?s.parentNode:null;var h=a&&a.nodeType===a.ELEMENT_NODE?a.className:null;if(h===gm.CLASS_NAME){c=e.getPositionFromDOMInfo(o,o.textContent.length);return{position:c,hitTarget:null}}r=o}return{position:null,hitTarget:r}},e._doHitTestWithCaretPositionFromPoint=function(e,t){var n=document.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){var i=n.offsetNode.parentNode,o=i?i.parentNode:null,r=o?o.parentNode:null,s=r&&r.nodeType===r.ELEMENT_NODE?r.className:null;if(s===gm.CLASS_NAME){var a=e.getPositionFromDOMInfo(n.offsetNode.parentNode,n.offset);return{position:a,hitTarget:null}}return{position:null,hitTarget:n.offsetNode.parentNode}}return{position:null,hitTarget:n.offsetNode}},e._doHitTestWithMoveToPoint=function(e,t){var n=null,i=null,o=document.body.createTextRange();try{o.moveToPoint(t.clientX,t.clientY)}catch(c){return{position:null,hitTarget:null}}o.collapse(!0);var r=o?o.parentElement():null,s=r?r.parentNode:null,a=s?s.parentNode:null,u=a&&a.nodeType===a.ELEMENT_NODE?a.className:"";if(u===gm.CLASS_NAME){var l=o.duplicate();l.moveToElementText(r),l.setEndPoint("EndToStart",o),n=e.getPositionFromDOMInfo(r,l.text.length),l.moveToElementText(e.viewDomNode)}else i=r;return o.moveToElementText(e.viewDomNode),{position:n,hitTarget:i}},e._doHitTest=function(e,t){return"function"===typeof document.caretRangeFromPoint?this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint?this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates()):document.body.createTextRange?this._doHitTestWithMoveToPoint(e,t.pos.toClientCoordinates()):{position:null,hitTarget:null}},e}();function dy(e,t,n){var i=document.createRange(),o=e.elementFromPoint(t,n);if(null!==o){while(o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE)o=o.lastChild;var r=o.getBoundingClientRect(),s=window.getComputedStyle(o,null).getPropertyValue("font"),a=o.innerText,u=r.left,l=0,c=void 0;if(t>r.left+r.width)l=a.length;else for(var h=fy.getInstance(),d=0;d<a.length+1;d++){if(c=h.getCharWidth(a.charAt(d),s)/2,u+=c,t<u){l=d;break}u+=c}i.setStart(o.firstChild,l),i.setEnd(o.firstChild,l)}return i}var fy=function(){function e(){this._cache={},this._canvas=document.createElement("canvas")}return e.getInstance=function(){return e._INSTANCE||(e._INSTANCE=new e),e._INSTANCE},e.prototype.getCharWidth=function(e,t){var n=e+t;if(this._cache[n])return this._cache[n];var i=this._canvas.getContext("2d");i.font=t;var o=i.measureText(e),r=o.width;return this._cache[n]=r,r},e._INSTANCE=null,e}(),py=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function gy(e){return function(t,n){var i=!1;return e&&(i=e.mouseTargetIsWidget(n)),i||n.preventDefault(),n}}var my=function(e){function t(n,i,o){var r=e.call(this)||this;r._isFocused=!1,r._context=n,r.viewController=i,r.viewHelper=o,r.mouseTargetFactory=new hy(r._context,o),r._mouseDownOperation=r._register(new vy(r._context,r.viewController,r.viewHelper,(function(e,t){return r._createMouseTarget(e,t)}),(function(e){return r._getMouseColumn(e)}))),r._asyncFocus=r._register(new mi((function(){return r.viewHelper.focusTextArea()}),0)),r.lastMouseLeaveTime=-1;var s=new Wg(r.viewHelper.viewDomNode);r._register(s.onContextMenu(r.viewHelper.viewDomNode,(function(e){return r._onContextMenu(e,!0)}))),r._register(s.onMouseMoveThrottled(r.viewHelper.viewDomNode,(function(e){return r._onMouseMove(e)}),gy(r.mouseTargetFactory),t.MOUSE_MOVE_MINIMUM_TIME)),r._register(s.onMouseUp(r.viewHelper.viewDomNode,(function(e){return r._onMouseUp(e)}))),r._register(s.onMouseLeave(r.viewHelper.viewDomNode,(function(e){return r._onMouseLeave(e)}))),r._register(s.onMouseDown(r.viewHelper.viewDomNode,(function(e){return r._onMouseDown(e)})));var a=function(e){if(r.viewController.emitMouseWheel(e),r._context.configuration.options.get(57)){var t=new ai(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){var n=Ta.getZoomLevel(),i=t.deltaY>0?1:-1;Ta.setZoomLevel(n+i),t.preventDefault(),t.stopPropagation()}}};return r._register(io(r.viewHelper.viewDomNode,Rn?"mousewheel":"wheel",a,{capture:!0,passive:!1})),r._context.addEventHandler(r),r}return py(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onCursorStateChanged=function(e){return this._mouseDownOperation.onCursorStateChanged(e),!1},t.prototype.onFocusChanged=function(e){return this._isFocused=e.isFocused,!1},t.prototype.onScrollChanged=function(e){return this._mouseDownOperation.onScrollChanged(),!1},t.prototype.getTargetAtClientPoint=function(e,t){var n=new Ag(e,t),i=n.toPageCoordinates(),o=Rg(this.viewHelper.viewDomNode);return i.y<o.y||i.y>o.y+o.height||i.x<o.x||i.x>o.x+o.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),o,i,null)},t.prototype._createMouseTarget=function(e,t){return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?e.target:null)},t.prototype._getMouseColumn=function(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)},t.prototype._onContextMenu=function(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})},t.prototype._onMouseMove=function(e){if(!this._mouseDownOperation.isActive()){var t=e.timestamp;t<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}},t.prototype._onMouseLeave=function(e){this.lastMouseLeaveTime=(new Date).getTime(),this.viewController.emitMouseLeave({event:e,target:null})},t.prototype._onMouseUp=function(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})},t.prototype._onMouseDown=function(e){var t=this,n=this._createMouseTarget(e,!0),i=6===n.type||7===n.type,o=2===n.type||3===n.type||4===n.type,r=3===n.type,a=this._context.configuration.options.get(83),u=8===n.type||5===n.type,l=9===n.type,c=e.leftButton||e.middleButton;s["e"]&&e.leftButton&&e.ctrlKey&&(c=!1);var h=function(){An&&!t._isFocused?t._asyncFocus.schedule():(e.preventDefault(),t.viewHelper.focusTextArea())};if(c&&(i||r&&a))h(),this._mouseDownOperation.start(n.type,e);else if(o)e.preventDefault();else if(u){var d=n.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(d.viewZoneId)&&(h(),this._mouseDownOperation.start(n.type,e),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&(h(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:n})},t.MOUSE_MOVE_MINIMUM_TIME=100,t}(zg),vy=function(e){function t(t,n,i,o,r){var s=e.call(this)||this;return s._context=t,s._viewController=n,s._viewHelper=i,s._createMouseTarget=o,s._getMouseColumn=r,s._mouseMoveMonitor=s._register(new Bg(s._viewHelper.viewDomNode)),s._onScrollTimeout=s._register(new pi),s._mouseState=new _y,s._currentSelection=new mn(1,1,1,1),s._isActive=!1,s._lastMouseEvent=null,s}return py(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.isActive=function(){return this._isActive},t.prototype._onMouseDownThenMove=function(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);var t=this._findMousePosition(e,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))},t.prototype.start=function(e,t){var n=this;this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);var i=this._findMousePosition(t,!0);if(i&&i.position){this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;var o=this._context.configuration.options;if(!o.get(68)&&o.get(24)&&!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,gy(null),(function(e){return n._onMouseDownThenMove(e)}),(function(){var e=n._findMousePosition(n._lastMouseEvent,!0);n._viewController.emitMouseDrop({event:n._lastMouseEvent,target:e?n._createMouseTarget(n._lastMouseEvent,!0):null}),n._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,gy(null),(function(e){return n._onMouseDownThenMove(e)}),(function(){return n._stop()})))}},t.prototype._stop=function(){this._isActive=!1,this._onScrollTimeout.cancel()},t.prototype.onScrollChanged=function(){var e=this;this._isActive&&this._onScrollTimeout.setIfNotSet((function(){if(e._lastMouseEvent){var t=e._findMousePosition(e._lastMouseEvent,!1);t&&(e._mouseState.isDragAndDrop||e._dispatchMouse(t,!0))}}),10)},t.prototype.onCursorStateChanged=function(e){this._currentSelection=e.selections[0]},t.prototype._getPositionOutsideEditor=function(e){var t=e.editorPos,n=this._context.model,i=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posy<t.y){var r=Math.max(i.getCurrentScrollTop()-(t.y-e.posy),0),s=sy.getZoneAtCoord(this._context,r);if(s){var a=this._helpPositionJumpOverViewZone(s);if(a)return new oy(null,13,o,a)}var u=i.getLineNumberAtVerticalOffset(r);return new oy(null,13,o,new fn(u,1))}if(e.posy>t.y+t.height){r=i.getCurrentScrollTop()+(e.posy-t.y),s=sy.getZoneAtCoord(this._context,r);if(s){a=this._helpPositionJumpOverViewZone(s);if(a)return new oy(null,13,o,a)}var l=i.getLineNumberAtVerticalOffset(r);return new oy(null,13,o,new fn(l,n.getLineMaxColumn(l)))}var c=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+(e.posy-t.y));return e.posx<t.x?new oy(null,13,o,new fn(c,1)):e.posx>t.x+t.width?new oy(null,13,o,new fn(c,n.getLineMaxColumn(c))):null},t.prototype._findMousePosition=function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var i=this._createMouseTarget(e,t),o=i.position;if(!o)return null;if(8===i.type||5===i.type){var r=this._helpPositionJumpOverViewZone(i.detail);if(r)return new oy(i.element,i.type,i.mouseColumn,r,null,i.detail)}return i},t.prototype._helpPositionJumpOverViewZone=function(e){var t=new fn(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null},t.prototype._dispatchMouse=function(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})},t}(Me),_y=function(){function e(){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}return Object.defineProperty(e.prototype,"altKey",{get:function(){return this._altKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctrlKey",{get:function(){return this._ctrlKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metaKey",{get:function(){return this._metaKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftKey",{get:function(){return this._shiftKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftButton",{get:function(){return this._leftButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"middleButton",{get:function(){return this._middleButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startedOnLineNumbers",{get:function(){return this._startedOnLineNumbers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._lastMouseDownCount},enumerable:!0,configurable:!0}),e.prototype.setModifiers=function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey},e.prototype.setStartButtons=function(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton},e.prototype.setStartedOnLineNumbers=function(e){this._startedOnLineNumbers=e},e.prototype.trySetCount=function(t,n){var i=(new Date).getTime();i-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=i,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)},e.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e}(),yy=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function by(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}var Cy=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.msTouchAction="none",o.viewHelper.linesContentDomNode.style.msContentZooming="none",o._installGestureHandlerTimeout=window.setTimeout((function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",(function(n){var i=n.pointerType;i!==(n.MSPOINTER_TYPE_MOUSE||"mouse")?i===(n.MSPOINTER_TYPE_TOUCH||"touch")?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"})),o._register(_o(o.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return o._onGestureChange(e)}),by)),o._register(io(o.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return o._onCaptureGestureTap(e)}),!0))}}),100),o._lastPointerType="mouse",o}return yy(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new Fg(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(my),wy=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.touchAction="none",o._installGestureHandlerTimeout=window.setTimeout((function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("pointerdown",(function(n){var i=n.pointerType;"mouse"!==i?"touch"===i?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"})),o._register(_o(o.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return o._onGestureChange(e)}),by)),o._register(io(o.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return o._onCaptureGestureTap(e)}),!0))}}),100),o._lastPointerType="mouse",o}return yy(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new Fg(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(my),Sy=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;o._register(kg.addTarget(o.viewHelper.linesContentDomNode)),o._register(io(o.viewHelper.linesContentDomNode,Dg.Tap,(function(e){return o.onTap(e)}))),o._register(io(o.viewHelper.linesContentDomNode,Dg.Change,(function(e){return o.onChange(e)}))),o._register(io(o.viewHelper.linesContentDomNode,Dg.Contextmenu,(function(e){return o._onContextMenu(new Fg(e,o.viewHelper.viewDomNode),!1)}))),o._lastPointerType="mouse",o._register(io(o.viewHelper.linesContentDomNode,"pointerdown",(function(e){var t=e.pointerType;o._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));var r=new Vg(o.viewHelper.viewDomNode);return o._register(r.onPointerMoveThrottled(o.viewHelper.viewDomNode,(function(e){return o._onMouseMove(e)}),gy(o.mouseTargetFactory),my.MOUSE_MOVE_MINIMUM_TIME)),o._register(r.onPointerUp(o.viewHelper.viewDomNode,(function(e){return o._onMouseUp(e)}))),o._register(r.onPointerLeave(o.viewHelper.viewDomNode,(function(e){return o._onMouseLeave(e)}))),o._register(r.onPointerDown(o.viewHelper.viewDomNode,(function(e){return o._onMouseDown(e)}))),o}return yy(t,e),t.prototype.onTap=function(e){if(e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new Fg(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})}},t.prototype.onChange=function(e){"touch"===this._lastPointerType&&this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype._onMouseDown=function(t){t.target&&this.viewHelper.linesContentDomNode.contains(t.target)&&"touch"===this._lastPointerType||e.prototype._onMouseDown.call(this,t)},t}(my),Ly=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o._register(kg.addTarget(o.viewHelper.linesContentDomNode)),o._register(io(o.viewHelper.linesContentDomNode,Dg.Tap,(function(e){return o.onTap(e)}))),o._register(io(o.viewHelper.linesContentDomNode,Dg.Change,(function(e){return o.onChange(e)}))),o._register(io(o.viewHelper.linesContentDomNode,Dg.Contextmenu,(function(e){return o._onContextMenu(new Fg(e,o.viewHelper.viewDomNode),!1)}))),o}return yy(t,e),t.prototype.onTap=function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new Fg(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)},t.prototype.onChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t}(my),Ny=function(e){function t(t,n,i){var o=e.call(this)||this;return window.navigator.msPointerEnabled?o.handler=o._register(new Cy(t,n,i)):s["c"]&&Bi.pointerEvents?o.handler=o._register(new Sy(t,n,i)):window.TouchEvent?o.handler=o._register(new Ly(t,n,i)):window.navigator.pointerEnabled||window.PointerEvent?o.handler=o._register(new wy(t,n,i)):o.handler=o._register(new my(t,n,i)),o}return yy(t,e),t.prototype.getTargetAtClientPoint=function(e,t){return this.handler.getTargetAtClientPoint(e,t)},t}(Me),Dy=(n("56f3"),function(){function e(e,t,n,i,o){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selectionStartPosition=i,this.selectionEndPosition=o}return e.prototype.toString=function(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"},e.readFromTextArea=function(t){return new e(t.getValue(),t.getSelectionStart(),t.getSelectionEnd(),null,null)},e.prototype.collapseSelection=function(){return new e(this.value,this.value.length,this.value.length,null,null)},e.prototype.writeToTextArea=function(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)},e.prototype.deduceEditorPosition=function(e){if(e<=this.selectionStart){var t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}var n=this.value.substring(this.selectionStart,e);if(-1===n.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,n,1);var i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)},e.prototype._finishDeduceEditorPosition=function(e,t,n){var i=0,o=-1;while(-1!==(o=t.indexOf("\n",o+1)))i++;return[e,n*t.length,i]},e.selectedText=function(t){return new e(t,0,t.length,null,null)},e.deduceInput=function(e,t,n){if(!e)return{text:"",replaceCharCnt:0};var i=e.value,o=e.selectionStart,r=e.selectionEnd,s=t.value,a=t.selectionStart,u=t.selectionEnd,l=i.substring(r),c=s.substring(u),h=Or(l,c);s=s.substring(0,s.length-h),i=i.substring(0,i.length-h);var d=i.substring(0,o),f=s.substring(0,a),p=kr(d,f);if(s=s.substring(p),i=i.substring(p),a-=p,o-=p,u-=p,r-=p,n&&a===u&&i.length>0){var g=null;if(a===s.length?gr(s,i)&&(g=s.substring(i.length)):mr(s,i)&&(g=s.substring(0,s.length-i.length)),null!==g&&g.length>0&&(/\uFE0F/.test(g)||Br(g)))return{text:g,replaceCharCnt:0}}if(a===u){if(i===s&&0===o&&r===i.length&&a===s.length&&-1===s.indexOf("\n")&&jr(s))return{text:"",replaceCharCnt:0};var m=d.length-p;return{text:s,replaceCharCnt:m}}var v=r-o;return{text:s,replaceCharCnt:v}},e.EMPTY=new e("",0,0,null,null),e}()),Ey=function(){function e(){}return e._getPageOfLine=function(e,t){return Math.floor((e-1)/t)},e._getRangeForPage=function(e,t){var n=e*t,i=n+1,o=n+t;return new pn(i,1,o+1,1)},e.fromEditorSelection=function(t,n,i,o,r){var s,a=e._getPageOfLine(i.startLineNumber,o),u=e._getRangeForPage(a,o),l=e._getPageOfLine(i.endLineNumber,o),c=e._getRangeForPage(l,o),h=u.intersectRanges(new pn(1,1,i.startLineNumber,i.startColumn)),d=n.getValueInRange(h,1),f=n.getLineCount(),p=n.getLineMaxColumn(f),g=c.intersectRanges(new pn(i.endLineNumber,i.endColumn,f,p)),m=n.getValueInRange(g,1);if(a===l||a+1===l)s=n.getValueInRange(i,1);else{var v=u.intersectRanges(i),_=c.intersectRanges(i);s=n.getValueInRange(v,1)+String.fromCharCode(8230)+n.getValueInRange(_,1)}if(r){var y=500;d.length>y&&(d=d.substring(d.length-y,d.length)),m.length>y&&(m=m.substring(0,y)),s.length>2*y&&(s=s.substring(0,y)+String.fromCharCode(8230)+s.substring(s.length-y,s.length))}return new Dy(d+s+m,d.length,d.length+s.length,new fn(i.startLineNumber,i.startColumn),new fn(i.endLineNumber,i.endColumn))},e}(),xy=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ky={forceCopyWithSyntaxHighlighting:!1},Oy=function(){function e(){this._lastState=null}return e.prototype.set=function(e,t){this._lastState={lastCopiedValue:e,data:t}},e.prototype.get=function(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)},e.INSTANCE=new e,e}(),Ty=function(e){function t(t,n){var i=e.call(this)||this;i.textArea=n,i._onFocus=i._register(new qe),i.onFocus=i._onFocus.event,i._onBlur=i._register(new qe),i.onBlur=i._onBlur.event,i._onKeyDown=i._register(new qe),i.onKeyDown=i._onKeyDown.event,i._onKeyUp=i._register(new qe),i.onKeyUp=i._onKeyUp.event,i._onCut=i._register(new qe),i.onCut=i._onCut.event,i._onPaste=i._register(new qe),i.onPaste=i._onPaste.event,i._onType=i._register(new qe),i.onType=i._onType.event,i._onCompositionStart=i._register(new qe),i.onCompositionStart=i._onCompositionStart.event,i._onCompositionUpdate=i._register(new qe),i.onCompositionUpdate=i._onCompositionUpdate.event,i._onCompositionEnd=i._register(new qe),i.onCompositionEnd=i._onCompositionEnd.event,i._onSelectionChangeRequest=i._register(new qe),i.onSelectionChangeRequest=i._onSelectionChangeRequest.event,i._host=t,i._textArea=i._register(new Iy(n)),i._asyncTriggerCut=i._register(new mi((function(){return i._onCut.fire()}),0)),i._textAreaState=Dy.EMPTY,i._selectionChangeListener=null,i.writeScreenReaderContent("ctor"),i._hasFocus=!1,i._isDoingComposition=!1,i._nextCommand=0,i._register(so(n.domNode,"keydown",(function(e){!i._isDoingComposition||109!==e.keyCode&&1!==e.keyCode||e.stopPropagation(),e.equals(9)&&e.preventDefault(),i._onKeyDown.fire(e)}))),i._register(so(n.domNode,"keyup",(function(e){i._onKeyUp.fire(e)}))),i._register(io(n.domNode,"compositionstart",(function(e){i._isDoingComposition||(i._isDoingComposition=!0,Rn||i._setAndWriteTextAreaState("compositionstart",Dy.EMPTY),i._onCompositionStart.fire())})));var o=function(e){var t=i._textAreaState,n=Dy.readFromTextArea(i._textArea);return[n,Dy.deduceInput(t,n,e)]},r=function(e){var t=i._textAreaState,n=Dy.selectedText(e),o={text:n.value,replaceCharCnt:t.selectionEnd-t.selectionStart};return[n,o]},a=function(e){return!(!Rn||"ja"!==e)||!(!An||0!==e.indexOf("zh-Han"))};return i._register(io(n.domNode,"compositionupdate",(function(e){if(a(e.locale)){var t=o(!1),n=t[0],s=t[1];return i._textAreaState=n,i._onType.fire(s),void i._onCompositionUpdate.fire(e)}var u=r(e.data),l=u[0],c=u[1];i._textAreaState=l,i._onType.fire(c),i._onCompositionUpdate.fire(e)}))),i._register(io(n.domNode,"compositionend",(function(e){if(i._isDoingComposition){if(a(e.locale)){var t=o(!1),n=t[0],s=t[1];i._textAreaState=n,i._onType.fire(s)}else{var u=r(e.data);n=u[0],s=u[1];i._textAreaState=n,i._onType.fire(s)}(Rn||Vn)&&(i._textAreaState=Dy.readFromTextArea(i._textArea)),i._isDoingComposition&&(i._isDoingComposition=!1,i._onCompositionEnd.fire())}}))),i._register(io(n.domNode,"input",(function(){if(i._textArea.setIgnoreSelectionChangeTime("received input event"),!i._isDoingComposition){var e=o(s["e"]),t=e[0],n=e[1];0===n.replaceCharCnt&&1===n.text.length&&Tr(n.text.charCodeAt(0))||(i._textAreaState=t,0===i._nextCommand?""!==n.text&&i._onType.fire(n):(""===n.text&&0===n.replaceCharCnt||i._firePaste(n.text,null),i._nextCommand=0))}}))),i._register(io(n.domNode,"cut",(function(e){i._textArea.setIgnoreSelectionChangeTime("received cut event"),i._ensureClipboardGetsEditorSelection(e),i._asyncTriggerCut.schedule()}))),i._register(io(n.domNode,"copy",(function(e){i._ensureClipboardGetsEditorSelection(e)}))),i._register(io(n.domNode,"paste",(function(e){if(i._textArea.setIgnoreSelectionChangeTime("received paste event"),My.canUseTextData(e)){var t=My.getTextData(e),n=t[0],o=t[1];""!==n&&i._firePaste(n,o)}else i._textArea.getSelectionStart()!==i._textArea.getSelectionEnd()&&i._setAndWriteTextAreaState("paste",Dy.EMPTY),i._nextCommand=1}))),i._register(io(n.domNode,"focus",(function(){i._setHasFocus(!0)}))),i._register(io(n.domNode,"blur",(function(){i._setHasFocus(!1)}))),i}return xy(t,e),t.prototype._installSelectionChangeListener=function(){var e=this,t=0;return io(document,"selectionchange",(function(n){if(e._hasFocus&&!e._isDoingComposition&&Vn&&s["h"]){var i=Date.now(),o=i-t;if(t=i,!(o<5)){var r=i-e._textArea.getIgnoreSelectionChangeTime();if(e._textArea.resetSelectionChangeTime(),!(r<100)&&e._textAreaState.selectionStartPosition&&e._textAreaState.selectionEndPosition){var a=e._textArea.getValue();if(e._textAreaState.value===a){var u=e._textArea.getSelectionStart(),l=e._textArea.getSelectionEnd();if(e._textAreaState.selectionStart!==u||e._textAreaState.selectionEnd!==l){var c=e._textAreaState.deduceEditorPosition(u),h=e._host.deduceModelPosition(c[0],c[1],c[2]),d=e._textAreaState.deduceEditorPosition(l),f=e._host.deduceModelPosition(d[0],d[1],d[2]),p=new mn(h.lineNumber,h.column,f.lineNumber,f.column);e._onSelectionChangeRequest.fire(p)}}}}}}))},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)},t.prototype.focusTextArea=function(){this._setHasFocus(!0),this.refreshFocusState()},t.prototype.isFocused=function(){return this._hasFocus},t.prototype.refreshFocusState=function(){var e=Ao(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):qi(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)},t.prototype._setHasFocus=function(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&(Pn?this._setAndWriteTextAreaState("focusgain",Dy.EMPTY):this.writeScreenReaderContent("focusgain")),this._hasFocus?this._onFocus.fire():this._onBlur.fire())},t.prototype._setAndWriteTextAreaState=function(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t},t.prototype.writeScreenReaderContent=function(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))},t.prototype._ensureClipboardGetsEditorSelection=function(e){var t=this._host.getDataToCopy(My.canUseTextData(e)&&Bi.clipboard.richText),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};Oy.INSTANCE.set(Fn?t.text.replace(/\r\n/g,"\n"):t.text,n),My.canUseTextData(e)?My.setTextData(e,t.text,t.html,n):this._setAndWriteTextAreaState("copy or cut",Dy.selectedText(t.text))},t.prototype._firePaste=function(e,t){t||(t=Oy.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})},t}(Me),My=function(){function e(){}return e.canUseTextData=function(e){return!!e.clipboardData||!!window.clipboardData},e.getTextData=function(e){if(e.clipboardData){e.preventDefault();var t=e.clipboardData.getData("text/plain"),n=null,i=e.clipboardData.getData("vscode-editor-data");if("string"===typeof i)try{n=JSON.parse(i),1!==n.version&&(n=null)}catch(o){}return[t,n]}if(window.clipboardData){e.preventDefault();t=window.clipboardData.getData("Text");return[t,null]}throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")},e.setTextData=function(e,t,n,i){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),"string"===typeof n&&e.clipboardData.setData("text/html",n),e.clipboardData.setData("vscode-editor-data",JSON.stringify(i)),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")},e}(),Iy=function(e){function t(t){var n=e.call(this)||this;return n._actual=t,n._ignoreSelectionChangeTime=0,n}return xy(t,e),t.prototype.setIgnoreSelectionChangeTime=function(e){this._ignoreSelectionChangeTime=Date.now()},t.prototype.getIgnoreSelectionChangeTime=function(){return this._ignoreSelectionChangeTime},t.prototype.resetSelectionChangeTime=function(){this._ignoreSelectionChangeTime=0},t.prototype.getValue=function(){return this._actual.domNode.value},t.prototype.setValue=function(e,t){var n=this._actual.domNode;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)},t.prototype.getSelectionStart=function(){return this._actual.domNode.selectionStart},t.prototype.getSelectionEnd=function(){return this._actual.domNode.selectionEnd},t.prototype.setSelectionRange=function(e,t,n){var i=this._actual.domNode,o=null,r=Ao(i);o=r?r.activeElement:document.activeElement;var s=o===i,a=i.selectionStart,u=i.selectionEnd;if(s&&a===t&&u===n)Fn&&window.parent!==window&&i.focus();else{if(s)return this.setIgnoreSelectionChangeTime("setSelectionRange"),i.setSelectionRange(t,n),void(Fn&&window.parent!==window&&i.focus());try{var l=jo(i);this.setIgnoreSelectionChangeTime("setSelectionRange"),i.focus(),i.setSelectionRange(t,n),Uo(i,l)}catch(c){}}},t}(Me),Ay=(n("2ab7"),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Py=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ay(t,e),t}(zg),Ry={ColorContribution:"base.contributions.colors"},Fy=function(){function e(){this._onDidChangeSchema=new qe,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}return e.prototype.registerColor=function(e,t,n,i,o){void 0===i&&(i=!1);var r={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:o};this.colorsById[e]=r;var s={type:"string",description:n,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(s.deprecationMessage=o),this.colorSchema.properties[e]=s,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e},e.prototype.resolveDefaultColor=function(e,t){var n=this.colorsById[e];if(n&&n.defaults){var i=n.defaults[t.type];return $b(i,t)}},e.prototype.getColorSchema=function(){return this.colorSchema},e.prototype.toString=function(){var e=this,t=function(e,t){var n=-1===e.indexOf(".")?0:1,i=-1===t.indexOf(".")?0:1;return n!==i?n-i:e.localeCompare(t)};return Object.keys(this.colorsById).sort(t).map((function(t){return"- `"+t+"`: "+e.colorsById[t].description})).join("\n")},e}(),Wy=new Fy;function Vy(e,t,n,i,o){return Wy.registerColor(e,t,n,i,o)}pd.add(Ry.ColorContribution,Wy);var By=Vy("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},r("foreground","Overall foreground color. This color is only used if not overridden by a component.")),Hy=(Vy("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},r("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),Vy("focusBorder",{dark:S_.fromHex("#0E639C").transparent(.8),light:S_.fromHex("#007ACC").transparent(.4),hc:"#F38518"},r("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component."))),zy=Vy("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},r("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),jy=Vy("contrastActiveBorder",{light:null,dark:null,hc:Hy},r("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),Uy=(Vy("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},r("textLinkForeground","Foreground color for links in text.")),Vy("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:S_.black},r("textCodeBlockBackground","Background color for code blocks in text.")),Vy("widget.shadow",{dark:"#000000",light:"#A8A8A8",hc:null},r("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),Ky=(Vy("input.background",{dark:"#3C3C3C",light:S_.white,hc:S_.black},r("inputBoxBackground","Input box background.")),Vy("input.foreground",{dark:By,light:By,hc:By},r("inputBoxForeground","Input box foreground.")),Vy("input.border",{dark:null,light:null,hc:zy},r("inputBoxBorder","Input box border.")),Vy("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:zy},r("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),Vy("inputOption.activeBackground",{dark:Zb(Hy,.5),light:Zb(Hy,.3),hc:null},r("inputOption.activeBackground","Background color of activated options in input fields.")),Vy("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:S_.black},r("inputValidationInfoBackground","Input validation background color for information severity.")),Vy("inputValidation.infoForeground",{dark:null,light:null,hc:null},r("inputValidationInfoForeground","Input validation foreground color for information severity.")),Vy("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:zy},r("inputValidationInfoBorder","Input validation border color for information severity.")),Vy("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:S_.black},r("inputValidationWarningBackground","Input validation background color for warning severity.")),Vy("inputValidation.warningForeground",{dark:null,light:null,hc:null},r("inputValidationWarningForeground","Input validation foreground color for warning severity.")),Vy("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:zy},r("inputValidationWarningBorder","Input validation border color for warning severity.")),Vy("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:S_.black},r("inputValidationErrorBackground","Input validation background color for error severity.")),Vy("inputValidation.errorForeground",{dark:null,light:null,hc:null},r("inputValidationErrorForeground","Input validation foreground color for error severity.")),Vy("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:zy},r("inputValidationErrorBorder","Input validation border color for error severity.")),Vy("dropdown.background",{dark:"#3C3C3C",light:S_.white,hc:S_.black},r("dropdownBackground","Dropdown background."))),qy=Vy("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:S_.white},r("dropdownForeground","Dropdown foreground.")),Gy=(Vy("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:S_.white},r("pickerGroupForeground","Quick picker color for grouping labels.")),Vy("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:S_.white},r("pickerGroupBorder","Quick picker color for grouping borders.")),Vy("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:S_.black},r("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),Vy("badge.foreground",{dark:S_.white,light:"#333",hc:S_.white},r("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),Vy("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},r("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled."))),Yy=Vy("scrollbarSlider.background",{dark:S_.fromHex("#797979").transparent(.4),light:S_.fromHex("#646464").transparent(.4),hc:Zb(zy,.6)},r("scrollbarSliderBackground","Scrollbar slider background color.")),Zy=Vy("scrollbarSlider.hoverBackground",{dark:S_.fromHex("#646464").transparent(.7),light:S_.fromHex("#646464").transparent(.7),hc:Zb(zy,.8)},r("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),Xy=Vy("scrollbarSlider.activeBackground",{dark:S_.fromHex("#BFBFBF").transparent(.4),light:S_.fromHex("#000000").transparent(.6),hc:zy},r("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),$y=(Vy("progressBar.background",{dark:S_.fromHex("#0E70C0"),light:S_.fromHex("#0E70C0"),hc:zy},r("progressBarBackground","Background color of the progress bar that can show for long running operations.")),Vy("editorError.foreground",{dark:"#F48771",light:"#E51400",hc:null},r("editorError.foreground","Foreground color of error squigglies in the editor."))),Qy=Vy("editorError.border",{dark:null,light:null,hc:S_.fromHex("#E47777").transparent(.8)},r("errorBorder","Border color of error boxes in the editor.")),Jy=Vy("editorWarning.foreground",{dark:"#CCA700",light:"#E9A700",hc:null},r("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),eb=Vy("editorWarning.border",{dark:null,light:null,hc:S_.fromHex("#FFCC00").transparent(.8)},r("warningBorder","Border color of warning boxes in the editor.")),tb=Vy("editorInfo.foreground",{dark:"#75BEFF",light:"#75BEFF",hc:null},r("editorInfo.foreground","Foreground color of info squigglies in the editor.")),nb=Vy("editorInfo.border",{dark:null,light:null,hc:S_.fromHex("#75BEFF").transparent(.8)},r("infoBorder","Border color of info boxes in the editor.")),ib=Vy("editorHint.foreground",{dark:S_.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},r("editorHint.foreground","Foreground color of hint squigglies in the editor.")),ob=Vy("editorHint.border",{dark:null,light:null,hc:S_.fromHex("#eeeeee").transparent(.8)},r("hintBorder","Border color of hint boxes in the editor.")),rb=Vy("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:S_.black},r("editorBackground","Editor background color.")),sb=Vy("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:S_.white},r("editorForeground","Editor default foreground color.")),ab=Vy("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},r("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),ub=Vy("editorWidget.foreground",{dark:By,light:By,hc:By},r("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),lb=Vy("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:zy},r("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),cb=(Vy("editorWidget.resizeBorder",{light:null,dark:null,hc:null},r("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),Vy("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},r("editorSelectionBackground","Color of the editor selection."))),hb=Vy("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},r("editorSelectionForeground","Color of the selected text for high contrast.")),db=Vy("editor.inactiveSelectionBackground",{light:Zb(cb,.5),dark:Zb(cb,.5),hc:Zb(cb,.5)},r("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),fb=Vy("editor.selectionHighlightBackground",{light:Xb(cb,rb,.3,.6),dark:Xb(cb,rb,.3,.6),hc:null},r("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),pb=(Vy("editor.selectionHighlightBorder",{light:null,dark:null,hc:jy},r("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),Vy("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},r("editorFindMatch","Color of the current search match.")),Vy("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},r("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0)),gb=(Vy("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},r("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Vy("editor.findMatchBorder",{light:null,dark:null,hc:jy},r("editorFindMatchBorder","Border color of the current search match.")),Vy("editor.findMatchHighlightBorder",{light:null,dark:null,hc:jy},r("findMatchHighlightBorder","Border color of the other search matches.")),Vy("editor.findRangeHighlightBorder",{dark:null,light:null,hc:Zb(jy,.4)},r("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Vy("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},r("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),Vy("editorHoverWidget.background",{light:ab,dark:ab,hc:ab},r("hoverBackground","Background color of the editor hover."))),mb=(Vy("editorHoverWidget.foreground",{light:ub,dark:ub,hc:ub},r("hoverForeground","Foreground color of the editor hover.")),Vy("editorHoverWidget.border",{light:lb,dark:lb,hc:lb},r("hoverBorder","Border color of the editor hover.")),Vy("editorHoverWidget.statusBarBackground",{dark:Yb(gb,.2),light:Gb(gb,.05),hc:ab},r("statusBarBackground","Background color of the editor hover status bar.")),Vy("editorLink.activeForeground",{dark:"#4E94CE",light:S_.blue,hc:S_.cyan},r("activeLinkForeground","Color of active links.")),Vy("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},r("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Vy("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},r("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),new S_(new b_(155,185,85,.2))),vb=new S_(new b_(255,0,0,.2)),_b=Vy("diffEditor.insertedTextBackground",{dark:mb,light:mb,hc:null},r("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),yb=Vy("diffEditor.removedTextBackground",{dark:vb,light:vb,hc:null},r("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),bb=Vy("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},r("diffEditorInsertedOutline","Outline color for the text that got inserted.")),Cb=Vy("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},r("diffEditorRemovedOutline","Outline color for text that got removed.")),wb=Vy("diffEditor.border",{dark:null,light:null,hc:zy},r("diffEditorBorder","Border color between the two text editors.")),Sb=Vy("list.focusBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},r("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Lb=Vy("list.focusForeground",{dark:null,light:null,hc:null},r("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Nb=Vy("list.activeSelectionBackground",{dark:"#094771",light:"#0074E8",hc:null},r("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Db=Vy("list.activeSelectionForeground",{dark:S_.white,light:S_.white,hc:null},r("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Eb=Vy("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},r("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),xb=Vy("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},r("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),kb=Vy("list.inactiveFocusBackground",{dark:null,light:null,hc:null},r("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Ob=Vy("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},r("listHoverBackground","List/Tree background when hovering over items using the mouse.")),Tb=Vy("list.hoverForeground",{dark:null,light:null,hc:null},r("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),Mb=Vy("list.dropBackground",{dark:Sb,light:Sb,hc:null},r("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),Ib=(Vy("list.highlightForeground",{dark:"#0097fb",light:"#0066BF",hc:Hy},r("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),Vy("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:S_.black},r("listFilterWidgetBackground","Background color of the type filter widget in lists and trees."))),Ab=Vy("listFilterWidget.outline",{dark:S_.transparent,light:S_.transparent,hc:"#f38518"},r("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),Pb=Vy("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:zy},r("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),Rb=Vy("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},r("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),Fb=Vy("menu.border",{dark:null,light:null,hc:zy},r("menuBorder","Border color of menus.")),Wb=Vy("menu.foreground",{dark:qy,light:By,hc:qy},r("menuForeground","Foreground color of menu items.")),Vb=Vy("menu.background",{dark:Ky,light:Ky,hc:Ky},r("menuBackground","Background color of menu items.")),Bb=Vy("menu.selectionForeground",{dark:Db,light:Db,hc:Db},r("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Hb=Vy("menu.selectionBackground",{dark:Nb,light:Nb,hc:Nb},r("menuSelectionBackground","Background color of the selected menu item in menus.")),zb=Vy("menu.selectionBorder",{dark:null,light:null,hc:jy},r("menuSelectionBorder","Border color of the selected menu item in menus.")),jb=Vy("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:zy},r("menuSeparatorBackground","Color of a separator menu item in menus.")),Ub=(Vy("editor.snippetTabstopHighlightBackground",{dark:new S_(new b_(124,124,124,.3)),light:new S_(new b_(10,50,100,.2)),hc:new S_(new b_(124,124,124,.3))},r("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),Vy("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},r("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),Vy("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},r("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),Vy("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new S_(new b_(10,50,100,.5)),hc:"#525252"},r("snippetFinalTabstopHighlightBorder","Highlight border color of the final stabstop of a snippet.")),Vy("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},r("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),Vy("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},r("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Vy("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},r("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),Vy("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},r("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0)),Kb=Vy("minimap.errorHighlight",{dark:new S_(new b_(255,18,18,.7)),light:new S_(new b_(255,18,18,.7)),hc:new S_(new b_(255,50,50,1))},r("minimapError","Minimap marker color for errors.")),qb=Vy("minimap.warningHighlight",{dark:Jy,light:Jy,hc:eb},r("overviewRuleWarning","Minimap marker color for warnings."));Vy("problemsErrorIcon.foreground",{dark:$y,light:$y,hc:$y},r("problemsErrorIconForeground","The color used for the problems error icon.")),Vy("problemsWarningIcon.foreground",{dark:Jy,light:Jy,hc:Jy},r("problemsWarningIconForeground","The color used for the problems warning icon.")),Vy("problemsInfoIcon.foreground",{dark:tb,light:tb,hc:tb},r("problemsInfoIconForeground","The color used for the problems info icon."));function Gb(e,t){return function(n){var i=$b(e,n);if(i)return i.darken(t)}}function Yb(e,t){return function(n){var i=$b(e,n);if(i)return i.lighten(t)}}function Zb(e,t){return function(n){var i=$b(e,n);if(i)return i.transparent(t)}}function Xb(e,t,n,i){return function(o){var r=$b(e,o);if(r){var s=$b(t,o);return s?r.isDarkerThan(s)?S_.getLighterColor(r,s,n).transparent(i):S_.getDarkerColor(r,s,n).transparent(i):r.transparent(n*i)}}}function $b(e,t){if(null!==e)return"string"===typeof e?"#"===e[0]?S_.fromHex(e):t.getColor(e):e instanceof S_?e:"function"===typeof e?e(t):void 0}var Qb="vscode://schemas/workbench-colors",Jb=pd.as(gd.JSONContribution);Jb.registerSchema(Qb,Wy.getColorSchema());var eC=new mi((function(){return Jb.notifySchemaChanged(Qb)}),200);Wy.onDidChangeSchema((function(){eC.isScheduled()||eC.schedule()}));var tC=Vy("editor.lineHighlightBackground",{dark:null,light:null,hc:null},r("lineHighlight","Background color for the highlight of line at the cursor position.")),nC=Vy("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},r("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),iC=Vy("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},r("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),oC=Vy("editor.rangeHighlightBorder",{dark:null,light:null,hc:jy},r("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),rC=Vy("editor.symbolHighlightBackground",{dark:pb,light:pb,hc:null},r("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),sC=Vy("editor.symbolHighlightBorder",{dark:null,light:null,hc:jy},r("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),aC=Vy("editorCursor.foreground",{dark:"#AEAFAD",light:S_.black,hc:S_.white},r("caret","Color of the editor cursor.")),uC=Vy("editorCursor.background",null,r("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),lC=Vy("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},r("editorWhitespaces","Color of whitespace characters in the editor.")),cC=Vy("editorIndentGuide.background",{dark:lC,light:lC,hc:lC},r("editorIndentGuides","Color of the editor indentation guides.")),hC=Vy("editorIndentGuide.activeBackground",{dark:lC,light:lC,hc:lC},r("editorActiveIndentGuide","Color of the active editor indentation guides.")),dC=Vy("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:S_.white},r("editorLineNumbers","Color of editor line numbers.")),fC=Vy("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:jy},r("editorActiveLineNumber","Color of editor active line number"),!1,r("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),pC=Vy("editorLineNumber.activeForeground",{dark:fC,light:fC,hc:fC},r("editorActiveLineNumber","Color of editor active line number")),gC=Vy("editorRuler.foreground",{dark:"#5A5A5A",light:S_.lightgrey,hc:S_.white},r("editorRuler","Color of the editor rulers.")),mC=(Vy("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},r("editorCodeLensForeground","Foreground color of editor code lenses")),Vy("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},r("editorBracketMatchBackground","Background color behind matching brackets")),Vy("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:zy},r("editorBracketMatchBorder","Color for matching brackets boxes")),Vy("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},r("editorOverviewRulerBorder","Color of the overview ruler border."))),vC=Vy("editorGutter.background",{dark:rb,light:rb,hc:rb},r("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),_C=Vy("editorUnnecessaryCode.border",{dark:null,light:null,hc:S_.fromHex("#fff").transparent(.8)},r("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),yC=Vy("editorUnnecessaryCode.opacity",{dark:S_.fromHex("#000a"),light:S_.fromHex("#0007"),hc:null},r("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),bC=Vy("editorOverviewRuler.errorForeground",{dark:new S_(new b_(255,18,18,.7)),light:new S_(new b_(255,18,18,.7)),hc:new S_(new b_(255,50,50,1))},r("overviewRuleError","Overview ruler marker color for errors.")),CC=Vy("editorOverviewRuler.warningForeground",{dark:Jy,light:Jy,hc:eb},r("overviewRuleWarning","Overview ruler marker color for warnings.")),wC=Vy("editorOverviewRuler.infoForeground",{dark:tb,light:tb,hc:nb},r("overviewRuleInfo","Overview ruler marker color for infos."));lm((function(e,t){var n=e.getColor(rb);n&&t.addRule(".monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: "+n+"; }");var i=e.getColor(sb);i&&t.addRule(".monaco-editor, .monaco-editor .inputarea.ime-input { color: "+i+"; }");var o=e.getColor(vC);o&&t.addRule(".monaco-editor .margin { background-color: "+o+"; }");var r=e.getColor(iC);r&&t.addRule(".monaco-editor .rangeHighlight { background-color: "+r+"; }");var s=e.getColor(oC);s&&t.addRule(".monaco-editor .rangeHighlight { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+s+"; }");var a=e.getColor(rC);a&&t.addRule(".monaco-editor .symbolHighlight { background-color: "+a+"; }");var u=e.getColor(sC);u&&t.addRule(".monaco-editor .symbolHighlight { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+u+"; }");var l=e.getColor(lC);l&&t.addRule(".vs-whitespace { color: "+l+" !important; }")}));var SC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),LC=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._readConfig(),n._lastCursorModelPosition=new fn(1,1),n._renderResult=null,n._context.addEventHandler(n),n}return SC(t,e),t.prototype._readConfig=function(){var e=this._context.configuration.options;this._lineHeight=e.get(49);var t=e.get(50);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(71);var n=e.get(107);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth},t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return this._readConfig(),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0].getPosition();return this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t),2===this._renderLineNumbers||3===this._renderLineNumbers},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getLineRenderLineNumber=function(e){var t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new fn(e,1));if(1!==t.column)return"";var n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(2===this._renderLineNumbers){var i=Math.abs(this._lastCursorModelPosition.lineNumber-n);return 0===i?'<span class="relative-current-line-number">'+n+"</span>":String(i)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n?String(n):n%10===0?String(n):"":String(n)},t.prototype.prepareRender=function(e){if(0!==this._renderLineNumbers){for(var n=s["d"]?this._lineHeight%2===0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r='<div class="'+t.CLASS_NAME+n+'" style="left:'+this._lineNumbersLeft.toString()+"px;width:"+this._lineNumbersWidth.toString()+'px;">',a=this._context.model.getLineCount(),u=[],l=i;l<=o;l++){var c=l-i;if(this._renderFinalNewline||l!==a||0!==this._context.model.getLineLength(l)){var h=this._getLineRenderLineNumber(l);u[c]=h?r+h+"</div>":""}else u[c]=""}this._renderResult=u}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.CLASS_NAME="line-numbers",t}(Py);lm((function(e,t){var n=e.getColor(dC);n&&t.addRule(".monaco-editor .line-numbers { color: "+n+"; }");var i=e.getColor(pC);i&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: "+i+"; }")}));var NC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),DC=function(e){function t(n){var i=e.call(this,n)||this,o=i._context.configuration.options,r=o.get(107);return i._canUseLayerHinting=!o.get(22),i._contentLeft=r.contentLeft,i._glyphMarginLeft=r.glyphMarginLeft,i._glyphMarginWidth=r.glyphMarginWidth,i._domNode=wg(document.createElement("div")),i._domNode.setClassName(t.OUTER_CLASS_NAME),i._domNode.setPosition("absolute"),i._domNode.setAttribute("role","presentation"),i._domNode.setAttribute("aria-hidden","true"),i._glyphMarginBackgroundDomNode=wg(document.createElement("div")),i._glyphMarginBackgroundDomNode.setClassName(t.CLASS_NAME),i._domNode.appendChild(i._glyphMarginBackgroundDomNode),i}return NC(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._canUseLayerHinting=!t.get(22),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollTopChanged},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");var t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);var n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)},t.CLASS_NAME="glyph-margin",t.OUTER_CLASS_NAME="margin",t}(Ug),EC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xC=function(){function e(e){this.type=1,this._source=e}return e.prototype.hasChanged=function(e){return this._source.hasChanged(e)},e}(),kC=function(){function e(e){this.type=2,this.contentWidth=e.contentWidth,this.contentHeight=e.contentHeight,this.contentWidthChanged=e.contentWidthChanged,this.contentHeightChanged=e.contentHeightChanged}return e}(),OC=function(){function e(e,t){this.type=3,this.selections=e,this.modelSelections=t}return e}(),TC=function(){function e(){this.type=4}return e}(),MC=function(){function e(){this.type=5}return e}(),IC=function(){function e(e){this.type=6,this.isFocused=e}return e}(),AC=function(){function e(){this.type=7}return e}(),PC=function(){function e(){this.type=8}return e}(),RC=function(){function e(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}return e}(),FC=function(){function e(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}return e}(),WC=function(){function e(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}return e}(),VC=function(){function e(e,t,n,i,o){this.type=12,this.source=e,this.range=t,this.verticalType=n,this.revealHorizontal=i,this.scrollType=o}return e}(),BC=function(){function e(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}return e}(),HC=function(){function e(){this.type=14}return e}(),zC=function(){function e(e){this.type=15,this.ranges=e}return e}(),jC=function(){function e(){this.type=16}return e}(),UC=function(){function e(){this.type=17}return e}(),KC=function(e){function t(){var t=e.call(this)||this;return t._listeners=[],t._collector=null,t._collectorCnt=0,t}return EC(t,e),t.prototype.dispose=function(){this._listeners=[],e.prototype.dispose.call(this)},t.prototype._beginEmit=function(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new qC),this._collector},t.prototype._endEmit=function(){if(this._collectorCnt--,0===this._collectorCnt){var e=this._collector.finalize();this._collector=null,e.length>0&&this._emit(e)}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),n=0,i=t.length;n<i;n++)GC(t[n],e)},t.prototype.addEventListener=function(e){var t=this;return this._listeners.push(e),ke((function(){for(var n=t._listeners,i=0,o=n.length;i<o;i++)if(n[i]===e){n.splice(i,1);break}}))},t}(Me),qC=function(){function e(){this._eventsLen=0,this._events=[],this._eventsLen=0}return e.prototype.emit=function(e){this._events[this._eventsLen++]=e},e.prototype.finalize=function(){var e=this._events;return this._events=[],e},e}();function GC(e,t){try{e(t)}catch(n){ge(n)}}var YC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ZC=function(){function e(e,t,n){this.top=e,this.left=t,this.width=n}return e.prototype.setWidth=function(t){return new e(this.top,this.left,t)},e}(),XC=Rn||Fn,$C=function(e){function t(t,n,i){var o=e.call(this,t)||this;o._primaryCursorPosition=new fn(1,1),o._primaryCursorVisibleRange=null,o._viewController=n,o._viewHelper=i,o._scrollLeft=0,o._scrollTop=0;var r=o._context.configuration.options,a=r.get(107);o._setAccessibilityOptions(r),o._contentLeft=a.contentLeft,o._contentWidth=a.contentWidth,o._contentHeight=a.height,o._fontInfo=r.get(34),o._lineHeight=r.get(49),o._emptySelectionClipboard=r.get(25),o._copyWithSyntaxHighlighting=r.get(15),o._visibleTextArea=null,o._selections=[new mn(1,1,1,1)],o._modelSelections=[new mn(1,1,1,1)],o._lastRenderPosition=null,o.textArea=wg(document.createElement("textarea")),Kg.write(o.textArea,6),o.textArea.setClassName("inputarea"),o.textArea.setAttribute("wrap","off"),o.textArea.setAttribute("autocorrect","off"),o.textArea.setAttribute("autocapitalize","off"),o.textArea.setAttribute("autocomplete","off"),o.textArea.setAttribute("spellcheck","false"),o.textArea.setAttribute("aria-label",o._getAriaLabel(r)),o.textArea.setAttribute("role","textbox"),o.textArea.setAttribute("aria-multiline","true"),o.textArea.setAttribute("aria-haspopup","false"),o.textArea.setAttribute("aria-autocomplete","both"),s["g"]&&r.get(68)&&o.textArea.setAttribute("readonly","true"),o.textAreaCover=wg(document.createElement("div")),o.textAreaCover.setPosition("absolute");var u={getLineCount:function(){return o._context.model.getLineCount()},getLineMaxColumn:function(e){return o._context.model.getLineMaxColumn(e)},getValueInRange:function(e,t){return o._context.model.getValueInRange(e,t)}},l={getDataToCopy:function(e){var t=o._context.model.getPlainTextToCopy(o._modelSelections,o._emptySelectionClipboard,s["h"]),n=o._context.model.getEOL(),i=o._emptySelectionClipboard&&1===o._modelSelections.length&&o._modelSelections[0].isEmpty(),r=Array.isArray(t)?t:null,a=Array.isArray(t)?t.join(n):t,u=void 0,l=null;if(e&&(ky.forceCopyWithSyntaxHighlighting||o._copyWithSyntaxHighlighting&&a.length<65536)){var c=o._context.model.getRichTextToCopy(o._modelSelections,o._emptySelectionClipboard);c&&(u=c.html,l=c.mode)}return{isFromEmptySelection:i,multicursorText:r,text:a,html:u,mode:l}},getScreenReaderContent:function(e){if(zn)return Dy.EMPTY;if(1===o._accessibilitySupport){if(s["e"]){var t=o._selections[0];if(t.isEmpty()){var n=t.getStartPosition(),i=o._getWordBeforePosition(n);if(0===i.length&&(i=o._getCharacterBeforePosition(n)),i.length>0)return new Dy(i,i.length,i.length,n,n)}}return Dy.EMPTY}return Ey.fromEditorSelection(e,u,o._selections[0],o._accessibilityPageSize,0===o._accessibilitySupport)},deduceModelPosition:function(e,t,n){return o._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)}};return o._textAreaInput=o._register(new Ty(l,o.textArea)),o._register(o._textAreaInput.onKeyDown((function(e){o._viewController.emitKeyDown(e)}))),o._register(o._textAreaInput.onKeyUp((function(e){o._viewController.emitKeyUp(e)}))),o._register(o._textAreaInput.onPaste((function(e){var t=!1,n=null,i=null;e.metadata&&(t=o._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,n="undefined"!==typeof e.metadata.multicursorText?e.metadata.multicursorText:null,i=e.metadata.mode),o._viewController.paste("keyboard",e.text,t,n,i)}))),o._register(o._textAreaInput.onCut((function(){o._viewController.cut("keyboard")}))),o._register(o._textAreaInput.onType((function(e){e.replaceCharCnt?o._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):o._viewController.type("keyboard",e.text)}))),o._register(o._textAreaInput.onSelectionChangeRequest((function(e){o._viewController.setSelection("keyboard",e)}))),o._register(o._textAreaInput.onCompositionStart((function(){var e=o._selections[0].startLineNumber,t=o._selections[0].startColumn;o._context.privateViewEventBus.emit(new VC("keyboard",new pn(e,t,e,t),0,!0,1));var n=o._viewHelper.visibleRangeForPositionRelativeToEditor(e,t);n&&(o._visibleTextArea=new ZC(o._context.viewLayout.getVerticalOffsetForLineNumber(e),n.left,XC?0:1),o._render()),o.textArea.setClassName("inputarea ime-input"),o._viewController.compositionStart("keyboard")}))),o._register(o._textAreaInput.onCompositionUpdate((function(e){o._visibleTextArea=Rn?o._visibleTextArea.setWidth(0):o._visibleTextArea.setWidth(QC(e.data,o._fontInfo)),o._render()}))),o._register(o._textAreaInput.onCompositionEnd((function(){o._visibleTextArea=null,o._render(),o.textArea.setClassName("inputarea"),o._viewController.compositionEnd("keyboard")}))),o._register(o._textAreaInput.onFocus((function(){o._context.privateViewEventBus.emit(new IC(!0))}))),o._register(o._textAreaInput.onBlur((function(){o._context.privateViewEventBus.emit(new IC(!1))}))),o}return YC(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getWordBeforePosition=function(e){var t=this._context.model.getLineContent(e.lineNumber),n=Dv(this._context.configuration.options.get(96)),i=e.column,o=0;while(i>1){var r=t.charCodeAt(i-2),s=n.get(r);if(0!==s||o>50)return t.substring(i-1,e.column-1);o++,i--}return t.substring(0,e.column-1)},t.prototype._getCharacterBeforePosition=function(e){if(e.column>1){var t=this._context.model.getLineContent(e.lineNumber),n=t.charAt(e.column-2);if(!Tr(n.charCodeAt(0)))return n}return""},t.prototype._getAriaLabel=function(e){var t=e.get(2);return 1===t?r("accessibilityOffAriaLabel","The editor is not accessible at this time. Press Alt+F1 for options."):e.get(4)},t.prototype._setAccessibilityOptions=function(e){this._accessibilitySupport=e.get(2);var t=e.get(3);2===this._accessibilitySupport&&t===de.accessibilityPageSize.defaultValue?this._accessibilityPageSize=160:this._accessibilityPageSize=t},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(34),this._lineHeight=t.get(49),this._emptySelectionClipboard=t.get(25),this._copyWithSyntaxHighlighting=t.get(15),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),s["g"]&&e.hasChanged(68)&&(t.get(68)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.isFocused=function(){return this._textAreaInput.isFocused()},t.prototype.focusTextArea=function(){this._textAreaInput.focusTextArea()},t.prototype.getLastRenderData=function(){return this._lastRenderPosition},t.prototype.setAriaOptions=function(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"))},t.prototype.prepareRender=function(e){this._primaryCursorPosition=new fn(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)},t.prototype.render=function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()},t.prototype._render=function(){if(this._visibleTextArea)this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);else if(this._primaryCursorVisibleRange){var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(e<this._contentLeft||e>this._contentLeft+this._contentWidth)this._renderAtTopLeft();else{var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():s["e"]?this._renderInsideEditor(this._primaryCursorPosition,t,e,XC?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,XC?0:1,XC?0:1)}}else this._renderAtTopLeft()},t.prototype._renderInsideEditor=function(e,t,n,i,o){this._lastRenderPosition=e;var r=this.textArea,s=this.textAreaCover;Zp.applyFontInfo(r,this._fontInfo),r.setTop(t),r.setLeft(n),r.setWidth(i),r.setHeight(o),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)},t.prototype._renderAtTopLeft=function(){this._lastRenderPosition=null;var e=this.textArea,t=this.textAreaCover;if(Zp.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),XC)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);var n=this._context.configuration.options;n.get(40)?t.setClassName("monaco-editor-background textAreaCover "+DC.OUTER_CLASS_NAME):0!==n.get(50).renderType?t.setClassName("monaco-editor-background textAreaCover "+LC.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")},t}(Ug);function QC(e,t){var n=document.createElement("canvas"),i=n.getContext("2d");i.font=JC(t);var o=i.measureText(e);return Fn?o.width+2:o.width}function JC(e){return ew("normal",e.fontWeight,e.fontSize,e.lineHeight,e.fontFamily)}function ew(e,t,n,i,o){return e+" normal "+t+" "+n+"px / "+i+"px "+o}var tw=function(){function e(){}return e.columnSelect=function(e,t,n,i,o,r){for(var s=Math.abs(o-n)+1,a=n>o,u=i>r,l=i<r,c=[],h=0;h<s;h++){var d=n+(a?-h:h),f=ey.columnFromVisibleColumn2(e,t,d,i),p=ey.columnFromVisibleColumn2(e,t,d,r),g=ey.visibleColumnFromColumn2(e,t,new fn(d,f)),m=ey.visibleColumnFromColumn2(e,t,new fn(d,p));if(l){if(g>r)continue;if(m<i)continue}if(u){if(m>i)continue;if(g<r)continue}c.push(new Y_(new pn(d,f,d,f),0,new fn(d,p),0))}if(0===c.length)for(h=0;h<s;h++){d=n+(a?-h:h);var v=t.getLineMaxColumn(d);c.push(new Y_(new pn(d,v,d,v),0,new fn(d,v),0))}return{viewStates:c,reversed:a,fromLineNumber:n,fromVisualColumn:i,toLineNumber:o,toVisualColumn:r}},e.columnSelectLeft=function(t,n,i){var o=i.toViewVisualColumn;return o>1&&o--,e.columnSelect(t,n,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,o)},e.columnSelectRight=function(e,t,n){for(var i=0,o=Math.min(n.fromViewLineNumber,n.toViewLineNumber),r=Math.max(n.fromViewLineNumber,n.toViewLineNumber),s=o;s<=r;s++){var a=t.getLineMaxColumn(s),u=ey.visibleColumnFromColumn2(e,t,new fn(s,a));i=Math.max(i,u)}var l=n.toViewVisualColumn;return l<i&&l++,this.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,l)},e.columnSelectUp=function(e,t,n,i){var o=i?e.pageSize:1,r=Math.max(1,n.toViewLineNumber-o);return this.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,r,n.toViewVisualColumn)},e.columnSelectDown=function(e,t,n,i){var o=i?e.pageSize:1,r=Math.min(t.getLineCount(),n.toViewLineNumber+o);return this.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,r,n.toViewVisualColumn)},e}(),nw=function(){function e(e,t,n){void 0===n&&(n=!1),this._range=e,this._text=t,this.insertsAutoWhitespace=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),i=n[0].range;return new mn(i.endLineNumber,i.endColumn,i.endLineNumber,i.endColumn)},e}(),iw=(function(){function e(e,t){this._range=e,this._text=t}e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),i=n[0].range;return new mn(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)}}(),function(){function e(e,t,n){void 0===n&&(n=!1),this._range=e,this._text=t,this.insertsAutoWhitespace=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),i=n[0].range;return new mn(i.startLineNumber,i.startColumn,i.startLineNumber,i.startColumn)},e}()),ow=function(){function e(e,t,n,i,o){void 0===o&&(o=!1),this._range=e,this._text=t,this._columnDeltaOffset=i,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=o}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),i=n[0].range;return new mn(i.endLineNumber+this._lineNumberDeltaOffset,i.endColumn+this._columnDeltaOffset,i.endLineNumber+this._lineNumberDeltaOffset,i.endColumn+this._columnDeltaOffset)},e}(),rw=function(){function e(e,t,n,i){void 0===i&&(i=!1),this._range=e,this._text=t,this._initialSelection=n,this._forceMoveMarkers=i,this._selectionId=null}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this._selectionId)},e}(),sw=function(){function e(e,t,n){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}return e}(),aw=function(){function e(){}return e.leftPosition=function(e,t,n){return n>e.getLineMinColumn(t)?n-=Rr(e.getLineContent(t),n-1):t>1&&(t-=1,n=e.getLineMaxColumn(t)),new fn(t,n)},e.left=function(t,n,i,o){var r=e.leftPosition(n,i,o);return new sw(r.lineNumber,r.column,0)},e.moveLeft=function(t,n,i,o,r){var s,a;if(i.hasSelection()&&!o)s=i.selection.startLineNumber,a=i.selection.startColumn;else{var u=e.left(t,n,i.position.lineNumber,i.position.column-(r-1));s=u.lineNumber,a=u.column}return i.move(o,s,a,0)},e.rightPosition=function(e,t,n){return n<e.getLineMaxColumn(t)?n+=Pr(e.getLineContent(t),n-1):t<e.getLineCount()&&(t+=1,n=e.getLineMinColumn(t)),new fn(t,n)},e.right=function(t,n,i,o){var r=e.rightPosition(n,i,o);return new sw(r.lineNumber,r.column,0)},e.moveRight=function(t,n,i,o,r){var s,a;if(i.hasSelection()&&!o)s=i.selection.endLineNumber,a=i.selection.endColumn;else{var u=e.right(t,n,i.position.lineNumber,i.position.column+(r-1));s=u.lineNumber,a=u.column}return i.move(o,s,a,0)},e.down=function(e,t,n,i,o,r,s){var a=ey.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize)+o;n+=r;var u=t.getLineCount();return n>u?(n=u,i=s?t.getLineMaxColumn(n):Math.min(t.getLineMaxColumn(n),i)):i=ey.columnFromVisibleColumn2(e,t,n,a),o=a-ey.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize),new sw(n,i,o)},e.moveDown=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.endLineNumber,a=i.selection.endColumn):(s=i.position.lineNumber,a=i.position.column);var u=e.down(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,u.lineNumber,u.column,u.leftoverVisibleColumns)},e.translateDown=function(t,n,i){var o=i.selection,r=e.down(t,n,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),s=e.down(t,n,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new Y_(new pn(r.lineNumber,r.column,r.lineNumber,r.column),r.leftoverVisibleColumns,new fn(s.lineNumber,s.column),s.leftoverVisibleColumns)},e.up=function(e,t,n,i,o,r,s){var a=ey.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize)+o;return n-=r,n<1?(n=1,i=s?t.getLineMinColumn(n):Math.min(t.getLineMaxColumn(n),i)):i=ey.columnFromVisibleColumn2(e,t,n,a),o=a-ey.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize),new sw(n,i,o)},e.moveUp=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.startLineNumber,a=i.selection.startColumn):(s=i.position.lineNumber,a=i.position.column);var u=e.up(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,u.lineNumber,u.column,u.leftoverVisibleColumns)},e.translateUp=function(t,n,i){var o=i.selection,r=e.up(t,n,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),s=e.up(t,n,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new Y_(new pn(r.lineNumber,r.column,r.lineNumber,r.column),r.leftoverVisibleColumns,new fn(s.lineNumber,s.column),s.leftoverVisibleColumns)},e.moveToBeginningOfLine=function(e,t,n,i){var o,r=n.position.lineNumber,s=t.getLineMinColumn(r),a=t.getLineFirstNonWhitespaceColumn(r)||s,u=n.position.column;return o=u===a?s:a,n.move(i,r,o,0)},e.moveToEndOfLine=function(e,t,n,i){var o=n.position.lineNumber,r=t.getLineMaxColumn(o);return n.move(i,o,r,0)},e.moveToBeginningOfBuffer=function(e,t,n,i){return n.move(i,1,1,0)},e.moveToEndOfBuffer=function(e,t,n,i){var o=t.getLineCount(),r=t.getLineMaxColumn(o);return n.move(i,o,r,0)},e}(),uw=function(){function e(){}return e.deleteRight=function(e,t,n,i){for(var o=[],r=3!==e,s=0,a=i.length;s<a;s++){var u=i[s],l=u;if(l.isEmpty()){var c=u.getPosition(),h=aw.right(t,n,c.lineNumber,c.column);l=new pn(h.lineNumber,h.column,c.lineNumber,c.column)}l.isEmpty()?o[s]=null:(l.startLineNumber!==l.endLineNumber&&(r=!0),o[s]=new nw(l,""))}return[r,o]},e._isAutoClosingPairDelete=function(e,t,n){if("never"===e.autoClosingBrackets&&"never"===e.autoClosingQuotes)return!1;for(var i=0,o=n.length;i<o;i++){var r=n[i],s=r.getPosition();if(!r.isEmpty())return!1;var a=t.getLineContent(s.lineNumber),u=a[s.column-2],l=e.autoClosingPairsOpen2.get(u);if(!l)return!1;if(ty(u)){if("never"===e.autoClosingQuotes)return!1}else if("never"===e.autoClosingBrackets)return!1;for(var c=a[s.column-1],h=!1,d=0,f=l;d<f.length;d++){var p=f[d];p.open===u&&p.close===c&&(h=!0)}if(!h)return!1}return!0},e._runAutoClosingPairDelete=function(e,t,n){for(var i=[],o=0,r=n.length;o<r;o++){var s=n[o].getPosition(),a=new pn(s.lineNumber,s.column-1,s.lineNumber,s.column+1);i[o]=new nw(a,"")}return[!0,i]},e.deleteLeft=function(e,t,n,i){if(this._isAutoClosingPairDelete(t,n,i))return this._runAutoClosingPairDelete(t,n,i);for(var o=[],r=2!==e,s=0,a=i.length;s<a;s++){var u=i[s],l=u;if(l.isEmpty()){var c=u.getPosition();if(t.useTabStops&&c.column>1){var h=n.getLineContent(c.lineNumber),d=br(h),f=-1===d?h.length+1:d+1;if(c.column<=f){var p=ey.visibleColumnFromColumn2(t,n,c),g=ey.prevIndentTabStop(p,t.indentSize),m=ey.columnFromVisibleColumn2(t,n,c.lineNumber,g);l=new pn(c.lineNumber,m,c.lineNumber,c.column)}else l=new pn(c.lineNumber,c.column-1,c.lineNumber,c.column)}else{var v=aw.left(t,n,c.lineNumber,c.column);l=new pn(v.lineNumber,v.column,c.lineNumber,c.column)}}l.isEmpty()?o[s]=null:(l.startLineNumber!==l.endLineNumber&&(r=!0),o[s]=new nw(l,""))}return[r,o]},e.cut=function(e,t,n){for(var i=[],o=0,r=n.length;o<r;o++){var s=n[o];if(s.isEmpty())if(e.emptySelectionClipboard){var a=s.getPosition(),u=void 0,l=void 0,c=void 0,h=void 0;a.lineNumber<t.getLineCount()?(u=a.lineNumber,l=1,c=a.lineNumber+1,h=1):a.lineNumber>1?(u=a.lineNumber-1,l=t.getLineMaxColumn(a.lineNumber-1),c=a.lineNumber,h=t.getLineMaxColumn(a.lineNumber)):(u=a.lineNumber,l=1,c=a.lineNumber,h=t.getLineMaxColumn(a.lineNumber));var d=new pn(u,l,c,h);d.isEmpty()?i[o]=null:i[o]=new nw(d,"")}else i[o]=null;else i[o]=new nw(s,"")}return new J_(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e}(),lw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cw=function(){function e(){}return e._createWord=function(e,t,n,i,o){return{start:i,end:o,wordType:t,nextCharClass:n}},e._findPreviousWordOnLine=function(e,t,n){var i=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(i,e,n)},e._doFindPreviousWordOnLine=function(e,t,n){for(var i=0,o=n.column-2;o>=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(0===s){if(2===i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1));i=1}else if(2===s){if(1===i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1));i=2}else if(1===s&&0!==i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1))}return 0!==i?this._createWord(e,i,1,0,this._findEndOfWord(e,t,i,0)):null},e._findEndOfWord=function(e,t,n,i){for(var o=e.length,r=i;r<o;r++){var s=e.charCodeAt(r),a=t.get(s);if(1===a)return r;if(1===n&&2===a)return r;if(2===n&&0===a)return r}return o},e._findNextWordOnLine=function(e,t,n){var i=t.getLineContent(n.lineNumber);return this._doFindNextWordOnLine(i,e,n)},e._doFindNextWordOnLine=function(e,t,n){for(var i=0,o=e.length,r=n.column-1;r<o;r++){var s=e.charCodeAt(r),a=t.get(s);if(0===a){if(2===i)return this._createWord(e,i,a,this._findStartOfWord(e,t,i,r-1),r);i=1}else if(2===a){if(1===i)return this._createWord(e,i,a,this._findStartOfWord(e,t,i,r-1),r);i=2}else if(1===a&&0!==i)return this._createWord(e,i,a,this._findStartOfWord(e,t,i,r-1),r)}return 0!==i?this._createWord(e,i,1,this._findStartOfWord(e,t,i,o-1),o):null},e._findStartOfWord=function(e,t,n,i){for(var o=i;o>=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(1===s)return o+1;if(1===n&&2===s)return o+1;if(2===n&&0===s)return o+1}return 0},e.moveWordLeft=function(t,n,i,o){var r=i.lineNumber,s=i.column,a=!1;1===s&&r>1&&(a=!0,r-=1,s=n.getLineMaxColumn(r));var u=e._findPreviousWordOnLine(t,n,new fn(r,s));if(0===o){if(u&&!a){var l=n.getLineLastNonWhitespaceColumn(r);if(l<s)return new fn(r,u.end+1)}return new fn(r,u?u.start+1:1)}if(1===o)return u&&2===u.wordType&&u.end-u.start===1&&0===u.nextCharClass&&(u=e._findPreviousWordOnLine(t,n,new fn(r,u.start+1))),new fn(r,u?u.start+1:1);if(3===o){while(u&&2===u.wordType)u=e._findPreviousWordOnLine(t,n,new fn(r,u.start+1));return new fn(r,u?u.start+1:1)}return u&&s<=u.end+1&&(u=e._findPreviousWordOnLine(t,n,new fn(r,u.start+1))),new fn(r,u?u.end+1:1)},e._moveWordPartLeft=function(e,t){var n=t.lineNumber,i=e.getLineMaxColumn(n);if(1===t.column)return n>1?new fn(n-1,e.getLineMaxColumn(n-1)):t;for(var o=e.getLineContent(n),r=t.column-1;r>1;r--){var s=o.charCodeAt(r-2),a=o.charCodeAt(r-1);if(95!==s&&95===a)return new fn(n,r);if(Sr(s)&&Lr(a))return new fn(n,r);if(Lr(s)&&Lr(a)&&r+1<i){var u=o.charCodeAt(r);if(Sr(u))return new fn(n,r)}}return new fn(n,1)},e.moveWordRight=function(t,n,i,o){var r=i.lineNumber,s=i.column,a=!1;s===n.getLineMaxColumn(r)&&r<n.getLineCount()&&(a=!0,r+=1,s=1);var u=e._findNextWordOnLine(t,n,new fn(r,s));if(2===o)u&&2===u.wordType&&u.end-u.start===1&&0===u.nextCharClass&&(u=e._findNextWordOnLine(t,n,new fn(r,u.end+1))),s=u?u.end+1:n.getLineMaxColumn(r);else if(3===o){a&&(s=0);while(u&&(2===u.wordType||u.start+1<=s))u=e._findNextWordOnLine(t,n,new fn(r,u.end+1));s=u?u.start+1:n.getLineMaxColumn(r)}else u&&!a&&s>=u.start+1&&(u=e._findNextWordOnLine(t,n,new fn(r,u.end+1))),s=u?u.start+1:n.getLineMaxColumn(r);return new fn(r,s)},e._moveWordPartRight=function(e,t){var n=t.lineNumber,i=e.getLineMaxColumn(n);if(t.column===i)return n<e.getLineCount()?new fn(n+1,1):t;for(var o=e.getLineContent(n),r=t.column+1;r<i;r++){var s=o.charCodeAt(r-2),a=o.charCodeAt(r-1);if(95===s&&95!==a)return new fn(n,r);if(Sr(s)&&Lr(a))return new fn(n,r);if(Lr(s)&&Lr(a)&&r+1<i){var u=o.charCodeAt(r);if(Sr(u))return new fn(n,r)}}return new fn(n,i)},e._deleteWordLeftWhitespace=function(e,t){var n=e.getLineContent(t.lineNumber),i=t.column-2,o=wr(n,i);return o+1<i?new pn(t.lineNumber,o+2,t.lineNumber,t.column):null},e.deleteWordLeft=function(t,n,i,o,r){if(!i.isEmpty())return i;var s=new fn(i.positionLineNumber,i.positionColumn),a=s.lineNumber,u=s.column;if(1===a&&1===u)return null;if(o){var l=this._deleteWordLeftWhitespace(n,s);if(l)return l}var c=e._findPreviousWordOnLine(t,n,s);return 0===r?c?u=c.start+1:u>1?u=1:(a--,u=n.getLineMaxColumn(a)):(c&&u<=c.end+1&&(c=e._findPreviousWordOnLine(t,n,new fn(a,c.start+1))),c?u=c.end+1:u>1?u=1:(a--,u=n.getLineMaxColumn(a))),new pn(a,u,s.lineNumber,s.column)},e._deleteWordPartLeft=function(t,n){if(!n.isEmpty())return n;var i=n.getPosition(),o=e._moveWordPartLeft(t,i);return new pn(i.lineNumber,i.column,o.lineNumber,o.column)},e._findFirstNonWhitespaceChar=function(e,t){for(var n=e.length,i=t;i<n;i++){var o=e.charAt(i);if(" "!==o&&"\t"!==o)return i}return n},e._deleteWordRightWhitespace=function(e,t){var n=e.getLineContent(t.lineNumber),i=t.column-1,o=this._findFirstNonWhitespaceChar(n,i);return i+1<o?new pn(t.lineNumber,t.column,t.lineNumber,o+1):null},e.deleteWordRight=function(t,n,i,o,r){if(!i.isEmpty())return i;var s=new fn(i.positionLineNumber,i.positionColumn),a=s.lineNumber,u=s.column,l=n.getLineCount(),c=n.getLineMaxColumn(a);if(a===l&&u===c)return null;if(o){var h=this._deleteWordRightWhitespace(n,s);if(h)return h}var d=e._findNextWordOnLine(t,n,s);return 2===r?d?u=d.end+1:u<c||a===l?u=c:(a++,d=e._findNextWordOnLine(t,n,new fn(a,1)),u=d?d.start+1:n.getLineMaxColumn(a)):(d&&u>=d.start+1&&(d=e._findNextWordOnLine(t,n,new fn(a,d.end+1))),d?u=d.start+1:u<c||a===l?u=c:(a++,d=e._findNextWordOnLine(t,n,new fn(a,1)),u=d?d.start+1:n.getLineMaxColumn(a))),new pn(a,u,s.lineNumber,s.column)},e._deleteWordPartRight=function(t,n){if(!n.isEmpty())return n;var i=n.getPosition(),o=e._moveWordPartRight(t,i);return new pn(i.lineNumber,i.column,o.lineNumber,o.column)},e.word=function(t,n,i,o,r){var s,a,u,l,c=Dv(t.wordSeparators),h=e._findPreviousWordOnLine(c,n,r),d=e._findNextWordOnLine(c,n,r);if(!o)return h&&1===h.wordType&&h.start<=r.column-1&&r.column-1<=h.end?(s=h.start+1,a=h.end+1):d&&1===d.wordType&&d.start<=r.column-1&&r.column-1<=d.end?(s=d.start+1,a=d.end+1):(s=h?h.end+1:1,a=d?d.start+1:n.getLineMaxColumn(r.lineNumber)),new Y_(new pn(r.lineNumber,s,r.lineNumber,a),0,new fn(r.lineNumber,a),0);h&&1===h.wordType&&h.start<r.column-1&&r.column-1<h.end?(u=h.start+1,l=h.end+1):d&&1===d.wordType&&d.start<r.column-1&&r.column-1<d.end?(u=d.start+1,l=d.end+1):(u=r.column,l=r.column);var f,p=r.lineNumber;if(i.selectionStart.containsPosition(r))f=i.selectionStart.endColumn;else if(r.isBeforeOrEqual(i.selectionStart.getStartPosition())){f=u;var g=new fn(p,f);i.selectionStart.containsPosition(g)&&(f=i.selectionStart.endColumn)}else{f=l;g=new fn(p,f);i.selectionStart.containsPosition(g)&&(f=i.selectionStart.startColumn)}return i.move(!0,p,f,0)},e}();(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}lw(t,e),t.deleteWordPartLeft=function(e,t,n,i){var o=hw([cw.deleteWordLeft(e,t,n,i,0),cw.deleteWordLeft(e,t,n,i,2),cw._deleteWordPartLeft(t,n)]);return o.sort(pn.compareRangesUsingEnds),o[2]},t.deleteWordPartRight=function(e,t,n,i){var o=hw([cw.deleteWordRight(e,t,n,i,0),cw.deleteWordRight(e,t,n,i,2),cw._deleteWordPartRight(t,n)]);return o.sort(pn.compareRangesUsingStarts),o[0]},t.moveWordPartLeft=function(e,t,n){var i=hw([cw.moveWordLeft(e,t,n,0),cw.moveWordLeft(e,t,n,2),cw._moveWordPartLeft(t,n)]);return i.sort(fn.compare),i[2]},t.moveWordPartRight=function(e,t,n){var i=hw([cw.moveWordRight(e,t,n,0),cw.moveWordRight(e,t,n,2),cw._moveWordPartRight(t,n)]);return i.sort(fn.compare),i[0]}})(cw);function hw(e){return e.filter((function(e){return Boolean(e)}))}var dw,fw=function(){function e(){}return e.addCursorDown=function(e,t,n){for(var i=[],o=0,r=0,s=t.length;r<s;r++){var a=t[r];i[o++]=new Q_(a.modelState,a.viewState),i[o++]=n?Q_.fromModelState(aw.translateDown(e.config,e.model,a.modelState)):Q_.fromViewState(aw.translateDown(e.config,e.viewModel,a.viewState))}return i},e.addCursorUp=function(e,t,n){for(var i=[],o=0,r=0,s=t.length;r<s;r++){var a=t[r];i[o++]=new Q_(a.modelState,a.viewState),i[o++]=n?Q_.fromModelState(aw.translateUp(e.config,e.model,a.modelState)):Q_.fromViewState(aw.translateUp(e.config,e.viewModel,a.viewState))}return i},e.moveToBeginningOfLine=function(e,t,n){for(var i=[],o=0,r=t.length;o<r;o++){var s=t[o];i[o]=this._moveToLineStart(e,s,n)}return i},e._moveToLineStart=function(e,t,n){var i=t.viewState.position.column,o=t.modelState.position.column,r=i===o,s=t.viewState.position.lineNumber,a=e.viewModel.getLineFirstNonWhitespaceColumn(s),u=i===a;return r||u?this._moveToLineStartByModel(e,t,n):this._moveToLineStartByView(e,t,n)},e._moveToLineStartByView=function(e,t,n){return Q_.fromViewState(aw.moveToBeginningOfLine(e.config,e.viewModel,t.viewState,n))},e._moveToLineStartByModel=function(e,t,n){return Q_.fromModelState(aw.moveToBeginningOfLine(e.config,e.model,t.modelState,n))},e.moveToEndOfLine=function(e,t,n){for(var i=[],o=0,r=t.length;o<r;o++){var s=t[o];i[o]=this._moveToLineEnd(e,s,n)}return i},e._moveToLineEnd=function(e,t,n){var i=t.viewState.position,o=e.viewModel.getLineMaxColumn(i.lineNumber),r=i.column===o,s=t.modelState.position,a=e.model.getLineMaxColumn(s.lineNumber),u=o-i.column===a-s.column;return r||u?this._moveToLineEndByModel(e,t,n):this._moveToLineEndByView(e,t,n)},e._moveToLineEndByView=function(e,t,n){return Q_.fromViewState(aw.moveToEndOfLine(e.config,e.viewModel,t.viewState,n))},e._moveToLineEndByModel=function(e,t,n){return Q_.fromModelState(aw.moveToEndOfLine(e.config,e.model,t.modelState,n))},e.expandLineSelection=function(e,t){for(var n=[],i=0,o=t.length;i<o;i++){var r=t[i],s=r.modelState.selection.startLineNumber,a=e.model.getLineCount(),u=r.modelState.selection.endLineNumber,l=void 0;u===a?l=e.model.getLineMaxColumn(a):(u++,l=1),n[i]=Q_.fromModelState(new Y_(new pn(s,1,s,1),0,new fn(u,l),0))}return n},e.moveToBeginningOfBuffer=function(e,t,n){for(var i=[],o=0,r=t.length;o<r;o++){var s=t[o];i[o]=Q_.fromModelState(aw.moveToBeginningOfBuffer(e.config,e.model,s.modelState,n))}return i},e.moveToEndOfBuffer=function(e,t,n){for(var i=[],o=0,r=t.length;o<r;o++){var s=t[o];i[o]=Q_.fromModelState(aw.moveToEndOfBuffer(e.config,e.model,s.modelState,n))}return i},e.selectAll=function(e,t){var n=e.model.getLineCount(),i=e.model.getLineMaxColumn(n);return Q_.fromModelState(new Y_(new pn(1,1,1,1),0,new fn(n,i),0))},e.line=function(e,t,n,i,o){var r=e.model.validatePosition(i),s=o?e.validateViewPosition(new fn(o.lineNumber,o.column),r):e.convertModelPositionToViewPosition(r);if(!n||!t.modelState.hasSelection()){var a=e.model.getLineCount(),u=r.lineNumber+1,l=1;return u>a&&(u=a,l=e.model.getLineMaxColumn(u)),Q_.fromModelState(new Y_(new pn(r.lineNumber,1,u,l),0,new fn(u,l),0))}var c=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumber<c)return Q_.fromViewState(t.viewState.move(t.modelState.hasSelection(),s.lineNumber,1,0));if(r.lineNumber>c){a=e.viewModel.getLineCount();var h=s.lineNumber+1,d=1;return h>a&&(h=a,d=e.viewModel.getLineMaxColumn(h)),Q_.fromViewState(t.viewState.move(t.modelState.hasSelection(),h,d,0))}var f=t.modelState.selectionStart.getEndPosition();return Q_.fromModelState(t.modelState.move(t.modelState.hasSelection(),f.lineNumber,f.column,0))},e.word=function(e,t,n,i){var o=e.model.validatePosition(i);return Q_.fromModelState(cw.word(e.config,e.model,t.modelState,n,o))},e.cancelSelection=function(e,t){if(!t.modelState.hasSelection())return new Q_(t.modelState,t.viewState);var n=t.viewState.position.lineNumber,i=t.viewState.position.column;return Q_.fromViewState(new Y_(new pn(n,i,n,i),0,new fn(n,i),0))},e.moveTo=function(e,t,n,i,o){var r=e.model.validatePosition(i),s=o?e.validateViewPosition(new fn(o.lineNumber,o.column),r):e.convertModelPositionToViewPosition(r);return Q_.fromViewState(t.viewState.move(n,s.lineNumber,s.column,0))},e.move=function(e,t,n){var i=n.select,o=n.value;switch(n.direction){case 0:return 4===n.unit?this._moveHalfLineLeft(e,t,i):this._moveLeft(e,t,i,o);case 1:return 4===n.unit?this._moveHalfLineRight(e,t,i):this._moveRight(e,t,i,o);case 2:return 2===n.unit?this._moveUpByViewLines(e,t,i,o):this._moveUpByModelLines(e,t,i,o);case 3:return 2===n.unit?this._moveDownByViewLines(e,t,i,o):this._moveDownByModelLines(e,t,i,o);case 4:return this._moveToViewMinColumn(e,t,i);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,i);case 6:return this._moveToViewCenterColumn(e,t,i);case 7:return this._moveToViewMaxColumn(e,t,i);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,i);case 9:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._firstLineNumberInRange(e.model,s,o),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 11:r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._lastLineNumberInRange(e.model,s,o),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 10:r=t[0],s=e.getCompletelyVisibleModelRange(),a=Math.round((s.startLineNumber+s.endLineNumber)/2),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 12:for(var l=e.getCompletelyVisibleViewRange(),c=[],h=0,d=t.length;h<d;h++){r=t[h];c[h]=this.findPositionInViewportIfOutside(e,r,l,i)}return c}return null},e.findPositionInViewportIfOutside=function(e,t,n,i){var o=t.viewState.position.lineNumber;if(n.startLineNumber<=o&&o<=n.endLineNumber-1)return new Q_(t.modelState,t.viewState);o>n.endLineNumber-1&&(o=n.endLineNumber-1),o<n.startLineNumber&&(o=n.startLineNumber);var r=e.viewModel.getLineFirstNonWhitespaceColumn(o);return this._moveToViewPosition(e,t,i,o,r)},e._firstLineNumberInRange=function(e,t,n){var i=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(i)&&i++,Math.min(t.endLineNumber,i+n-1)},e._lastLineNumberInRange=function(e,t,n){var i=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(i)&&i++,Math.max(i,t.endLineNumber-n+1)},e._moveLeft=function(e,t,n,i){for(var o=[],r=0,s=t.length;r<s;r++){var a=t[r],u=aw.moveLeft(e.config,e.viewModel,a.viewState,n,i);if(1===i&&u.position.lineNumber!==a.viewState.position.lineNumber){var l=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(u.position);l.lineNumber===a.modelState.position.lineNumber&&(u=aw.moveLeft(e.config,e.viewModel,u,n,1))}o[r]=Q_.fromViewState(u)}return o},e._moveHalfLineLeft=function(e,t,n){for(var i=[],o=0,r=t.length;o<r;o++){var s=t[o],a=s.viewState.position.lineNumber,u=Math.round(e.viewModel.getLineContent(a).length/2);i[o]=Q_.fromViewState(aw.moveLeft(e.config,e.viewModel,s.viewState,n,u))}return i},e._moveRight=function(e,t,n,i){for(var o=[],r=0,s=t.length;r<s;r++){var a=t[r],u=aw.moveRight(e.config,e.viewModel,a.viewState,n,i);if(1===i&&u.position.lineNumber!==a.viewState.position.lineNumber){var l=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(u.position);l.lineNumber===a.modelState.position.lineNumber&&(u=aw.moveRight(e.config,e.viewModel,u,n,1))}o[r]=Q_.fromViewState(u)}return o},e._moveHalfLineRight=function(e,t,n){for(var i=[],o=0,r=t.length;o<r;o++){var s=t[o],a=s.viewState.position.lineNumber,u=Math.round(e.viewModel.getLineContent(a).length/2);i[o]=Q_.fromViewState(aw.moveRight(e.config,e.viewModel,s.viewState,n,u))}return i},e._moveDownByViewLines=function(e,t,n,i){for(var o=[],r=0,s=t.length;r<s;r++){var a=t[r];o[r]=Q_.fromViewState(aw.moveDown(e.config,e.viewModel,a.viewState,n,i))}return o},e._moveDownByModelLines=function(e,t,n,i){for(var o=[],r=0,s=t.length;r<s;r++){var a=t[r];o[r]=Q_.fromModelState(aw.moveDown(e.config,e.model,a.modelState,n,i))}return o},e._moveUpByViewLines=function(e,t,n,i){for(var o=[],r=0,s=t.length;r<s;r++){var a=t[r];o[r]=Q_.fromViewState(aw.moveUp(e.config,e.viewModel,a.viewState,n,i))}return o},e._moveUpByModelLines=function(e,t,n,i){for(var o=[],r=0,s=t.length;r<s;r++){var a=t[r];o[r]=Q_.fromModelState(aw.moveUp(e.config,e.model,a.modelState,n,i))}return o},e._moveToViewPosition=function(e,t,n,i,o){return Q_.fromViewState(t.viewState.move(n,i,o,0))},e._moveToModelPosition=function(e,t,n,i,o){return Q_.fromModelState(t.modelState.move(n,i,o,0))},e._moveToViewMinColumn=function(e,t,n){for(var i=[],o=0,r=t.length;o<r;o++){var s=t[o],a=s.viewState.position.lineNumber,u=e.viewModel.getLineMinColumn(a);i[o]=this._moveToViewPosition(e,s,n,a,u)}return i},e._moveToViewFirstNonWhitespaceColumn=function(e,t,n){for(var i=[],o=0,r=t.length;o<r;o++){var s=t[o],a=s.viewState.position.lineNumber,u=e.viewModel.getLineFirstNonWhitespaceColumn(a);i[o]=this._moveToViewPosition(e,s,n,a,u)}return i},e._moveToViewCenterColumn=function(e,t,n){for(var i=[],o=0,r=t.length;o<r;o++){var s=t[o],a=s.viewState.position.lineNumber,u=Math.round((e.viewModel.getLineMaxColumn(a)+e.viewModel.getLineMinColumn(a))/2);i[o]=this._moveToViewPosition(e,s,n,a,u)}return i},e._moveToViewMaxColumn=function(e,t,n){for(var i=[],o=0,r=t.length;o<r;o++){var s=t[o],a=s.viewState.position.lineNumber,u=e.viewModel.getLineMaxColumn(a);i[o]=this._moveToViewPosition(e,s,n,a,u)}return i},e._moveToViewLastNonWhitespaceColumn=function(e,t,n){for(var i=[],o=0,r=t.length;o<r;o++){var s=t[o],a=s.viewState.position.lineNumber,u=e.viewModel.getLineLastNonWhitespaceColumn(a);i[o]=this._moveToViewPosition(e,s,n,a,u)}return i},e}();(function(e){var t=function(e){if(!Ps(e))return!1;var t=e;return!!As(t.to)&&(!(!Ws(t.select)&&!Fs(t.select))&&(!(!Ws(t.by)&&!As(t.by))&&!(!Ws(t.value)&&!Rs(t.value))))};function n(t){if(!t.to)return null;var n;switch(t.to){case e.RawDirection.Left:n=0;break;case e.RawDirection.Right:n=1;break;case e.RawDirection.Up:n=2;break;case e.RawDirection.Down:n=3;break;case e.RawDirection.WrappedLineStart:n=4;break;case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter:n=5;break;case e.RawDirection.WrappedLineColumnCenter:n=6;break;case e.RawDirection.WrappedLineEnd:n=7;break;case e.RawDirection.WrappedLineLastNonWhitespaceCharacter:n=8;break;case e.RawDirection.ViewPortTop:n=9;break;case e.RawDirection.ViewPortBottom:n=11;break;case e.RawDirection.ViewPortCenter:n=10;break;case e.RawDirection.ViewPortIfOutside:n=12;break;default:return null}var i=0;switch(t.by){case e.RawUnit.Line:i=1;break;case e.RawUnit.WrappedLine:i=2;break;case e.RawUnit.Character:i=3;break;case e.RawUnit.HalfLine:i=4;break}return{direction:n,unit:i,select:!!t.select,value:t.value||1}}e.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down'\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",constraint:t,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},e.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"},e.parse=n})(dw||(dw={}));var pw=Object.create(null);function gw(e,t){pw[e]||(pw[e]=["",e]);for(var n=pw[e],i=n.length;i<=t;i++)n[i]=n[i-1]+e;return n[t]}var mw,vw=function(){function e(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}return e.unshiftIndent=function(e,t,n,i,o){var r=ey.visibleColumnFromColumn(e,t,n);if(o){var s=gw(" ",i),a=ey.prevIndentTabStop(r,i),u=a/i;return gw(s,u)}s="\t",a=ey.prevRenderTabStop(r,n),u=a/n;return gw(s,u)},e.shiftIndent=function(e,t,n,i,o){var r=ey.visibleColumnFromColumn(e,t,n);if(o){var s=gw(" ",i),a=ey.nextIndentTabStop(r,i),u=a/i;return gw(s,u)}s="\t",a=ey.nextRenderTabStop(r,n),u=a/n;return gw(s,u)},e.prototype._addEditOperation=function(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)},e.prototype.getEditOperations=function(t,n){var i=this._selection.startLineNumber,o=this._selection.endLineNumber;1===this._selection.endColumn&&i!==o&&(o-=1);var r=this._opts,s=r.tabSize,a=r.indentSize,u=r.insertSpaces,l=i===o;if(this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0),this._opts.useTabStops)for(var c=0,h=0,d=i;d<=o;d++,c=h){h=0;var f=t.getLineContent(d),p=br(f);if((!this._opts.isUnshift||0!==f.length&&0!==p)&&(l||this._opts.isUnshift||0!==f.length)){if(-1===p&&(p=f.length),d>1){var g=ey.visibleColumnFromColumn(f,p+1,s);if(g%a!==0&&t.isCheapToTokenize(d-1)){var m=Zl.getEnterAction(this._opts.autoIndent,t,new pn(d-1,t.getLineMaxColumn(d-1),d-1,t.getLineMaxColumn(d-1)));if(m){if(h=c,m.appendText)for(var v=0,_=m.appendText.length;v<_&&h<a;v++){if(32!==m.appendText.charCodeAt(v))break;h++}m.removeText&&(h=Math.max(0,h-m.removeText));for(v=0;v<h;v++){if(0===p||32!==f.charCodeAt(p-1))break;p--}}}}if(!this._opts.isUnshift||0!==p){var y=void 0;y=this._opts.isUnshift?e.unshiftIndent(f,p+1,s,a,u):e.shiftIndent(f,p+1,s,a,u),this._addEditOperation(n,new pn(d,1,d,p+1),y),d!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=this._selection.startColumn<=p+1)}}}else{var b=u?gw(" ",a):"\t";for(d=i;d<=o;d++){f=t.getLineContent(d),p=br(f);if((!this._opts.isUnshift||0!==f.length&&0!==p)&&((l||this._opts.isUnshift||0!==f.length)&&(-1===p&&(p=f.length),!this._opts.isUnshift||0!==p)))if(this._opts.isUnshift){p=Math.min(p,a);for(var C=0;C<p;C++){var w=f.charCodeAt(C);if(9===w){p=C+1;break}}this._addEditOperation(n,new pn(d,1,d,p+1),"")}else this._addEditOperation(n,new pn(d,1,d,1),b),d!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=1===this._selection.startColumn)}}this._selectionId=n.trackSelection(this._selection)},e.prototype.computeCursorState=function(e,t){if(this._useLastEditRangeForCursorEndPosition){var n=t.getInverseEditOperations()[0];return new mn(n.range.endLineNumber,n.range.endColumn,n.range.endLineNumber,n.range.endColumn)}var i=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){var o=this._selection.startColumn,r=i.startColumn;return r<=o?i:0===i.getDirection()?new mn(i.startLineNumber,o,i.endLineNumber,i.endColumn):new mn(i.endLineNumber,i.endColumn,i.startLineNumber,o)}return i},e}(),_w=function(){function e(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(new pn(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new pn(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),i=n[0].range,o=n[1].range;return new mn(i.endLineNumber,i.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)},e}(),yw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),bw=function(){function e(){}return e.indent=function(e,t,n){if(null===t||null===n)return[];for(var i=[],o=0,r=n.length;o<r;o++)i[o]=new vw(n[o],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return i},e.outdent=function(e,t,n){for(var i=[],o=0,r=n.length;o<r;o++)i[o]=new vw(n[o],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return i},e.shiftIndent=function(e,t,n){return n=n||1,vw.shiftIndent(t,t.length+n,e.tabSize,e.indentSize,e.insertSpaces)},e.unshiftIndent=function(e,t,n){return n=n||1,vw.unshiftIndent(t,t.length+n,e.tabSize,e.indentSize,e.insertSpaces)},e._distributedPaste=function(e,t,n,i){for(var o=[],r=0,s=n.length;r<s;r++)o[r]=new nw(n[r],i[r]);return new J_(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e._simplePaste=function(e,t,n,i,o){for(var r=[],s=0,a=n.length;s<a;s++){var u=n[s],l=u.getPosition();if(o&&!u.isEmpty()&&(o=!1),o&&i.indexOf("\n")!==i.length-1&&(o=!1),o){var c=new pn(l.lineNumber,1,l.lineNumber,1);r[s]=new rw(c,i,u,!0)}else r[s]=new nw(u,i)}return new J_(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e._distributePasteToCursors=function(e,t,n,i,o){if(i)return null;if(1===t.length)return null;if(o&&o.length===t.length)return o;if("spread"===e.multiCursorPaste){10===n.charCodeAt(n.length-1)&&(n=n.substr(0,n.length-1)),13===n.charCodeAt(n.length-1)&&(n=n.substr(0,n.length-1));var r=n.split(/\r\n|\r|\n/);if(r.length===t.length)return r}return null},e.paste=function(e,t,n,i,o,r){var s=this._distributePasteToCursors(e,n,i,o,r);return s?(n=n.sort(pn.compareRangesUsingStarts),this._distributedPaste(e,t,n,s)):this._simplePaste(e,t,n,i,o)},e._goodIndentForLine=function(t,n,i){var o=null,r="",s=Zl.getInheritIndentForLine(t.autoIndent,n,i,!1);if(s)o=s.action,r=s.indentation;else if(i>1){var a=void 0;for(a=i-1;a>=1;a--){var u=n.getLineContent(a),l=wr(u);if(l>=0)break}if(a<1)return null;var c=n.getLineMaxColumn(a),h=Zl.getEnterAction(t.autoIndent,n,new pn(a,c,a,c));h&&(r=h.indentation+h.appendText)}return o&&(o===Cl.Indent&&(r=e.shiftIndent(t,r)),o===Cl.Outdent&&(r=e.unshiftIndent(t,r)),r=t.normalizeIndentation(r)),r||null},e._replaceJumpToNextIndent=function(e,t,n,i){var o="",r=n.getStartPosition();if(e.insertSpaces)for(var s=ey.visibleColumnFromColumn2(e,t,r),a=e.indentSize,u=a-s%a,l=0;l<u;l++)o+=" ";else o="\t";return new nw(n,o,i)},e.tab=function(e,t,n){for(var i=[],o=0,r=n.length;o<r;o++){var s=n[o];if(s.isEmpty()){var a=t.getLineContent(s.startLineNumber);if(/^\s*$/.test(a)&&t.isCheapToTokenize(s.startLineNumber)){var u=this._goodIndentForLine(e,t,s.startLineNumber);u=u||"\t";var l=e.normalizeIndentation(u);if(!gr(a,l)){i[o]=new nw(new pn(s.startLineNumber,1,s.startLineNumber,a.length+1),l,!0);continue}}i[o]=this._replaceJumpToNextIndent(e,t,s,!0)}else{if(s.startLineNumber===s.endLineNumber){var c=t.getLineMaxColumn(s.startLineNumber);if(1!==s.startColumn||s.endColumn!==c){i[o]=this._replaceJumpToNextIndent(e,t,s,!1);continue}}i[o]=new vw(s,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent})}}return i},e.replacePreviousChar=function(e,t,n,i,o,r){for(var s=[],a=0,u=i.length;a<u;a++){var l=i[a];if(l.isEmpty()){var c=l.getPosition(),h=Math.max(1,c.column-r),d=new pn(c.lineNumber,h,c.lineNumber,c.column);s[a]=new nw(d,o)}else s[a]=null}return new J_(1,s,{shouldPushStackElementBefore:1!==e,shouldPushStackElementAfter:!1})},e._typeCommand=function(e,t,n){return n?new iw(e,t,!0):new nw(e,t,!0)},e._enter=function(t,n,i,o){if(0===t.autoIndent)return e._typeCommand(o,"\n",i);if(!n.isCheapToTokenize(o.getStartPosition().lineNumber)||1===t.autoIndent){var r=n.getLineContent(o.startLineNumber),s=Cr(r).substring(0,o.startColumn-1);return e._typeCommand(o,"\n"+t.normalizeIndentation(s),i)}var a=Zl.getEnterAction(t.autoIndent,n,o);if(a){if(a.indentAction===Cl.None)return e._typeCommand(o,"\n"+t.normalizeIndentation(a.indentation+a.appendText),i);if(a.indentAction===Cl.Indent)return e._typeCommand(o,"\n"+t.normalizeIndentation(a.indentation+a.appendText),i);if(a.indentAction===Cl.IndentOutdent){var u=t.normalizeIndentation(a.indentation),l=t.normalizeIndentation(a.indentation+a.appendText),c="\n"+l+"\n"+u;return i?new iw(o,c,!0):new ow(o,c,-1,l.length-u.length,!0)}if(a.indentAction===Cl.Outdent){var h=e.unshiftIndent(t,a.indentation);return e._typeCommand(o,"\n"+t.normalizeIndentation(h+a.appendText),i)}}var d=n.getLineContent(o.startLineNumber),f=Cr(d).substring(0,o.startColumn-1);if(t.autoIndent>=4){var p=Zl.getIndentForEnter(t.autoIndent,n,o,{unshiftIndent:function(n){return e.unshiftIndent(t,n)},shiftIndent:function(n){return e.shiftIndent(t,n)},normalizeIndentation:function(e){return t.normalizeIndentation(e)}});if(p){var g=ey.visibleColumnFromColumn2(t,n,o.getEndPosition()),m=o.endColumn,v="\n";f!==t.normalizeIndentation(p.beforeEnter)&&(v=t.normalizeIndentation(p.beforeEnter)+d.substring(f.length,o.startColumn-1)+"\n",o=new pn(o.startLineNumber,1,o.endLineNumber,o.endColumn));var _=n.getLineContent(o.endLineNumber),y=br(_);if(o=y>=0?o.setEndPosition(o.endLineNumber,Math.max(o.endColumn,y+1)):o.setEndPosition(o.endLineNumber,n.getLineMaxColumn(o.endLineNumber)),i)return new iw(o,v+t.normalizeIndentation(p.afterEnter),!0);var b=0;return m<=y+1&&(t.insertSpaces||(g=Math.ceil(g/t.indentSize)),b=Math.min(g+1-t.normalizeIndentation(p.afterEnter).length-1,0)),new ow(o,v+t.normalizeIndentation(p.afterEnter),0,b,!0)}}return e._typeCommand(o,"\n"+t.normalizeIndentation(f),i)},e._isAutoIndentType=function(e,t,n){if(e.autoIndent<4)return!1;for(var i=0,o=n.length;i<o;i++)if(!t.isCheapToTokenize(n[i].getEndPosition().lineNumber))return!1;return!0},e._runAutoIndentType=function(t,n,i,o){var r=Zl.getIndentationAtPosition(n,i.startLineNumber,i.startColumn),s=Zl.getIndentActionForType(t.autoIndent,n,i,o,{shiftIndent:function(n){return e.shiftIndent(t,n)},unshiftIndent:function(n){return e.unshiftIndent(t,n)}});if(null===s)return null;if(s!==t.normalizeIndentation(r)){var a=n.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===a?e._typeCommand(new pn(i.startLineNumber,0,i.endLineNumber,i.endColumn),t.normalizeIndentation(s)+o,!1):e._typeCommand(new pn(i.startLineNumber,0,i.endLineNumber,i.endColumn),t.normalizeIndentation(s)+n.getLineContent(i.startLineNumber).substring(a-1,i.startColumn-1)+o,!1)}return null},e._isAutoClosingOvertype=function(e,t,n,i,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairsClose2.has(o))return!1;for(var r=0,s=n.length;r<s;r++){var a=n[r];if(!a.isEmpty())return!1;var u=a.getPosition(),l=t.getLineContent(u.lineNumber),c=l.charAt(u.column-1);if(c!==o)return!1;var h=ty(o),d=u.column>2?l.charCodeAt(u.column-2):0;if(92===d&&h)return!1;if("auto"===e.autoClosingOvertype){for(var f=!1,p=0,g=i.length;p<g;p++){var m=i[p];if(u.lineNumber===m.startLineNumber&&u.column===m.startColumn){f=!0;break}}if(!f)return!1}}return!0},e._runAutoClosingOvertype=function(e,t,n,i,o){for(var r=[],s=0,a=i.length;s<a;s++){var u=i[s],l=u.getPosition(),c=new pn(l.lineNumber,l.column,l.lineNumber,l.column+1);r[s]=new nw(c,o)}return new J_(1,r,{shouldPushStackElementBefore:1!==e,shouldPushStackElementAfter:!1})},e._autoClosingPairIsSymmetric=function(e){var t=e.open,n=e.close;return t.indexOf(n)>=0||n.indexOf(t)>=0},e._isBeforeClosingBrace=function(t,n,i){var o=t.autoClosingPairsClose2.get(i);if(!o)return!1;for(var r=e._autoClosingPairIsSymmetric(n),s=0,a=o;s<a.length;s++){var u=a[s],l=e._autoClosingPairIsSymmetric(u);if(r||!l)return!0}return!1},e._findAutoClosingPairOpen=function(e,t,n,i){var o=e.autoClosingPairsOpen2.get(i);if(!o)return null;for(var r=null,s=0,a=o;s<a.length;s++){var u=a[s];if(null===r||u.open.length>r.open.length){for(var l=!0,c=0,h=n;c<h.length;c++){var d=h[c],f=t.getValueInRange(new pn(d.lineNumber,d.column-u.open.length+1,d.lineNumber,d.column));if(f+i!==u.open){l=!1;break}}l&&(r=u)}}return r},e._isAutoClosingOpenCharType=function(t,n,i,o,r){var s=ty(o),a=s?t.autoClosingQuotes:t.autoClosingBrackets;if("never"===a)return null;var u=this._findAutoClosingPairOpen(t,n,i.map((function(e){return e.getPosition()})),o);if(!u)return null;for(var l=s?t.shouldAutoCloseBefore.quote:t.shouldAutoCloseBefore.bracket,c=0,h=i.length;c<h;c++){var d=i[c];if(!d.isEmpty())return null;var f=d.getPosition(),p=n.getLineContent(f.lineNumber);if(p.length>f.column-1){var g=p.charAt(f.column-1),m=e._isBeforeClosingBrace(t,u,g);if(!m&&!l(g))return null}if(!n.isCheapToTokenize(f.lineNumber))return null;if(1===u.open.length&&s&&"always"!==a){var v=Dv(t.wordSeparators);if(r&&f.column>1&&0===v.get(p.charCodeAt(f.column-2)))return null;if(!r&&f.column>2&&0===v.get(p.charCodeAt(f.column-3)))return null}n.forceTokenization(f.lineNumber);var _=n.getLineTokens(f.lineNumber),y=!1;try{y=Zl.shouldAutoClosePair(u,_,r?f.column:f.column-1)}catch(b){ge(b)}if(!y)return null}return u},e._runAutoClosingOpenCharType=function(e,t,n,i,o,r,s){for(var a=[],u=0,l=i.length;u<l;u++){var c=i[u];a[u]=new Cw(c,o,r,s.close)}return new J_(1,a,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})},e._shouldSurroundChar=function(e,t){return ty(t)?"quotes"===e.autoSurround||"languageDefined"===e.autoSurround:"brackets"===e.autoSurround||"languageDefined"===e.autoSurround},e._isSurroundSelectionType=function(t,n,i,o){if(!e._shouldSurroundChar(t,o)||!t.surroundingPairs.hasOwnProperty(o))return!1;for(var r=ty(o),s=0,a=i.length;s<a;s++){var u=i[s];if(u.isEmpty())return!1;for(var l=!0,c=u.startLineNumber;c<=u.endLineNumber;c++){var h=n.getLineContent(c),d=c===u.startLineNumber?u.startColumn-1:0,f=c===u.endLineNumber?u.endColumn-1:h.length,p=h.substring(d,f);if(/[^ \t]/.test(p)){l=!1;break}}if(l)return!1;if(r&&u.startLineNumber===u.endLineNumber&&u.startColumn+1===u.endColumn){var g=n.getValueInRange(u);if(ty(g))return!1}}return!0},e._runSurroundSelectionType=function(e,t,n,i,o){for(var r=[],s=0,a=i.length;s<a;s++){var u=i[s],l=t.surroundingPairs[o];r[s]=new _w(u,o,l)}return new J_(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e._isTypeInterceptorElectricChar=function(e,t,n){return!(1!==n.length||!t.isCheapToTokenize(n[0].getEndPosition().lineNumber))},e._typeInterceptorElectricChar=function(e,t,n,i,o){if(!t.electricChars.hasOwnProperty(o)||!i.isEmpty())return null;var r=i.getPosition();n.forceTokenization(r.lineNumber);var s,a=n.getLineTokens(r.lineNumber);try{s=Zl.onElectricCharacter(o,a,r.column)}catch(y){return ge(y),null}if(!s)return null;if(s.matchOpenBracket){var u=(a.getLineContent()+o).lastIndexOf(s.matchOpenBracket)+1,l=n.findMatchingBracketUp(s.matchOpenBracket,{lineNumber:r.lineNumber,column:u});if(l){if(l.startLineNumber===r.lineNumber)return null;var c=n.getLineContent(l.startLineNumber),h=Cr(c),d=t.normalizeIndentation(h),f=n.getLineContent(r.lineNumber),p=n.getLineFirstNonWhitespaceColumn(r.lineNumber)||r.column,g=f.substring(p-1,r.column-1),m=d+g+o,v=new pn(r.lineNumber,1,r.lineNumber,r.column),_=new nw(v,m);return new J_(1,[_],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null},e.compositionEndWithInterceptors=function(e,t,n,i,o,r){if(!i||mn.selectionsArrEqual(i,o))return null;for(var s=null,a=0,u=o;a<u.length;a++){var l=u[a];if(!l.isEmpty())return null;var c=l.getPosition(),h=n.getValueInRange(new pn(c.lineNumber,c.column-1,c.lineNumber,c.column));if(null===s)s=h;else if(s!==h)return null}if(!s)return null;if(this._isAutoClosingOvertype(t,n,o,r,s)){var d=o.map((function(e){return new nw(new pn(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)}));return new J_(1,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}var f=this._isAutoClosingOpenCharType(t,n,o,s,!1);return f?this._runAutoClosingOpenCharType(e,t,n,o,s,!1,f):null},e.typeWithInterceptors=function(t,n,i,o,r,s){if("\n"===s){for(var a=[],u=0,l=o.length;u<l;u++)a[u]=e._enter(n,i,!1,o[u]);return new J_(1,a,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoIndentType(n,i,o)){var c=[],h=!1;for(u=0,l=o.length;u<l;u++)if(c[u]=this._runAutoIndentType(n,i,o[u],s),!c[u]){h=!0;break}if(!h)return new J_(1,c,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(n,i,o,r,s))return this._runAutoClosingOvertype(t,n,i,o,s);var d=this._isAutoClosingOpenCharType(n,i,o,s,!0);if(d)return this._runAutoClosingOpenCharType(t,n,i,o,s,!0,d);if(this._isSurroundSelectionType(n,i,o,s))return this._runSurroundSelectionType(t,n,i,o,s);if(this._isTypeInterceptorElectricChar(n,i,o)){var f=this._typeInterceptorElectricChar(t,n,i,o[0],s);if(f)return f}var p=[];for(u=0,l=o.length;u<l;u++)p[u]=new nw(o[u],s);var g=1!==t;return" "===s&&(g=!0),new J_(1,p,{shouldPushStackElementBefore:g,shouldPushStackElementAfter:!1})},e.typeWithoutInterceptors=function(e,t,n,i,o){for(var r=[],s=0,a=i.length;s<a;s++)r[s]=new nw(i[s],o);return new J_(1,r,{shouldPushStackElementBefore:1!==e,shouldPushStackElementAfter:!1})},e.lineInsertBefore=function(e,t,n){if(null===t||null===n)return[];for(var i=[],o=0,r=n.length;o<r;o++){var s=n[o].positionLineNumber;if(1===s)i[o]=new iw(new pn(1,1,1,1),"\n");else{s--;var a=t.getLineMaxColumn(s);i[o]=this._enter(e,t,!1,new pn(s,a,s,a))}}return i},e.lineInsertAfter=function(e,t,n){if(null===t||null===n)return[];for(var i=[],o=0,r=n.length;o<r;o++){var s=n[o].positionLineNumber,a=t.getLineMaxColumn(s);i[o]=this._enter(e,t,!1,new pn(s,a,s,a))}return i},e.lineBreakInsert=function(e,t,n){for(var i=[],o=0,r=n.length;o<r;o++)i[o]=this._enter(e,t,!0,n[o]);return i},e}(),Cw=function(e){function t(t,n,i,o){var r=e.call(this,t,(i?n:"")+o,0,-o.length)||this;return r._openCharacter=n,r._closeCharacter=o,r.closeCharacterRange=null,r.enclosingRange=null,r}return yw(t,e),t.prototype.computeCursorState=function(t,n){var i=n.getInverseEditOperations(),o=i[0].range;return this.closeCharacterRange=new pn(o.startLineNumber,o.endColumn-this._closeCharacter.length,o.endLineNumber,o.endColumn),this.enclosingRange=new pn(o.startLineNumber,o.endColumn-this._openCharacter.length-this._closeCharacter.length,o.endLineNumber,o.endColumn),e.prototype.computeCursorState.call(this,t,n)},t}(ow);(function(e){e.editorSimpleInput=new Rf("editorSimpleInput",!1),e.editorTextFocus=new Rf("editorTextFocus",!1),e.focus=new Rf("editorFocus",!1),e.textInputFocus=new Rf("textInputFocus",!1),e.readOnly=new Rf("editorReadonly",!1),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new Rf("editorHasSelection",!1),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new Rf("editorHasMultipleSelections",!1),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new Rf("editorTabMovesFocus",!1),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInEmbeddedEditor=new Rf("isInEmbeddedEditor",!1),e.canUndo=new Rf("canUndo",!1),e.canRedo=new Rf("canRedo",!1),e.languageId=new Rf("editorLangId",""),e.hasCompletionItemProvider=new Rf("editorHasCompletionItemProvider",!1),e.hasCodeActionsProvider=new Rf("editorHasCodeActionsProvider",!1),e.hasCodeLensProvider=new Rf("editorHasCodeLensProvider",!1),e.hasDefinitionProvider=new Rf("editorHasDefinitionProvider",!1),e.hasDeclarationProvider=new Rf("editorHasDeclarationProvider",!1),e.hasImplementationProvider=new Rf("editorHasImplementationProvider",!1),e.hasTypeDefinitionProvider=new Rf("editorHasTypeDefinitionProvider",!1),e.hasHoverProvider=new Rf("editorHasHoverProvider",!1),e.hasDocumentHighlightProvider=new Rf("editorHasDocumentHighlightProvider",!1),e.hasDocumentSymbolProvider=new Rf("editorHasDocumentSymbolProvider",!1),e.hasReferenceProvider=new Rf("editorHasReferenceProvider",!1),e.hasRenameProvider=new Rf("editorHasRenameProvider",!1),e.hasSignatureHelpProvider=new Rf("editorHasSignatureHelpProvider",!1),e.hasDocumentFormattingProvider=new Rf("editorHasDocumentFormattingProvider",!1),e.hasDocumentSelectionFormattingProvider=new Rf("editorHasDocumentSelectionFormattingProvider",!1),e.hasMultipleDocumentFormattingProvider=new Rf("editorHasMultipleDocumentFormattingProvider",!1),e.hasMultipleDocumentSelectionFormattingProvider=new Rf("editorHasMultipleDocumentSelectionFormattingProvider",!1)})(mw||(mw={}));var ww,Sw,Lw,Nw,Dw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ew=0,xw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Dw(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors();i&&this.runCoreEditorCommand(i,n||{})},t}(gg);function kw(e){e.register()}(function(e){var t=function(e){if(!Ps(e))return!1;var t=e;return!!As(t.to)&&(!(!Ws(t.by)&&!As(t.by))&&(!(!Ws(t.value)&&!Rs(t.value))&&!(!Ws(t.revealCursor)&&!Fs(t.revealCursor))))};function n(t){var n,i;switch(t.to){case e.RawDirection.Up:n=1;break;case e.RawDirection.Down:n=2;break;default:return null}switch(t.by){case e.RawUnit.Line:i=1;break;case e.RawUnit.WrappedLine:i=2;break;case e.RawUnit.Page:i=3;break;case e.RawUnit.HalfPage:i=4;break;default:i=2}var o=Math.floor(t.value||1),r=!!t.revealCursor;return{direction:n,unit:i,value:o,revealCursor:r,select:!!t.select}}e.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:t,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},e.RawDirection={Up:"up",Down:"down"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},e.parse=n})(ww||(ww={})),function(e){var t=function(e){if(!Ps(e))return!1;var t=e;return!!Rs(t.lineNumber)&&!(!Ws(t.at)&&!As(t.at))};e.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed .\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:t,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:"number"},at:{type:"string",enum:["top","center","bottom"]}}}}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(Sw||(Sw={})),function(e){var t=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[fw.moveTo(e.context,e.getPrimaryCursor(),this._inSelectionMode,t.position,t.viewPosition)]),e.reveal(t.source,!0,0,0)},t}(xw);e.MoveTo=vg(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=vg(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement();var n=this._getColumnSelectResult(e.context,e.getPrimaryCursor(),e.getColumnSelectData(),t);e.setStates(t.source,3,n.viewStates.map((function(e){return Q_.fromViewState(e)}))),e.setColumnSelectData({isReal:!0,fromViewLineNumber:n.fromLineNumber,fromViewVisualColumn:n.fromVisualColumn,toViewLineNumber:n.toLineNumber,toViewVisualColumn:n.toVisualColumn}),e.reveal(t.source,!0,n.reversed?1:2,0)},t}(xw);e.ColumnSelect=vg(new(function(e){function t(){return e.call(this,{id:"columnSelect",precondition:void 0})||this}return Dw(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){var o=e.model.validatePosition(i.position),r=e.validateViewPosition(new fn(i.viewPosition.lineNumber,i.viewPosition.column),o),s=i.doColumnSelect?n.fromViewLineNumber:r.lineNumber,a=i.doColumnSelect?n.fromViewVisualColumn:i.mouseColumn-1;return tw.columnSelect(e.config,e.viewModel,s,a,r.lineNumber,i.mouseColumn-1)},t}(n))),e.CursorColumnSelectLeft=vg(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:3599,linux:{primary:0}}})||this}return Dw(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return tw.columnSelectLeft(e.config,e.viewModel,n)},t}(n))),e.CursorColumnSelectRight=vg(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:3601,linux:{primary:0}}})||this}return Dw(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return tw.columnSelectRight(e.config,e.viewModel,n)},t}(n)));var i=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaged=t.isPaged,n}return Dw(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return tw.columnSelectUp(e.config,e.viewModel,n,this._isPaged)},t}(n);e.CursorColumnSelectUp=vg(new i({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=vg(new i({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:3595,linux:{primary:0}}}));var o=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaged=t.isPaged,n}return Dw(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return tw.columnSelectDown(e.config,e.viewModel,n,this._isPaged)},t}(n);e.CursorColumnSelectDown=vg(new o({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=vg(new o({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:3596,linux:{primary:0}}}));var r=function(e){function t(){return e.call(this,{id:"cursorMove",precondition:void 0,description:dw.description})||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=dw.parse(t);n&&this._runCursorMove(e,t.source,n)},t.prototype._runCursorMove=function(e,t,n){e.context.model.pushStackElement(),e.setStates(t,3,fw.move(e.context,e.getAll(),n)),e.reveal(t,!0,0,0)},t}(xw);e.CursorMoveImpl=r,e.CursorMove=vg(new r);var s=function(t){function n(e){var n=t.call(this,e)||this;return n._staticArgs=e.args,n}return Dw(n,t),n.prototype.runCoreEditorCommand=function(t,n){var i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.context.config.pageSize}),e.CursorMove._runCursorMove(t,n.source,i)},n}(xw);e.CursorLeft=vg(new s({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=vg(new s({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:1039}})),e.CursorRight=vg(new s({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=vg(new s({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:1041}})),e.CursorUp=vg(new s({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=vg(new s({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=vg(new s({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:11}})),e.CursorPageUpSelect=vg(new s({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:1035}})),e.CursorDown=vg(new s({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=vg(new s({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=vg(new s({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:12}})),e.CursorPageDownSelect=vg(new s({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:1036}})),e.CreateCursor=vg(new(function(e){function t(){return e.call(this,{id:"createCursor",precondition:void 0})||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n,i=e.context;n=t.wholeLine?fw.line(i,e.getPrimaryCursor(),!1,t.position,t.viewPosition):fw.moveTo(i,e.getPrimaryCursor(),!1,t.position,t.viewPosition);var o=e.getAll();if(o.length>1)for(var r=n.modelState?n.modelState.position:null,s=n.viewState?n.viewState.position:null,a=0,u=o.length;a<u;a++){var l=o[a];if((!r||l.modelState.selection.containsPosition(r))&&(!s||l.viewState.selection.containsPosition(s)))return o.splice(a,1),e.context.model.pushStackElement(),void e.setStates(t.source,3,o)}o.push(n),e.context.model.pushStackElement(),e.setStates(t.source,3,o)},t}(xw))),e.LastCursorMoveToSelect=vg(new(function(e){function t(){return e.call(this,{id:"_lastCursorMoveToSelect",precondition:void 0})||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=e.context,i=e.getLastAddedCursorIndex(),o=e.getAll(),r=o.slice(0);r[i]=fw.moveTo(n,o[i],!0,t.position,t.viewPosition),e.context.model.pushStackElement(),e.setStates(t.source,3,r)},t}(xw)));var a=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,fw.moveToBeginningOfLine(e.context,e.getAll(),this._inSelectionMode)),e.reveal(t.source,!0,0,0)},t}(xw);e.CursorHome=vg(new a({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),e.CursorHomeSelect=vg(new a({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}})),e.CursorLineStart=vg(new(function(e){function t(){return e.call(this,{id:"cursorLineStart",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:0,mac:{primary:287}}})||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,this._exec(e.context,e.getAll())),e.reveal(t.source,!0,0,0)},t.prototype._exec=function(e,t){for(var n=[],i=0,o=t.length;i<o;i++){var r=t[i],s=r.modelState.position.lineNumber;n[i]=Q_.fromModelState(r.modelState.move(!1,s,1,0))}return n},t}(xw)));var u=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,fw.moveToEndOfLine(e.context,e.getAll(),this._inSelectionMode)),e.reveal(t.source,!0,0,0)},t}(xw);e.CursorEnd=vg(new u({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}}})),e.CursorEndSelect=vg(new u({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}}})),e.CursorLineEnd=vg(new(function(e){function t(){return e.call(this,{id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:0,mac:{primary:291}}})||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,this._exec(e.context,e.getAll())),e.reveal(t.source,!0,0,0)},t.prototype._exec=function(e,t){for(var n=[],i=0,o=t.length;i<o;i++){var r=t[i],s=r.modelState.position.lineNumber,a=e.model.getLineMaxColumn(s);n[i]=Q_.fromModelState(r.modelState.move(!1,s,a,0))}return n},t}(xw)));var l=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,fw.moveToBeginningOfBuffer(e.context,e.getAll(),this._inSelectionMode)),e.reveal(t.source,!0,0,0)},t}(xw);e.CursorTop=vg(new l({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:2062,mac:{primary:2064}}})),e.CursorTopSelect=vg(new l({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:3086,mac:{primary:3088}}}));var c=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,fw.moveToEndOfBuffer(e.context,e.getAll(),this._inSelectionMode)),e.reveal(t.source,!0,0,0)},t}(xw);e.CursorBottom=vg(new c({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:2061,mac:{primary:2066}}})),e.CursorBottomSelect=vg(new c({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:3085,mac:{primary:3090}}}));var h=function(e){function t(){return e.call(this,{id:"editorScroll",precondition:void 0,description:ww.description})||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=ww.parse(t);n&&this._runEditorScroll(e,t.source,n)},t.prototype._runEditorScroll=function(e,t,n){var i=this._computeDesiredScrollTop(e.context,n);if(n.revealCursor){var o=e.context.getCompletelyVisibleViewRangeAtScrollTop(i);e.setStates(t,3,[fw.findPositionInViewportIfOutside(e.context,e.getPrimaryCursor(),o,n.select)])}e.scrollTo(i)},t.prototype._computeDesiredScrollTop=function(e,t){if(1===t.unit){var n=e.getCompletelyVisibleModelRange(),i=void 0;i=1===t.direction?Math.max(1,n.startLineNumber-t.value):Math.min(e.model.getLineCount(),n.startLineNumber+t.value);var o=e.convertModelPositionToViewPosition(new fn(i,1));return e.getVerticalOffsetForViewLine(o.lineNumber)}var r;r=3===t.unit?e.config.pageSize*t.value:4===t.unit?Math.round(e.config.pageSize/2)*t.value:t.value;var s=(1===t.direction?-1:1)*r;return e.getCurrentScrollTop()+s*e.config.lineHeight},t}(xw);e.EditorScrollImpl=h,e.EditorScroll=vg(new h),e.ScrollLineUp=vg(new(function(t){function n(){return t.call(this,{id:"scrollLineUp",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:2064,mac:{primary:267}}})||this}return Dw(n,t),n.prototype.runCoreEditorCommand=function(t,n){e.EditorScroll._runEditorScroll(t,n.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})},n}(xw))),e.ScrollPageUp=vg(new(function(t){function n(){return t.call(this,{id:"scrollPageUp",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})||this}return Dw(n,t),n.prototype.runCoreEditorCommand=function(t,n){e.EditorScroll._runEditorScroll(t,n.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})},n}(xw))),e.ScrollLineDown=vg(new(function(t){function n(){return t.call(this,{id:"scrollLineDown",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:2066,mac:{primary:268}}})||this}return Dw(n,t),n.prototype.runCoreEditorCommand=function(t,n){e.EditorScroll._runEditorScroll(t,n.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})},n}(xw))),e.ScrollPageDown=vg(new(function(t){function n(){return t.call(this,{id:"scrollPageDown",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})||this}return Dw(n,t),n.prototype.runCoreEditorCommand=function(t,n){e.EditorScroll._runEditorScroll(t,n.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})},n}(xw)));var d=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[fw.word(e.context,e.getPrimaryCursor(),this._inSelectionMode,t.position)]),e.reveal(t.source,!0,0,0)},t}(xw);e.WordSelect=vg(new d({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),e.WordSelectDrag=vg(new d({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),e.LastCursorWordSelect=vg(new(function(e){function t(){return e.call(this,{id:"lastCursorWordSelect",precondition:void 0})||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=e.context,i=e.getLastAddedCursorIndex(),o=e.getAll(),r=o.slice(0),s=o[i];r[i]=fw.word(n,s,s.modelState.hasSelection(),t.position),n.model.pushStackElement(),e.setStates(t.source,3,r)},t}(xw)));var f=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[fw.line(e.context,e.getPrimaryCursor(),this._inSelectionMode,t.position,t.viewPosition)]),e.reveal(t.source,!1,0,0)},t}(xw);e.LineSelect=vg(new f({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),e.LineSelectDrag=vg(new f({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));var p=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=e.getLastAddedCursorIndex(),i=e.getAll(),o=i.slice(0);o[n]=fw.line(e.context,i[n],this._inSelectionMode,t.position,t.viewPosition),e.context.model.pushStackElement(),e.setStates(t.source,3,o)},t}(xw);e.LastCursorLineSelect=vg(new p({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),e.LastCursorLineSelectDrag=vg(new p({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),e.ExpandLineSelection=vg(new(function(e){function t(){return e.call(this,{id:"expandLineSelection",precondition:void 0,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:2090}})||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,fw.expandLineSelection(e.context,e.getAll())),e.reveal(t.source,!0,0,0)},t}(xw))),e.CancelSelection=vg(new(function(e){function t(){return e.call(this,{id:"cancelSelection",precondition:mw.hasNonEmptySelection,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:9,secondary:[1033]}})||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[fw.cancelSelection(e.context,e.getPrimaryCursor())]),e.reveal(t.source,!0,0,0)},t}(xw))),e.RemoveSecondaryCursors=vg(new(function(e){function t(){return e.call(this,{id:"removeSecondaryCursors",precondition:mw.hasMultipleSelections,kbOpts:{weight:Ew+1,kbExpr:mw.textInputFocus,primary:9,secondary:[1033]}})||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[e.getPrimaryCursor()]),e.reveal(t.source,!0,0,0)},t}(xw))),e.RevealLine=vg(new(function(e){function t(){return e.call(this,{id:"revealLine",precondition:void 0,description:Sw.description})||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=t,i=(n.lineNumber||0)+1;i<1&&(i=1);var o=e.context.model.getLineCount();i>o&&(i=o);var r=new pn(i,1,i,e.context.model.getLineMaxColumn(i)),s=0;if(n.at)switch(n.at){case Sw.RawAtArgument.Top:s=3;break;case Sw.RawAtArgument.Center:s=1;break;case Sw.RawAtArgument.Bottom:s=4;break;default:break}var a=e.context.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,a,s,0)},t}(xw))),e.SelectAll=vg(new(function(e){function t(){return e.call(this,{id:"selectAll",precondition:void 0})||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[fw.selectAll(e.context,e.getPrimaryCursor())])},t}(xw))),e.SetSelection=vg(new(function(e){function t(){return e.call(this,{id:"setSelection",precondition:void 0})||this}return Dw(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[Q_.fromModelSelection(t.selection)])},t}(xw)))}(Lw||(Lw={})),function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Dw(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors();i&&this.runCoreEditingCommand(t,i,n||{})},t}(gg);e.CoreEditingCommand=t,e.LineBreakInsert=vg(new(function(e){function t(){return e.call(this,{id:"lineBreakInsert",precondition:mw.writable,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:0,mac:{primary:301}}})||this}return Dw(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,bw.lineBreakInsert(t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection}))))},t}(t))),e.Outdent=vg(new(function(e){function t(){return e.call(this,{id:"outdent",precondition:mw.writable,kbOpts:{weight:Ew,kbExpr:Df.and(mw.editorTextFocus,mw.tabDoesNotMoveFocus),primary:1026}})||this}return Dw(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,bw.outdent(t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection})))),e.pushUndoStop()},t}(t))),e.Tab=vg(new(function(e){function t(){return e.call(this,{id:"tab",precondition:mw.writable,kbOpts:{weight:Ew,kbExpr:Df.and(mw.editorTextFocus,mw.tabDoesNotMoveFocus),primary:2}})||this}return Dw(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,bw.tab(t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection})))),e.pushUndoStop()},t}(t))),e.DeleteLeft=vg(new(function(e){function t(){return e.call(this,{id:"deleteLeft",precondition:mw.writable,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})||this}return Dw(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){var i=uw.deleteLeft(t.getPrevEditOperationType(),t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection}))),o=i[0],r=i[1];o&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(2)},t}(t))),e.DeleteRight=vg(new(function(e){function t(){return e.call(this,{id:"deleteRight",precondition:mw.writable,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})||this}return Dw(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){var i=uw.deleteRight(t.getPrevEditOperationType(),t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection}))),o=i[0],r=i[1];o&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(3)},t}(t)))}(Nw||(Nw={}));var Ow=function(e){function t(t){var n=e.call(this,t)||this;return n._editorHandler=t.editorHandler,n._inputHandler=t.inputHandler,n}return Dw(t,e),t.prototype.runCommand=function(e,t){var n=e.get(En).getFocusedCodeEditor();if(n&&n.hasTextFocus())return this._runEditorHandler(e,n,t);var i=document.activeElement;if(!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)){var o=e.get(En).getActiveCodeEditor();return o?(o.focus(),this._runEditorHandler(e,o,t)):void 0}document.execCommand(this._inputHandler)},t.prototype._runEditorHandler=function(e,t,n){var i=this._editorHandler;"string"===typeof i?t.trigger("keyboard",i,n):(n=n||{},n.source="keyboard",i.runEditorCommand(e,t,n))},t}(pg),Tw=function(e){function t(t,n,i){var o=e.call(this,{id:t,precondition:void 0,description:i})||this;return o._handlerId=n,o}return Dw(t,e),t.prototype.runCommand=function(e,t){var n=e.get(En).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)},t}(pg);function Mw(e,t){kw(new Tw("default:"+e,e)),kw(new Tw(e,e,t))}kw(new Ow({editorHandler:Lw.SelectAll,inputHandler:"selectAll",id:"editor.action.selectAll",precondition:mw.textInputFocus,kbOpts:{weight:Ew,kbExpr:null,primary:2079},menuOpts:{menuId:25,group:"1_basic",title:r({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1}})),kw(new Ow({editorHandler:Ha.Undo,inputHandler:"undo",id:Ha.Undo,precondition:mw.writable,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:2104},menuOpts:{menuId:17,group:"1_do",title:r({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1}})),kw(new Tw("default:"+Ha.Undo,Ha.Undo)),kw(new Ow({editorHandler:Ha.Redo,inputHandler:"redo",id:Ha.Redo,precondition:mw.writable,kbOpts:{weight:Ew,kbExpr:mw.textInputFocus,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:{menuId:17,group:"1_do",title:r({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2}})),kw(new Tw("default:"+Ha.Redo,Ha.Redo)),Mw(Ha.Type,{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),Mw(Ha.ReplacePreviousChar),Mw(Ha.CompositionStart),Mw(Ha.CompositionEnd),Mw(Ha.Paste),Mw(Ha.Cut);var Iw=function(){function e(e,t,n,i){this.configuration=e,this.viewModel=t,this.outgoingEvents=n,this.commandDelegate=i}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this.commandDelegate.executeEditorCommand(e,t)},e.prototype.paste=function(e,t,n,i,o){this.commandDelegate.paste(e,t,n,i,o)},e.prototype.type=function(e,t){this.commandDelegate.type(e,t)},e.prototype.replacePreviousChar=function(e,t,n){this.commandDelegate.replacePreviousChar(e,t,n)},e.prototype.compositionStart=function(e){this.commandDelegate.compositionStart(e)},e.prototype.compositionEnd=function(e){this.commandDelegate.compositionEnd(e)},e.prototype.cut=function(e){this.commandDelegate.cut(e)},e.prototype.setSelection=function(e,t){this.commandDelegate.executeEditorCommand(Lw.SetSelection,{source:e,selection:t})},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new fn(e.lineNumber,t):e},e.prototype._hasMulticursorModifier=function(e){switch(this.configuration.options.get(59)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey}return!1},e.prototype._hasNonMulticursorModifier=function(e){switch(this.configuration.options.get(59)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey}return!1},e.prototype.dispatchMouse=function(e){var t=s["d"]&&this.configuration.options.get(81);e.middleButton&&!t?this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount>=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?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?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)},e.prototype._usualArgs=function(e){return e=this._validateViewColumn(e),{position:this._convertViewToModelPosition(e),viewPosition:e}},e.prototype.moveTo=function(e){this._execMouseCommand(Lw.MoveTo,this._usualArgs(e))},e.prototype._moveToSelect=function(e){this._execMouseCommand(Lw.MoveToSelect,this._usualArgs(e))},e.prototype._columnSelect=function(e,t,n){e=this._validateViewColumn(e),this._execMouseCommand(Lw.ColumnSelect,{position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})},e.prototype._createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(Lw.CreateCursor,{position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})},e.prototype._lastCursorMoveToSelect=function(e){this._execMouseCommand(Lw.LastCursorMoveToSelect,this._usualArgs(e))},e.prototype._wordSelect=function(e){this._execMouseCommand(Lw.WordSelect,this._usualArgs(e))},e.prototype._wordSelectDrag=function(e){this._execMouseCommand(Lw.WordSelectDrag,this._usualArgs(e))},e.prototype._lastCursorWordSelect=function(e){this._execMouseCommand(Lw.LastCursorWordSelect,this._usualArgs(e))},e.prototype._lineSelect=function(e){this._execMouseCommand(Lw.LineSelect,this._usualArgs(e))},e.prototype._lineSelectDrag=function(e){this._execMouseCommand(Lw.LineSelectDrag,this._usualArgs(e))},e.prototype._lastCursorLineSelect=function(e){this._execMouseCommand(Lw.LastCursorLineSelect,this._usualArgs(e))},e.prototype._lastCursorLineSelectDrag=function(e){this._execMouseCommand(Lw.LastCursorLineSelectDrag,this._usualArgs(e))},e.prototype._selectAll=function(){this._execMouseCommand(Lw.SelectAll,{})},e.prototype._convertViewToModelPosition=function(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)},e.prototype.emitKeyDown=function(e){this.outgoingEvents.emitKeyDown(e)},e.prototype.emitKeyUp=function(e){this.outgoingEvents.emitKeyUp(e)},e.prototype.emitContextMenu=function(e){this.outgoingEvents.emitContextMenu(e)},e.prototype.emitMouseMove=function(e){this.outgoingEvents.emitMouseMove(e)},e.prototype.emitMouseLeave=function(e){this.outgoingEvents.emitMouseLeave(e)},e.prototype.emitMouseUp=function(e){this.outgoingEvents.emitMouseUp(e)},e.prototype.emitMouseDown=function(e){this.outgoingEvents.emitMouseDown(e)},e.prototype.emitMouseDrag=function(e){this.outgoingEvents.emitMouseDrag(e)},e.prototype.emitMouseDrop=function(e){this.outgoingEvents.emitMouseDrop(e)},e.prototype.emitMouseWheel=function(e){this.outgoingEvents.emitMouseWheel(e)},e}(),Aw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Pw=function(e){function t(t){var n=e.call(this)||this;return n.onDidContentSizeChange=null,n.onDidScroll=null,n.onDidGainFocus=null,n.onDidLoseFocus=null,n.onKeyDown=null,n.onKeyUp=null,n.onContextMenu=null,n.onMouseMove=null,n.onMouseLeave=null,n.onMouseUp=null,n.onMouseDown=null,n.onMouseDrag=null,n.onMouseDrop=null,n.onMouseWheel=null,n._viewModel=t,n}return Aw(t,e),t.prototype.emitContentSizeChange=function(e){this.onDidContentSizeChange&&this.onDidContentSizeChange(e)},t.prototype.emitScrollChanged=function(e){this.onDidScroll&&this.onDidScroll(e)},t.prototype.emitViewFocusGained=function(){this.onDidGainFocus&&this.onDidGainFocus(void 0)},t.prototype.emitViewFocusLost=function(){this.onDidLoseFocus&&this.onDidLoseFocus(void 0)},t.prototype.emitKeyDown=function(e){this.onKeyDown&&this.onKeyDown(e)},t.prototype.emitKeyUp=function(e){this.onKeyUp&&this.onKeyUp(e)},t.prototype.emitContextMenu=function(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseMove=function(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseLeave=function(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseUp=function(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDown=function(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrag=function(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrop=function(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseWheel=function(e){this.onMouseWheel&&this.onMouseWheel(e)},t.prototype._convertViewToModelMouseEvent=function(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e},t.prototype._convertViewToModelMouseTarget=function(e){return t.convertViewToModelMouseTarget(e,this._viewModel.coordinatesConverter)},t.convertViewToModelMouseTarget=function(e,t){return new Rw(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)},t}(Me),Rw=function(){function e(e,t,n,i,o,r){this.element=e,this.type=t,this.mouseColumn=n,this.position=i,this.range=o,this.detail=r}return e.prototype.toString=function(){return oy.toString(this)},e}(),Fw=function(){function e(e){this._createLine=e,this._set(1,[])}return e.prototype.flush=function(){this._set(1,[])},e.prototype._set=function(e,t){this._lines=t,this._rendLineNumberStart=e},e.prototype._get=function(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}},e.prototype.getStartLineNumber=function(){return this._rendLineNumberStart},e.prototype.getEndLineNumber=function(){return this._rendLineNumberStart+this._lines.length-1},e.prototype.getCount=function(){return this._lines.length},e.prototype.getLine=function(e){var t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]},e.prototype.onLinesDeleted=function(e,t){if(0===this.getCount())return null;var n=this.getStartLineNumber(),i=this.getEndLineNumber();if(t<n){var o=t-e+1;return this._rendLineNumberStart-=o,null}if(e>i)return null;for(var r=0,s=0,a=n;a<=i;a++){var u=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=u,s=1):s++)}if(e<n){var l=0;l=t<n?t-e+1:n-e,this._rendLineNumberStart-=l}var c=this._lines.splice(r,s);return c},e.prototype.onLinesChanged=function(e,t){if(0===this.getCount())return!1;for(var n=this.getStartLineNumber(),i=this.getEndLineNumber(),o=!1,r=e;r<=t;r++)r>=n&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var n=t-e+1,i=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o){var r=this._lines.splice(e-this._rendLineNumberStart,o-e+1);return r}for(var s=[],a=0;a<n;a++)s[a]=this._createLine();var u=e-this._rendLineNumberStart,l=this._lines.slice(0,u),c=this._lines.slice(u,this._lines.length-n),h=this._lines.slice(this._lines.length-n,this._lines.length);return this._lines=l.concat(s).concat(c),h},e.prototype.onTokensChanged=function(e){if(0===this.getCount())return!1;for(var t=this.getStartLineNumber(),n=this.getEndLineNumber(),i=!1,o=0,r=e.length;o<r;o++){var s=e[o];if(!(s.toLineNumber<t||s.fromLineNumber>n))for(var a=Math.max(t,s.fromLineNumber),u=Math.min(n,s.toLineNumber),l=a;l<=u;l++){var c=l-this._rendLineNumberStart;this._lines[c].onTokensChanged(),i=!0}}return i},e}(),Ww=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new Fw((function(){return t._host.createVisibleLine()}))}return e.prototype._createDomNode=function(){var e=wg(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e},e.prototype.onConfigurationChanged=function(e){return!!e.hasChanged(107)},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0},e.prototype.onLinesChanged=function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;n<i;n++){var o=t[n].getDomNode();o&&this.domNode.domNode.removeChild(o)}return!0},e.prototype.onLinesInserted=function(e){var t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;n<i;n++){var o=t[n].getDomNode();o&&this.domNode.domNode.removeChild(o)}return!0},e.prototype.onScrollChanged=function(e){return e.scrollTopChanged},e.prototype.onTokensChanged=function(e){return this._linesCollection.onTokensChanged(e.ranges)},e.prototype.onZonesChanged=function(e){return!0},e.prototype.getStartLineNumber=function(){return this._linesCollection.getStartLineNumber()},e.prototype.getEndLineNumber=function(){return this._linesCollection.getEndLineNumber()},e.prototype.getVisibleLine=function(e){return this._linesCollection.getLine(e)},e.prototype.renderLines=function(e){var t=this._linesCollection._get(),n=new Vw(this.domNode.domNode,this._host,e),i={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},o=n.render(i,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(o.rendLineNumberStart,o.lines)},e}(),Vw=function(){function e(e,t,n){this.domNode=e,this.host=t,this.viewportData=n}return e.prototype.render=function(e,t,n,i){var o={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(o.rendLineNumberStart+o.linesLength-1<t||n<o.rendLineNumberStart){o.rendLineNumberStart=t,o.linesLength=n-t+1,o.lines=[];for(var r=t;r<=n;r++)o.lines[r-t]=this.host.createVisibleLine();return this._finishRendering(o,!0,i),o}if(this._renderUntouchedLines(o,Math.max(t-o.rendLineNumberStart,0),Math.min(n-o.rendLineNumberStart,o.linesLength-1),i,t),o.rendLineNumberStart>t){var s=t,a=Math.min(n,o.rendLineNumberStart-1);s<=a&&(this._insertLinesBefore(o,s,a,i,t),o.linesLength+=a-s+1)}else if(o.rendLineNumberStart<t){var u=Math.min(o.linesLength,t-o.rendLineNumberStart);u>0&&(this._removeLinesBefore(o,u),o.linesLength-=u)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1<n){s=o.rendLineNumberStart+o.linesLength,a=n;s<=a&&(this._insertLinesAfter(o,s,a,i,t),o.linesLength+=a-s+1)}else if(o.rendLineNumberStart+o.linesLength-1>n){s=Math.max(0,n-o.rendLineNumberStart+1),a=o.linesLength-1,u=a-s+1;u>0&&(this._removeLinesAfter(o,u),o.linesLength-=u)}return this._finishRendering(o,!1,i),o},e.prototype._renderUntouchedLines=function(e,t,n,i,o){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=n;a++){var u=r+a;s[a].layoutLine(u,i[u-o])}},e.prototype._insertLinesBefore=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var n=0;n<t;n++){var i=e.lines[n].getDomNode();i&&this.domNode.removeChild(i)}e.lines.splice(0,t)},e.prototype._insertLinesAfter=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=e.lines.concat(r)},e.prototype._removeLinesAfter=function(e,t){for(var n=e.linesLength-t,i=0;i<t;i++){var o=e.lines[n+i].getDomNode();o&&this.domNode.removeChild(o)}e.lines.splice(n,t)},e.prototype._finishRenderingNewLines=function(e,t,n,i){var o=this.domNode.lastChild;t||!o?this.domNode.innerHTML=n:o.insertAdjacentHTML("afterend",n);for(var r=this.domNode.lastChild,s=e.linesLength-1;s>=0;s--){var a=e.lines[s];i[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,n){var i=document.createElement("div");i.innerHTML=t;for(var o=0;o<e.linesLength;o++){var r=e.lines[o];if(n[o]){var s=i.firstChild,a=r.getDomNode();a.parentNode.replaceChild(s,a),r.setDomNode(s)}}},e.prototype._finishRendering=function(t,n,i){var o=e._sb,r=t.linesLength,s=t.lines,a=t.rendLineNumberStart,u=[];o.reset();for(var l=!1,c=0;c<r;c++){var h=s[c];u[c]=!1;var d=h.getDomNode();if(!d){var f=h.renderLine(c+a,i[c],this.viewportData,o);f&&(u[c]=!0,l=!0)}}l&&this._finishRenderingNewLines(t,n,o.build(),u),o.reset();var p=!1,g=[];for(c=0;c<r;c++){h=s[c];if(g[c]=!1,!u[c]){f=h.renderLine(c+a,i[c],this.viewportData,o);f&&(g[c]=!0,p=!0)}}p&&this._finishRenderingInvalidLines(t,o.build(),g)},e._sb=sh(1e5),e}(),Bw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Hw=function(e){function t(t){var n=e.call(this,t)||this;return n._visibleLines=new Ww(n),n.domNode=n._visibleLines.domNode,n._dynamicOverlays=[],n._isFocused=!1,n.domNode.setClassName("view-overlays"),n}return Bw(t,e),t.prototype.shouldRender=function(){if(e.prototype.shouldRender.call(this))return!0;for(var t=0,n=this._dynamicOverlays.length;t<n;t++){var i=this._dynamicOverlays[t];if(i.shouldRender())return!0}return!1},t.prototype.dispose=function(){e.prototype.dispose.call(this);for(var t=0,n=this._dynamicOverlays.length;t<n;t++){var i=this._dynamicOverlays[t];i.dispose()}this._dynamicOverlays=[]},t.prototype.getDomNode=function(){return this.domNode},t.prototype.createVisibleLine=function(){return new zw(this._context.configuration,this._dynamicOverlays)},t.prototype.addDynamicOverlay=function(e){this._dynamicOverlays.push(e)},t.prototype.onConfigurationChanged=function(e){this._visibleLines.onConfigurationChanged(e);for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++){var o=this._visibleLines.getVisibleLine(i);o.onConfigurationChanged(e)}return!0},t.prototype.onFlushed=function(e){return this._visibleLines.onFlushed(e)},t.prototype.onFocusChanged=function(e){return this._isFocused=e.isFocused,!0},t.prototype.onLinesChanged=function(e){return this._visibleLines.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._visibleLines.onLinesDeleted(e)},t.prototype.onLinesInserted=function(e){return this._visibleLines.onLinesInserted(e)},t.prototype.onScrollChanged=function(e){return this._visibleLines.onScrollChanged(e)||!0},t.prototype.onTokensChanged=function(e){return this._visibleLines.onTokensChanged(e)},t.prototype.onZonesChanged=function(e){return this._visibleLines.onZonesChanged(e)},t.prototype.prepareRender=function(e){for(var t=this._dynamicOverlays.filter((function(e){return e.shouldRender()})),n=0,i=t.length;n<i;n++){var o=t[n];o.prepareRender(e),o.onDidRender()}},t.prototype.render=function(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)},t.prototype._viewOverlaysRender=function(e){this._visibleLines.renderLines(e.viewportData)},t}(Ug),zw=function(){function e(e,t){this._configuration=e,this._lineHeight=this._configuration.options.get(49),this._dynamicOverlays=t,this._domNode=null,this._renderedContent=null}return e.prototype.getDomNode=function(){return this._domNode?this._domNode.domNode:null},e.prototype.setDomNode=function(e){this._domNode=wg(e)},e.prototype.onContentChanged=function(){},e.prototype.onTokensChanged=function(){},e.prototype.onConfigurationChanged=function(e){this._lineHeight=this._configuration.options.get(49)},e.prototype.renderLine=function(e,t,n,i){for(var o="",r=0,s=this._dynamicOverlays.length;r<s;r++){var a=this._dynamicOverlays[r];o+=a.render(n.startLineNumber,e)}return this._renderedContent!==o&&(this._renderedContent=o,i.appendASCIIString('<div style="position:absolute;top:'),i.appendASCIIString(String(t)),i.appendASCIIString("px;width:100%;height:"),i.appendASCIIString(String(this._lineHeight)),i.appendASCIIString('px;">'),i.appendASCIIString(o),i.appendASCIIString("</div>"),!0)},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))},e}(),jw=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options,o=i.get(107);return n._contentWidth=o.contentWidth,n.domNode.setHeight(0),n}return Bw(t,e),t.prototype.onConfigurationChanged=function(t){var n=this._context.configuration.options,i=n.get(107);return this._contentWidth=i.contentWidth,e.prototype.onConfigurationChanged.call(this,t)||!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollWidthChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))},t}(Hw),Uw=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options,o=i.get(107);return n._contentLeft=o.contentLeft,n.domNode.setClassName("margin-view-overlays"),n.domNode.setWidth(1),Zp.applyFontInfo(n.domNode,i.get(34)),n}return Bw(t,e),t.prototype.onConfigurationChanged=function(t){var n=this._context.configuration.options;Zp.applyFontInfo(this.domNode,n.get(34));var i=n.get(107);return this._contentLeft=i.contentLeft,e.prototype.onConfigurationChanged.call(this,t)||!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t);var n=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)},t}(Hw),Kw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),qw=function(){function e(e,t){this.top=e,this.left=t}return e}(),Gw=function(e){function t(t,n){var i=e.call(this,t)||this;return i._viewDomNode=n,i._widgets={},i.domNode=wg(document.createElement("div")),Kg.write(i.domNode,1),i.domNode.setClassName("contentWidgets"),i.domNode.setPosition("absolute"),i.domNode.setTop(0),i.overflowingContentWidgetsDomNode=wg(document.createElement("div")),Kg.write(i.overflowingContentWidgetsDomNode,2),i.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),i}return Kw(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets={}},t.prototype.onConfigurationChanged=function(e){for(var t=Object.keys(this._widgets),n=0,i=t;n<i.length;n++){var o=i[n];this._widgets[o].onConfigurationChanged(e)}return!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLineMappingChanged=function(e){for(var t=Object.keys(this._widgets),n=0,i=t;n<i.length;n++){var o=i[n];this._widgets[o].onLineMappingChanged(e)}return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.addWidget=function(e){var t=new Yw(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()},t.prototype.setWidgetPosition=function(e,t,n){var i=this._widgets[e.getId()];i.setPosition(t,n),this.setShouldRender()},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t];delete this._widgets[t];var i=n.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}},t.prototype.shouldSuppressMouseDownOnWidget=function(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown},t.prototype.onBeforeRender=function(e){for(var t=Object.keys(this._widgets),n=0,i=t;n<i.length;n++){var o=i[n];this._widgets[o].onBeforeRender(e)}},t.prototype.prepareRender=function(e){for(var t=Object.keys(this._widgets),n=0,i=t;n<i.length;n++){var o=i[n];this._widgets[o].prepareRender(e)}},t.prototype.render=function(e){for(var t=Object.keys(this._widgets),n=0,i=t;n<i.length;n++){var o=i[n];this._widgets[o].render(e)}},t}(Ug),Yw=function(){function e(e,t,n){this._context=e,this._viewDomNode=t,this._actual=n,this.domNode=wg(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;var i=this._context.configuration.options,o=i.get(107);this._fixedOverflowWidgets=i.get(29),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=i.get(49),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}return e.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;if(this._lineHeight=t.get(49),e.hasChanged(107)){var n=t.get(107);this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._maxWidth=this._getMaxWidth()}},e.prototype.onLineMappingChanged=function(e){this._setPosition(this._range)},e.prototype._setPosition=function(e){if(this._range=e,this._viewRange=null,this._range){var t=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(t.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(t.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(t))}},e.prototype._getMaxWidth=function(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth},e.prototype.setPosition=function(e,t){this._setPosition(e),this._preference=t,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1},e.prototype._layoutBoxInViewport=function(e,t,n,i,o){var r=e.top,s=r,a=t.top+this._lineHeight,u=o.viewportHeight-a,l=r-i,c=s>=i,h=a,d=u>=i,f=e.left,p=t.left;return f+n>o.scrollLeft+o.viewportWidth&&(f=o.scrollLeft+o.viewportWidth-n),p+n>o.scrollLeft+o.viewportWidth&&(p=o.scrollLeft+o.viewportWidth-n),f<o.scrollLeft&&(f=o.scrollLeft),p<o.scrollLeft&&(p=o.scrollLeft),{fitsAbove:c,aboveTop:l,aboveLeft:f,fitsBelow:d,belowTop:h,belowLeft:p}},e.prototype._layoutHorizontalSegmentInPage=function(e,t,n,i){var o=Math.max(0,t.left-i),r=Math.min(t.left+t.width+i,e.width),s=t.left+n-No.scrollX;if(s+i>r){var a=s-(r-i);s-=a,n-=a}if(s<o){a=s-o;s-=a,n-=a}return[n,s]},e.prototype._layoutBoxInPage=function(e,t,n,i,o){var r=e.top-i,s=t.top+this._lineHeight,a=Lo(this._viewDomNode.domNode),u=a.top+r-No.scrollY,l=a.top+s-No.scrollY,c=bo(document.body),h=this._layoutHorizontalSegmentInPage(c,a,e.left-o.scrollLeft+this._contentLeft,n),d=h[0],f=h[1],p=this._layoutHorizontalSegmentInPage(c,a,t.left-o.scrollLeft+this._contentLeft,n),g=p[0],m=p[1],v=22,_=22,y=u>=v,b=l+i<=c.height-_;return this._fixedOverflowWidgets?{fitsAbove:y,aboveTop:Math.max(u,v),aboveLeft:f,fitsBelow:b,belowTop:l,belowLeft:m}:{fitsAbove:y,aboveTop:Math.max(r,v),aboveLeft:d,fitsBelow:b,belowTop:s,belowLeft:g}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new qw(e.top,e.left+this._contentLeft)},e.prototype._getTopAndBottomLeft=function(e){if(!this._viewRange)return[null,null];var t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];for(var n=t[0],i=t[0],o=0,r=t;o<r.length;o++){var s=r[o];s.lineNumber<n.lineNumber&&(n=s),s.lineNumber>i.lineNumber&&(i=s)}for(var a=1073741824,u=0,l=n.ranges;u<l.length;u++){var c=l[u];c.left<a&&(a=c.left)}for(var h=1073741824,d=0,f=i.ranges;d<f.length;d++){c=f[d];c.left<h&&(h=c.left)}var p=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.scrollTop,g=new qw(p,a),m=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.scrollTop,v=new qw(m,h);return[g,v]},e.prototype._prepareRenderWidget=function(e){var t,n=this._getTopAndBottomLeft(e),i=n[0],o=n[1];if(!i||!o)return null;if(-1===this._cachedDomNodeClientWidth||-1===this._cachedDomNodeClientHeight){var r=this.domNode.domNode;this._cachedDomNodeClientWidth=r.clientWidth,this._cachedDomNodeClientHeight=r.clientHeight}if(t=this.allowEditorOverflow?this._layoutBoxInPage(i,o,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e):this._layoutBoxInViewport(i,o,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e),this._preference)for(var s=1;s<=2;s++)for(var a=0,u=this._preference;a<u.length;a++){var l=u[a];if(1===l){if(!t)return null;if(2===s||t.fitsAbove)return new qw(t.aboveTop,t.aboveLeft)}else{if(2!==l)return this.allowEditorOverflow?this._prepareRenderWidgetAtExactPositionOverflowing(i):i;if(!t)return null;if(2===s||t.fitsBelow)return new qw(t.belowTop,t.belowLeft)}}return null},e.prototype.onBeforeRender=function(e){this._viewRange&&this._preference&&(this._viewRange.endLineNumber<e.startLineNumber||this._viewRange.startLineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){this._renderData=this._prepareRenderWidget(e)},e.prototype.render=function(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))},e}(),Zw=(n("930f"),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),Xw=!0,$w=function(e){function t(t){var n=e.call(this)||this;n._context=t;var i=n._context.configuration.options,o=i.get(107);return n._lineHeight=i.get(49),n._renderLineHighlight=i.get(72),n._contentLeft=o.contentLeft,n._contentWidth=o.contentWidth,n._selectionIsEmpty=!0,n._cursorLineNumbers=[],n._selections=[],n._renderData=null,n._context.addEventHandler(n),n}return Zw(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype._readFromSelections=function(){var e=!1,t=Xw?this._selections.slice(0,1):this._selections,n=t.map((function(e){return e.positionLineNumber}));n.sort((function(e,t){return e-t})),Ci(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);var i=t.every((function(e){return e.isEmpty()}));return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e},t.prototype.onThemeChanged=function(e){return this._readFromSelections()},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._lineHeight=t.get(49),this._renderLineHighlight=t.get(72),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections,this._readFromSelections()},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollWidthChanged||e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(this._shouldRenderThis()){for(var t=this._renderOne(e),n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length,r=0,s=[],a=n;a<=i;a++){var u=a-n;while(r<o&&this._cursorLineNumbers[r]<a)r++;r<o&&this._cursorLineNumbers[r]===a?s[u]=t:s[u]=""}this._renderData=s}else this._renderData=null},t.prototype.render=function(e,t){if(!this._renderData)return"";var n=t-e;return n>=this._renderData.length?"":this._renderData[n]},t}(Py),Qw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zw(t,e),t.prototype._renderOne=function(e){var t="current-line"+(this._shouldRenderOther()?" current-line-both":"");return'<div class="'+t+'" style="width:'+Math.max(e.scrollWidth,this._contentWidth)+"px; height:"+this._lineHeight+'px;"></div>'},t.prototype._shouldRenderThis=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t.prototype._shouldRenderOther=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t}($w),Jw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zw(t,e),t.prototype._renderOne=function(e){var t="current-line current-line-margin"+(this._shouldRenderOther()?" current-line-margin-both":"");return'<div class="'+t+'" style="width:'+this._contentLeft+"px; height:"+this._lineHeight+'px;"></div>'},t.prototype._shouldRenderThis=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t.prototype._shouldRenderOther=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t}($w);lm((function(e,t){Xw=!1;var n=e.getColor(tC);if(n&&(t.addRule(".monaco-editor .view-overlays .current-line { background-color: "+n+"; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: "+n+"; border: none; }")),!n||n.isTransparent()||e.defines(nC)){var i=e.getColor(nC);i&&(Xw=!0,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; }")))}}));n("56dc");var eS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),tS=function(e){function t(t){var n=e.call(this)||this;n._context=t;var i=n._context.configuration.options;return n._lineHeight=i.get(49),n._typicalHalfwidthCharacterWidth=i.get(34).typicalHalfwidthCharacterWidth,n._renderResult=null,n._context.addEventHandler(n),n}return eS(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;return this._lineHeight=t.get(49),this._typicalHalfwidthCharacterWidth=t.get(34).typicalHalfwidthCharacterWidth,!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;o<r;o++){var s=t[o];s.options.className&&(n[i++]=s)}n=n.sort((function(e,t){if(e.options.zIndex<t.options.zIndex)return-1;if(e.options.zIndex>t.options.zIndex)return 1;var n=e.options.className,i=t.options.className;return n<i?-1:n>i?1:pn.compareRangesUsingStarts(e.range,t.range)}));for(var a=e.visibleRange.startLineNumber,u=e.visibleRange.endLineNumber,l=[],c=a;c<=u;c++){var h=c-a;l[h]=""}this._renderWholeLineDecorations(e,n,l),this._renderNormalDecorations(e,n,l),this._renderResult=l},t.prototype._renderWholeLineDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s<a;s++){var u=t[s];if(u.options.isWholeLine)for(var l='<div class="cdr '+u.options.className+'" style="left:0;width:100%;height:'+i+'px;"></div>',c=Math.max(u.range.startLineNumber,o),h=Math.min(u.range.endLineNumber,r),d=c;d<=h;d++){var f=d-o;n[f]+=l}}},t.prototype._renderNormalDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=null,s=!1,a=null,u=0,l=t.length;u<l;u++){var c=t[u];if(!c.options.isWholeLine){var h=c.options.className,d=Boolean(c.options.showIfCollapsed),f=c.range;d&&1===f.endColumn&&f.endLineNumber!==f.startLineNumber&&(f=new pn(f.startLineNumber,f.startColumn,f.endLineNumber-1,this._context.model.getLineMaxColumn(f.endLineNumber-1))),r===h&&s===d&&pn.areIntersectingOrTouching(a,f)?a=pn.plusRange(a,f):(null!==r&&this._renderNormalDecoration(e,a,r,s,i,o,n),r=h,s=d,a=f)}}null!==r&&this._renderNormalDecoration(e,a,r,s,i,o,n)},t.prototype._renderNormalDecoration=function(e,t,n,i,o,r,s){var a=e.linesVisibleRangesForRange(t,"findMatch"===n);if(a)for(var u=0,l=a.length;u<l;u++){var c=a[u];if(!c.outsideRenderedLine){var h=c.lineNumber-r;if(i&&1===c.ranges.length){var d=c.ranges[0];0===d.width&&(c.ranges[0]=new Xg(d.left,this._typicalHalfwidthCharacterWidth))}for(var f=0,p=c.ranges.length;f<p;f++){var g=c.ranges[f],m='<div class="cdr '+n+'" style="left:'+String(g.left)+"px;width:"+String(g.width)+"px;height:"+o+'px;"></div>';s[h]+=m}}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(Py),nS=(n("7aad"),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),iS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nS(t,e),t.prototype.onclick=function(e,t){this._register(io(e,Ho.CLICK,(function(e){return t(new si(e))})))},t.prototype.onmousedown=function(e,t){this._register(io(e,Ho.MOUSE_DOWN,(function(e){return t(new si(e))})))},t.prototype.onmouseover=function(e,t){this._register(io(e,Ho.MOUSE_OVER,(function(e){return t(new si(e))})))},t.prototype.onnonbubblingmouseout=function(e,t){this._register(ao(e,(function(e){return t(new si(e))})))},t.prototype.onkeydown=function(e,t){this._register(io(e,Ho.KEY_DOWN,(function(e){return t(new Jn(e))})))},t.prototype.onkeyup=function(e,t){this._register(io(e,Ho.KEY_UP,(function(e){return t(new Jn(e))})))},t.prototype.oninput=function(e,t){this._register(io(e,Ho.INPUT,t))},t.prototype.onblur=function(e,t){this._register(io(e,Ho.BLUR,t))},t.prototype.onfocus=function(e,t){this._register(io(e,Ho.FOCUS,t))},t.prototype.ignoreGesture=function(e){kg.ignoreTarget(e)},t}(Me),oS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),rS=11,sS=function(e){function t(t){var n=e.call(this)||this;return n._onActivate=t.onActivate,n.bgDomNode=document.createElement("div"),n.bgDomNode.className="arrow-background",n.bgDomNode.style.position="absolute",n.bgDomNode.style.width=t.bgWidth+"px",n.bgDomNode.style.height=t.bgHeight+"px","undefined"!==typeof t.top&&(n.bgDomNode.style.top="0px"),"undefined"!==typeof t.left&&(n.bgDomNode.style.left="0px"),"undefined"!==typeof t.bottom&&(n.bgDomNode.style.bottom="0px"),"undefined"!==typeof t.right&&(n.bgDomNode.style.right="0px"),n.domNode=document.createElement("div"),n.domNode.className=t.className,n.domNode.style.position="absolute",n.domNode.style.width=rS+"px",n.domNode.style.height=rS+"px","undefined"!==typeof t.top&&(n.domNode.style.top=t.top+"px"),"undefined"!==typeof t.left&&(n.domNode.style.left=t.left+"px"),"undefined"!==typeof t.bottom&&(n.domNode.style.bottom=t.bottom+"px"),"undefined"!==typeof t.right&&(n.domNode.style.right=t.right+"px"),n._mouseMoveMonitor=n._register(new Tg),n.onmousedown(n.bgDomNode,(function(e){return n._arrowMouseDown(e)})),n.onmousedown(n.domNode,(function(e){return n._arrowMouseDown(e)})),n._mousedownRepeatTimer=n._register(new gi),n._mousedownScheduleRepeatTimer=n._register(new pi),n}return oS(t,e),t.prototype._arrowMouseDown=function(e){var t=this,n=function(){t._mousedownRepeatTimer.cancelAndSet((function(){return t._onActivate()}),1e3/24)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(n,200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,Og,(function(e){}),(function(){t._mousedownRepeatTimer.cancel(),t._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()},t}(iS),aS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),uS=function(e){function t(t,n,i){var o=e.call(this)||this;return o._visibility=t,o._visibleClassName=n,o._invisibleClassName=i,o._domNode=null,o._isVisible=!1,o._isNeeded=!1,o._shouldBeVisible=!1,o._revealTimer=o._register(new pi),o}return aS(t,e),t.prototype.applyVisibilitySetting=function(e){return 2!==this._visibility&&(3===this._visibility||e)},t.prototype.setShouldBeVisible=function(e){var t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())},t.prototype.setIsNeeded=function(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())},t.prototype.setDomNode=function(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)},t.prototype.ensureVisibility=function(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)},t.prototype._reveal=function(){var e=this;this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((function(){e._domNode&&e._domNode.setClassName(e._visibleClassName)}),0))},t.prototype._hide=function(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))},t}(Me),lS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cS=140,hS=function(e){function t(t){var n=e.call(this)||this;return n._lazyRender=t.lazyRender,n._host=t.host,n._scrollable=t.scrollable,n._scrollbarState=t.scrollbarState,n._visibilityController=n._register(new uS(t.visibility,"visible scrollbar "+t.extraScrollbarClassName,"invisible scrollbar "+t.extraScrollbarClassName)),n._visibilityController.setIsNeeded(n._scrollbarState.isNeeded()),n._mouseMoveMonitor=n._register(new Tg),n._shouldRender=!0,n.domNode=wg(document.createElement("div")),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n._visibilityController.setDomNode(n.domNode),n.domNode.setPosition("absolute"),n.onmousedown(n.domNode.domNode,(function(e){return n._domNodeMouseDown(e)})),n}return lS(t,e),t.prototype._createArrow=function(e){var t=this._register(new sS(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)},t.prototype._createSlider=function(e,t,n,i){var o=this;this.slider=wg(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"===typeof n&&this.slider.setWidth(n),"number"===typeof i&&this.slider.setHeight(i),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,(function(e){e.leftButton&&(e.preventDefault(),o._sliderMouseDown(e,(function(){})))})),this.onclick(this.slider.domNode,(function(e){e.leftButton&&e.stopPropagation()}))},t.prototype._onElementSize=function(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype._onElementScrollSize=function(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype._onElementScrollPosition=function(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype.beginReveal=function(){this._visibilityController.setShouldBeVisible(!0)},t.prototype.beginHide=function(){this._visibilityController.setShouldBeVisible(!1)},t.prototype.render=function(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))},t.prototype._domNodeMouseDown=function(e){e.target===this.domNode.domNode&&this._onMouseDown(e)},t.prototype.delegateMouseDown=function(e){var t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),i=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);n<=o&&o<=i?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(function(){}))):this._onMouseDown(e)},t.prototype._onMouseDown=function(e){var t,n;if(e.target===this.domNode.domNode&&"number"===typeof e.browserEvent.offsetX&&"number"===typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,n=e.browserEvent.offsetY;else{var i=Lo(this.domNode.domNode);t=e.posx-i.left,n=e.posy-i.top}this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(t,n))),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(function(){})))},t.prototype._sliderMouseDown=function(e,t){var n=this,i=this._sliderMousePosition(e),o=this._sliderOrthogonalMousePosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,Og,(function(e){var t=n._sliderOrthogonalMousePosition(e),a=Math.abs(t-o);if(s["h"]&&a>cS)n._setDesiredScrollPositionNow(r.getScrollPosition());else{var u=n._sliderMousePosition(e),l=u-i;n._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(l))}}),(function(){n.slider.toggleClassName("active",!1),n._host.onDragEnd(),t()})),this._host.onDragStart()},t.prototype._setDesiredScrollPositionNow=function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)},t}(iS),dS=20,fS=function(){function e(e,t,n,i,o,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=i,this._scrollSize=o,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}return e.prototype.clone=function(){return new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)},e.prototype.setVisibleSize=function(e){var t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollSize=function(e){var t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollPosition=function(e){var t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)},e._computeValues=function(e,t,n,i,o){var r=Math.max(0,n-e),s=Math.max(0,r-2*t),a=i>0&&i>n;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};var u=Math.round(Math.max(dS,Math.floor(n*s/i))),l=(s-u)/(i-n),c=o*l;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(u),computedSliderRatio:l,computedSliderPosition:Math.round(c)}},e.prototype._refreshComputedValues=function(){var t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition},e.prototype.getArrowSize=function(){return this._arrowSize},e.prototype.getScrollPosition=function(){return this._scrollPosition},e.prototype.getRectangleLargeSize=function(){return this._computedAvailableSize},e.prototype.getRectangleSmallSize=function(){return this._scrollbarSize},e.prototype.isNeeded=function(){return this._computedIsNeeded},e.prototype.getSliderSize=function(){return this._computedSliderSize},e.prototype.getSliderPosition=function(){return this._computedSliderPosition},e.prototype.getDesiredScrollPositionFromOffset=function(e){if(!this._computedIsNeeded)return 0;var t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)},e.prototype.getDesiredScrollPositionFromDelta=function(e){if(!this._computedIsNeeded)return 0;var t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)},e}(),pS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),gS=function(e){function t(t,n,i){var o=this,r=t.getScrollDimensions(),s=t.getCurrentScrollPosition();if(o=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new fS(n.horizontalHasArrows?n.arrowSize:0,2===n.horizontal?0:n.horizontalScrollbarSize,2===n.vertical?0:n.verticalScrollbarSize,r.width,r.scrollWidth,s.scrollLeft),visibility:n.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this,n.horizontalHasArrows){var a=(n.arrowSize-rS)/2,u=(n.horizontalScrollbarSize-rS)/2;o._createArrow({className:"left-arrow",top:u,left:a,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new ai(null,1,0))}}),o._createArrow({className:"right-arrow",top:u,left:void 0,bottom:void 0,right:a,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new ai(null,-1,0))}})}return o._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,void 0,n.horizontalSliderSize),o}return pS(t,e),t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),this.slider.setLeft(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)},t.prototype.onDidScroll=function(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},t.prototype._mouseDownRelativePosition=function(e,t){return e},t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy},t.prototype.writeScrollPosition=function(e,t){e.scrollLeft=t},t}(hS),mS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vS=function(e){function t(t,n,i){var o=this,r=t.getScrollDimensions(),s=t.getCurrentScrollPosition();if(o=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new fS(n.verticalHasArrows?n.arrowSize:0,2===n.vertical?0:n.verticalScrollbarSize,0,r.height,r.scrollHeight,s.scrollTop),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this,n.verticalHasArrows){var a=(n.arrowSize-rS)/2,u=(n.verticalScrollbarSize-rS)/2;o._createArrow({className:"up-arrow",top:a,left:u,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return o._host.onMouseWheel(new ai(null,0,1))}}),o._createArrow({className:"down-arrow",top:void 0,left:u,bottom:a,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return o._host.onMouseWheel(new ai(null,0,-1))}})}return o._createSlider(0,Math.floor((n.verticalScrollbarSize-n.verticalSliderSize)/2),n.verticalSliderSize,void 0),o}return mS(t,e),t.prototype._updateSlider=function(e,t){this.slider.setHeight(e),this.slider.setTop(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)},t.prototype.onDidScroll=function(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},t.prototype._mouseDownRelativePosition=function(e,t){return t},t.prototype._sliderMousePosition=function(e){return e.posy},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posx},t.prototype.writeScrollPosition=function(e,t){e.scrollTop=t},t}(hS),_S=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),yS=function(){function e(e,t,n,i,o,r){e|=0,t|=0,n|=0,i|=0,o|=0,r|=0,e<0&&(e=0),n+e>t&&(n=t-e),n<0&&(n=0),i<0&&(i=0),r+i>o&&(r=o-i),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=n,this.height=i,this.scrollHeight=o,this.scrollTop=r}return e.prototype.equals=function(e){return this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop},e.prototype.withScrollDimensions=function(t){return new e("undefined"!==typeof t.width?t.width:this.width,"undefined"!==typeof t.scrollWidth?t.scrollWidth:this.scrollWidth,this.scrollLeft,"undefined"!==typeof t.height?t.height:this.height,"undefined"!==typeof t.scrollHeight?t.scrollHeight:this.scrollHeight,this.scrollTop)},e.prototype.withScrollPosition=function(t){return new e(this.width,this.scrollWidth,"undefined"!==typeof t.scrollLeft?t.scrollLeft:this.scrollLeft,this.height,this.scrollHeight,"undefined"!==typeof t.scrollTop?t.scrollTop:this.scrollTop)},e.prototype.createScrollEvent=function(e){var t=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:t,scrollWidthChanged:n,scrollLeftChanged:i,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:s}},e}(),bS=function(e){function t(t,n){var i=e.call(this)||this;return i._onScroll=i._register(new qe),i.onScroll=i._onScroll.event,i._smoothScrollDuration=t,i._scheduleAtNextAnimationFrame=n,i._state=new yS(0,0,0,0,0,0),i._smoothScrolling=null,i}return _S(t,e),t.prototype.dispose=function(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),e.prototype.dispose.call(this)},t.prototype.setSmoothScrollDuration=function(e){this._smoothScrollDuration=e},t.prototype.validateScrollPosition=function(e){return this._state.withScrollPosition(e)},t.prototype.getScrollDimensions=function(){return this._state},t.prototype.setScrollDimensions=function(e){var t=this._state.withScrollDimensions(e);this._setState(t),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)},t.prototype.getFutureScrollPosition=function(){return this._smoothScrolling?this._smoothScrolling.to:this._state},t.prototype.getCurrentScrollPosition=function(){return this._state},t.prototype.setScrollPositionNow=function(e){var t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t)},t.prototype.setScrollPositionSmooth=function(e){var t=this;if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:"undefined"===typeof e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:"undefined"===typeof e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};var n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;var i=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=i}else{n=this._state.withScrollPosition(e);this._smoothScrolling=LS.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){t._smoothScrolling&&(t._smoothScrolling.animationFrameDisposable=null,t._performSmoothScrolling())}))},t.prototype._performSmoothScrolling=function(){var e=this;if(this._smoothScrolling){var t=this._smoothScrolling.tick(),n=this._state.withScrollPosition(t);if(this._setState(n),t.isDone)return this._smoothScrolling.dispose(),void(this._smoothScrolling=null);this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){e._smoothScrolling&&(e._smoothScrolling.animationFrameDisposable=null,e._performSmoothScrolling())}))}},t.prototype._setState=function(e){var t=this._state;t.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(t)))},t}(Me),CS=function(){function e(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}return e}();function wS(e,t){var n=t-e;return function(t){return e+n*DS(t)}}function SS(e,t,n){return function(i){return i<n?e(i/n):t((i-n)/(1-n))}}var LS=function(){function e(e,t,n,i){this.from=e,this.to=t,this.duration=i,this._startTime=n,this.animationFrameDisposable=null,this._initAnimations()}return e.prototype._initAnimations=function(){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)},e.prototype._initAnimation=function(e,t,n){var i=Math.abs(e-t);if(i>2.5*n){var o=void 0,r=void 0;return e<t?(o=e+.75*n,r=t-.75*n):(o=e-.75*n,r=t+.75*n),SS(wS(e,o),wS(r,t),.33)}return wS(e,t)},e.prototype.dispose=function(){null!==this.animationFrameDisposable&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)},e.prototype.acceptScrollDimensions=function(e){this.to=e.withScrollPosition(this.to),this._initAnimations()},e.prototype.tick=function(){return this._tick(Date.now())},e.prototype._tick=function(e){var t=(e-this._startTime)/this.duration;if(t<1){var n=this.scrollLeft(t),i=this.scrollTop(t);return new CS(n,i,!1)}return new CS(this.to.scrollLeft,this.to.scrollTop,!0)},e.prototype.combine=function(t,n,i){return e.start(t,n,i)},e.start=function(t,n,i){i+=10;var o=Date.now()-10;return new e(t,n,o,i)},e}();function NS(e){return Math.pow(e,3)}function DS(e){return 1-NS(1-e)}var ES=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xS=500,kS=50,OS=!0,TS=function(){function e(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}return e}(),MS=function(){function e(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}return e.prototype.isPhysicalMouseWheel=function(){if(-1===this._front&&-1===this._rear)return!1;var e=1,t=0,n=1,i=this._rear;do{var o=i===this._front?e:Math.pow(2,-n);if(e-=o,t+=this._memory[i].score*o,i===this._front)break;i=(this._capacity+i-1)%this._capacity,n++}while(1);return t<=.5},e.prototype.accept=function(e,t,n){var i=new TS(e,t,n);i.score=this._computeScore(i),-1===this._front&&-1===this._rear?(this._memory[0]=i,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i)},e.prototype._computeScore=function(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;var t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return(Math.abs(e.deltaX-Math.round(e.deltaX))>0||Math.abs(e.deltaY-Math.round(e.deltaY))>0)&&(t+=.25),Math.min(Math.max(t,0),1)},e.INSTANCE=new e,e}(),IS=function(e){function t(t,n,i){var o=e.call(this)||this;o._onScroll=o._register(new qe),o.onScroll=o._onScroll.event,t.style.overflow="hidden",o._options=FS(n),o._scrollable=i,o._register(o._scrollable.onScroll((function(e){o._onDidScroll(e),o._onScroll.fire(e)})));var r={onMouseWheel:function(e){return o._onMouseWheel(e)},onDragStart:function(){return o._onDragStart()},onDragEnd:function(){return o._onDragEnd()}};return o._verticalScrollbar=o._register(new vS(o._scrollable,o._options,r)),o._horizontalScrollbar=o._register(new gS(o._scrollable,o._options,r)),o._domNode=document.createElement("div"),o._domNode.className="monaco-scrollable-element "+o._options.className,o._domNode.setAttribute("role","presentation"),o._domNode.style.position="relative",o._domNode.style.overflow="hidden",o._domNode.appendChild(t),o._domNode.appendChild(o._horizontalScrollbar.domNode.domNode),o._domNode.appendChild(o._verticalScrollbar.domNode.domNode),o._options.useShadows?(o._leftShadowDomNode=wg(document.createElement("div")),o._leftShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._leftShadowDomNode.domNode),o._topShadowDomNode=wg(document.createElement("div")),o._topShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._topShadowDomNode.domNode),o._topLeftShadowDomNode=wg(document.createElement("div")),o._topLeftShadowDomNode.setClassName("shadow top-left-corner"),o._domNode.appendChild(o._topLeftShadowDomNode.domNode)):(o._leftShadowDomNode=null,o._topShadowDomNode=null,o._topLeftShadowDomNode=null),o._listenOnDomNode=o._options.listenOnDomNode||o._domNode,o._mouseWheelToDispose=[],o._setListeningToMouseWheel(o._options.handleMouseWheel),o.onmouseover(o._listenOnDomNode,(function(e){return o._onMouseOver(e)})),o.onnonbubblingmouseout(o._listenOnDomNode,(function(e){return o._onMouseOut(e)})),o._hideTimeout=o._register(new pi),o._isDragging=!1,o._mouseIsOver=!1,o._shouldRender=!0,o._revealOnScroll=!0,o}return ES(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=Ee(this._mouseWheelToDispose),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getOverviewRulerLayoutInfo=function(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._verticalScrollbar.delegateMouseDown(e)},t.prototype.getScrollDimensions=function(){return this._scrollable.getScrollDimensions()},t.prototype.setScrollDimensions=function(e){this._scrollable.setScrollDimensions(e)},t.prototype.updateClassName=function(e){this._options.className=e,s["e"]&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className},t.prototype.updateOptions=function(e){var t=FS(e);this._options.handleMouseWheel=t.handleMouseWheel,this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity,this._options.fastScrollSensitivity=t.fastScrollSensitivity,this._setListeningToMouseWheel(this._options.handleMouseWheel),this._options.lazyRender||this._render()},t.prototype._setListeningToMouseWheel=function(e){var t=this,n=this._mouseWheelToDispose.length>0;if(n!==e&&(this._mouseWheelToDispose=Ee(this._mouseWheelToDispose),e)){var i=function(e){t._onMouseWheel(new ai(e))};this._mouseWheelToDispose.push(io(this._listenOnDomNode,Rn?"mousewheel":"wheel",i,{passive:!1}))}},t.prototype._onMouseWheel=function(e){var t,n=MS.INSTANCE;if(OS&&n.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var i=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(t=[o,i],i=t[0],o=t[1]);var r=!s["e"]&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||o||(o=i,i=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,i*=this._options.fastScrollSensitivity);var a=this._scrollable.getFutureScrollPosition(),u={};if(i){var l=a.scrollTop-kS*i;this._verticalScrollbar.writeScrollPosition(u,l)}if(o){var c=a.scrollLeft-kS*o;this._horizontalScrollbar.writeScrollPosition(u,c)}if(u=this._scrollable.validateScrollPosition(u),a.scrollLeft!==u.scrollLeft||a.scrollTop!==u.scrollTop){var h=OS&&this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel();h?this._scrollable.setScrollPositionSmooth(u):this._scrollable.setScrollPositionNow(u),this._shouldRender=!0}}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())},t.prototype._onDidScroll=function(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()},t.prototype.renderNow=function(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()},t.prototype._render=function(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){var e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(n?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(n?" left":""))}},t.prototype._onDragStart=function(){this._isDragging=!0,this._reveal()},t.prototype._onDragEnd=function(){this._isDragging=!1,this._hide()},t.prototype._onMouseOut=function(e){this._mouseIsOver=!1,this._hide()},t.prototype._onMouseOver=function(e){this._mouseIsOver=!0,this._reveal()},t.prototype._reveal=function(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()},t.prototype._hide=function(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())},t.prototype._scheduleHide=function(){var e=this;this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((function(){return e._hide()}),xS)},t}(iS),AS=function(e){function t(t,n){var i=this;n=n||{},n.mouseWheelSmoothScroll=!1;var o=new bS(0,(function(e){return co(e)}));return i=e.call(this,t,n,o)||this,i._register(o),i}return ES(t,e),t.prototype.setScrollPosition=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.getScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t}(IS),PS=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return ES(t,e),t}(IS),RS=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._element=t,i.onScroll((function(e){e.scrollTopChanged&&(i._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(i._element.scrollLeft=e.scrollLeft)})),i.scanDomNode(),i}return ES(t,e),t.prototype.scanDomNode=function(){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})},t}(AS);function FS(e){var t={lazyRender:"undefined"!==typeof e.lazyRender&&e.lazyRender,className:"undefined"!==typeof e.className?e.className:"",useShadows:"undefined"===typeof e.useShadows||e.useShadows,handleMouseWheel:"undefined"===typeof e.handleMouseWheel||e.handleMouseWheel,flipAxes:"undefined"!==typeof e.flipAxes&&e.flipAxes,alwaysConsumeMouseWheel:"undefined"!==typeof e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:"undefined"!==typeof e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:"undefined"!==typeof e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:"undefined"!==typeof e.fastScrollSensitivity?e.fastScrollSensitivity:5,mouseWheelSmoothScroll:"undefined"===typeof e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:"undefined"!==typeof e.arrowSize?e.arrowSize:11,listenOnDomNode:"undefined"!==typeof e.listenOnDomNode?e.listenOnDomNode:null,horizontal:"undefined"!==typeof e.horizontal?e.horizontal:1,horizontalScrollbarSize:"undefined"!==typeof e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:"undefined"!==typeof e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:"undefined"!==typeof e.horizontalHasArrows&&e.horizontalHasArrows,vertical:"undefined"!==typeof e.vertical?e.vertical:1,verticalScrollbarSize:"undefined"!==typeof e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:"undefined"!==typeof e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:"undefined"!==typeof e.verticalSliderSize?e.verticalSliderSize:0};return t.horizontalSliderSize="undefined"!==typeof e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize="undefined"!==typeof e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,s["e"]&&(t.className+=" mac"),t}var WS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),VS=function(e){function t(t,n,i,o){var r=e.call(this,t)||this,s=r._context.configuration.options,a=s.get(78),u=s.get(56),l=s.get(27),c={listenOnDomNode:i.domNode,className:"editor-scrollable "+rm(t.theme.type),useShadows:!1,lazyRender:!0,vertical:a.vertical,horizontal:a.horizontal,verticalHasArrows:a.verticalHasArrows,horizontalHasArrows:a.horizontalHasArrows,verticalScrollbarSize:a.verticalScrollbarSize,verticalSliderSize:a.verticalSliderSize,horizontalScrollbarSize:a.horizontalScrollbarSize,horizontalSliderSize:a.horizontalSliderSize,handleMouseWheel:a.handleMouseWheel,alwaysConsumeMouseWheel:a.alwaysConsumeMouseWheel,arrowSize:a.arrowSize,mouseWheelScrollSensitivity:u,fastScrollSensitivity:l};r.scrollbar=r._register(new PS(n.domNode,c,r._context.viewLayout.getScrollable())),Kg.write(r.scrollbar.getDomNode(),5),r.scrollbarDomNode=wg(r.scrollbar.getDomNode()),r.scrollbarDomNode.setPosition("absolute"),r._setLayout();var h=function(e,t,n){var i={};if(t){var o=e.scrollTop;o&&(i.scrollTop=r._context.viewLayout.getCurrentScrollTop()+o,e.scrollTop=0)}if(n){var s=e.scrollLeft;s&&(i.scrollLeft=r._context.viewLayout.getCurrentScrollLeft()+s,e.scrollLeft=0)}r._context.viewLayout.setScrollPositionNow(i)};return r._register(io(i.domNode,"scroll",(function(e){return h(i.domNode,!0,!0)}))),r._register(io(n.domNode,"scroll",(function(e){return h(n.domNode,!0,!1)}))),r._register(io(o.domNode,"scroll",(function(e){return h(o.domNode,!0,!1)}))),r._register(io(r.scrollbarDomNode.domNode,"scroll",(function(e){return h(r.scrollbarDomNode.domNode,!0,!1)}))),r}return WS(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._setLayout=function(){var e=this._context.configuration.options,t=e.get(107);this.scrollbarDomNode.setLeft(t.contentLeft);var n=e.get(54),i=n.side;"right"===i?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)},t.prototype.getOverviewRulerLayoutInfo=function(){return this.scrollbar.getOverviewRulerLayoutInfo()},t.prototype.getDomNode=function(){return this.scrollbarDomNode},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)},t.prototype.onConfigurationChanged=function(e){if(e.hasChanged(78)||e.hasChanged(56)||e.hasChanged(27)){var t=this._context.configuration.options,n=t.get(78),i=t.get(56),o=t.get(27),r={handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:o};this.scrollbar.updateOptions(r)}return e.hasChanged(107)&&this._setLayout(),!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onThemeChanged=function(e){return this.scrollbar.updateClassName("editor-scrollable "+rm(this._context.theme.type)),!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this.scrollbar.renderNow()},t}(Ug),BS=(n("8478"),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),HS=function(){function e(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)}return e}(),zS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return BS(t,e),t.prototype._render=function(e,t,n){for(var i=[],o=e;o<=t;o++){var r=o-e;i[r]=[]}if(0===n.length)return i;n.sort((function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className<t.className?-1:1}));for(var s=null,a=0,u=0,l=n.length;u<l;u++){var c=n[u],h=c.className,d=Math.max(c.startLineNumber,e)-e,f=Math.min(c.endLineNumber,t)-e;s===h?(d=Math.max(a+1,d),a=Math.max(a,f)):(s=h,a=f);for(var p=d;p<=a;p++)i[p].push(s)}return i},t}(Py),jS=function(e){function t(t){var n=e.call(this)||this;n._context=t;var i=n._context.configuration.options,o=i.get(107);return n._lineHeight=i.get(49),n._glyphMargin=i.get(40),n._glyphMarginLeft=o.glyphMarginLeft,n._glyphMarginWidth=o.glyphMarginWidth,n._renderResult=null,n._context.addEventHandler(n),n}return BS(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._lineHeight=t.get(49),this._glyphMargin=t.get(40),this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;o<r;o++){var s=t[o],a=s.options.glyphMarginClassName;a&&(n[i++]=new HS(s.range.startLineNumber,s.range.endLineNumber,a))}return n},t.prototype.prepareRender=function(e){if(this._glyphMargin){for(var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._render(t,n,this._getDecorations(e)),o=this._lineHeight.toString(),r=this._glyphMarginLeft.toString(),s=this._glyphMarginWidth.toString(),a='" style="left:'+r+"px;width:"+s+"px;height:"+o+'px;"></div>',u=[],l=t;l<=n;l++){var c=l-t,h=i[c];0===h.length?u[c]="":u[c]='<div class="cgmr codicon '+h.join(" ")+a}this._renderResult=u}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(zS),US=(n("0baa"),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),KS=function(e){function t(t){var n=e.call(this)||this;n._context=t,n._primaryLineNumber=0;var i=n._context.configuration.options,o=i.get(108),r=i.get(34);return n._lineHeight=i.get(49),n._spaceWidth=r.spaceWidth,n._enabled=i.get(70),n._activeIndentEnabled=i.get(43),n._maxIndentLeft=-1===o.wrappingColumn?-1:o.wrappingColumn*r.typicalHalfwidthCharacterWidth,n._renderResult=null,n._context.addEventHandler(n),n}return US(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(108),i=t.get(34);return this._lineHeight=t.get(49),this._spaceWidth=i.spaceWidth,this._enabled=t.get(70),this._activeIndentEnabled=t.get(43),this._maxIndentLeft=-1===n.wrappingColumn?-1:n.wrappingColumn*i.typicalHalfwidthCharacterWidth,!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0],n=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==n&&(this._primaryLineNumber=n,!0)},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.onLanguageConfigurationChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(this._enabled){var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._context.model.getOptions().indentSize,o=i*this._spaceWidth,r=e.scrollWidth,s=this._lineHeight,a=this._context.model.getLinesIndentGuides(t,n),u=0,l=0,c=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var h=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,n);u=h.startLineNumber,l=h.endLineNumber,c=h.indent}for(var d=[],f=t;f<=n;f++){var p=u<=f&&f<=l,g=f-t,m=a[g],v="";if(m>=1)for(var _=e.visibleRangeForPosition(new fn(f,1)),y=_?_.left:0,b=1;b<=m;b++){var C=p&&b===c?"cigra":"cigr";if(v+='<div class="'+C+'" style="left:'+y+"px;height:"+s+"px;width:"+o+'px"></div>',y+=o,y>r||this._maxIndentLeft>0&&y>this._maxIndentLeft)break}d[g]=v}this._renderResult=d}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(Py);lm((function(e,t){var n=e.getColor(cC);n&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 "+n+" inset; }");var i=e.getColor(hC)||n;i&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 "+i+" inset; }")}));n("38a2");var qS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),GS=function(){function e(){this._currentVisibleRange=new pn(1,1,1,1)}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange},e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e},e}(),YS=function(){function e(e,t,n,i,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=n,this.startScrollTop=i,this.stopScrollTop=o,this.scrollType=r}return e}(),ZS=function(e){function t(t,n){var i=e.call(this,t)||this;i._linesContent=n,i._textRangeRestingSpot=document.createElement("div"),i._visibleLines=new Ww(i),i.domNode=i._visibleLines.domNode;var o=i._context.configuration,r=i._context.configuration.options,s=r.get(34),a=r.get(108);return i._lineHeight=r.get(49),i._typicalHalfwidthCharacterWidth=s.typicalHalfwidthCharacterWidth,i._isViewportWrapping=a.isViewportWrapping,i._revealHorizontalRightPadding=r.get(75),i._cursorSurroundingLines=r.get(19),i._cursorSurroundingLinesStyle=r.get(20),i._canUseLayerHinting=!r.get(22),i._viewLineOptions=new pm(o,i._context.theme.type),Kg.write(i.domNode,7),i.domNode.setClassName("view-lines"),Zp.applyFontInfo(i.domNode,s),i._maxLineWidth=0,i._asyncUpdateLineWidths=new mi((function(){i._updateLineWidthsSlow()}),200),i._lastRenderedData=new GS,i._horizontalRevealRequest=null,i}return qS(t,e),t.prototype.dispose=function(){this._asyncUpdateLineWidths.dispose(),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this.domNode},t.prototype.createVisibleLine=function(){return new gm(this._viewLineOptions)},t.prototype.onConfigurationChanged=function(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(108)&&(this._maxLineWidth=0);var t=this._context.configuration.options,n=t.get(34),i=t.get(108);return this._lineHeight=t.get(49),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=i.isViewportWrapping,this._revealHorizontalRightPadding=t.get(75),this._cursorSurroundingLines=t.get(19),this._cursorSurroundingLinesStyle=t.get(20),this._canUseLayerHinting=!t.get(22),Zp.applyFontInfo(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(107)&&(this._maxLineWidth=0),!0},t.prototype._onOptionsMaybeChanged=function(){var e=this._context.configuration,t=new pm(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;for(var n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),o=n;o<=i;o++){var r=this._visibleLines.getVisibleLine(o);r.onOptionsChanged(this._viewLineOptions)}return!0}return!1},t.prototype.onCursorStateChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=!1,o=t;o<=n;o++)i=this._visibleLines.getVisibleLine(o).onSelectionChanged()||i;return i},t.prototype.onDecorationsChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged();return!0},t.prototype.onFlushed=function(e){var t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t},t.prototype.onLinesChanged=function(e){return this._visibleLines.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._visibleLines.onLinesDeleted(e)},t.prototype.onLinesInserted=function(e){return this._visibleLines.onLinesInserted(e)},t.prototype.onRevealRangeRequest=function(e){var t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.range,e.verticalType),n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:this._horizontalRevealRequest=new YS(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):this._horizontalRevealRequest=null;var i=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop);return 0===e.scrollType&&i>this._lineHeight?this._context.viewLayout.setScrollPositionSmooth(n):this._context.viewLayout.setScrollPositionNow(n),!0},t.prototype.onScrollChanged=function(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){var t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<t||e.scrollTop>n)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0},t.prototype.onTokensChanged=function(e){return this._visibleLines.onTokensChanged(e)},t.prototype.onZonesChanged=function(e){return this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth),this._visibleLines.onZonesChanged(e)},t.prototype.onThemeChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.getPositionFromDOMInfo=function(e,t){var n=this._getViewLineDomNode(e);if(null===n)return null;var i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new fn(i,1);var o=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(i<o||i>r)return null;var s=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t),a=this._context.model.getLineMinColumn(i);return s<a&&(s=a),new fn(i,s)},t.prototype._getViewLineDomNode=function(e){while(e&&1===e.nodeType){if(e.className===gm.CLASS_NAME)return e;e=e.parentElement}return null},t.prototype._getLineNumberFor=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++){var o=this._visibleLines.getVisibleLine(i);if(e===o.getDomNode())return i}return-1},t.prototype.getLineWidth=function(e){var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();return e<t||e>n?-1:this._visibleLines.getVisibleLine(e).getWidth()},t.prototype.linesVisibleRangesForRange=function(e,t){if(this.shouldRender())return null;var n=e.endLineNumber,i=pn.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!i)return null;var o=[],r=0,s=new fm(this.domNode.domNode,this._textRangeRestingSpot),a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new fn(i.startLineNumber,1)).lineNumber);for(var u=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber(),c=i.startLineNumber;c<=i.endLineNumber;c++)if(!(c<u||c>l)){var h=c===i.startLineNumber?i.startColumn:1,d=c===i.endLineNumber?i.endColumn:this._context.model.getLineMaxColumn(c),f=this._visibleLines.getVisibleLine(c).getVisibleRangesForRange(h,d,s);if(f){if(t&&c<n){var p=a;a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new fn(c+1,1)).lineNumber,p!==a&&(f.ranges[f.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}o[r++]=new Zg(f.outsideRenderedLine,c,f.ranges)}}return 0===r?null:o},t.prototype._visibleRangesForLineRange=function(e,t,n){return this.shouldRender()?null:e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t,n,new fm(this.domNode.domNode,this._textRangeRestingSpot))},t.prototype.visibleRangeForPosition=function(e){var t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new $g(t.outsideRenderedLine,t.ranges[0].left):null},t.prototype.updateLineWidths=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidthsFast=function(){return this._updateLineWidths(!0)},t.prototype._updateLineWidthsSlow=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidths=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=1,o=!0,r=t;r<=n;r++){var s=this._visibleLines.getVisibleLine(r);!e||s.getWidthIsFast()?i=Math.max(i,s.getWidth()):o=!1}return o&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),o},t.prototype.prepareRender=function(){throw new Error("Not supported")},t.prototype.render=function(){throw new Error("Not supported")},t.prototype.renderText=function(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){var t=this._horizontalRevealRequest.lineNumber,n=this._horizontalRevealRequest.startColumn,i=this._horizontalRevealRequest.endColumn,o=this._horizontalRevealRequest.scrollType;if(e.startLineNumber<=t&&t<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var r=this._computeScrollLeftToRevealRange(t,n,i),s=this._isViewportWrapping;s||this._ensureMaxLineWidth(r.maxHorizontalOffset),0===o?this._context.viewLayout.setScrollPositionSmooth({scrollLeft:r.scrollLeft}):this._context.viewLayout.setScrollPositionNow({scrollLeft:r.scrollLeft})}}this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");var a=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-a),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())},t.prototype._ensureMaxLineWidth=function(e){var t=Math.ceil(e);this._maxLineWidth<t&&(this._maxLineWidth=t,this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth))},t.prototype._computeScrollTopToRevealRange=function(e,t,n,i){var o,r,s=e.top,a=e.height,u=s+a;o=this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber),r=this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber)+this._lineHeight;var l,c="mouse"===t&&"default"===this._cursorSurroundingLinesStyle;if(!c){var h=Math.min(a/this._lineHeight/2,this._cursorSurroundingLines);o-=h*this._lineHeight,r+=Math.max(0,h-1)*this._lineHeight}if(0!==i&&4!==i||(r+=this._lineHeight),r-o>a)l=o;else if(1===i||2===i)if(2===i&&s<=o&&r<=u)l=s;else{var d=(o+r)/2;l=Math.max(0,d-a/2)}else l=this._computeMinimumScrolling(s,u,o,r,3===i,4===i);return l},t.prototype._computeScrollLeftToRevealRange=function(e,n,i){var o=0,r=this._context.viewLayout.getCurrentViewport(),s=r.left,a=s+r.width,u=this._visibleRangesForLineRange(e,n,i),l=1073741824,c=0;if(!u)return{scrollLeft:s,maxHorizontalOffset:o};for(var h=0,d=u.ranges;h<d.length;h++){var f=d[h];f.left<l&&(l=f.left),f.left+f.width>c&&(c=f.left+f.width)}o=c,l=Math.max(0,l-t.HORIZONTAL_EXTRA_PX),c+=this._revealHorizontalRightPadding;var p=this._computeMinimumScrolling(s,a,l,c);return{scrollLeft:p,maxHorizontalOffset:o}},t.prototype._computeMinimumScrolling=function(e,t,n,i,o,r){e|=0,t|=0,n|=0,i|=0,o=!!o,r=!!r;var s=t-e,a=i-n;return a<s?o?n:r?Math.max(0,i-s):n<e?n:i>t?Math.max(0,i-s):e:n},t.HORIZONTAL_EXTRA_PX=30,t}(Ug),XS=(n("27e6"),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),$S=function(e){function t(t){var n=e.call(this)||this;n._context=t;var i=n._context.configuration.options,o=i.get(107);return n._decorationsLeft=o.decorationsLeft,n._decorationsWidth=o.decorationsWidth,n._renderResult=null,n._context.addEventHandler(n),n}return XS(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;o<r;o++){var s=t[o],a=s.options.linesDecorationsClassName;a&&(n[i++]=new HS(s.range.startLineNumber,s.range.endLineNumber,a))}return n},t.prototype.prepareRender=function(e){for(var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._render(t,n,this._getDecorations(e)),o=this._decorationsLeft.toString(),r=this._decorationsWidth.toString(),s='" style="left:'+o+"px;width:"+r+'px;"></div>',a=[],u=t;u<=n;u++){for(var l=u-t,c=i[l],h="",d=0,f=c.length;d<f;d++)h+='<div class="cldr '+c[d]+s;a[l]=h}this._renderResult=a},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(zS),QS=(n("5d70"),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),JS=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._renderResult=null,n._context.addEventHandler(n),n}return QS(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;o<r;o++){var s=t[o],a=s.options.marginClassName;a&&(n[i++]=new HS(s.range.startLineNumber,s.range.endLineNumber,a))}return n},t.prototype.prepareRender=function(e){for(var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._render(t,n,this._getDecorations(e)),o=[],r=t;r<=n;r++){for(var s=r-t,a=i[s],u="",l=0,c=a.length;l<c;l++)u+='<div class="cmdr '+a[l]+'" style=""></div>';o[s]=u}this._renderResult=o},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(zS),eL=(n("f20b"),function(){function e(t,n,i,o){this.r=e._clamp(t),this.g=e._clamp(n),this.b=e._clamp(i),this.a=e._clamp(o)}return e._clamp=function(e){return e<0?0:e>255?255:0|e},e.Empty=new e(0,0,0,0),e}()),tL=function(){function e(){var e=this;this._onDidChange=new qe,this.onDidChange=this._onDidChange.event,this._updateColorMap(),il.onDidChange((function(t){t.changedColorMap&&e._updateColorMap()}))}return e.getInstance=function(){return this._INSTANCE||(this._INSTANCE=new e),this._INSTANCE},e.prototype._updateColorMap=function(){var e=il.getColorMap();if(!e)return this._colors=[eL.Empty],void(this._backgroundIsLight=!0);this._colors=[eL.Empty];for(var t=1;t<e.length;t++){var n=e[t].rgba;this._colors[t]=new eL(n.r,n.g,n.b,Math.round(255*n.a))}var i=e[2].getRelativeLuminance();this._backgroundIsLight=i>=.5,this._onDidChange.fire(void 0)},e.prototype.getColor=function(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]},e.prototype.backgroundIsLight=function(){return this._backgroundIsLight},e._INSTANCE=null,e}(),nL=function(){for(var e=[],t=32;t<=126;t++)e.push(t);return e.push(65533),e}(),iL=function(e,t){return e-=32,e<0||e>96?t<=2?(e+96)%96:95:e},oL=function(){function e(t,n){this.scale=n,this.charDataNormal=e.soften(t,.8),this.charDataLight=e.soften(t,50/60)}return e.soften=function(e,t){for(var n=new Uint8ClampedArray(e.length),i=0,o=e.length;i<o;i++)n[i]=e[i]*t;return n},e.prototype.renderChar=function(e,t,n,i,o,r,s,a){var u=1*this.scale,l=2*this.scale;if(t+u>e.width||n+l>e.height)console.warn("bad render request outside image data");else for(var c=a?this.charDataLight:this.charDataNormal,h=iL(i,s),d=4*e.width,f=r.r,p=r.g,g=r.b,m=o.r-f,v=o.g-p,_=o.b-g,y=e.data,b=h*u*l,C=n*d+4*t,w=0;w<l;w++){for(var S=C,L=0;L<u;L++){var N=c[b++]/255;y[S++]=f+m*N,y[S++]=p+v*N,y[S++]=g+_*N,S++}C+=d}},e.prototype.blockRenderChar=function(e,t,n,i,o,r){var s=1*this.scale,a=2*this.scale;if(t+s>e.width||n+a>e.height)console.warn("bad render request outside image data");else for(var u=4*e.width,l=.5,c=o.r,h=o.g,d=o.b,f=i.r-c,p=i.g-h,g=i.b-d,m=c+f*l,v=h+p*l,_=d+g*l,y=e.data,b=n*u+4*t,C=0;C<a;C++){for(var w=b,S=0;S<s;S++)y[w++]=m,y[w++]=v,y[w++]=_,w++;b+=u}},e}(),rL={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},sL=function(e){for(var t=new Uint8ClampedArray(e.length/2),n=0;n<e.length;n+=2)t[n>>1]=rL[e[n]]<<4|15&rL[e[n+1]];return t},aL={1:we((function(){return sL("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")})),2:we((function(){return sL("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")}))},uL=function(){function e(){}return e.create=function(t,n){return this.lastCreated&&t===this.lastCreated.scale&&n===this.lastFontFamily?this.lastCreated:(i=aL[t]?new oL(aL[t](),t):e.createFromSampleData(e.createSampleData(n).data,t),this.lastFontFamily=n,this.lastCreated=i,i);var i},e.createSampleData=function(e){var t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",n.fillStyle="#ffffff",n.font="bold 16px "+e,n.textBaseline="middle";for(var i=0,o=0,r=nL;o<r.length;o++){var s=r[o];n.fillText(String.fromCharCode(s),i,8),i+=10}return n.getImageData(0,0,960,16)},e.createFromSampleData=function(t,n){var i=61440;if(t.length!==i)throw new Error("Unexpected source in MinimapCharRenderer");var o=e._downsample(t,n);return new oL(o,n)},e._downsampleChar=function(e,t,n,i,o){for(var r=1*o,s=2*o,a=i,u=0,l=0;l<s;l++)for(var c=l/s*16,h=(l+1)/s*16,d=0;d<r;d++){for(var f=d/r*10,p=(d+1)/r*10,g=0,m=0,v=c;v<h;v++)for(var _=t+3840*Math.floor(v),y=1-(v-Math.floor(v)),b=f;b<p;b++){var C=1-(b-Math.floor(b)),w=_+4*Math.floor(b),S=C*y;m+=S,g+=e[w]*e[w+3]/255*S}var L=g/m;u=Math.max(u,L),n[a++]=L}return u},e._downsample=function(e,t){for(var n=2*t*1*t,i=96*n,o=new Uint8ClampedArray(i),r=0,s=0,a=0,u=0;u<96;u++)a=Math.max(a,this._downsampleChar(e,s,o,r,t)),r+=n,s+=40;if(a>0)for(var l=255/a,c=0;c<i;c++)o[c]*=l;return o},e}(),lL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function cL(e,t){return 1===e?2*t:3*t}function hL(e,t){return 1*t}var dL=140,fL=2,pL=function(){function e(e){var t=this,n=e.options,i=n.get(105),o=n.get(107),r=n.get(34);this.renderMinimap=0|o.renderMinimap,this.scrollBeyondLastLine=n.get(80);var s=n.get(54);this.showSlider=s.showSlider,this.fontScale=Math.round(s.scale*i),this.charRenderer=we((function(){return uL.create(t.fontScale,r.fontFamily)})),this.pixelRatio=i,this.typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(49),this.minimapLeft=o.minimapLeft,this.minimapWidth=o.minimapWidth,this.minimapHeight=o.height,this.canvasInnerWidth=Math.floor(i*this.minimapWidth),this.canvasInnerHeight=Math.floor(i*this.minimapHeight),this.canvasOuterWidth=this.canvasInnerWidth/i,this.canvasOuterHeight=this.canvasInnerHeight/i}return e.prototype.equals=function(e){return this.renderMinimap===e.renderMinimap&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.fontScale===e.fontScale&&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},e}(),gL=function(){function e(e,t,n,i,o,r,s){this.scrollTop=e,this.scrollHeight=t,this._computedSliderRatio=n,this.sliderTop=i,this.sliderHeight=o,this.startLineNumber=r,this.endLineNumber=s}return e.prototype.getDesiredScrollTopFromDelta=function(e){var t=this.sliderTop+e;return Math.round(t/this._computedSliderRatio)},e.prototype.getDesiredScrollTopFromTouchLocation=function(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)},e.create=function(t,n,i,o,r,s,a,u,l){var c,h,d=t.pixelRatio,f=cL(t.renderMinimap,t.fontScale),p=Math.floor(t.canvasInnerHeight/f),g=t.lineHeight;if(r&&i!==s){var m=i-n+1;c=Math.floor(m*f/d)}else{var v=o/g;c=Math.floor(v*f/d)}h=t.scrollBeyondLastLine?(s-1)*f/d:Math.max(0,s*f/d-c),h=Math.min(t.minimapHeight-c,h);var _=h/(u-o),y=a*_,b=0;if(t.scrollBeyondLastLine){v=o/g;b=v}if(p>=s+b){var C=1,w=s;return new e(a,u,_,y,c,C,w)}C=Math.max(1,Math.floor(n-y*d/f));l&&l.scrollHeight===u&&(l.scrollTop>a&&(C=Math.min(C,l.startLineNumber)),l.scrollTop<a&&(C=Math.max(C,l.startLineNumber)));w=Math.min(s,C+p-1);return new e(a,u,_,y,c,C,w)},e}(),mL=function(){function e(e){this.dy=e}return e.prototype.onContentChanged=function(){this.dy=-1},e.prototype.onTokensChanged=function(){this.dy=-1},e.INVALID=new e(-1),e}(),vL=function(){function e(e,t,n){this.renderedLayout=e,this._imageData=t,this._renderedLines=new Fw((function(){return mL.INVALID})),this._renderedLines._set(e.startLineNumber,n)}return e.prototype.linesEquals=function(e){if(!this.scrollEquals(e))return!1;for(var t=this._renderedLines._get(),n=t.lines,i=0,o=n.length;i<o;i++)if(-1===n[i].dy)return!1;return!0},e.prototype.scrollEquals=function(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber},e.prototype._get=function(){var e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}},e.prototype.onLinesChanged=function(e){return this._renderedLines.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){this._renderedLines.onLinesDeleted(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesInserted=function(e){this._renderedLines.onLinesInserted(e.fromLineNumber,e.toLineNumber)},e.prototype.onTokensChanged=function(e){return this._renderedLines.onTokensChanged(e.ranges)},e}(),_L=function(){function e(t,n,i,o){this._backgroundFillData=e._createBackgroundFillData(n,i,o),this._buffers=[t.createImageData(n,i),t.createImageData(n,i)],this._lastUsedBuffer=0}return e.prototype.getBuffer=function(){this._lastUsedBuffer=1-this._lastUsedBuffer;var e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e},e._createBackgroundFillData=function(e,t,n){for(var i=n.r,o=n.g,r=n.b,s=new Uint8ClampedArray(e*t*4),a=0,u=0;u<t;u++)for(var l=0;l<e;l++)s[a]=i,s[a+1]=o,s[a+2]=r,s[a+3]=255,a+=4;return s},e}(),yL=function(e){function t(t){var n=e.call(this,t)||this;return n._selections=[],n._renderDecorations=!1,n._gestureInProgress=!1,n._options=new pL(n._context.configuration),n._lastRenderData=null,n._buffers=null,n._selectionColor=n._context.theme.getColor(Ub),n._domNode=wg(document.createElement("div")),Kg.write(n._domNode,8),n._domNode.setClassName(n._getMinimapDomNodeClassName()),n._domNode.setPosition("absolute"),n._domNode.setAttribute("role","presentation"),n._domNode.setAttribute("aria-hidden","true"),n._shadow=wg(document.createElement("div")),n._shadow.setClassName("minimap-shadow-hidden"),n._domNode.appendChild(n._shadow),n._canvas=wg(document.createElement("canvas")),n._canvas.setPosition("absolute"),n._canvas.setLeft(0),n._domNode.appendChild(n._canvas),n._decorationsCanvas=wg(document.createElement("canvas")),n._decorationsCanvas.setPosition("absolute"),n._decorationsCanvas.setClassName("minimap-decorations-layer"),n._decorationsCanvas.setLeft(0),n._domNode.appendChild(n._decorationsCanvas),n._slider=wg(document.createElement("div")),n._slider.setPosition("absolute"),n._slider.setClassName("minimap-slider"),n._slider.setLayerHinting(!0),n._slider.setContain("strict"),n._domNode.appendChild(n._slider),n._sliderHorizontal=wg(document.createElement("div")),n._sliderHorizontal.setPosition("absolute"),n._sliderHorizontal.setClassName("minimap-slider-horizontal"),n._slider.appendChild(n._sliderHorizontal),n._tokensColorTracker=tL.getInstance(),n._applyLayout(),n._mouseDownListener=so(n._domNode.domNode,"mousedown",(function(e){e.preventDefault();var t=n._options.renderMinimap;if(0!==t&&n._lastRenderData){var i=cL(t,n._options.fontScale),o=n._options.pixelRatio*e.browserEvent.offsetY,r=Math.floor(o/i),s=r+n._lastRenderData.renderedLayout.startLineNumber;s=Math.min(s,n._context.model.getLineCount()),n._context.privateViewEventBus.emit(new VC("mouse",new pn(s,1,s,1),1,!1,0))}})),n._sliderMouseMoveMonitor=new Tg,n._sliderMouseDownListener=so(n._slider.domNode,"mousedown",(function(e){if(e.preventDefault(),e.stopPropagation(),e.leftButton&&n._lastRenderData){var t=e.posy,i=e.posx,o=n._lastRenderData.renderedLayout;n._slider.toggleClassName("active",!0),n._sliderMouseMoveMonitor.startMonitoring(e.target,e.buttons,Og,(function(e){var r=Math.abs(e.posx-i);if(s["h"]&&r>dL)n._context.viewLayout.setScrollPositionNow({scrollTop:o.scrollTop});else{var a=e.posy-t;n._context.viewLayout.setScrollPositionNow({scrollTop:o.getDesiredScrollTopFromDelta(a)})}}),(function(){n._slider.toggleClassName("active",!1)}))}})),n._gestureDisposable=kg.addTarget(n._domNode.domNode),n._sliderTouchStartListener=io(n._domNode.domNode,Dg.Start,(function(e){e.preventDefault(),e.stopPropagation(),n._lastRenderData&&(n._slider.toggleClassName("active",!0),n._gestureInProgress=!0,n.scrollDueToTouchEvent(e))})),n._sliderTouchMoveListener=so(n._domNode.domNode,Dg.Change,(function(e){e.preventDefault(),e.stopPropagation(),n._lastRenderData&&n._gestureInProgress&&n.scrollDueToTouchEvent(e)})),n._sliderTouchEndListener=so(n._domNode.domNode,Dg.End,(function(e){e.preventDefault(),e.stopPropagation(),n._gestureInProgress=!1,n._slider.toggleClassName("active",!1)})),n}return lL(t,e),t.prototype.scrollDueToTouchEvent=function(e){var t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._context.viewLayout.setScrollPositionNow({scrollTop:n})},t.prototype.dispose=function(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),e.prototype.dispose.call(this)},t.prototype._getMinimapDomNodeClassName=function(){return"always"===this._options.showSlider?"minimap slider-always":"minimap slider-mouseover"},t.prototype.getDomNode=function(){return this._domNode},t.prototype._applyLayout=function(){this._domNode.setLeft(this._options.minimapLeft),this._domNode.setWidth(this._options.minimapWidth),this._domNode.setHeight(this._options.minimapHeight),this._shadow.setHeight(this._options.minimapHeight),this._canvas.setWidth(this._options.canvasOuterWidth),this._canvas.setHeight(this._options.canvasOuterHeight),this._canvas.domNode.width=this._options.canvasInnerWidth,this._canvas.domNode.height=this._options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._options.canvasInnerHeight,this._slider.setWidth(this._options.minimapWidth)},t.prototype._getBuffer=function(){return this._buffers||this._options.canvasInnerWidth>0&&this._options.canvasInnerHeight>0&&(this._buffers=new _L(this._canvas.domNode.getContext("2d"),this._options.canvasInnerWidth,this._options.canvasInnerHeight,this._tokensColorTracker.getColor(2))),this._buffers?this._buffers.getBuffer():null},t.prototype._onOptionsMaybeChanged=function(){var e=new pL(this._context.configuration);return!this._options.equals(e)&&(this._options=e,this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName()),!0)},t.prototype.onConfigurationChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections,this._renderDecorations=!0,!0},t.prototype.onFlushed=function(e){return this._lastRenderData=null,!0},t.prototype.onLinesChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e),!0},t.prototype.onLinesInserted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e),!0},t.prototype.onScrollChanged=function(e){return this._renderDecorations=!0,!0},t.prototype.onTokensChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)},t.prototype.onTokensColorsChanged=function(e){return this._lastRenderData=null,this._buffers=null,!0},t.prototype.onZonesChanged=function(e){return this._lastRenderData=null,!0},t.prototype.onDecorationsChanged=function(e){return this._renderDecorations=!0,!0},t.prototype.onThemeChanged=function(e){return this._context.model.invalidateMinimapColorCache(),this._selectionColor=this._context.theme.getColor(Ub),this._renderDecorations=!0,!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){var t=this._options.renderMinimap;if(0===t)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");var n=gL.create(this._options,e.visibleRange.startLineNumber,e.visibleRange.endLineNumber,e.viewportHeight,e.viewportData.whitespaceViewportData.length>0,this._context.model.getLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setTop(n.sliderTop),this._slider.setHeight(n.sliderHeight);var i=e.scrollLeft/this._options.typicalHalfwidthCharacterWidth,o=Math.min(this._options.minimapWidth,Math.round(i*hL(this._options.renderMinimap,this._options.fontScale)/this._options.pixelRatio));this._sliderHorizontal.setLeft(o),this._sliderHorizontal.setWidth(this._options.minimapWidth-o),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(n.sliderHeight),this.renderDecorations(n),this._lastRenderData=this.renderLines(n)},t.prototype.renderDecorations=function(e){if(this._renderDecorations){this._renderDecorations=!1;var t=this._context.model.getDecorationsInViewport(new pn(e.startLineNumber,1,e.endLineNumber,this._context.model.getLineMaxColumn(e.endLineNumber))),n=this._options,i=n.renderMinimap,o=n.canvasInnerWidth,r=n.canvasInnerHeight,s=cL(i,this._options.fontScale),a=hL(i,this._options.fontScale),u=this._context.model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,o,r);for(var c=new Map,h=0;h<this._selections.length;h++)for(var d=this._selections[h],f=d.startLineNumber;f<=d.endLineNumber;f++)this.renderDecorationOnLine(l,c,d,this._selectionColor,e,f,s,s,u,a);for(h=0;h<t.length;h++){var p=t[h];if(p.options.minimap){var g=p.options.minimap.getColor(this._context.theme);for(f=p.range.startLineNumber;f<=p.range.endLineNumber;f++)switch(p.options.minimap.position){case Va.Inline:this.renderDecorationOnLine(l,c,p.range,g,e,f,s,s,u,a);continue;case Va.Gutter:var m=(f-e.startLineNumber)*s,v=2;this.renderDecoration(l,g,v,m,fL,s);continue}}}}},t.prototype.renderDecorationOnLine=function(e,t,n,i,o,r,s,a,u,l){var c=(r-o.startLineNumber)*a;if(!(c+s<0||c>this._options.canvasInnerHeight)){var h=t.get(r),d=!h;if(!h){var f=this._context.model.getLineContent(r);h=[m];for(var p=1;p<f.length+1;p++){var g=f.charCodeAt(p-1),v=9===g?u*l:Ur(g)?2*l:l;h[p]=h[p-1]+v}t.set(r,h)}var _=n.startColumn,y=n.endColumn,b=n.startLineNumber,C=n.endLineNumber,w=b===r?h[_-1]:m,S=C>r?h.length-1:y-1;if(S>0){var L=h[S]-w||2;this.renderDecoration(e,i,w,c,L,s)}d&&this.renderLineHighlight(e,i,c,s)}},t.prototype.renderLineHighlight=function(e,t,n,i){e.fillStyle=t&&t.transparent(.5).toString()||"",e.fillRect(m,n,e.canvas.width,i)},t.prototype.renderDecoration=function(e,t,n,i,o,r){e.fillStyle=t&&t.toString()||"",e.fillRect(n,i,o,r)},t.prototype.renderLines=function(e){var n=this._options.renderMinimap,i=this._options.charRenderer(),o=e.startLineNumber,r=e.endLineNumber,s=cL(n,this._options.fontScale);if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var a=this._lastRenderData._get();return new vL(e,a.imageData,a.lines)}var u=this._getBuffer();if(!u)return null;for(var l=t._renderUntouchedLines(u,o,r,s,this._lastRenderData),c=l[0],h=l[1],d=l[2],f=this._context.model.getMinimapLinesRenderingData(o,r,d),p=f.tabSize,g=this._tokensColorTracker.getColor(2),m=this._tokensColorTracker.backgroundIsLight(),v=0,_=[],y=0,b=r-o+1;y<b;y++)d[y]&&t._renderLine(u,g,m,n,this._tokensColorTracker,i,v,p,f.data[y],this._options.fontScale),_[y]=new mL(v),v+=s;var C=-1===c?0:c,w=-1===h?u.height:h,S=w-C,L=this._canvas.domNode.getContext("2d");return L.putImageData(u,0,0,0,C,u.width,S),new vL(e,u,_)},t._renderUntouchedLines=function(e,t,n,i,o){var r=[];if(!o){for(var s=0,a=n-t+1;s<a;s++)r[s]=!0;return[-1,-1,r]}for(var u=o._get(),l=u.imageData.data,c=u.rendLineNumberStart,h=u.lines,d=h.length,f=e.width,p=e.data,g=(n-t+1)*i*f*4,m=-1,v=-1,_=-1,y=-1,b=-1,C=-1,w=0,S=t;S<=n;S++){var L=S-t,N=S-c,D=N>=0&&N<d?h[N].dy:-1;if(-1!==D){var E=D*f*4,x=(D+i)*f*4,k=w*f*4,O=(w+i)*f*4;y===E&&C===k?(y=x,C=O):(-1!==_&&(p.set(l.subarray(_,y),b),-1===m&&0===_&&_===b&&(m=y),-1===v&&y===g&&_===b&&(v=_)),_=E,y=x,b=k,C=O),r[L]=!1,w+=i}else r[L]=!0,w+=i}-1!==_&&(p.set(l.subarray(_,y),b),-1===m&&0===_&&_===b&&(m=y),-1===v&&y===g&&_===b&&(v=_));var T=-1===m?-1:m/(4*f),M=-1===v?-1:v/(4*f);return[T,M,r]},t._renderLine=function(e,t,n,i,o,r,s,a,u,l){for(var c=u.content,h=u.tokens,d=hL(i,l),f=e.width-d,p=m,g=0,v=0,_=0,y=h.getCount();_<y;_++)for(var b=h.getEndOffset(_),C=h.getForeground(_),w=o.getColor(C);g<b;g++){if(p>f)return;var S=c.charCodeAt(g);if(9===S){var L=a-(g+v)%a;v+=L-1,p+=L*d}else if(32===S)p+=d;else for(var N=Ur(S)?2:1,D=0;D<N;D++)if(2===i?r.blockRenderChar(e,p,s,w,t,n):r.renderChar(e,p,s,S,w,t,l,n),p+=d,p>f)return}},t}(Ug);lm((function(e,t){var n=e.getColor(Yy);if(n){var i=n.transparent(.5);t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: "+i+"; }")}var o=e.getColor(Zy);if(o){var r=o.transparent(.5);t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: "+r+"; }")}var s=e.getColor(Xy);if(s){var a=s.transparent(.5);t.addRule(".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: "+a+"; }")}var u=e.getColor(Gy);u&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: "+u+" -6px 0 6px -6px inset; }")}));n("725e");var bL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),CL=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options,o=i.get(107);return n._widgets={},n._verticalScrollbarWidth=o.verticalScrollbarWidth,n._minimapWidth=o.minimapWidth,n._horizontalScrollbarHeight=o.horizontalScrollbarHeight,n._editorHeight=o.height,n._editorWidth=o.width,n._domNode=wg(document.createElement("div")),Kg.write(n._domNode,4),n._domNode.setClassName("overlayWidgets"),n}return bL(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets={}},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,!0},t.prototype.addWidget=function(e){var t=wg(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()},t.prototype.setWidgetPosition=function(e,t){var n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t],i=n.domNode.domNode;delete this._widgets[t],i.parentNode.removeChild(i),this.setShouldRender()}},t.prototype._renderWidget=function(e){var 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){var n=t.domNode.clientHeight;t.setTop(this._editorHeight-n-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()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),n=0,i=t.length;n<i;n++){var o=t[n];this._renderWidget(this._widgets[o])}},t}(Ug),wL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),SL=function(){function e(e,t){var n=e.options;this.lineHeight=n.get(49),this.pixelRatio=n.get(105),this.overviewRulerLanes=n.get(63),this.renderBorder=n.get(62);var i=t.getColor(mC);this.borderColor=i?i.toString():null,this.hideCursor=n.get(42);var o=t.getColor(aC);this.cursorColor=o?o.transparent(.7).toString():null,this.themeType=t.type;var r=n.get(54),s=r.enabled,a=r.side,u=s?il.getDefaultBackground():null;this.backgroundColor=null===u||"left"===a?null:S_.Format.CSS.formatHex(u);var l=n.get(107),c=l.overviewRuler;this.top=c.top,this.right=c.right,this.domWidth=c.width,this.domHeight=c.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);var h=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes),d=h[0],f=h[1];this.x=d,this.w=f}return e.prototype._initLanes=function(e,t,n){var i=t-e;if(n>=3){var o=Math.floor(i/3),r=Math.floor(i/3),s=i-o-r,a=e,u=a+o,l=a+o+s;return[[0,a,u,a,l,a,u,a],[0,o,s,o+s,r,o+s+r,s+r,o+s+r]]}if(2===n){o=Math.floor(i/2),r=i-o,a=e,l=a+o;return[[0,a,a,a,l,a,a,a],[0,o,o,o,r,o+r,o+r,o+r]]}var c=e,h=i;return[[0,c,c,c,c,c,c,c],[0,h,h,h,h,h,h,h]]},e.prototype.equals=function(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},e}(),LL=function(e){function t(t){var n=e.call(this,t)||this;return n._domNode=wg(document.createElement("canvas")),n._domNode.setClassName("decorationsOverviewRuler"),n._domNode.setPosition("absolute"),n._domNode.setLayerHinting(!0),n._domNode.setContain("strict"),n._domNode.setAttribute("aria-hidden","true"),n._updateSettings(!1),n._tokensColorTrackerListener=il.onDidChange((function(e){e.changedColorMap&&n._updateSettings(!0)})),n._cursorPositions=[],n}return wL(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._tokensColorTrackerListener.dispose()},t.prototype._updateSettings=function(e){var t=new SL(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)},t.prototype.onConfigurationChanged=function(e){return this._updateSettings(!1)},t.prototype.onCursorStateChanged=function(e){this._cursorPositions=[];for(var t=0,n=e.selections.length;t<n;t++)this._cursorPositions[t]=e.selections[t].getPosition();return this._cursorPositions.sort(fn.compare),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.onThemeChanged=function(e){return this._context.model.invalidateOverviewRulerColorCache(),this._updateSettings(!1)},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._render()},t.prototype._render=function(){if(0!==this._settings.overviewRulerLanes){var e=this._settings.canvasWidth,t=this._settings.canvasHeight,n=this._settings.lineHeight,i=this._context.viewLayout,o=this._context.viewLayout.getScrollHeight(),r=t/o,s=this._context.model.getAllOverviewRulerDecorations(this._context.theme),a=6*this._settings.pixelRatio|0,u=a/2|0,l=this._domNode.domNode.getContext("2d");null===this._settings.backgroundColor?l.clearRect(0,0,e,t):(l.fillStyle=this._settings.backgroundColor,l.fillRect(0,0,e,t));var c=this._settings.x,h=this._settings.w,d=Object.keys(s);d.sort();for(var f=0,p=d.length;f<p;f++){var g=d[f],m=s[g];l.fillStyle=g;for(var v=0,_=0,y=0,b=0,C=m.length;b<C;b++){var w=m[3*b],S=m[3*b+1],L=m[3*b+2],N=i.getVerticalOffsetForLineNumber(S)*r|0,D=(i.getVerticalOffsetForLineNumber(L)+n)*r|0,E=D-N;if(E<a){var x=(N+D)/2|0;x<u?x=u:x+u>t&&(x=t-u),N=x-u,D=x+u}N>y+1||w!==v?(0!==b&&l.fillRect(c[v],_,h[v],y-_),v=w,_=N,y=D):D>y&&(y=D)}l.fillRect(c[v],_,h[v],y-_)}if(!this._settings.hideCursor&&this._settings.cursorColor){var k=2*this._settings.pixelRatio|0,O=k/2|0,T=this._settings.x[7],M=this._settings.w[7];l.fillStyle=this._settings.cursorColor;for(_=-100,y=-100,b=0,C=this._cursorPositions.length;b<C;b++){var I=this._cursorPositions[b];x=i.getVerticalOffsetForLineNumber(I.lineNumber)*r|0;x<O?x=O:x+O>t&&(x=t-O);N=x-O,D=N+k;N>y+1?(0!==b&&l.fillRect(T,_,M,y-_),_=N,y=D):D>y&&(y=D)}l.fillRect(T,_,M,y-_)}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())}else this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"")},t}(Ug),NL=function(){function e(e,t,n){this.from=0|e,this.to=0|t,this.colorId=0|n}return e.compare=function(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId},e}(),DL=function(){function e(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.color=n,this._colorZone=null}return e.compare=function(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.color<t.color?-1:1},e.prototype.setColorZone=function(e){this._colorZone=e},e.prototype.getColorZones=function(){return this._colorZone},e}(),EL=function(){function e(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}return e.prototype.getId2Color=function(){return this._id2Color},e.prototype.setZones=function(e){this._zones=e,this._zones.sort(DL.compare)},e.prototype.setLineHeight=function(e){return this._lineHeight!==e&&(this._lineHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.setPixelRatio=function(e){this._pixelRatio=e,this._colorZonesInvalid=!0},e.prototype.getDOMWidth=function(){return this._domWidth},e.prototype.getCanvasWidth=function(){return this._domWidth*this._pixelRatio},e.prototype.setDOMWidth=function(e){return this._domWidth!==e&&(this._domWidth=e,this._colorZonesInvalid=!0,!0)},e.prototype.getDOMHeight=function(){return this._domHeight},e.prototype.getCanvasHeight=function(){return this._domHeight*this._pixelRatio},e.prototype.setDOMHeight=function(e){return this._domHeight!==e&&(this._domHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.getOuterHeight=function(){return this._outerHeight},e.prototype.setOuterHeight=function(e){return this._outerHeight!==e&&(this._outerHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.resolveColorZones=function(){for(var e=this._colorZonesInvalid,t=Math.floor(this._lineHeight),n=Math.floor(this.getCanvasHeight()),i=Math.floor(this._outerHeight),o=n/i,r=Math.floor(4*this._pixelRatio/2),s=[],a=0,u=this._zones.length;a<u;a++){var l=this._zones[a];if(!e){var c=l.getColorZones();if(c){s.push(c);continue}}var h=Math.floor(o*this._getVerticalOffsetForLine(l.startLineNumber)),d=Math.floor(o*(this._getVerticalOffsetForLine(l.endLineNumber)+t)),f=Math.floor((h+d)/2),p=d-f;p<r&&(p=r),f-p<0&&(f=p),f+p>n&&(f=n-p);var g=l.color,m=this._color2Id[g];m||(m=++this._lastAssignedId,this._color2Id[g]=m,this._id2Color[m]=g);var v=new NL(f-p,f+p,m);l.setColorZone(v),s.push(v)}return this._colorZonesInvalid=!1,s.sort(NL.compare),s},e}(),xL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),kL=function(e){function t(t,n){var i=e.call(this)||this;i._context=t;var o=i._context.configuration.options;return i._domNode=wg(document.createElement("canvas")),i._domNode.setClassName(n),i._domNode.setPosition("absolute"),i._domNode.setLayerHinting(!0),i._domNode.setContain("strict"),i._zoneManager=new EL((function(e){return i._context.viewLayout.getVerticalOffsetForLineNumber(e)})),i._zoneManager.setDOMWidth(0),i._zoneManager.setDOMHeight(0),i._zoneManager.setOuterHeight(i._context.viewLayout.getScrollHeight()),i._zoneManager.setLineHeight(o.get(49)),i._zoneManager.setPixelRatio(o.get(105)),i._context.addEventHandler(i),i}return xL(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;return e.hasChanged(49)&&(this._zoneManager.setLineHeight(t.get(49)),this._render()),e.hasChanged(105)&&(this._zoneManager.setPixelRatio(t.get(105)),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},t.prototype.onFlushed=function(e){return this._render(),!0},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0},t.prototype.onZonesChanged=function(e){return this._render(),!0},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.setLayout=function(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);var 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())},t.prototype.setZones=function(e){this._zoneManager.setZones(e),this._render()},t.prototype._render=function(){if(0===this._zoneManager.getOuterHeight())return!1;var e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(o,n,i,e),!0},t.prototype._renderOneLane=function(e,t,n,i){for(var o=0,r=0,s=0,a=0,u=t;a<u.length;a++){var l=u[a],c=l.colorId,h=l.from,d=l.to;c!==o?(e.fillRect(0,r,i,s-r),o=c,e.fillStyle=n[o],r=h,s=d):s>=h?s=Math.max(s,d):(e.fillRect(0,r,i,s-r),r=h,s=d)}e.fillRect(0,r,i,s-r)},t}(zg),OL=(n("ef37"),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),TL=function(e){function t(t){var n=e.call(this,t)||this;n.domNode=wg(document.createElement("div")),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n.domNode.setClassName("view-rulers"),n._renderedRulers=[];var i=n._context.configuration.options;return n._rulers=i.get(77),n._typicalHalfwidthCharacterWidth=i.get(34).typicalHalfwidthCharacterWidth,n}return OL(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;return this._rulers=t.get(77),this._typicalHalfwidthCharacterWidth=t.get(34).typicalHalfwidthCharacterWidth,!0},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged},t.prototype.prepareRender=function(e){},t.prototype._ensureRulersCount=function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e<t){var n=this._context.model.getOptions().tabSize,i=n,o=t-e;while(o>0){var r=wg(document.createElement("div"));r.setClassName("view-ruler"),r.setWidth(i),this.domNode.appendChild(r),this._renderedRulers.push(r),o--}}else{var s=e-t;while(s>0){r=this._renderedRulers.pop();this.domNode.removeChild(r),s--}}},t.prototype.render=function(e){this._ensureRulersCount();for(var t=0,n=this._rulers.length;t<n;t++){var i=this._renderedRulers[t];i.setHeight(Math.min(e.scrollHeight,1e6)),i.setLeft(this._rulers[t]*this._typicalHalfwidthCharacterWidth)}},t}(Ug);lm((function(e,t){var n=e.getColor(gC);n&&t.addRule(".monaco-editor .view-ruler { box-shadow: 1px 0 0 0 "+n+" inset; }")}));n("d8c3");var ML=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),IL=function(e){function t(t){var n=e.call(this,t)||this;n._scrollTop=0,n._width=0,n._updateWidth(),n._shouldShow=!1;var i=n._context.configuration.options,o=i.get(78);return n._useShadows=o.useShadows,n._domNode=wg(document.createElement("div")),n._domNode.setAttribute("role","presentation"),n._domNode.setAttribute("aria-hidden","true"),n}return ML(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._updateShouldShow=function(){var e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)},t.prototype.getDomNode=function(){return this._domNode},t.prototype._updateWidth=function(){var e=this._context.configuration.options,t=e.get(107);0===t.renderMinimap||t.minimapWidth>0&&0===t.minimapLeft?this._width=t.width:this._width=t.width-t.minimapWidth-t.verticalScrollbarWidth},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(78);return this._useShadows=n.useShadows,this._updateWidth(),this._updateShouldShow(),!0},t.prototype.onScrollChanged=function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")},t}(Ug);lm((function(e,t){var n=e.getColor(Gy);n&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: "+n+" 0 6px 6px -6px inset; }")}));n("782d");var AL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),PL=function(){function e(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}return e}(),RL=function(){function e(e,t){this.lineNumber=e,this.ranges=t}return e}();function FL(e){return new PL(e)}function WL(e){return new RL(e.lineNumber,e.ranges.map(FL))}var VL=Rn,BL=function(e){function t(t){var n=e.call(this)||this;n._previousFrameVisibleRangesWithStyle=[],n._context=t;var i=n._context.configuration.options;return n._lineHeight=i.get(49),n._roundedSelection=i.get(76),n._typicalHalfwidthCharacterWidth=i.get(34).typicalHalfwidthCharacterWidth,n._selections=[],n._renderResult=null,n._context.addEventHandler(n),n}return AL(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;return this._lineHeight=t.get(49),this._roundedSelection=t.get(76),this._typicalHalfwidthCharacterWidth=t.get(34).typicalHalfwidthCharacterWidth,!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._visibleRangesHaveGaps=function(e){for(var t=0,n=e.length;t<n;t++){var i=e[t];if(i.ranges.length>1)return!0}return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t,n){var i=this._typicalHalfwidthCharacterWidth/4,o=null,r=null;if(n&&n.length>0&&t.length>0){var s=t[0].lineNumber;if(s===e.startLineNumber)for(var a=0;!o&&a<n.length;a++)n[a].lineNumber===s&&(o=n[a].ranges[0]);var u=t[t.length-1].lineNumber;if(u===e.endLineNumber)for(a=n.length-1;!r&&a>=0;a--)n[a].lineNumber===u&&(r=n[a].ranges[0]);o&&!o.startStyle&&(o=null),r&&!r.startStyle&&(r=null)}a=0;for(var l=t.length;a<l;a++){var c=t[a].ranges[0],h=c.left,d=c.left+c.width,f={top:0,bottom:0},p={top:0,bottom:0};if(a>0){var g=t[a-1].ranges[0].left,m=t[a-1].ranges[0].left+t[a-1].ranges[0].width;HL(h-g)<i?f.top=2:h>g&&(f.top=1),HL(d-m)<i?p.top=2:g<d&&d<m&&(p.top=1)}else o&&(f.top=o.startStyle.top,p.top=o.endStyle.top);if(a+1<l){var v=t[a+1].ranges[0].left,_=t[a+1].ranges[0].left+t[a+1].ranges[0].width;HL(h-v)<i?f.bottom=2:v<h&&h<_&&(f.bottom=1),HL(d-_)<i?p.bottom=2:d<_&&(p.bottom=1)}else r&&(f.bottom=r.startStyle.bottom,p.bottom=r.endStyle.bottom);c.startStyle=f,c.endStyle=p}},t.prototype._getVisibleRangesWithStyle=function(e,t,n){var i=t.linesVisibleRangesForRange(e,!0)||[],o=i.map(WL),r=this._visibleRangesHaveGaps(o);return VL||r||!this._roundedSelection||this._enrichVisibleRangesWithStyle(t.visibleRange,o,n),o},t.prototype._createSelectionPiece=function(e,t,n,i,o){return'<div class="cslr '+n+'" style="top:'+e.toString()+"px;left:"+i.toString()+"px;width:"+o.toString()+"px;height:"+t+'px;"></div>'},t.prototype._actualRenderOneSelection=function(e,n,i,o){if(0!==o.length)for(var r=!!o[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),u=o[0].lineNumber,l=o[o.length-1].lineNumber,c=0,h=o.length;c<h;c++){for(var d=o[c],f=d.lineNumber,p=f-n,g=i&&(f===l||f===u)?a:s,m=i&&f===u?1:0,v="",_="",y=0,b=d.ranges.length;y<b;y++){var C=d.ranges[y];if(r){var w=C.startStyle,S=C.endStyle;if(1===w.top||1===w.bottom){v+=this._createSelectionPiece(m,g,t.SELECTION_CLASS_NAME,C.left-t.ROUNDED_PIECE_WIDTH,t.ROUNDED_PIECE_WIDTH);var L=t.EDITOR_BACKGROUND_CLASS_NAME;1===w.top&&(L+=" "+t.SELECTION_TOP_RIGHT),1===w.bottom&&(L+=" "+t.SELECTION_BOTTOM_RIGHT),v+=this._createSelectionPiece(m,g,L,C.left-t.ROUNDED_PIECE_WIDTH,t.ROUNDED_PIECE_WIDTH)}if(1===S.top||1===S.bottom){v+=this._createSelectionPiece(m,g,t.SELECTION_CLASS_NAME,C.left+C.width,t.ROUNDED_PIECE_WIDTH);var N=t.EDITOR_BACKGROUND_CLASS_NAME;1===S.top&&(N+=" "+t.SELECTION_TOP_LEFT),1===S.bottom&&(N+=" "+t.SELECTION_BOTTOM_LEFT),v+=this._createSelectionPiece(m,g,N,C.left+C.width,t.ROUNDED_PIECE_WIDTH)}}var D=t.SELECTION_CLASS_NAME;if(r){w=C.startStyle,S=C.endStyle;0===w.top&&(D+=" "+t.SELECTION_TOP_LEFT),0===w.bottom&&(D+=" "+t.SELECTION_BOTTOM_LEFT),0===S.top&&(D+=" "+t.SELECTION_TOP_RIGHT),0===S.bottom&&(D+=" "+t.SELECTION_BOTTOM_RIGHT)}_+=this._createSelectionPiece(m,g,D,C.left,C.width)}e[p][0]+=v,e[p][1]+=_}},t.prototype.prepareRender=function(e){for(var t=[],n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,o=n;o<=i;o++){var r=o-n;t[r]=["",""]}for(var s=[],a=0,u=this._selections.length;a<u;a++){var l=this._selections[a];if(l.isEmpty())s[a]=null;else{var c=this._getVisibleRangesWithStyle(l,e,this._previousFrameVisibleRangesWithStyle[a]);s[a]=c,this._actualRenderOneSelection(t,n,this._selections.length>1,c)}}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map((function(e){var t=e[0],n=e[1];return t+n}))},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.SELECTION_CLASS_NAME="selected-text",t.SELECTION_TOP_LEFT="top-left-radius",t.SELECTION_BOTTOM_LEFT="bottom-left-radius",t.SELECTION_TOP_RIGHT="top-right-radius",t.SELECTION_BOTTOM_RIGHT="bottom-right-radius",t.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",t.ROUNDED_PIECE_WIDTH=10,t}(Py);function HL(e){return e<0?-e:e}lm((function(e,t){var n=e.getColor(cb);n&&t.addRule(".monaco-editor .focused .selected-text { background-color: "+n+"; }");var i=e.getColor(db);i&&t.addRule(".monaco-editor .selected-text { background-color: "+i+"; }");var o=e.getColor(hb);o&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: "+o+"; }")}));n("d93b");var zL=function(){function e(e,t,n,i,o,r){this.top=e,this.left=t,this.width=n,this.height=i,this.textContent=o,this.textContentClassName=r}return e}(),jL=function(){function e(e){this._context=e;var t=this._context.configuration.options,n=t.get(34);this._cursorStyle=t.get(18),this._lineHeight=t.get(49),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(21),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=wg(document.createElement("div")),this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Zp.applyFontInfo(this._domNode,n),this._domNode.setDisplay("none"),this._position=new fn(1,1),this._lastRenderedContent="",this._renderData=null}return e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return this._position},e.prototype.show=function(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)},e.prototype.hide=function(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)},e.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(34);return this._cursorStyle=t.get(18),this._lineHeight=t.get(49),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(21),this._typicalHalfwidthCharacterWidth),Zp.applyFontInfo(this._domNode,n),!0},e.prototype.onCursorPositionChanged=function(e){return this._position=e,!0},e.prototype._prepareRender=function(e){var t="";if(this._cursorStyle===k.Line||this._cursorStyle===k.LineThin){var n,i=e.visibleRangeForPosition(this._position);if(!i||i.outsideRenderedLine)return null;if(this._cursorStyle===k.Line){if(n=ir(this._lineCursorWidth>0?this._lineCursorWidth:2),n>2){var o=this._context.model.getLineContent(this._position.lineNumber),r=Pr(o,this._position.column-1);t=o.substr(this._position.column-1,r)}}else n=ir(1);var s=i.left;n>=2&&s>=1&&(s-=1);var a=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new zL(a,s,n,this._lineHeight,t,"")}var u=this._context.model.getLineContent(this._position.lineNumber),l=Pr(u,this._position.column-1),c=e.linesVisibleRangesForRange(new pn(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+l),!1);if(!c||0===c.length)return null;var h=c[0];if(h.outsideRenderedLine||0===h.ranges.length)return null;var d=h.ranges[0],f=d.width<1?this._typicalHalfwidthCharacterWidth:d.width,p="";if(this._cursorStyle===k.Block){var g=this._context.model.getViewLineData(this._position.lineNumber);t=u.substr(this._position.column-1,l);var m=g.tokens.findTokenIndexAtOffset(this._position.column-1);p=g.tokens.getClassName(m)}var v=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,_=this._lineHeight;return this._cursorStyle!==k.Underline&&this._cursorStyle!==k.UnderlineThin||(v+=this._lineHeight-2,_=2),new zL(v,d.left,f,_,t,p)},e.prototype.prepareRender=function(e){this._renderData=this._prepareRender(e)},e.prototype.render=function(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName("cursor "+this._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)},e}(),UL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),KL=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options;return n._readOnly=i.get(68),n._cursorBlinking=i.get(16),n._cursorStyle=i.get(18),n._cursorSmoothCaretAnimation=i.get(17),n._selectionIsEmpty=!0,n._isVisible=!1,n._primaryCursor=new jL(n._context),n._secondaryCursors=[],n._renderData=[],n._domNode=wg(document.createElement("div")),n._domNode.setAttribute("role","presentation"),n._domNode.setAttribute("aria-hidden","true"),n._updateDomClassName(),n._domNode.appendChild(n._primaryCursor.getDomNode()),n._startCursorBlinkAnimation=new pi,n._cursorFlatBlinkInterval=new gi,n._blinkingEnabled=!1,n._editorHasFocus=!1,n._updateBlinking(),n}return UL(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;this._readOnly=t.get(68),this._cursorBlinking=t.get(16),this._cursorStyle=t.get(18),this._cursorSmoothCaretAnimation=t.get(17),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(var n=0,i=this._secondaryCursors.length;n<i;n++)this._secondaryCursors[n].onConfigurationChanged(e);return!0},t.prototype._onCursorPositionChanged=function(e,t){if(this._primaryCursor.onCursorPositionChanged(e),this._updateBlinking(),this._secondaryCursors.length<t.length)for(var n=t.length-this._secondaryCursors.length,i=0;i<n;i++){var o=new jL(this._context);this._domNode.domNode.insertBefore(o.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(o)}else if(this._secondaryCursors.length>t.length){var r=this._secondaryCursors.length-t.length;for(i=0;i<r;i++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(i=0;i<t.length;i++)this._secondaryCursors[i].onCursorPositionChanged(t[i])},t.prototype.onCursorStateChanged=function(e){for(var t=[],n=0,i=e.selections.length;n<i;n++)t[n]=e.selections[n].getPosition();this._onCursorPositionChanged(t[0],t.slice(1));var o=e.selections[0].isEmpty();return this._selectionIsEmpty!==o&&(this._selectionIsEmpty=o,this._updateDomClassName()),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onFocusChanged=function(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onTokensChanged=function(e){var t=function(t){for(var n=0,i=e.ranges.length;n<i;n++)if(e.ranges[n].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[n].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(var n=0,i=this._secondaryCursors;n<i.length;n++){var o=i[n];if(t(o.getPosition()))return!0}return!1},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getCursorBlinking=function(){return this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0},t.prototype._updateBlinking=function(){var e=this;this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();var n=this._getCursorBlinking(),i=0===n,o=5===n;i?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),i||o||(1===n?this._cursorFlatBlinkInterval.cancelAndSet((function(){e._isVisible?e._hide():e._show()}),t.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((function(){e._blinkingEnabled=!0,e._updateDomClassName()}),t.BLINK_INTERVAL))},t.prototype._updateDomClassName=function(){this._domNode.setClassName(this._getClassName())},t.prototype._getClassName=function(){var e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case k.Line:e+=" cursor-line-style";break;case k.Block:e+=" cursor-block-style";break;case k.Underline:e+=" cursor-underline-style";break;case k.LineThin:e+=" cursor-line-thin-style";break;case k.BlockOutline:e+=" cursor-block-outline-style";break;case k.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e},t.prototype._show=function(){this._primaryCursor.show();for(var e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0},t.prototype._hide=function(){this._primaryCursor.hide();for(var e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1},t.prototype.prepareRender=function(e){this._primaryCursor.prepareRender(e);for(var t=0,n=this._secondaryCursors.length;t<n;t++)this._secondaryCursors[t].prepareRender(e)},t.prototype.render=function(e){var t=[],n=0,i=this._primaryCursor.render(e);i&&(t[n++]=i);for(var o=0,r=this._secondaryCursors.length;o<r;o++){var s=this._secondaryCursors[o].render(e);s&&(t[n++]=s)}this._renderData=t},t.prototype.getLastRenderData=function(){return this._renderData},t.BLINK_INTERVAL=500,t}(Ug);lm((function(e,t){var n=e.getColor(aC);if(n){var i=e.getColor(uC);i||(i=n.opposite()),t.addRule(".monaco-editor .cursor { background-color: "+n+"; border-color: "+n+"; color: "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid "+i+"; border-right: 1px solid "+i+"; }")}}));var qL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),GL=function(){throw new Error("Invalid change accessor")},YL=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options,o=i.get(107);return n._lineHeight=i.get(49),n._contentWidth=o.contentWidth,n._contentLeft=o.contentLeft,n.domNode=wg(document.createElement("div")),n.domNode.setClassName("view-zones"),n.domNode.setPosition("absolute"),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n.marginDomNode=wg(document.createElement("div")),n.marginDomNode.setClassName("margin-view-zones"),n.marginDomNode.setPosition("absolute"),n.marginDomNode.setAttribute("role","presentation"),n.marginDomNode.setAttribute("aria-hidden","true"),n._zones={},n}return qL(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._zones={}},t.prototype._recomputeWhitespacesProps=function(){for(var e=this,t=this._context.viewLayout.getWhitespaces(),n=new Map,i=0,o=t;i<o.length;i++){var r=o[i];n.set(r.id,r)}return this._context.viewLayout.changeWhitespace((function(t){for(var i=!1,o=Object.keys(e._zones),r=0,s=o.length;r<s;r++){var a=o[r],u=e._zones[a],l=e._computeWhitespaceProps(u.delegate),c=n.get(a);!c||c.afterLineNumber===l.afterViewLineNumber&&c.height===l.heightInPx||(t.changeOneWhitespace(a,l.afterViewLineNumber,l.heightInPx),e._safeCallOnComputedHeight(u.delegate,l.heightInPx),i=!0)}return i}))},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._lineHeight=t.get(49),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,e.hasChanged(49)&&this._recomputeWhitespacesProps(),!0},t.prototype.onLineMappingChanged=function(e){var t=this._recomputeWhitespacesProps();return t&&this._context.viewLayout.onHeightMaybeChanged(),t},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype._getZoneOrdinal=function(e){return"undefined"!==typeof e.afterColumn?e.afterColumn:1e4},t.prototype._computeWhitespaceProps=function(e){if(0===e.afterLineNumber)return{afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};var t,n;if("undefined"!==typeof e.afterColumn)t=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{var i=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new fn(i,this._context.model.getModelLineMaxColumn(i))}n=t.column===this._context.model.getModelLineMaxColumn(t.lineNumber)?this._context.model.validateModelPosition({lineNumber:t.lineNumber+1,column:1}):this._context.model.validateModelPosition({lineNumber:t.lineNumber,column:t.column+1});var o=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t),r=this._context.model.coordinatesConverter.modelPositionIsVisible(n);return{afterViewLineNumber:o.lineNumber,heightInPx:r?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}},t.prototype.changeViewZones=function(e){var t=this;return this._context.viewLayout.changeWhitespace((function(n){var i=!1,o={addZone:function(e){return i=!0,t._addZone(n,e)},removeZone:function(e){e&&(i=t._removeZone(n,e)||i)},layoutZone:function(e){e&&(i=t._layoutZone(n,e)||i)}};return ZL(e,o),o.addZone=GL,o.removeZone=GL,o.layoutZone=GL,i}))},t.prototype._addZone=function(e,t){var n=this._computeWhitespaceProps(t),i=e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(t),n.heightInPx,n.minWidthInPx),o={whitespaceId:i,delegate:t,isVisible:!1,domNode:wg(t.domNode),marginDomNode:t.marginDomNode?wg(t.marginDomNode):null};return this._safeCallOnComputedHeight(o.delegate,n.heightInPx),o.domNode.setPosition("absolute"),o.domNode.domNode.style.width="100%",o.domNode.setDisplay("none"),o.domNode.setAttribute("monaco-view-zone",o.whitespaceId),this.domNode.appendChild(o.domNode),o.marginDomNode&&(o.marginDomNode.setPosition("absolute"),o.marginDomNode.domNode.style.width="100%",o.marginDomNode.setDisplay("none"),o.marginDomNode.setAttribute("monaco-view-zone",o.whitespaceId),this.marginDomNode.appendChild(o.marginDomNode)),this._zones[o.whitespaceId]=o,this.setShouldRender(),o.whitespaceId},t.prototype._removeZone=function(e,t){if(this._zones.hasOwnProperty(t)){var n=this._zones[t];return delete this._zones[t],e.removeWhitespace(n.whitespaceId),n.domNode.removeAttribute("monaco-visible-view-zone"),n.domNode.removeAttribute("monaco-view-zone"),n.domNode.domNode.parentNode.removeChild(n.domNode.domNode),n.marginDomNode&&(n.marginDomNode.removeAttribute("monaco-visible-view-zone"),n.marginDomNode.removeAttribute("monaco-view-zone"),n.marginDomNode.domNode.parentNode.removeChild(n.marginDomNode.domNode)),this.setShouldRender(),!0}return!1},t.prototype._layoutZone=function(e,t){if(this._zones.hasOwnProperty(t)){var n=this._zones[t],i=this._computeWhitespaceProps(n.delegate);return e.changeOneWhitespace(n.whitespaceId,i.afterViewLineNumber,i.heightInPx),this._safeCallOnComputedHeight(n.delegate,i.heightInPx),this.setShouldRender(),!0}return!1},t.prototype.shouldSuppressMouseDownOnViewZone=function(e){if(this._zones.hasOwnProperty(e)){var t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1},t.prototype._heightInPixels=function(e){return"number"===typeof e.heightInPx?e.heightInPx:"number"===typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight},t.prototype._minWidthInPixels=function(e){return"number"===typeof e.minWidthInPx?e.minWidthInPx:0},t.prototype._safeCallOnComputedHeight=function(e,t){if("function"===typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(n){ge(n)}},t.prototype._safeCallOnDomNodeTop=function(e,t){if("function"===typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(n){ge(n)}},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){for(var t=e.viewportData.whitespaceViewportData,n={},i=!1,o=0,r=t.length;o<r;o++)n[t[o].id]=t[o],i=!0;var s=Object.keys(this._zones);for(o=0,r=s.length;o<r;o++){var a=s[o],u=this._zones[a],l=0,c=0,h="none";n.hasOwnProperty(a)?(l=n[a].verticalOffset-e.bigNumbersDelta,c=n[a].height,h="block",u.isVisible||(u.domNode.setAttribute("monaco-visible-view-zone","true"),u.isVisible=!0),this._safeCallOnDomNodeTop(u.delegate,e.getScrolledTopFromAbsoluteTop(n[a].verticalOffset))):(u.isVisible&&(u.domNode.removeAttribute("monaco-visible-view-zone"),u.isVisible=!1),this._safeCallOnDomNodeTop(u.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),u.domNode.setTop(l),u.domNode.setHeight(c),u.domNode.setDisplay(h),u.marginDomNode&&(u.marginDomNode.setTop(l),u.marginDomNode.setHeight(c),u.marginDomNode.setDisplay(h))}i&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))},t}(Ug);function ZL(e,t){try{return e(t)}catch(n){ge(n)}}var XL=function(){function e(e,t,n,i){this.configuration=e,this.theme=t,this.model=n,this.viewLayout=n.viewLayout,this.privateViewEventBus=i}return e.prototype.addEventHandler=function(e){this.privateViewEventBus.addEventHandler(e)},e.prototype.removeEventHandler=function(e){this.privateViewEventBus.removeEventHandler(e)},e}(),$L=function(){function e(e){this._eventHandlerGateKeeper=e,this._eventHandlers=[],this._eventQueue=null,this._isConsumingQueue=!1}return e.prototype.addEventHandler=function(e){for(var t=0,n=this._eventHandlers.length;t<n;t++)this._eventHandlers[t]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)},e.prototype.removeEventHandler=function(e){for(var t=0;t<this._eventHandlers.length;t++)if(this._eventHandlers[t]===e){this._eventHandlers.splice(t,1);break}},e.prototype.emit=function(e){this._eventQueue?this._eventQueue.push(e):this._eventQueue=[e],this._isConsumingQueue||this.consumeQueue()},e.prototype.emitMany=function(e){this._eventQueue?this._eventQueue=this._eventQueue.concat(e):this._eventQueue=e,this._isConsumingQueue||this.consumeQueue()},e.prototype.consumeQueue=function(){var e=this;this._eventHandlerGateKeeper((function(){try{e._isConsumingQueue=!0,e._doConsumeQueue()}finally{e._isConsumingQueue=!1}}))},e.prototype._doConsumeQueue=function(){while(this._eventQueue){var e=this._eventQueue;this._eventQueue=null;for(var t=this._eventHandlers.slice(0),n=0,i=t.length;n<i;n++)t[n].handleEvents(e)}},e}(),QL=function(){function e(e,t,n,i){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.whitespaceViewportData=n,this._model=i,this.visibleRange=new pn(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}return e.prototype.getViewLineRenderingData=function(e){return this._model.getViewLineRenderingData(this.visibleRange,e)},e.prototype.getDecorationsInViewport=function(){return this._model.getDecorationsInViewport(this.visibleRange)},e}(),JL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),eN=function(e){function t(t,n,i,o,r,s){var a=e.call(this)||this;a._cursor=r,a._renderAnimationFrame=null,a.outgoingEvents=s;var u=new Iw(n,o,a.outgoingEvents,t);a.eventDispatcher=new $L((function(e){return a._renderOnce(e)})),a.eventDispatcher.addEventHandler(a),a._context=new XL(n,i.getTheme(),o,a.eventDispatcher),a._register(i.onThemeChange((function(e){a._context.theme=e,a.eventDispatcher.emit(new HC),a.render(!0,!1)}))),a.viewParts=[],a._textAreaHandler=new $C(a._context,u,a.createTextAreaHandlerHelper()),a.viewParts.push(a._textAreaHandler),a.linesContent=wg(document.createElement("div")),a.linesContent.setClassName("lines-content monaco-editor-background"),a.linesContent.setPosition("absolute"),a.domNode=wg(document.createElement("div")),a.domNode.setClassName(a.getEditorClassName()),a.overflowGuardContainer=wg(document.createElement("div")),Kg.write(a.overflowGuardContainer,3),a.overflowGuardContainer.setClassName("overflow-guard"),a._scrollbar=new VS(a._context,a.linesContent,a.domNode,a.overflowGuardContainer),a.viewParts.push(a._scrollbar),a.viewLines=new ZS(a._context,a.linesContent),a.viewZones=new YL(a._context),a.viewParts.push(a.viewZones);var l=new LL(a._context);a.viewParts.push(l);var c=new IL(a._context);a.viewParts.push(c);var h=new jw(a._context);a.viewParts.push(h),h.addDynamicOverlay(new Qw(a._context)),h.addDynamicOverlay(new BL(a._context)),h.addDynamicOverlay(new KS(a._context)),h.addDynamicOverlay(new tS(a._context));var d=new Uw(a._context);a.viewParts.push(d),d.addDynamicOverlay(new Jw(a._context)),d.addDynamicOverlay(new jS(a._context)),d.addDynamicOverlay(new JS(a._context)),d.addDynamicOverlay(new $S(a._context)),d.addDynamicOverlay(new LC(a._context));var f=new DC(a._context);f.getDomNode().appendChild(a.viewZones.marginDomNode),f.getDomNode().appendChild(d.getDomNode()),a.viewParts.push(f),a.contentWidgets=new Gw(a._context,a.domNode),a.viewParts.push(a.contentWidgets),a.viewCursors=new KL(a._context),a.viewParts.push(a.viewCursors),a.overlayWidgets=new CL(a._context),a.viewParts.push(a.overlayWidgets);var p=new TL(a._context);a.viewParts.push(p);var g=new yL(a._context);if(a.viewParts.push(g),l){var m=a._scrollbar.getOverviewRulerLayoutInfo();m.parent.insertBefore(l.getDomNode(),m.insertBefore)}return a.linesContent.appendChild(h.getDomNode()),a.linesContent.appendChild(p.domNode),a.linesContent.appendChild(a.viewZones.domNode),a.linesContent.appendChild(a.viewLines.getDomNode()),a.linesContent.appendChild(a.contentWidgets.domNode),a.linesContent.appendChild(a.viewCursors.getDomNode()),a.overflowGuardContainer.appendChild(f.getDomNode()),a.overflowGuardContainer.appendChild(a._scrollbar.getDomNode()),a.overflowGuardContainer.appendChild(c.getDomNode()),a.overflowGuardContainer.appendChild(a._textAreaHandler.textArea),a.overflowGuardContainer.appendChild(a._textAreaHandler.textAreaCover),a.overflowGuardContainer.appendChild(a.overlayWidgets.getDomNode()),a.overflowGuardContainer.appendChild(g.getDomNode()),a.domNode.appendChild(a.overflowGuardContainer),a.domNode.appendChild(a.contentWidgets.overflowingContentWidgetsDomNode),a._applyLayout(),a.pointerHandler=a._register(new Ny(a._context,u,a.createPointerHandlerHelper())),a._register(o.addEventListener((function(e){a.eventDispatcher.emitMany(e)}))),a._register(a._cursor.addEventListener((function(e){a.eventDispatcher.emitMany(e)}))),a}return JL(t,e),t.prototype._flushAccumulatedAndRenderNow=function(){this._renderNow()},t.prototype.createPointerHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode.domNode,linesContentDomNode:this.linesContent.domNode,focusTextArea:function(){e.focus()},getLastRenderData:function(){var t=e.viewCursors.getLastRenderData()||[],n=e._textAreaHandler.getLastRenderData();return new iy(t,n)},shouldSuppressMouseDownOnViewZone:function(t){return e.viewZones.shouldSuppressMouseDownOnViewZone(t)},shouldSuppressMouseDownOnWidget:function(t){return e.contentWidgets.shouldSuppressMouseDownOnWidget(t)},getPositionFromDOMInfo:function(t,n){return e._flushAccumulatedAndRenderNow(),e.viewLines.getPositionFromDOMInfo(t,n)},visibleRangeForPosition:function(t,n){return e._flushAccumulatedAndRenderNow(),e.viewLines.visibleRangeForPosition(new fn(t,n))},getLineWidth:function(t){return e._flushAccumulatedAndRenderNow(),e.viewLines.getLineWidth(t)}}},t.prototype.createTextAreaHandlerHelper=function(){var e=this;return{visibleRangeForPositionRelativeToEditor:function(t,n){return e._flushAccumulatedAndRenderNow(),e.viewLines.visibleRangeForPosition(new fn(t,n))}}},t.prototype._applyLayout=function(){var e=this._context.configuration.options,t=e.get(107);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this.overflowGuardContainer.setWidth(t.width),this.overflowGuardContainer.setHeight(t.height),this.linesContent.setWidth(1e6),this.linesContent.setHeight(1e6)},t.prototype.getEditorClassName=function(){var e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(104)+" "+rm(this._context.theme.type)+e},t.prototype.onConfigurationChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),this._applyLayout(),!1},t.prototype.onContentSizeChanged=function(e){return this.outgoingEvents.emitContentSizeChange(e),!1},t.prototype.onFocusChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),this._context.model.setHasFocus(e.isFocused),e.isFocused?this.outgoingEvents.emitViewFocusGained():this.outgoingEvents.emitViewFocusLost(),!1},t.prototype.onScrollChanged=function(e){return this.outgoingEvents.emitScrollChanged(e),!1},t.prototype.onThemeChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),!1},t.prototype.dispose=function(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this.eventDispatcher.removeEventHandler(this),this.outgoingEvents.dispose(),this.viewLines.dispose();for(var t=0,n=this.viewParts.length;t<n;t++)this.viewParts[t].dispose();this.viewParts=[],e.prototype.dispose.call(this)},t.prototype._renderOnce=function(e){var t=tN(e);return this._scheduleRender(),t},t.prototype._scheduleRender=function(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=lo(this._onRenderScheduled.bind(this),100))},t.prototype._onRenderScheduled=function(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()},t.prototype._renderNow=function(){var e=this;tN((function(){return e._actualRender()}))},t.prototype._getViewPartsToRender=function(){for(var e=[],t=0,n=0,i=this.viewParts.length;n<i;n++){var o=this.viewParts[n];o.shouldRender()&&(e[t++]=o)}return e},t.prototype._actualRender=function(){if(qi(this.domNode.domNode)){var e=this._getViewPartsToRender();if(this.viewLines.shouldRender()||0!==e.length){var t=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);var n=new QL(this._cursor.getViewSelections(),t,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this.contentWidgets.shouldRender()&&this.contentWidgets.onBeforeRender(n),this.viewLines.shouldRender()&&(this.viewLines.renderText(n),this.viewLines.onDidRender(),e=this._getViewPartsToRender());for(var i=new Yg(this._context.viewLayout,n,this.viewLines),o=0,r=e.length;o<r;o++){var s=e[o];s.prepareRender(i)}for(o=0,r=e.length;o<r;o++){s=e[o];s.render(i),s.onDidRender()}}}},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)},t.prototype.restoreState=function(e){this._context.viewLayout.setScrollPositionNow({scrollTop:e.scrollTop}),this._context.model.tokenizeViewport(),this._renderNow(),this.viewLines.updateLineWidths(),this._context.viewLayout.setScrollPositionNow({scrollLeft:e.scrollLeft})},t.prototype.getOffsetForColumn=function(e,t){var n=this._context.model.validateModelPosition({lineNumber:e,column:t}),i=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();var o=this.viewLines.visibleRangeForPosition(new fn(i.lineNumber,i.column));return o?o.left:-1},t.prototype.getTargetAtClientPoint=function(e,t){var n=this.pointerHandler.getTargetAtClientPoint(e,t);return n?Pw.convertViewToModelMouseTarget(n,this._context.model.coordinatesConverter):null},t.prototype.createOverviewRuler=function(e){return new kL(this._context,e)},t.prototype.change=function(e){var t=this;return this._renderOnce((function(){var n=t.viewZones.changeViewZones(e);return n&&(t._context.viewLayout.onHeightMaybeChanged(),t._context.privateViewEventBus.emit(new UC)),n}))},t.prototype.render=function(e,t){if(t){this.viewLines.forceShouldRender();for(var n=0,i=this.viewParts.length;n<i;n++){var o=this.viewParts[n];o.forceShouldRender()}}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()},t.prototype.focus=function(){this._textAreaHandler.focusTextArea()},t.prototype.isFocused=function(){return this._textAreaHandler.isFocused()},t.prototype.setAriaOptions=function(e){this._textAreaHandler.setAriaOptions(e)},t.prototype.addContentWidget=function(e){this.contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()},t.prototype.layoutContentWidget=function(e){var t=e.position&&e.position.range||null;if(null===t){var n=e.position?e.position.position:null;null!==n&&(t=new pn(n.lineNumber,n.column,n.lineNumber,n.column))}var i=e.position?e.position.preference:null;this.contentWidgets.setWidgetPosition(e.widget,t,i),this._scheduleRender()},t.prototype.removeContentWidget=function(e){this.contentWidgets.removeWidget(e.widget),this._scheduleRender()},t.prototype.addOverlayWidget=function(e){this.overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()},t.prototype.layoutOverlayWidget=function(e){var t=e.position?e.position.preference:null,n=this.overlayWidgets.setWidgetPosition(e.widget,t);n&&this._scheduleRender()},t.prototype.removeOverlayWidget=function(e){this.overlayWidgets.removeWidget(e.widget),this._scheduleRender()},t}(zg);function tN(e){try{return e()}catch(t){ge(t)}}var nN=function(){function e(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Y_(new pn(1,1,1,1),0,new fn(1,1),0),new Y_(new pn(1,1,1,1),0,new fn(1,1),0))}return e.prototype.dispose=function(e){this._removeTrackedRange(e)},e.prototype.startTrackingSelection=function(e){this._trackSelection=!0,this._updateTrackedRange(e)},e.prototype.stopTrackingSelection=function(e){this._trackSelection=!1,this._removeTrackedRange(e)},e.prototype._updateTrackedRange=function(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))},e.prototype._removeTrackedRange=function(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)},e.prototype.asCursorState=function(){return new Q_(this.modelState,this.viewState)},e.prototype.readSelectionFromMarkers=function(e){var t=e.model._getTrackedRange(this._selTrackedRange);return 0===this.modelState.selection.getDirection()?new mn(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new mn(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)},e.prototype.ensureValidState=function(e){this._setState(e,this.modelState,this.viewState)},e.prototype.setState=function(e,t,n){this._setState(e,t,n)},e.prototype._setState=function(e,t,n){if(t){r=e.model.validateRange(t.selectionStart);var i=t.selectionStart.equalsRange(r)?t.selectionStartLeftoverVisibleColumns:0,o=(s=e.model.validatePosition(t.position),t.position.equals(s)?t.leftoverVisibleColumns:0);t=new Y_(r,i,s,o)}else{if(!n)return;var r=e.model.validateRange(e.convertViewRangeToModelRange(n.selectionStart)),s=e.model.validatePosition(e.convertViewPositionToModelPosition(n.position.lineNumber,n.position.column));t=new Y_(r,n.selectionStartLeftoverVisibleColumns,s,n.leftoverVisibleColumns)}if(n){l=e.validateViewRange(n.selectionStart,t.selectionStart),c=e.validateViewPosition(n.position,t.position);n=new Y_(l,t.selectionStartLeftoverVisibleColumns,c,t.leftoverVisibleColumns)}else{var a=e.convertModelPositionToViewPosition(new fn(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),u=e.convertModelPositionToViewPosition(new fn(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),l=new pn(a.lineNumber,a.column,u.lineNumber,u.column),c=e.convertModelPositionToViewPosition(t.position);n=new Y_(l,t.selectionStartLeftoverVisibleColumns,c,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)},e}(),iN=function(){function e(e){this.context=e,this.primaryCursor=new nN(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}return e.prototype.dispose=function(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()},e.prototype.startTrackingSelections=function(){this.primaryCursor.startTrackingSelection(this.context);for(var e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].startTrackingSelection(this.context)},e.prototype.stopTrackingSelections=function(){this.primaryCursor.stopTrackingSelection(this.context);for(var e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].stopTrackingSelection(this.context)},e.prototype.updateContext=function(e){this.context=e},e.prototype.ensureValidState=function(){this.primaryCursor.ensureValidState(this.context);for(var e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].ensureValidState(this.context)},e.prototype.readSelectionFromMarkers=function(){var e=[];e[0]=this.primaryCursor.readSelectionFromMarkers(this.context);for(var t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].readSelectionFromMarkers(this.context);return e},e.prototype.getAll=function(){var e=[];e[0]=this.primaryCursor.asCursorState();for(var t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].asCursorState();return e},e.prototype.getViewPositions=function(){var e=[];e[0]=this.primaryCursor.viewState.position;for(var t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].viewState.position;return e},e.prototype.getSelections=function(){var e=[];e[0]=this.primaryCursor.modelState.selection;for(var t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].modelState.selection;return e},e.prototype.getViewSelections=function(){var e=[];e[0]=this.primaryCursor.viewState.selection;for(var t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].viewState.selection;return e},e.prototype.setSelections=function(e){this.setStates(Q_.fromModelSelections(e))},e.prototype.getPrimaryCursor=function(){return this.primaryCursor.asCursorState()},e.prototype.setStates=function(e){null!==e&&(this.primaryCursor.setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))},e.prototype._setSecondaryStates=function(e){var t=this.secondaryCursors.length,n=e.length;if(t<n)for(var i=n-t,o=0;o<i;o++)this._addSecondaryCursor();else if(t>n){var r=t-n;for(o=0;o<r;o++)this._removeSecondaryCursor(this.secondaryCursors.length-1)}for(o=0;o<n;o++)this.secondaryCursors[o].setState(this.context,e[o].modelState,e[o].viewState)},e.prototype.killSecondaryCursors=function(){this._setSecondaryStates([])},e.prototype._addSecondaryCursor=function(){this.secondaryCursors.push(new nN(this.context)),this.lastAddedCursorIndex=this.secondaryCursors.length},e.prototype.getLastAddedCursorIndex=function(){return 0===this.secondaryCursors.length||0===this.lastAddedCursorIndex?0:this.lastAddedCursorIndex},e.prototype._removeSecondaryCursor=function(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)},e.prototype._getAll=function(){var e=[];e[0]=this.primaryCursor;for(var t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t];return e},e.prototype.normalize=function(){if(0!==this.secondaryCursors.length){for(var e=this._getAll(),t=[],n=0,i=e.length;n<i;n++)t.push({index:n,selection:e[n].modelState.selection});t.sort((function(e,t){return e.selection.startLineNumber===t.selection.startLineNumber?e.selection.startColumn-t.selection.startColumn:e.selection.startLineNumber-t.selection.startLineNumber}));for(var o=0;o<t.length-1;o++){var r=t[o],s=t[o+1],a=r.selection,u=s.selection;if(this.context.config.multiCursorMergeOverlapping){var l=void 0;if(l=u.isEmpty()||a.isEmpty()?u.getStartPosition().isBeforeOrEqual(a.getEndPosition()):u.getStartPosition().isBefore(a.getEndPosition()),l){var c=r.index<s.index?o:o+1,h=r.index<s.index?o+1:o,d=t[h].index,f=t[c].index,p=t[h].selection,g=t[c].selection;if(!p.equalsSelection(g)){var m=p.plusRange(g),v=p.selectionStartLineNumber===p.startLineNumber&&p.selectionStartColumn===p.startColumn,_=g.selectionStartLineNumber===g.startLineNumber&&g.selectionStartColumn===g.startColumn,y=void 0;d===this.lastAddedCursorIndex?(y=v,this.lastAddedCursorIndex=f):y=_;var b=void 0;b=y?new mn(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn):new mn(m.endLineNumber,m.endColumn,m.startLineNumber,m.startColumn),t[c].selection=b;var C=Q_.fromModelSelection(b);e[f].setState(this.context,C.modelState,C.viewState)}for(var w=0,S=t;w<S.length;w++){var L=S[w];L.index>d&&L.index--}e.splice(d,1),t.splice(h,1),this._removeSecondaryCursor(d-1),o--}}}}},e}(),oN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function rN(e){for(var t=0,n=e.length;t<n;t++)if(8===e[t].type)return!0;return!1}var sN=function(){function e(e,t,n,i,o,r){this.selections=e,this.modelVersionId=t,this.oldSelections=n,this.oldModelVersionId=i,this.source=o,this.reason=r}return e}(),aN=function(){function e(e,t){this.modelVersionId=e.getVersionId(),this.cursorState=t.getAll()}return e.prototype.equals=function(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(var t=0,n=this.cursorState.length;t<n;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0},e}(),uN=function(){function e(e,t,n){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=n}return e.getAllAutoClosedCharacters=function(e){for(var t=[],n=0,i=e;n<i.length;n++){var o=i[n];t=t.concat(o.getAutoClosedCharactersRanges())}return t},e.prototype.dispose=function(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])},e.prototype.getAutoClosedCharactersRanges=function(){for(var e=[],t=0;t<this._autoClosedCharactersDecorations.length;t++){var n=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);n&&e.push(n)}return e},e.prototype.isValid=function(e){for(var t=[],n=0;n<this._autoClosedEnclosingDecorations.length;n++){var i=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[n]);if(i&&(t.push(i),i.startLineNumber!==i.endLineNumber))return!1}t.sort(pn.compareRangesUsingStarts),e.sort(pn.compareRangesUsingStarts);for(n=0;n<e.length;n++){if(n>=t.length)return!1;if(!t[n].strictContainsRange(e[n]))return!1}return!0},e}(),lN=function(e){function t(t,n,i){var o=e.call(this)||this;o._onDidReachMaxCursorCount=o._register(new qe),o.onDidReachMaxCursorCount=o._onDidReachMaxCursorCount.event,o._onDidAttemptReadOnlyEdit=o._register(new qe),o.onDidAttemptReadOnlyEdit=o._onDidAttemptReadOnlyEdit.event,o._onDidChange=o._register(new qe),o.onDidChange=o._onDidChange.event,o._configuration=t,o._model=n,o._knownModelVersionId=o._model.getVersionId(),o._viewModel=i,o.context=new Z_(o._configuration,o._model,o._viewModel),o._cursors=new iN(o.context),o._isHandling=!1,o._isDoingComposition=!1,o._selectionsWhenCompositionStarted=null,o._columnSelectData=null,o._autoClosedActions=[],o._prevEditOperationType=0,o._register(o._model.onDidChangeRawContent((function(e){if(o._knownModelVersionId=e.versionId,!o._isHandling){var t=e.containsEvent(1);o._onModelContentChanged(t)}}))),o._register(i.addEventListener((function(e){rN(e)&&o._knownModelVersionId===o._model.getVersionId()&&o.setStates("viewModel",0,o.getAll())})));var r=function(){o.context=new Z_(o._configuration,o._model,o._viewModel),o._cursors.updateContext(o.context)};return o._register(o._model.onDidChangeLanguage((function(e){r()}))),o._register(o._model.onDidChangeLanguageConfiguration((function(){r()}))),o._register(o._model.onDidChangeOptions((function(){r()}))),o._register(o._configuration.onDidChange((function(e){G_.shouldRecreate(e)&&r()}))),o}return oN(t,e),t.prototype.dispose=function(){this._cursors.dispose(),this._autoClosedActions=Ee(this._autoClosedActions),e.prototype.dispose.call(this)},t.prototype._validateAutoClosedActions=function(){if(this._autoClosedActions.length>0)for(var e=this._cursors.getSelections(),t=0;t<this._autoClosedActions.length;t++){var n=this._autoClosedActions[t];n.isValid(e)||(n.dispose(),this._autoClosedActions.splice(t,1),t--)}},t.prototype.getPrimaryCursor=function(){return this._cursors.getPrimaryCursor()},t.prototype.getLastAddedCursorIndex=function(){return this._cursors.getLastAddedCursorIndex()},t.prototype.getAll=function(){return this._cursors.getAll()},t.prototype.setStates=function(e,n,i){null!==i&&i.length>t.MAX_CURSOR_COUNT&&(i=i.slice(0,t.MAX_CURSOR_COUNT),this._onDidReachMaxCursorCount.fire(void 0));var o=new aN(this._model,this);this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,n,o)},t.prototype.setColumnSelectData=function(e){this._columnSelectData=e},t.prototype.reveal=function(e,t,n,i){this._revealRange(e,n,0,t,i)},t.prototype.revealRange=function(e,t,n,i,o){this.emitCursorRevealRange(e,n,i,t,o)},t.prototype.scrollTo=function(e){this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop:e})},t.prototype.saveState=function(){for(var e=[],t=this._cursors.getSelections(),n=0,i=t.length;n<i;n++){var o=t[n];e.push({inSelectionMode:!o.isEmpty(),selectionStart:{lineNumber:o.selectionStartLineNumber,column:o.selectionStartColumn},position:{lineNumber:o.positionLineNumber,column:o.positionColumn}})}return e},t.prototype.restoreState=function(e){for(var t=[],n=0,i=e.length;n<i;n++){var o=e[n],r=1,s=1;o.position&&o.position.lineNumber&&(r=o.position.lineNumber),o.position&&o.position.column&&(s=o.position.column);var a=r,u=s;o.selectionStart&&o.selectionStart.lineNumber&&(a=o.selectionStart.lineNumber),o.selectionStart&&o.selectionStart.column&&(u=o.selectionStart.column),t.push({selectionStartLineNumber:a,selectionStartColumn:u,positionLineNumber:r,positionColumn:s})}this.setStates("restoreState",0,Q_.fromModelSelections(t)),this.reveal("restoreState",!0,0,1)},t.prototype._onModelContentChanged=function(e){if(this._prevEditOperationType=0,e)this._cursors.dispose(),this._cursors=new iN(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary("model",1,null);else{var t=this._cursors.readSelectionFromMarkers();this.setStates("modelChange",2,Q_.fromModelSelections(t))}},t.prototype.getSelection=function(){return this._cursors.getPrimaryCursor().modelState.selection},t.prototype.getColumnSelectData=function(){if(this._columnSelectData)return this._columnSelectData;var e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),n=t.lineNumber,i=ey.visibleColumnFromColumn2(this.context.config,this.context.viewModel,t);return{isReal:!1,fromViewLineNumber:n,fromViewVisualColumn:i,toViewLineNumber:n,toViewVisualColumn:i}},t.prototype.getSelections=function(){return this._cursors.getSelections()},t.prototype.getViewSelections=function(){return this._cursors.getViewSelections()},t.prototype.getPosition=function(){return this._cursors.getPrimaryCursor().modelState.position},t.prototype.setSelections=function(e,t){this.setStates(e,0,Q_.fromModelSelections(t))},t.prototype.getPrevEditOperationType=function(){return this._prevEditOperationType},t.prototype.setPrevEditOperationType=function(e){this._prevEditOperationType=e},t.prototype._pushAutoClosedAction=function(e,t){for(var n=[],i=[],o=0,r=e.length;o<r;o++)n.push({range:e[o],options:{inlineClassName:"auto-closed-character",stickiness:1}}),i.push({range:t[o],options:{stickiness:1}});var s=this._model.deltaDecorations([],n),a=this._model.deltaDecorations([],i);this._autoClosedActions.push(new uN(this._model,s,a))},t.prototype._executeEditOperation=function(e){if(e){e.shouldPushStackElementBefore&&this._model.pushStackElement();var t=cN.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);for(var n=[],i=[],o=0;o<e.commands.length;o++){var r=e.commands[o];r instanceof Cw&&r.enclosingRange&&r.closeCharacterRange&&(n.push(r.closeCharacterRange),i.push(r.enclosingRange))}n.length>0&&this._pushAutoClosedAction(n,i),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}},t.prototype._interpretCommandResult=function(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()},t.prototype._emitStateChangedIfNecessary=function(e,t,n){var i=new aN(this._model,this);if(i.equals(n))return!1;var o=this._cursors.getSelections(),r=this._cursors.getViewSelections();try{var s=this._beginEmit();s.emit(new OC(r,o))}finally{this._endEmit()}if(!n||n.cursorState.length!==i.cursorState.length||i.cursorState.some((function(e,t){return!e.modelState.equals(n.cursorState[t].modelState)}))){var a=n?n.cursorState.map((function(e){return e.modelState.selection})):null,u=n?n.modelVersionId:0;this._onDidChange.fire(new sN(o,i.modelVersionId,a,u,e||"keyboard",t))}return!0},t.prototype._revealRange=function(e,t,n,i,o){var r=this._cursors.getViewPositions(),s=r[0];if(1===t)for(var a=1;a<r.length;a++)r[a].isBefore(s)&&(s=r[a]);else if(2===t)for(a=1;a<r.length;a++)s.isBeforeOrEqual(r[a])&&(s=r[a]);else if(r.length>1)return;var u=new pn(s.lineNumber,s.column,s.lineNumber,s.column);this.emitCursorRevealRange(e,u,n,i,o)},t.prototype.emitCursorRevealRange=function(e,t,n,i,o){try{var r=this._beginEmit();r.emit(new VC(e,t,n,i,o))}finally{this._endEmit()}},t.prototype._findAutoClosingPairs=function(e){if(!e.length)return null;for(var t=[],n=0,i=e.length;n<i;n++){var o=e[n];if(!o.text||o.text.indexOf("\n")>=0)return null;var r=o.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;var s=r[1],a=this.context.config.autoClosingPairsClose2.get(s);if(!a||1!==a.length)return null;var u=a[0].open,l=o.text.length-r[2].length-1,c=o.text.lastIndexOf(u,l-1);if(-1===c)return null;t.push([c,l])}return t},t.prototype.executeEdits=function(e,t,n){var i=this,o=null;"snippet"===e&&(o=this._findAutoClosingPairs(t)),o&&(t[0]._isTracked=!0);var r=[],s=[],a=this._model.pushEditOperations(this.getSelections(),t,(function(e){if(o)for(var t=0,a=o.length;t<a;t++){var u=o[t],l=u[0],c=u[1],h=e[t],d=h.range.startLineNumber,f=h.range.startColumn-1+l,p=h.range.startColumn-1+c;r.push(new pn(d,p+1,d,p+2)),s.push(new pn(d,f+1,d,p+2))}var g=n(e);return g&&(i._isHandling=!0),g}));a&&(this._isHandling=!1,this.setSelections(e,a)),r.length>0&&this._pushAutoClosedAction(r,s)},t.prototype.trigger=function(e,t,n){var i=Ha;if(t===i.CompositionStart)return this._isDoingComposition=!0,void(this._selectionsWhenCompositionStarted=this.getSelections().slice(0));if(t===i.CompositionEnd&&(this._isDoingComposition=!1),this._configuration.options.get(68))this._onDidAttemptReadOnlyEdit.fire(void 0);else{var o=new aN(this._model,this),r=0;t!==i.Undo&&t!==i.Redo&&this._cursors.stopTrackingSelections(),this._cursors.ensureValidState(),this._isHandling=!0;try{switch(t){case i.Type:this._type(e,n.text);break;case i.ReplacePreviousChar:this._replacePreviousChar(n.text,n.replaceCharCnt);break;case i.Paste:r=4,this._paste(n.text,n.pasteOnNewLine,n.multicursorText||[]);break;case i.Cut:this._cut();break;case i.Undo:r=5,this._interpretCommandResult(this._model.undo());break;case i.Redo:r=6,this._interpretCommandResult(this._model.redo());break;case i.ExecuteCommand:this._externalExecuteCommand(n);break;case i.ExecuteCommands:this._externalExecuteCommands(n);break;case i.CompositionEnd:this._interpretCompositionEnd(e);break}}catch(s){ge(s)}this._isHandling=!1,t!==i.Undo&&t!==i.Redo&&this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,r,o)&&this._revealRange(e,0,0,!0,0)}},t.prototype._interpretCompositionEnd=function(e){if(!this._isDoingComposition&&"keyboard"===e){var t=uN.getAllAutoClosedCharacters(this._autoClosedActions);this._executeEditOperation(bw.compositionEndWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this._selectionsWhenCompositionStarted,this.getSelections(),t)),this._selectionsWhenCompositionStarted=null}},t.prototype._type=function(e,t){if(this._isDoingComposition||"keyboard"!==e)this._executeEditOperation(bw.typeWithoutInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),t));else{var n=t.length,i=0;while(i<n){var o=Pr(t,i),r=t.substr(i,o),s=uN.getAllAutoClosedCharacters(this._autoClosedActions);this._executeEditOperation(bw.typeWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),s,r)),i+=o}}},t.prototype._replacePreviousChar=function(e,t){this._executeEditOperation(bw.replacePreviousChar(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),e,t))},t.prototype._paste=function(e,t,n){this._executeEditOperation(bw.paste(this.context.config,this.context.model,this.getSelections(),e,t,n))},t.prototype._cut=function(){this._executeEditOperation(uw.cut(this.context.config,this.context.model,this.getSelections()))},t.prototype._externalExecuteCommand=function(e){this._cursors.killSecondaryCursors(),this._executeEditOperation(new J_(0,[e],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},t.prototype._externalExecuteCommands=function(e){this._executeEditOperation(new J_(0,e,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},t.MAX_CURSOR_COUNT=1e4,t}(KC),cN=function(){function e(){}return e.executeCommands=function(e,t,n){for(var i={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(i,n),r=0,s=i.trackedRanges.length;r<s;r++)i.model._setTrackedRange(i.trackedRanges[r],null,0);return o},e._innerExecuteCommands=function(e,t){if(this._arrayIsEmpty(t))return null;var n=this._getEditOperations(e,t);if(0===n.operations.length)return null;var i=n.operations,o=this._getLoserCursorMap(i);if(o.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;for(var r=[],s=0,a=i.length;s<a;s++)o.hasOwnProperty(i[s].identifier.major.toString())||r.push(i[s]);n.hadTrackedEditOperation&&r.length>0&&(r[0]._isTracked=!0);var u=e.model.pushEditOperations(e.selectionsBefore,r,(function(n){for(var i=[],o=0;o<e.selectionsBefore.length;o++)i[o]=[];for(var r=0,s=n;r<s.length;r++){var a=s[r];a.identifier&&i[a.identifier.major].push(a)}var u=function(e,t){return e.identifier.minor-t.identifier.minor},l=[],c=function(n){i[n].length>0?(i[n].sort(u),l[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:function(){return i[n]},getTrackedSelection:function(t){var n=parseInt(t,10),i=e.model._getTrackedRange(e.trackedRanges[n]);return 0===e.trackedRangesDirection[n]?new mn(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new mn(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn)}})):l[n]=e.selectionsBefore[n]};for(o=0;o<e.selectionsBefore.length;o++)c(o);return l}));u||(u=e.selectionsBefore);var l=[];for(var c in o)o.hasOwnProperty(c)&&l.push(parseInt(c,10));l.sort((function(e,t){return t-e}));for(var h=0,d=l;h<d.length;h++){var f=d[h];u.splice(f,1)}return u},e._arrayIsEmpty=function(e){for(var t=0,n=e.length;t<n;t++)if(e[t])return!1;return!0},e._getEditOperations=function(e,t){for(var n=[],i=!1,o=0,r=t.length;o<r;o++){var s=t[o];if(s){var a=this._getEditOperationsFromCommand(e,o,s);n=n.concat(a.operations),i=i||a.hadTrackedEditOperation}}return{operations:n,hadTrackedEditOperation:i}},e._getEditOperationsFromCommand=function(e,t,n){var i=[],o=0,r=function(e,r,s){void 0===s&&(s=!1),e.isEmpty()&&""===r||i.push({identifier:{major:t,minor:o++},range:e,text:r,forceMoveMarkers:s,isAutoWhitespaceEdit:n.insertsAutoWhitespace})},s=!1,a=function(e,t,n){s=!0,r(e,t,n)},u=function(t,n){var i;if(t.isEmpty())if("boolean"===typeof n)i=n?2:3;else{var o=e.model.getLineMaxColumn(t.startLineNumber);i=t.startColumn===o?2:3}else i=1;var r=e.trackedRanges.length,s=e.model._setTrackedRange(null,t,i);return e.trackedRanges[r]=s,e.trackedRangesDirection[r]=t.getDirection(),r.toString()},l={addEditOperation:r,addTrackedEditOperation:a,trackSelection:u};try{n.getEditOperations(e.model,l)}catch(c){return ge(c),{operations:[],hadTrackedEditOperation:!1}}return{operations:i,hadTrackedEditOperation:s}},e._getLoserCursorMap=function(e){e=e.slice(0),e.sort((function(e,t){return-pn.compareRangesUsingEnds(e.range,t.range)}));for(var t={},n=1;n<e.length;n++){var i=e[n-1],o=e[n];if(i.range.getStartPosition().isBefore(o.range.getEndPosition())){var r=void 0;r=i.identifier.major>o.identifier.major?i.identifier.major:o.identifier.major,t[r.toString()]=!0;for(var s=0;s<e.length;s++)e[s].identifier.major===r&&(e.splice(s,1),s<n&&n--,s--);n>0&&n--}}return t},e}(),hN=function(){function e(e,t,n,i,o,r){this.id=e,this.label=t,this.alias=n,this._precondition=i,this._run=o,this._contextKeyService=r}return e.prototype.isSupported=function(){return this._contextKeyService.contextMatchesRules(this._precondition)},e.prototype.run=function(){if(!this.isSupported())return Promise.resolve(void 0);var e=this._run();return e||Promise.resolve(void 0)},e}();function dN(e,t,n,i,o,r,s){for(var a="<div>",u=i,l=0,c=0,h=t.getCount();c<h;c++){var d=t.getEndOffset(c);if(!(d<=i)){for(var f="";u<d&&u<o;u++){var p=e.charCodeAt(u);switch(p){case 9:var g=r-(u+l)%r;l+=g-1;while(g>0)f+=s?"&#160;":" ",g--;break;case 60:f+="&lt;";break;case 62:f+="&gt;";break;case 38:f+="&amp;";break;case 0:f+="&#00;";break;case 65279:case 8232:f+="<22>";break;case 13:f+="&#8203";break;case 32:f+=s?"&#160;":" ";break;default:f+=String.fromCharCode(p)}}if(a+='<span style="'+t.getInlineStyle(c,n)+'">'+f+"</span>",d>o||u>=o)break}}return a+="</div>",a}var fN=function(){function e(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}return e.prototype.insert=function(e){this._hasPending=!0,this._inserts.push(e)},e.prototype.change=function(e){this._hasPending=!0,this._changes.push(e)},e.prototype.remove=function(e){this._hasPending=!0,this._removes.push(e)},e.prototype.mustCommit=function(){return this._hasPending},e.prototype.commit=function(e){if(this._hasPending){var t=this._inserts,n=this._changes,i=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,i)}},e}(),pN=function(){function e(e,t,n,i,o){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=i,this.minWidth=o,this.prefixSum=0}return e}(),gN=function(){function e(t,n){this._instanceId=Yr(++e.INSTANCE_COUNT),this._pendingChanges=new fN,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=t,this._lineHeight=n}return e.findInsertionIndex=function(e,t,n){var i=0,o=e.length;while(i<o){var r=i+o>>>1;t===e[r].afterLineNumber?n<e[r].ordinal?o=r:i=r+1:t<e[r].afterLineNumber?o=r:i=r+1}return i},e.prototype.setLineHeight=function(e){this._checkPendingChanges(),this._lineHeight=e},e.prototype.onFlushed=function(e){this._checkPendingChanges(),this._lineCount=e},e.prototype.changeWhitespace=function(e){var t=this;try{var n={insertWhitespace:function(e,n,i,o){e|=0,n|=0,i|=0,o|=0;var r=t._instanceId+ ++t._lastWhitespaceId;return t._pendingChanges.insert(new pN(r,e,n,i,o)),r},changeOneWhitespace:function(e,n,i){n|=0,i|=0,t._pendingChanges.change({id:e,newAfterLineNumber:n,newHeight:i})},removeWhitespace:function(e){t._pendingChanges.remove({id:e})}};return e(n)}finally{this._pendingChanges.commit(this)}},e.prototype._commitPendingChanges=function(e,t,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){for(var i=0,o=e;i<o.length;i++){var r=o[i];this._insertWhitespace(r)}for(var s=0,a=t;s<a.length;s++){var u=a[s];this._changeOneWhitespace(u.id,u.newAfterLineNumber,u.newHeight)}for(var l=0,c=n;l<c.length;l++){var h=c[l],d=this._findWhitespaceIndex(h.id);-1!==d&&this._removeWhitespace(d)}}else{for(var f=new Set,p=0,g=n;p<g.length;p++){h=g[p];f.add(h.id)}for(var m=new Map,v=0,_=t;v<_.length;v++){u=_[v];m.set(u.id,u)}var y=function(e){for(var t=[],n=0,i=e;n<i.length;n++){var o=i[n];if(!f.has(o.id)){if(m.has(o.id)){var r=m.get(o.id);o.afterLineNumber=r.newAfterLineNumber,o.height=r.newHeight}t.push(o)}}return t},b=y(this._arr).concat(y(e));b.sort((function(e,t){return e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber})),this._arr=b,this._prefixSumValidIndex=-1}},e.prototype._checkPendingChanges=function(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)},e.prototype._insertWhitespace=function(t){var n=e.findInsertionIndex(this._arr,t.afterLineNumber,t.ordinal);this._arr.splice(n,0,t),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)},e.prototype._findWhitespaceIndex=function(e){for(var t=this._arr,n=0,i=t.length;n<i;n++)if(t[n].id===e)return n;return-1},e.prototype._changeOneWhitespace=function(e,t,n){var i=this._findWhitespaceIndex(e);if(-1!==i&&(this._arr[i].height!==n&&(this._arr[i].height=n,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,i-1)),this._arr[i].afterLineNumber!==t)){var o=this._arr[i];this._removeWhitespace(i),o.afterLineNumber=t,this._insertWhitespace(o)}},e.prototype._removeWhitespace=function(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)},e.prototype.onLinesDeleted=function(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount-=t-e+1;for(var n=0,i=this._arr.length;n<i;n++){var o=this._arr[n].afterLineNumber;e<=o&&o<=t?this._arr[n].afterLineNumber=e-1:o>t&&(this._arr[n].afterLineNumber-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(var n=0,i=this._arr.length;n<i;n++){var o=this._arr[n].afterLineNumber;e<=o&&(this._arr[n].afterLineNumber+=t-e+1)}},e.prototype.getWhitespacesTotalHeight=function(){return this._checkPendingChanges(),0===this._arr.length?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)},e.prototype.getWhitespacesAccumulatedHeight=function(e){this._checkPendingChanges(),e|=0;var t=Math.max(0,this._prefixSumValidIndex+1);0===t&&(this._arr[0].prefixSum=this._arr[0].height,t++);for(var n=t;n<=e;n++)this._arr[n].prefixSum=this._arr[n-1].prefixSum+this._arr[n].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum},e.prototype.getLinesTotalHeight=function(){this._checkPendingChanges();var e=this._lineHeight*this._lineCount,t=this.getWhitespacesTotalHeight();return e+t},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){this._checkPendingChanges(),e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e);return-1===t?0:this.getWhitespacesAccumulatedHeight(t)},e.prototype._findLastWhitespaceBeforeLineNumber=function(e){e|=0;var t=this._arr,n=0,i=t.length-1;while(n<=i){var o=i-n|0,r=o/2|0,s=n+r|0;if(t[s].afterLineNumber<e){if(s+1>=t.length||t[s+1].afterLineNumber>=e)return s;n=s+1|0}else i=s-1|0}return-1},e.prototype._findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e),n=t+1;return n<this._arr.length?n:-1},e.prototype.getFirstWhitespaceIndexAfterLineNumber=function(e){return this._checkPendingChanges(),e|=0,this._findFirstWhitespaceAfterLineNumber(e)},e.prototype.getVerticalOffsetForLineNumber=function(e){var t;this._checkPendingChanges(),e|=0,t=e>1?this._lineHeight*(e-1):0;var n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e);return t+n},e.prototype.getWhitespaceMinWidth=function(){if(this._checkPendingChanges(),-1===this._minWidth){for(var e=0,t=0,n=this._arr.length;t<n;t++)e=Math.max(e,this._arr[t].minWidth);this._minWidth=e}return this._minWidth},e.prototype.isAfterLines=function(e){this._checkPendingChanges();var t=this.getLinesTotalHeight();return e>t},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){if(this._checkPendingChanges(),e|=0,e<0)return 1;var t=0|this._lineCount,n=this._lineHeight,i=1,o=t;while(i<o){var r=(i+o)/2|0,s=0|this.getVerticalOffsetForLineNumber(r);if(e>=s+n)i=r+1;else{if(e>=s)return r;o=r}}return i>t?t:i},e.prototype.getLinesViewportData=function(e,t){this._checkPendingChanges(),e|=0,t|=0;var n,i,o=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,u=0|this.getFirstWhitespaceIndexAfterLineNumber(r),l=0|this.getWhitespacesCount();-1===u?(u=l,i=a+1,n=0):(i=0|this.getAfterLineNumberForWhitespaceIndex(u),n=0|this.getHeightForWhitespaceIndex(u));var c=s,h=c,d=5e5,f=0;s>=d&&(f=Math.floor(s/d)*d,f=Math.floor(f/o)*o,h-=f);for(var p=[],g=e+(t-e)/2,m=-1,v=r;v<=a;v++){if(-1===m){var _=c,y=c+o;(_<=g&&g<y||_>g)&&(m=v)}c+=o,p[v-r]=h,h+=o;while(i===v)h+=n,c+=n,u++,u>=l?i=a+1:(i=0|this.getAfterLineNumberForWhitespaceIndex(u),n=0|this.getHeightForWhitespaceIndex(u));if(c>=t){a=v;break}}-1===m&&(m=a);var b=0|this.getVerticalOffsetForLineNumber(a),C=r,w=a;return C<w&&s<e&&C++,C<w&&b+o>t&&w--,{bigNumbersDelta:f,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:p,centeredLineNumber:m,completelyVisibleStartLineNumber:C,completelyVisibleEndLineNumber:w}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e){this._checkPendingChanges(),e|=0;var t,n,i=this.getAfterLineNumberForWhitespaceIndex(e);return t=i>=1?this._lineHeight*i:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,t+n},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e){this._checkPendingChanges(),e|=0;var t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;var i=this.getVerticalOffsetForWhitespaceIndex(n),o=this.getHeightForWhitespaceIndex(n);if(e>=i+o)return-1;while(t<n){var r=Math.floor((t+n)/2),s=this.getVerticalOffsetForWhitespaceIndex(r),a=this.getHeightForWhitespaceIndex(r);if(e>=s+a)t=r+1;else{if(e>=s)return r;n=r}}return t},e.prototype.getWhitespaceAtVerticalOffset=function(e){this._checkPendingChanges(),e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;var n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;var i=this.getHeightForWhitespaceIndex(t),o=this.getIdForWhitespaceIndex(t),r=this.getAfterLineNumberForWhitespaceIndex(t);return{id:o,afterLineNumber:r,verticalOffset:n,height:i}},e.prototype.getWhitespaceViewportData=function(e,t){this._checkPendingChanges(),e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this.getWhitespacesCount()-1;if(n<0)return[];for(var o=[],r=n;r<=i;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this.getHeightForWhitespaceIndex(r);if(s>=t)break;o.push({id:this.getIdForWhitespaceIndex(r),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a})}return o},e.prototype.getWhitespaces=function(){return this._checkPendingChanges(),this._arr.slice(0)},e.prototype.getWhitespacesCount=function(){return this._checkPendingChanges(),this._arr.length},e.prototype.getIdForWhitespaceIndex=function(e){return this._checkPendingChanges(),e|=0,this._arr[e].id},e.prototype.getAfterLineNumberForWhitespaceIndex=function(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber},e.prototype.getHeightForWhitespaceIndex=function(e){return this._checkPendingChanges(),e|=0,this._arr[e].height},e.INSTANCE_COUNT=0,e}(),mN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vN=125,_N=function(){function e(e,t,n,i){e|=0,t|=0,n|=0,i|=0,e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),i<0&&(i=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=i,this.scrollHeight=Math.max(n,i)}return e.prototype.equals=function(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight},e}(),yN=function(e){function t(t,n){var i=e.call(this)||this;return i._onDidContentSizeChange=i._register(new qe),i.onDidContentSizeChange=i._onDidContentSizeChange.event,i._dimensions=new _N(0,0,0,0),i._scrollable=i._register(new bS(t,n)),i.onDidScroll=i._scrollable.onScroll,i}return mN(t,e),t.prototype.getScrollable=function(){return this._scrollable},t.prototype.setSmoothScrollDuration=function(e){this._scrollable.setSmoothScrollDuration(e)},t.prototype.validateScrollPosition=function(e){return this._scrollable.validateScrollPosition(e)},t.prototype.getScrollDimensions=function(){return this._dimensions},t.prototype.setScrollDimensions=function(e){if(!this._dimensions.equals(e)){var t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight});var n=t.contentWidth!==e.contentWidth,i=t.contentHeight!==e.contentHeight;(n||i)&&this._onDidContentSizeChange.fire({contentWidth:e.contentWidth,contentHeight:e.contentHeight,contentWidthChanged:n,contentHeightChanged:i})}},t.prototype.getFutureScrollPosition=function(){return this._scrollable.getFutureScrollPosition()},t.prototype.getCurrentScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t.prototype.setScrollPositionNow=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this._scrollable.setScrollPositionSmooth(e)},t}(Me),bN=function(e){function t(t,n,i){var o=e.call(this)||this;o._configuration=t;var r=o._configuration.options,s=r.get(107);return o._linesLayout=new gN(n,r.get(49)),o._scrollable=o._register(new yN(0,i)),o._configureSmoothScrollDuration(),o._scrollable.setScrollDimensions(new _N(s.contentWidth,0,s.height,0)),o.onDidScroll=o._scrollable.onDidScroll,o.onDidContentSizeChange=o._scrollable.onDidContentSizeChange,o._updateHeight(),o}return mN(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.getScrollable=function(){return this._scrollable.getScrollable()},t.prototype.onHeightMaybeChanged=function(){this._updateHeight()},t.prototype._configureSmoothScrollDuration=function(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(87)?vN:0)},t.prototype.onConfigurationChanged=function(e){var t=this._configuration.options;if(e.hasChanged(49)&&this._linesLayout.setLineHeight(t.get(49)),e.hasChanged(107)){var n=t.get(107),i=n.contentWidth,o=n.height,r=this._scrollable.getScrollDimensions(),s=r.scrollWidth;this._scrollable.setScrollDimensions(new _N(i,r.contentWidth,o,this._getContentHeight(i,o,s)))}else this._updateHeight();e.hasChanged(87)&&this._configureSmoothScrollDuration()},t.prototype.onFlushed=function(e){this._linesLayout.onFlushed(e)},t.prototype.onLinesDeleted=function(e,t){this._linesLayout.onLinesDeleted(e,t)},t.prototype.onLinesInserted=function(e,t){this._linesLayout.onLinesInserted(e,t)},t.prototype._getHorizontalScrollbarHeight=function(e,t){var n=this._configuration.options,i=n.get(78);return 2===i.horizontal?0:e>=t?0:i.horizontalScrollbarSize},t.prototype._getContentHeight=function(e,t,n){var i=this._configuration.options,o=this._linesLayout.getLinesTotalHeight();return i.get(80)?o+=t-i.get(49):o+=this._getHorizontalScrollbarHeight(e,n),o},t.prototype._updateHeight=function(){var e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,i=e.scrollWidth;this._scrollable.setScrollDimensions(new _N(t,e.contentWidth,n,this._getContentHeight(t,n,i)))},t.prototype.getCurrentViewport=function(){var e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new Th(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype.getFutureViewport=function(){var e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new Th(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype._computeContentWidth=function(e){var t=this._configuration.options,n=t.get(108),i=t.get(34);if(n.isViewportWrapping){var o=t.get(107),r=t.get(54);return e>o.contentWidth+i.typicalHalfwidthCharacterWidth&&r.enabled&&"right"===r.side?e+o.verticalScrollbarWidth:e}var s=t.get(79)*i.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+s,a)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new _N(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()},t.prototype.saveState=function(){var e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),i=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n);return{scrollTop:t,scrollTopWithoutViewZones:t-i,scrollLeft:e.scrollLeft}},t.prototype.changeWhitespace=function(e){return this._linesLayout.changeWhitespace(e)},t.prototype.getVerticalOffsetForLineNumber=function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)},t.prototype.isAfterLines=function(e){return this._linesLayout.isAfterLines(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)},t.prototype.getLinesViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)},t.prototype.getLinesViewportDataAtScrollTop=function(e){var 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)},t.prototype.getWhitespaceViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)},t.prototype.getWhitespaces=function(){return this._linesLayout.getWhitespaces()},t.prototype.getContentWidth=function(){var e=this._scrollable.getScrollDimensions();return e.contentWidth},t.prototype.getScrollWidth=function(){var e=this._scrollable.getScrollDimensions();return e.scrollWidth},t.prototype.getContentHeight=function(){var e=this._scrollable.getScrollDimensions();return e.contentHeight},t.prototype.getScrollHeight=function(){var e=this._scrollable.getScrollDimensions();return e.scrollHeight},t.prototype.getCurrentScrollLeft=function(){var e=this._scrollable.getCurrentScrollPosition();return e.scrollLeft},t.prototype.getCurrentScrollTop=function(){var e=this._scrollable.getCurrentScrollPosition();return e.scrollTop},t.prototype.validateScrollPosition=function(e){return this._scrollable.validateScrollPosition(e)},t.prototype.setScrollPositionNow=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this._scrollable.setScrollPositionSmooth(e)},t.prototype.deltaScrollNow=function(e,t){var n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})},t}(Me),CN=function(){function e(e,t){this.outputLineIndex=e,this.outputOffset=t}return e}(),wN=function(){function e(e,t,n){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=n}return e.getInputOffsetOfOutputPosition=function(e,t,n){return 0===t?n:e[t-1]+n},e.getOutputPositionOfInputOffset=function(e,t){var n=0,i=e.length-1,o=0,r=0;while(n<=i){o=n+(i-n)/2|0;var s=e[o];if(r=o>0?e[o-1]:0,t<r)i=o-1;else{if(!(t>=s))break;n=o+1}}return new CN(o,t-r)},e}(),SN=function(){function e(e){this._lines=e}return e.prototype.convertViewPositionToModelPosition=function(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)},e.prototype.convertViewRangeToModelRange=function(e){return this._lines.convertViewRangeToModelRange(e)},e.prototype.validateViewPosition=function(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)},e.prototype.validateViewRange=function(e,t){return this._lines.validateViewRange(e,t)},e.prototype.convertModelPositionToViewPosition=function(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)},e.prototype.convertModelRangeToViewRange=function(e){return this._lines.convertModelRangeToViewRange(e)},e.prototype.modelPositionIsVisible=function(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)},e}(),LN=function(){function e(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}return e.prototype._invalidate=function(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)},e.prototype._ensureValid=function(){if(!this._isValid){for(var e=this._validEndIndex+1,t=this._counts.length;e<t;e++){var n=this._counts[e],i=e>0?this._modelToView[e-1]:0;this._modelToView[e]=i+n;for(var o=0;o<n;o++)this._viewToModel[i+o]=e}this._modelToView.length=this._counts.length,this._viewToModel.length=this._modelToView[this._modelToView.length-1],this._isValid=!0,this._validEndIndex=this._counts.length-1}},e.prototype.changeValue=function(e,t){this._counts[e]!==t&&(this._counts[e]=t,this._invalidate(e))},e.prototype.removeValues=function(e,t){this._counts.splice(e,t),this._invalidate(e)},e.prototype.insertValues=function(e,t){this._counts=Fi(this._counts,e,t),this._invalidate(e)},e.prototype.getTotalValue=function(){return this._ensureValid(),this._viewToModel.length},e.prototype.getAccumulatedValue=function(e){return this._ensureValid(),this._modelToView[e]},e.prototype.getIndexOf=function(e){this._ensureValid();var t=this._viewToModel[e],n=t>0?this._modelToView[t-1]:0;return new _c(t,e-n)},e}(),NN=function(){function e(e,t,n,i,o,r,s,a){this.model=e,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=t,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=i,this.tabSize=o,this.wrappingStrategy=r,this.wrappingColumn=s,this.wrappingIndent=a,this._constructLines(!0,null)}return e.prototype.dispose=function(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])},e.prototype.createCoordinatesConverter=function(){return new SN(this)},e.prototype._constructLines=function(e,t){var n=this;this.lines=[],e&&(this.hiddenAreasIds=[]);for(var i=this.model.getLinesContent(),o=i.length,r=this.createLineBreaksComputer(),s=0;s<o;s++)r.addRequest(i[s],t?t[s]:null);var a=r.finalize(),u=[],l=this.hiddenAreasIds.map((function(e){return n.model.getDecorationRange(e)})).sort(pn.compareRangesUsingStarts),c=1,h=0,d=-1,f=d+1<l.length?h+1:o+2;for(s=0;s<o;s++){var p=s+1;p===f&&(d++,c=l[d].startLineNumber,h=l[d].endLineNumber,f=d+1<l.length?h+1:o+2);var g=p>=c&&p<=h,m=MN(a[s],!g);u[s]=m.getViewLineCount(),this.lines[s]=m}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new LN(u)},e.prototype.getHiddenAreas=function(){var e=this;return this.hiddenAreasIds.map((function(t){return e.model.getDecorationRange(t)}))},e.prototype._reduceRanges=function(e){var t=this;if(0===e.length)return[];for(var n=e.map((function(e){return t.model.validateRange(e)})).sort(pn.compareRangesUsingStarts),i=[],o=n[0].startLineNumber,r=n[0].endLineNumber,s=1,a=n.length;s<a;s++){var u=n[s];u.startLineNumber>r+1?(i.push(new pn(o,1,r,1)),o=u.startLineNumber,r=u.endLineNumber):u.endLineNumber>r&&(r=u.endLineNumber)}return i.push(new pn(o,1,r,1)),i},e.prototype.setHiddenAreas=function(e){var t=this,n=this._reduceRanges(e),i=this.hiddenAreasIds.map((function(e){return t.model.getDecorationRange(e)})).sort(pn.compareRangesUsingStarts);if(n.length===i.length){for(var o=!1,r=0;r<n.length;r++)if(!n[r].equalsRange(i[r])){o=!0;break}if(!o)return!1}for(var s=[],a=0,u=n;a<u.length;a++){var l=u[a];s.push({range:l,options:W_.EMPTY})}this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,s);var c=n,h=1,d=0,f=-1,p=f+1<c.length?d+1:this.lines.length+2,g=!1;for(r=0;r<this.lines.length;r++){var m=r+1;m===p&&(f++,h=c[f].startLineNumber,d=c[f].endLineNumber,p=f+1<c.length?d+1:this.lines.length+2);var v=!1;if(m>=h&&m<=d?this.lines[r].isVisible()&&(this.lines[r]=this.lines[r].setVisible(!1),v=!0):(g=!0,this.lines[r].isVisible()||(this.lines[r]=this.lines[r].setVisible(!0),v=!0)),v){var _=this.lines[r].getViewLineCount();this.prefixSumComputer.changeValue(r,_)}}return g||this.setHiddenAreas([]),!0},e.prototype.modelPositionIsVisible=function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()},e.prototype.setTabSize=function(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)},e.prototype.setWrappingSettings=function(e,t,n,i){var o=this.fontInfo.equals(e),r=this.wrappingStrategy===t,s=this.wrappingColumn===n,a=this.wrappingIndent===i;if(o&&r&&s&&a)return!1;var u=o&&r&&!s&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=i;var l=null;if(u){l=[];for(var c=0,h=this.lines.length;c<h;c++)l[c]=this.lines[c].getLineBreakData()}return this._constructLines(!1,l),!0},e.prototype.createLineBreaksComputer=function(){var e="advanced"===this.wrappingStrategy?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory;return e.createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)},e.prototype.onModelFlushed=function(){this._constructLines(!0,null)},e.prototype.onModelLinesDeleted=function(e,t,n){if(e<=this._validModelVersionId)return null;var i=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,o=this.prefixSumComputer.getAccumulatedValue(n-1);return this.lines.splice(t-1,n-t+1),this.prefixSumComputer.removeValues(t-1,n-t+1),new FC(i,o)},e.prototype.onModelLinesInserted=function(e,t,n,i){if(e<=this._validModelVersionId)return null;for(var o=this.getHiddenAreas(),r=!1,s=new fn(t,1),a=0,u=o;a<u.length;a++){var l=u[a];if(l.containsPosition(s)){r=!0;break}}for(var c=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,h=0,d=[],f=[],p=0,g=i.length;p<g;p++){var m=MN(i[p],!r);d.push(m);var v=m.getViewLineCount();h+=v,f[p]=v}return this.lines=this.lines.slice(0,t-1).concat(d).concat(this.lines.slice(t-1)),this.prefixSumComputer.insertValues(t-1,f),new WC(c,c+h-1)},e.prototype.onModelLineChanged=function(e,t,n){if(e<=this._validModelVersionId)return[!1,null,null,null];var i=t-1,o=this.lines[i].getViewLineCount(),r=this.lines[i].isVisible(),s=MN(n,r);this.lines[i]=s;var a=this.lines[i].getViewLineCount(),u=!1,l=0,c=-1,h=0,d=-1,f=0,p=-1;o>a?(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,c=l+a-1,f=c+1,p=f+(o-a)-1,u=!0):o<a?(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,c=l+o-1,h=c+1,d=h+(a-o)-1,u=!0):(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,c=l+a-1),this.prefixSumComputer.changeValue(i,a);var g=l<=c?new RC(l,c):null,m=h<=d?new WC(h,d):null,v=f<=p?new FC(f,p):null;return[u,g,m,v]},e.prototype.acceptVersionId=function(e){this._validModelVersionId=e,1!==this.lines.length||this.lines[0].isVisible()||this.setHiddenAreas([])},e.prototype.getViewLineCount=function(){return this.prefixSumComputer.getTotalValue()},e.prototype._toValidViewLineNumber=function(e){if(e<1)return 1;var t=this.getViewLineCount();return e>t?t:0|e},e.prototype.getActiveIndentGuide=function(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);var i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),s=this.model.getActiveIndentGuide(i.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),u=this.convertModelPositionToViewPosition(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:u.lineNumber,indent:s.indent}},e.prototype.getViewLinesIndentGuides=function(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),o=[],r=[],s=[],a=n.lineNumber-1,u=i.lineNumber-1,l=null,c=a;c<=u;c++){var h=this.lines[c];if(h.isVisible()){var d=h.getViewLineNumberOfModelPosition(0,c===a?n.column:1),f=h.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(c+1)),p=f-d+1,g=0;p>1&&1===h.getViewLineMinColumn(this.model,c+1,f)&&(g=0===d?1:2),r.push(p),s.push(g),null===l&&(l=new fn(c+1,0))}else null!==l&&(o=o.concat(this.model.getLinesIndentGuides(l.lineNumber,c)),l=null)}null!==l&&(o=o.concat(this.model.getLinesIndentGuides(l.lineNumber,i.lineNumber)),l=null);for(var m=t-e+1,v=new Array(m),_=0,y=0,b=o.length;y<b;y++){var C=o[y],w=(p=Math.min(m-_,r[y]),g=s[y],void 0);w=2===g?0:1===g?1:p;for(var S=0;S<p;S++)S===w&&(C=0),v[_++]=C}return v},e.prototype.getViewLineContent=function(e){e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineContent(this.model,n+1,i)},e.prototype.getViewLineLength=function(e){e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineLength(this.model,n+1,i)},e.prototype.getViewLineMinColumn=function(e){e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineMinColumn(this.model,n+1,i)},e.prototype.getViewLineMaxColumn=function(e){e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineMaxColumn(this.model,n+1,i)},e.prototype.getViewLineData=function(e){e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineData(this.model,n+1,i)},e.prototype.getViewLinesData=function(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var i=this.prefixSumComputer.getIndexOf(e-1),o=e,r=i.index,s=i.remainder,a=[],u=r,l=this.model.getLineCount();u<l;u++){var c=this.lines[u];if(c.isVisible()){var h=u===r?s:0,d=c.getViewLineCount()-h,f=!1;o+d>t&&(f=!0,d=t-o+1);var p=h+d;if(c.getViewLinesData(this.model,u+1,h,p,o-e,n,a),o+=d,f)break}}return a},e.prototype.validateViewPosition=function(e,t,n){e=this._toValidViewLineNumber(e);var i=this.prefixSumComputer.getIndexOf(e-1),o=i.index,r=i.remainder,s=this.lines[o],a=s.getViewLineMinColumn(this.model,o+1,r),u=s.getViewLineMaxColumn(this.model,o+1,r);t<a&&(t=a),t>u&&(t=u);var l=s.getModelColumnOfViewPosition(r,t),c=this.model.validatePosition(new fn(o+1,l));return c.equals(n)?new fn(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)},e.prototype.validateViewRange=function(e,t){var n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),i=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new pn(n.lineNumber,n.column,i.lineNumber,i.column)},e.prototype.convertViewPositionToModelPosition=function(e,t){e=this._toValidViewLineNumber(e);var n=this.prefixSumComputer.getIndexOf(e-1),i=n.index,o=n.remainder,r=this.lines[i].getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new fn(i+1,r))},e.prototype.convertViewRangeToModelRange=function(e){var t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new pn(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype.convertModelPositionToViewPosition=function(e,t){var n=this.model.validatePosition(new fn(e,t)),i=n.lineNumber,o=n.column,r=i-1,s=!1;while(r>0&&!this.lines[r].isVisible())r--,s=!0;if(0===r&&!this.lines[r].isVisible())return new fn(1,1);var a,u=1+(0===r?0:this.prefixSumComputer.getAccumulatedValue(r-1));return a=s?this.lines[r].getViewPositionOfModelPosition(u,this.model.getLineMaxColumn(r+1)):this.lines[i-1].getViewPositionOfModelPosition(u,o),a},e.prototype.convertModelRangeToViewRange=function(e){var t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return e.startLineNumber===e.endLineNumber&&t.lineNumber!==n.lineNumber&&n.column===this.getViewLineMinColumn(n.lineNumber)?new pn(t.lineNumber,t.column,n.lineNumber-1,this.getViewLineMaxColumn(n.lineNumber-1)):new pn(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype._getViewLineNumberForModelPosition=function(e,t){var n=e-1;if(this.lines[n].isVisible()){var i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,t)}while(n>0&&!this.lines[n].isVisible())n--;if(0===n&&!this.lines[n].isVisible())return 1;var o=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(o,this.model.getLineMaxColumn(n+1))},e.prototype.getAllOverviewRulerDecorations=function(e,t,n){for(var i=this.model.getOverviewRulerDecorations(e,t),o=new PN,r=0,s=i;r<s.length;r++){var a=s[r],u=a.options.overviewRuler,l=u?u.position:0;if(0!==l){var c=u.getColor(n),h=this._getViewLineNumberForModelPosition(a.range.startLineNumber,a.range.startColumn),d=this._getViewLineNumberForModelPosition(a.range.endLineNumber,a.range.endColumn);o.accept(c,h,d,l)}}return o.result},e.prototype.getDecorationsInRange=function(e,t,n){var i=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),o=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(o.lineNumber-i.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new pn(i.lineNumber,1,o.lineNumber,o.column),t,n);for(var r=[],s=i.lineNumber-1,a=o.lineNumber-1,u=null,l=s;l<=a;l++){var c=this.lines[l];if(c.isVisible())null===u&&(u=new fn(l+1,l===s?i.column:1));else if(null!==u){var h=this.model.getLineMaxColumn(l);r=r.concat(this.model.getDecorationsInRange(new pn(u.lineNumber,u.column,l,h),t,n)),u=null}}null!==u&&(r=r.concat(this.model.getDecorationsInRange(new pn(u.lineNumber,u.column,o.lineNumber,o.column),t,n)),u=null),r.sort((function(e,t){var n=pn.compareRangesUsingStarts(e.range,t.range);return 0===n?e.id<t.id?-1:e.id>t.id?1:0:n}));for(var d=[],f=0,p=null,g=0,m=r;g<m.length;g++){var v=m[g],_=v.id;p!==_&&(p=_,d[f++]=v)}return d},e}(),DN=function(){function e(){}return e.prototype.isVisible=function(){return!0},e.prototype.setVisible=function(e){return e?this:EN.INSTANCE},e.prototype.getLineBreakData=function(){return null},e.prototype.getViewLineCount=function(){return 1},e.prototype.getViewLineContent=function(e,t,n){return e.getLineContent(t)},e.prototype.getViewLineLength=function(e,t,n){return e.getLineLength(t)},e.prototype.getViewLineMinColumn=function(e,t,n){return e.getLineMinColumn(t)},e.prototype.getViewLineMaxColumn=function(e,t,n){return e.getLineMaxColumn(t)},e.prototype.getViewLineData=function(e,t,n){var i=e.getLineTokens(t),o=i.getLineContent();return new Ih(o,!1,1,o.length+1,0,i.inflate())},e.prototype.getViewLinesData=function(e,t,n,i,o,r,s){r[o]?s[o]=this.getViewLineData(e,t,0):s[o]=null},e.prototype.getModelColumnOfViewPosition=function(e,t){return t},e.prototype.getViewPositionOfModelPosition=function(e,t){return new fn(e,t)},e.prototype.getViewLineNumberOfModelPosition=function(e,t){return e},e.INSTANCE=new e,e}(),EN=function(){function e(){}return e.prototype.isVisible=function(){return!1},e.prototype.setVisible=function(e){return e?DN.INSTANCE:this},e.prototype.getLineBreakData=function(){return null},e.prototype.getViewLineCount=function(){return 0},e.prototype.getViewLineContent=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLineLength=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLineMinColumn=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLineMaxColumn=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLineData=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLinesData=function(e,t,n,i,o,r,s){throw new Error("Not supported")},e.prototype.getModelColumnOfViewPosition=function(e,t){throw new Error("Not supported")},e.prototype.getViewPositionOfModelPosition=function(e,t){throw new Error("Not supported")},e.prototype.getViewLineNumberOfModelPosition=function(e,t){throw new Error("Not supported")},e.INSTANCE=new e,e}(),xN=function(){function e(e,t){this._lineBreakData=e,this._isVisible=t}return e.prototype.isVisible=function(){return this._isVisible},e.prototype.setVisible=function(e){return this._isVisible=e,this},e.prototype.getLineBreakData=function(){return this._lineBreakData},e.prototype.getViewLineCount=function(){return this._isVisible?this._lineBreakData.breakOffsets.length:0},e.prototype.getInputStartOffsetOfOutputLineIndex=function(e){return wN.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,e,0)},e.prototype.getInputEndOffsetOfOutputLineIndex=function(e,t,n){return n+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:wN.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,n+1,0)},e.prototype.getViewLineContent=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:o+1});return n>0&&(r=ON(this._lineBreakData.wrappedTextIndentLength)+r),r},e.prototype.getViewLineLength=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=o-i;return n>0&&(r=this._lineBreakData.wrappedTextIndentLength+r),r},e.prototype.getViewLineMinColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this._lineBreakData.wrappedTextIndentLength+1:1},e.prototype.getViewLineMaxColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,n).length+1},e.prototype.getViewLineData=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:o+1});n>0&&(r=ON(this._lineBreakData.wrappedTextIndentLength)+r);var s=n>0?this._lineBreakData.wrappedTextIndentLength+1:1,a=r.length+1,u=n+1<this.getViewLineCount(),l=0;n>0&&(l=this._lineBreakData.wrappedTextIndentLength);var c=e.getLineTokens(t),h=0===n?0:this._lineBreakData.breakOffsetsVisibleColumn[n-1];return new Ih(r,u,s,a,h,c.sliceAndInflate(i,o,l))},e.prototype.getViewLinesData=function(e,t,n,i,o,r,s){if(!this._isVisible)throw new Error("Not supported");for(var a=n;a<i;a++){var u=o+a-n;r[u]?s[u]=this.getViewLineData(e,t,a):s[u]=null}},e.prototype.getModelColumnOfViewPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");var n=t-1;return e>0&&(n<this._lineBreakData.wrappedTextIndentLength?n=0:n-=this._lineBreakData.wrappedTextIndentLength),wN.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,e,n)+1},e.prototype.getViewPositionOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");var n=wN.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1),i=n.outputLineIndex,o=n.outputOffset+1;return i>0&&(o+=this._lineBreakData.wrappedTextIndentLength),new fn(e+i,o)},e.prototype.getViewLineNumberOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");var n=wN.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1);return e+n.outputLineIndex},e}(),kN=[""];function ON(e){if(e>=kN.length)for(var t=1;t<=e;t++)kN[t]=TN(t);return kN[e]}function TN(e){return new Array(e+1).join(" ")}function MN(e,t){return null===e?t?DN.INSTANCE:EN.INSTANCE:new xN(e,t)}var IN=function(){function e(e){this._lines=e}return e.prototype._validPosition=function(e){return this._lines.model.validatePosition(e)},e.prototype._validRange=function(e){return this._lines.model.validateRange(e)},e.prototype.convertViewPositionToModelPosition=function(e){return this._validPosition(e)},e.prototype.convertViewRangeToModelRange=function(e){return this._validRange(e)},e.prototype.validateViewPosition=function(e,t){return this._validPosition(t)},e.prototype.validateViewRange=function(e,t){return this._validRange(t)},e.prototype.convertModelPositionToViewPosition=function(e){return this._validPosition(e)},e.prototype.convertModelRangeToViewRange=function(e){return this._validRange(e)},e.prototype.modelPositionIsVisible=function(e){var t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)},e}(),AN=function(){function e(e){this.model=e}return e.prototype.dispose=function(){},e.prototype.createCoordinatesConverter=function(){return new IN(this)},e.prototype.getHiddenAreas=function(){return[]},e.prototype.setHiddenAreas=function(e){return!1},e.prototype.setTabSize=function(e){return!1},e.prototype.setWrappingSettings=function(e,t,n,i){return!1},e.prototype.createLineBreaksComputer=function(){var e=[];return{addRequest:function(t,n){e.push(null)},finalize:function(){return e}}},e.prototype.onModelFlushed=function(){},e.prototype.onModelLinesDeleted=function(e,t,n){return new FC(t,n)},e.prototype.onModelLinesInserted=function(e,t,n,i){return new WC(t,n)},e.prototype.onModelLineChanged=function(e,t,n){return[!1,new RC(t,t),null,null]},e.prototype.acceptVersionId=function(e){},e.prototype.getViewLineCount=function(){return this.model.getLineCount()},e.prototype.getActiveIndentGuide=function(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}},e.prototype.getViewLinesIndentGuides=function(e,t){for(var n=t-e+1,i=new Array(n),o=0;o<n;o++)i[o]=0;return i},e.prototype.getViewLineContent=function(e){return this.model.getLineContent(e)},e.prototype.getViewLineLength=function(e){return this.model.getLineLength(e)},e.prototype.getViewLineMinColumn=function(e){return this.model.getLineMinColumn(e)},e.prototype.getViewLineMaxColumn=function(e){return this.model.getLineMaxColumn(e)},e.prototype.getViewLineData=function(e){var t=this.model.getLineTokens(e),n=t.getLineContent();return new Ih(n,!1,1,n.length+1,0,t.inflate())},e.prototype.getViewLinesData=function(e,t,n){var i=this.model.getLineCount();e=Math.min(Math.max(1,e),i),t=Math.min(Math.max(1,t),i);for(var o=[],r=e;r<=t;r++){var s=r-e;n[s]||(o[s]=null),o[s]=this.getViewLineData(r)}return o},e.prototype.getAllOverviewRulerDecorations=function(e,t,n){for(var i=this.model.getOverviewRulerDecorations(e,t),o=new PN,r=0,s=i;r<s.length;r++){var a=s[r],u=a.options.overviewRuler,l=u?u.position:0;if(0!==l){var c=u.getColor(n),h=a.range.startLineNumber,d=a.range.endLineNumber;o.accept(c,h,d,l)}}return o.result},e.prototype.getDecorationsInRange=function(e,t,n){return this.model.getDecorationsInRange(e,t,n)},e}(),PN=function(){function e(){this.result=Object.create(null)}return e.prototype.accept=function(e,t,n,i){var o=this.result[e];if(o){var r=o[o.length-3],s=o[o.length-1];if(r===i&&s+1>=t)return void(n>s&&(o[o.length-1]=n));o.push(i,t,n)}else this.result[e]=[i,t,n]},e}(),RN=function(){function e(e,t,n,i,o){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=i,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onLineMappingChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype._getOrCreateViewModelDecoration=function(e){var t=e.id,n=this._decorationsCache[t];if(!n){var i=e.range,o=e.options,r=void 0;if(o.isWholeLine){var s=this._coordinatesConverter.convertModelPositionToViewPosition(new fn(i.startLineNumber,1)),a=this._coordinatesConverter.convertModelPositionToViewPosition(new fn(i.endLineNumber,this.model.getLineMaxColumn(i.endLineNumber)));r=new pn(s.lineNumber,s.column,a.lineNumber,a.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(i);n=new Rh(r,o),this._decorationsCache[t]=n}return n},e.prototype.getDecorationsViewportData=function(e){var t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver},e.prototype._getDecorationsViewportData=function(e){for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,$(this.configuration.options)),n=e.startLineNumber,i=e.endLineNumber,o=[],r=0,s=[],a=n;a<=i;a++)s[a-n]=[];for(var u=0,l=t.length;u<l;u++){var c=t[u],h=c.options,d=this._getOrCreateViewModelDecoration(c),f=d.range;if(o[r++]=d,h.inlineClassName){var p=new Ph(f,h.inlineClassName,h.inlineClassNameAffectsLetterSpacing?3:0),g=Math.max(n,f.startLineNumber),m=Math.min(i,f.endLineNumber);for(a=g;a<=m;a++)s[a-n].push(p)}if(h.beforeContentClassName&&n<=f.startLineNumber&&f.startLineNumber<=i){p=new Ph(new pn(f.startLineNumber,f.startColumn,f.startLineNumber,f.startColumn),h.beforeContentClassName,1);s[f.startLineNumber-n].push(p)}if(h.afterContentClassName&&n<=f.endLineNumber&&f.endLineNumber<=i){p=new Ph(new pn(f.endLineNumber,f.endColumn,f.endLineNumber,f.endColumn),h.afterContentClassName,2);s[f.endLineNumber-n].push(p)}}return{decorations:o,inlineDecorations:s}},e}(),FN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),WN=!0,VN=function(e){function t(t,n,i,o,r,s){var a=e.call(this)||this;if(a.editorId=t,a.configuration=n,a.model=i,a._tokenizeViewportSoon=a._register(new mi((function(){return a.tokenizeViewport()}),50)),a.hasFocus=!1,a.viewportStartLine=-1,a.viewportStartLineTrackedRange=null,a.viewportStartLineDelta=0,WN&&a.model.isTooLargeForTokenization())a.lines=new AN(a.model);else{var u=a.configuration.options,l=u.get(34),c=u.get(103),h=u.get(108),d=u.get(102);a.lines=new NN(a.model,o,r,l,a.model.getOptions().tabSize,c,h.wrappingColumn,d)}return a.coordinatesConverter=a.lines.createCoordinatesConverter(),a.viewLayout=a._register(new bN(a.configuration,a.getLineCount(),s)),a._register(a.viewLayout.onDidScroll((function(e){e.scrollTopChanged&&a._tokenizeViewportSoon.schedule();try{var t=a._beginEmit();t.emit(new BC(e))}finally{a._endEmit()}}))),a._register(a.viewLayout.onDidContentSizeChange((function(e){try{var t=a._beginEmit();t.emit(new kC(e))}finally{a._endEmit()}}))),a.decorations=new RN(a.editorId,a.model,a.configuration,a.lines,a.coordinatesConverter),a._registerModelEvents(),a._register(a.configuration.onDidChange((function(e){try{var t=a._beginEmit();a._onConfigurationChanged(t,e)}finally{a._endEmit()}}))),a._register(tL.getInstance().onDidChange((function(){try{var e=a._beginEmit();e.emit(new jC)}finally{a._endEmit()}}))),a}return FN(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.decorations.dispose(),this.lines.dispose(),this.invalidateMinimapColorCache(),this.viewportStartLineTrackedRange=this.model._setTrackedRange(this.viewportStartLineTrackedRange,null,1)},t.prototype.tokenizeViewport=function(){var e=this.viewLayout.getLinesViewportData(),t=this.coordinatesConverter.convertViewPositionToModelPosition(new fn(e.startLineNumber,1)),n=this.coordinatesConverter.convertViewPositionToModelPosition(new fn(e.endLineNumber,1));this.model.tokenizeViewport(t.lineNumber,n.lineNumber)},t.prototype.setHasFocus=function(e){this.hasFocus=e},t.prototype._onConfigurationChanged=function(e,t){var n=null;if(-1!==this.viewportStartLine){var i=new fn(this.viewportStartLine,this.getLineMinColumn(this.viewportStartLine));n=this.coordinatesConverter.convertViewPositionToModelPosition(i)}var o=!1,r=this.configuration.options,s=r.get(34),a=r.get(103),u=r.get(108),l=r.get(102);if(this.lines.setWrappingSettings(s,a,u.wrappingColumn,l)&&(e.emit(new MC),e.emit(new PC),e.emit(new TC),this.decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(o=!0)),t.hasChanged(68)&&(this.decorations.reset(),e.emit(new TC)),e.emit(new xC(t)),this.viewLayout.onConfigurationChanged(t),o&&n){var c=this.coordinatesConverter.convertModelPositionToViewPosition(n),h=this.viewLayout.getVerticalOffsetForLineNumber(c.lineNumber);this.viewLayout.setScrollPositionNow({scrollTop:h+this.viewportStartLineDelta})}},t.prototype._registerModelEvents=function(){var e=this;this._register(this.model.onDidChangeRawContentFast((function(t){try{for(var n=e._beginEmit(),i=!1,o=!1,r=t.changes,s=t.versionId,a=e.lines.createLineBreaksComputer(),u=0,l=r;u<l.length;u++){var c=l[u];switch(c.changeType){case 4:for(var h=0,d=c.detail;h<d.length;h++){var f=d[h];a.addRequest(f,null)}break;case 2:a.addRequest(c.detail,null);break}}for(var p=a.finalize(),g=0,m=0,v=r;m<v.length;m++){c=v[m];switch(c.changeType){case 1:e.lines.onModelFlushed(),n.emit(new MC),e.decorations.reset(),e.viewLayout.onFlushed(e.getLineCount()),i=!0;break;case 3:var _=e.lines.onModelLinesDeleted(s,c.fromLineNumber,c.toLineNumber);null!==_&&(n.emit(_),e.viewLayout.onLinesDeleted(_.fromLineNumber,_.toLineNumber)),i=!0;break;case 4:var y=p.slice(g,g+c.detail.length);g+=c.detail.length;var b=e.lines.onModelLinesInserted(s,c.fromLineNumber,c.toLineNumber,y);null!==b&&(n.emit(b),e.viewLayout.onLinesInserted(b.fromLineNumber,b.toLineNumber)),i=!0;break;case 2:var C=p[g];g++;var w=e.lines.onModelLineChanged(s,c.lineNumber,C),S=w[0],L=w[1];b=w[2],_=w[3];o=S,L&&n.emit(L),b&&(n.emit(b),e.viewLayout.onLinesInserted(b.fromLineNumber,b.toLineNumber)),_&&(n.emit(_),e.viewLayout.onLinesDeleted(_.fromLineNumber,_.toLineNumber));break;case 5:break}}e.lines.acceptVersionId(s),e.viewLayout.onHeightMaybeChanged(),!i&&o&&(n.emit(new PC),n.emit(new TC),e.decorations.onLineMappingChanged())}finally{e._endEmit()}if(e.viewportStartLine=-1,e.configuration.setMaxLineNumber(e.model.getLineCount()),!e.hasFocus&&e.model.getAttachedEditorCount()>=2&&e.viewportStartLineTrackedRange){var N=e.model._getTrackedRange(e.viewportStartLineTrackedRange);if(N){var D=e.coordinatesConverter.convertModelPositionToViewPosition(N.getStartPosition()),E=e.viewLayout.getVerticalOffsetForLineNumber(D.lineNumber);e.viewLayout.setScrollPositionNow({scrollTop:E+e.viewportStartLineDelta})}}}))),this._register(this.model.onDidChangeTokens((function(t){for(var n=[],i=0,o=t.ranges.length;i<o;i++){var r=t.ranges[i],s=e.coordinatesConverter.convertModelPositionToViewPosition(new fn(r.fromLineNumber,1)).lineNumber,a=e.coordinatesConverter.convertModelPositionToViewPosition(new fn(r.toLineNumber,e.model.getLineMaxColumn(r.toLineNumber))).lineNumber;n[i]={fromLineNumber:s,toLineNumber:a}}try{var u=e._beginEmit();u.emit(new zC(n))}finally{e._endEmit()}t.tokenizationSupportChanged&&e._tokenizeViewportSoon.schedule()}))),this._register(this.model.onDidChangeLanguageConfiguration((function(t){try{var n=e._beginEmit();n.emit(new AC)}finally{e._endEmit()}}))),this._register(this.model.onDidChangeOptions((function(t){if(e.lines.setTabSize(e.model.getOptions().tabSize)){e.decorations.onLineMappingChanged(),e.viewLayout.onFlushed(e.getLineCount());try{var n=e._beginEmit();n.emit(new MC),n.emit(new PC),n.emit(new TC)}finally{e._endEmit()}}}))),this._register(this.model.onDidChangeDecorations((function(t){e.decorations.onModelDecorationsChanged();try{var n=e._beginEmit();n.emit(new TC)}finally{e._endEmit()}})))},t.prototype.setHiddenAreas=function(e){try{var t=this._beginEmit(),n=this.lines.setHiddenAreas(e);n&&(t.emit(new MC),t.emit(new PC),t.emit(new TC),this.decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._endEmit()}},t.prototype.getVisibleRanges=function(){var e=this.getCompletelyVisibleViewRange(),t=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this.lines.getHiddenAreas();if(0===n.length)return[t];for(var i=[],o=0,r=t.startLineNumber,s=t.startColumn,a=t.endLineNumber,u=t.endColumn,l=0,c=n.length;l<c;l++){var h=n[l].startLineNumber,d=n[l].endLineNumber;d<r||(h>a||(r<h&&(i[o++]=new pn(r,s,h-1,this.model.getLineMaxColumn(h-1))),r=d+1,s=1))}return(r<a||r===a&&s<u)&&(i[o++]=new pn(r,s,a,u)),i},t.prototype.getCompletelyVisibleViewRange=function(){var e=this.viewLayout.getLinesViewportData(),t=e.completelyVisibleStartLineNumber,n=e.completelyVisibleEndLineNumber;return new pn(t,this.getLineMinColumn(t),n,this.getLineMaxColumn(n))},t.prototype.getCompletelyVisibleViewRangeAtScrollTop=function(e){var t=this.viewLayout.getLinesViewportDataAtScrollTop(e),n=t.completelyVisibleStartLineNumber,i=t.completelyVisibleEndLineNumber;return new pn(n,this.getLineMinColumn(n),i,this.getLineMaxColumn(i))},t.prototype.saveState=function(){var e=this.viewLayout.saveState(),t=e.scrollTop,n=this.viewLayout.getLineNumberAtVerticalOffset(t),i=this.coordinatesConverter.convertViewPositionToModelPosition(new fn(n,this.getLineMinColumn(n))),o=this.viewLayout.getVerticalOffsetForLineNumber(n)-t;return{scrollLeft:e.scrollLeft,firstPosition:i,firstPositionDeltaTop:o}},t.prototype.reduceRestoreState=function(e){if("undefined"===typeof e.firstPosition)return this._reduceRestoreStateCompatibility(e);var t=this.model.validatePosition(e.firstPosition),n=this.coordinatesConverter.convertModelPositionToViewPosition(t),i=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:i}},t.prototype._reduceRestoreStateCompatibility=function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}},t.prototype.getTabSize=function(){return this.model.getOptions().tabSize},t.prototype.getOptions=function(){return this.model.getOptions()},t.prototype.getLineCount=function(){return this.lines.getViewLineCount()},t.prototype.setViewport=function(e,t,n){this.viewportStartLine=e;var i=this.coordinatesConverter.convertViewPositionToModelPosition(new fn(e,this.getLineMinColumn(e)));this.viewportStartLineTrackedRange=this.model._setTrackedRange(this.viewportStartLineTrackedRange,new pn(i.lineNumber,i.column,i.lineNumber,i.column),1);var o=this.viewLayout.getVerticalOffsetForLineNumber(e),r=this.viewLayout.getCurrentScrollTop();this.viewportStartLineDelta=r-o},t.prototype.getActiveIndentGuide=function(e,t,n){return this.lines.getActiveIndentGuide(e,t,n)},t.prototype.getLinesIndentGuides=function(e,t){return this.lines.getViewLinesIndentGuides(e,t)},t.prototype.getLineContent=function(e){return this.lines.getViewLineContent(e)},t.prototype.getLineLength=function(e){return this.lines.getViewLineLength(e)},t.prototype.getLineMinColumn=function(e){return this.lines.getViewLineMinColumn(e)},t.prototype.getLineMaxColumn=function(e){return this.lines.getViewLineMaxColumn(e)},t.prototype.getLineFirstNonWhitespaceColumn=function(e){var t=br(this.getLineContent(e));return-1===t?0:t+1},t.prototype.getLineLastNonWhitespaceColumn=function(e){var t=wr(this.getLineContent(e));return-1===t?0:t+2},t.prototype.getDecorationsInViewport=function(e){return this.decorations.getDecorationsViewportData(e).decorations},t.prototype.getViewLineRenderingData=function(e,t){var n=this.model.mightContainRTL(),i=this.model.mightContainNonBasicASCII(),o=this.getTabSize(),r=this.lines.getViewLineData(t),s=this.decorations.getDecorationsViewportData(e).inlineDecorations,a=s[t-e.startLineNumber];return new Ah(r.minColumn,r.maxColumn,r.content,r.continuesWithWrappedLine,n,i,r.tokens,a,o,r.startVisibleColumn)},t.prototype.getViewLineData=function(e){return this.lines.getViewLineData(e)},t.prototype.getMinimapLinesRenderingData=function(e,t,n){var i=this.lines.getViewLinesData(e,t,n);return new Mh(this.getTabSize(),i)},t.prototype.getAllOverviewRulerDecorations=function(e){return this.lines.getAllOverviewRulerDecorations(this.editorId,$(this.configuration.options),e)},t.prototype.invalidateOverviewRulerColorCache=function(){for(var e=this.model.getOverviewRulerDecorations(),t=0,n=e;t<n.length;t++){var i=n[t],o=i.options.overviewRuler;o&&o.invalidateCachedColor()}},t.prototype.invalidateMinimapColorCache=function(){for(var e=this.model.getAllDecorations(),t=0,n=e;t<n.length;t++){var i=n[t],o=i.options.minimap;o&&o.invalidateCachedColor()}},t.prototype.getValueInRange=function(e,t){var n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)},t.prototype.getModelLineMaxColumn=function(e){return this.model.getLineMaxColumn(e)},t.prototype.validateModelPosition=function(e){return this.model.validatePosition(e)},t.prototype.validateModelRange=function(e){return this.model.validateRange(e)},t.prototype.deduceModelPositionRelativeToViewPosition=function(e,t,n){var i=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=n:t+=n);var o=this.model.getOffsetAt(i),r=o+t;return this.model.getPositionAt(r)},t.prototype.getEOL=function(){return this.model.getEOL()},t.prototype.getPlainTextToCopy=function(e,t,n){var i=n?"\r\n":this.model.getEOL();e=e.slice(0),e.sort(pn.compareRangesUsingStarts);for(var o=!1,r=!1,s=0,a=e;s<a.length;s++){var u=a[s];u.isEmpty()?o=!0:r=!0}if(!r){if(!t)return"";for(var l=e.map((function(e){return e.startLineNumber})),c="",h=0;h<l.length;h++)h>0&&l[h-1]===l[h]||(c+=this.model.getLineContent(l[h])+i);return c}if(o&&t){for(var d=[],f=0,p=0,g=e;p<g.length;p++){var m=g[p],v=m.startLineNumber;m.isEmpty()?v!==f&&d.push(this.model.getLineContent(v)):d.push(this.model.getValueInRange(m,n?2:0)),f=v}return 1===d.length?d[0]:d}for(var _=[],y=0,b=e;y<b.length;y++){m=b[y];m.isEmpty()||_.push(this.model.getValueInRange(m,n?2:0))}return 1===_.length?_[0]:_},t.prototype.getRichTextToCopy=function(e,t){var n=this.model.getLanguageIdentifier();if(1===n.id)return null;if(1!==e.length)return null;var i=e[0];if(i.isEmpty()){if(!t)return null;var o=i.startLineNumber;i=new pn(o,this.model.getLineMinColumn(o),o,this.model.getLineMaxColumn(o))}var r=this.configuration.options.get(34),s=this._getColorMap(),a=r.fontFamily===ue.fontFamily?r.fontFamily:"'"+r.fontFamily+"', "+ue.fontFamily;return{mode:n.language,html:'<div style="color: '+s[1]+";background-color: "+s[2]+";font-family: "+a+";font-weight: "+r.fontWeight+";font-size: "+r.fontSize+"px;line-height: "+r.lineHeight+'px;white-space: pre;">'+this._getHTMLToCopy(i,s)+"</div>"}},t.prototype._getHTMLToCopy=function(e,t){for(var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn,a=this.getTabSize(),u="",l=n;l<=o;l++){var c=this.model.getLineTokens(l),h=c.getLineContent(),d=l===n?i-1:0,f=l===o?r-1:h.length;u+=""===h?"<br>":dN(h,c.inflate(),t,d,f,a,s["h"])}return u},t.prototype._getColorMap=function(){var e=il.getColorMap(),t=["#000000"];if(e)for(var n=1,i=e.length;n<i;n++)t[n]=S_.Format.CSS.formatHex(e[n]);return t},t}(KC),BN=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._entries=new Map;for(var n=0,i=e;n<i.length;n++){var o=i[n],r=o[0],s=o[1];this.set(r,s)}}return e.prototype.set=function(e,t){var n=this._entries.get(e);return this._entries.set(e,t),n},e.prototype.has=function(e){return this._entries.has(e)},e.prototype.get=function(e){return this._entries.get(e)},e}(),HN=Nn("accessibilityService"),zN=new Rf("accessibilityModeEnabled",!1),jN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),UN=function(e){function t(t,n){for(var i=e.call(this,0)||this,o=0;o<t.length;o++)i.set(t.charCodeAt(o),1);for(o=0;o<n.length;o++)i.set(n.charCodeAt(o),2);return i}return jN(t,e),t.prototype.get=function(e){return 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},t}(Cc),KN=[],qN=[],GN=function(){function e(e,t){this.classifier=new UN(e,t)}return e.create=function(t){return new e(t.get(99),t.get(98))},e.prototype.createLineBreaksComputer=function(e,t,n,i){var o=this;t|=0,n=+n;var r=[],s=[];return{addRequest:function(e,t){r.push(e),s.push(t)},finalize:function(){for(var a=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,u=[],l=0,c=r.length;l<c;l++){var h=s[l];u[l]=h?YN(o.classifier,h,r[l],t,n,a,i):ZN(o.classifier,r[l],t,n,a,i)}return KN.length=0,qN.length=0,u}}},e}();function YN(e,t,n,i,o,r,s){if(-1===o)return null;var a=n.length;if(a<=1)return null;var u=t.breakOffsets,l=t.breakOffsetsVisibleColumn,c=JN(n,i,o,r,s),h=o-c,d=KN,f=qN,p=0,g=o,m=u.length,v=0;if(v>=0){var _=Math.abs(l[v]-g);while(v+1<m){var y=Math.abs(l[v+1]-g);if(y>=_)break;_=y,v++}}while(v<m){var b=v<0?0:u[v],C=v<0?0:l[v],w=0,S=0,L=0,N=0;if(C<=g){for(var D=C,E=n.charCodeAt(b-1),x=e.get(E),k=!0,O=b;O<a;O++){var T=O,M=n.charCodeAt(O),I=void 0,A=void 0;if(Tr(M)?(O++,I=0,A=2):(I=e.get(M),A=XN(M,D,i,r)),QN(E,x,M,I)&&(w=T,S=D),D+=A,D>g){L=T,N=D-A,D-S>h&&(w=0),k=!1;break}E=M,x=I}if(k){p>0&&(d[p]=u[u.length-1],f[p]=l[u.length-1],p++);break}}if(0===w){D=C,M=n.charCodeAt(b),I=e.get(M);var P=!1;for(O=b-1;O>=0;O--){T=O+1,E=n.charCodeAt(O);if(9===E){P=!0;break}x=void 0;var R=void 0;if(Mr(E)?(O--,x=0,R=2):(x=e.get(E),R=Ur(E)?r:1),D<=g){if(0===L&&(L=T,N=D),D<=g-h)break;if(QN(E,x,M,I)){w=T,S=D;break}}D-=R,M=E,I=x}if(0!==w){var F=h-(N-S);if(F<=i){var W=n.charCodeAt(L);A=void 0;A=Tr(W)?2:XN(W,N,i,r),F-A<0&&(w=0)}}if(P){v--;continue}}0===w&&(w=L,S=N),d[p]=w,f[p]=S,p++,g=S+h;while(v<0||v<m&&l[v]<S)v++;_=Math.abs(l[v]-g);while(v+1<m){y=Math.abs(l[v+1]-g);if(y>=_)break;_=y,v++}}return 0===p?null:(d.length=p,f.length=p,KN=t.breakOffsets,qN=t.breakOffsetsVisibleColumn,t.breakOffsets=d,t.breakOffsetsVisibleColumn=f,t.wrappedTextIndentLength=c,t)}function ZN(e,t,n,i,o,r){if(-1===i)return null;var s=t.length;if(s<=1)return null;var a=JN(t,n,i,o,r),u=i-a,l=[],c=[],h=0,d=0,f=0,p=i,g=t.charCodeAt(0),m=e.get(g),v=XN(g,0,n,o),_=1;Tr(g)&&(v+=1,g=t.charCodeAt(1),m=e.get(g),_++);for(var y=_;y<s;y++){var b=y,C=t.charCodeAt(y),w=void 0,S=void 0;Tr(C)?(y++,w=0,S=2):(w=e.get(C),S=XN(C,v,n,o)),QN(g,m,C,w)&&(d=b,f=v),v+=S,v>p&&((0===d||v-f>u)&&(d=b,f=v-S),l[h]=d,c[h]=f,h++,p=f+u,d=0),g=C,m=w}return 0===h?null:(l[h]=s,c[h]=v,new wN(l,c,a))}function XN(e,t,n,i){return 9===e?n-t%n:Ur(e)?i:1}function $N(e,t){return t-e%t}function QN(e,t,n,i){return 32!==n&&(2===t||3===t&&2!==i||1===i||3===i&&1!==t)}function JN(e,t,n,i,o){var r=0;if(0!==o){var s=br(e);if(-1!==s){for(var a=0;a<s;a++){var u=9===e.charCodeAt(a)?$N(r,t):1;r+=u}var l=3===o?2:2===o?1:0;for(a=0;a<l;a++){u=$N(r,t);r+=u}r+i>n&&(r=0)}}return r}var eD=function(){function e(){}return e.create=function(){return new e},e.prototype.createLineBreaksComputer=function(e,t,n,i){t|=0,n=+n;var o=[];return{addRequest:function(e,t){o.push(e)},finalize:function(){return tD(o,e,t,n,i)}}},e}();function tD(e,t,n,i,o){if(-1===i){for(var r=[],s=0,a=e.length;s<a;s++)r[s]=null;return r}var u=Math.round(i*t.typicalHalfwidthCharacterWidth);2!==o&&3!==o||(o=1);var l=document.createElement("div");Zp.applyFontInfoSlow(l,t);var c=sh(1e4),h=[],d=[],f=[],p=[],g=[];for(s=0;s<e.length;s++){var m=e[s],v=0,_=0,y=u;if(0!==o)if(v=br(m),-1===v)v=0;else{for(var b=0;b<v;b++){var C=9===m.charCodeAt(b)?n-_%n:1;_+=C}var w=Math.ceil(t.spaceWidth*_);w+t.typicalFullwidthCharacterWidth>u?(v=0,_=0):y=u-w}var S=m.substr(v),L=nD(S,_,n,y,c);h[s]=v,d[s]=_,f[s]=S,p[s]=L[0],g[s]=L[1]}l.innerHTML=c.build(),l.style.position="absolute",l.style.top="10000",l.style.wordWrap="break-word",document.body.appendChild(l);var N=document.createRange(),D=Array.prototype.slice.call(l.children,0),E=[];for(s=0;s<e.length;s++){var x=D[s],k=iD(N,x,f[s],p[s]);if(null!==k){v=h[s],_=d[s];var O=g[s],T=[],M=0;for(a=k.length;M<a;M++)T[M]=O[k[M]];if(0!==v)for(M=0,a=k.length;M<a;M++)k[M]+=v;E[s]=new wN(k,T,_)}else E[s]=null}return document.body.removeChild(l),E}function nD(e,t,n,i,o){o.appendASCIIString('<div style="width:'),o.appendASCIIString(String(i)),o.appendASCIIString('px;">');for(var r=e.length,s=t,a=0,u=[],l=[],c=0<r?e.charCodeAt(0):0,h=0;h<r;h++){u[h]=a,l[h]=s;var d=c;c=h+1<r?e.charCodeAt(h+1):0;var f=1,p=1;switch(d){case 9:f=n-s%n,p=f;for(var g=1;g<=f;g++)g<f?o.write1(160):o.appendASCII(32);break;case 32:32===c?o.write1(160):o.appendASCII(32);break;case 60:o.appendASCIIString("&lt;");break;case 62:o.appendASCIIString("&gt;");break;case 38:o.appendASCIIString("&amp;");break;case 0:o.appendASCIIString("&#00;");break;case 65279:case 8232:o.write1(65533);break;default:Ur(d)&&p++,o.write1(d)}a+=f,s+=p}return u[e.length]=a,l[e.length]=s,o.appendASCIIString("</div>"),[u,l]}function iD(e,t,n,i){if(n.length<=1)return null;var o=t.firstChild,r=[];return oD(e,o,i,0,null,n.length-1,null,r),0===r.length?null:(r.push(n.length),r)}function oD(e,t,n,i,o,r,s,a){if(i!==r&&(o=o||rD(e,t,n[i],n[i+1]),s=s||rD(e,t,n[r],n[r+1]),!(Math.abs(o[0].top-s[0].top)<=.1)))if(i+1!==r){var u=i+(r-i)/2|0,l=rD(e,t,n[u],n[u+1]);oD(e,t,n,i,o,u,l,a),oD(e,t,n,u,l,r,s,a)}else a.push(r)}function rD(e,t,n,i){return e.setStart(t,n),e.setEnd(t,i),e.getClientRects()}var sD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),aD=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},uD=function(e,t){return function(n,i){t(n,i,e)}},lD=0,cD=function(){function e(e,t,n,i,o,r){this.model=e,this.viewModel=t,this.cursor=n,this.view=i,this.hasRealView=o,this.listenersToRemove=r}return e.prototype.dispose=function(){Ee(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.cursor.dispose(),this.viewModel.dispose()},e}(),hD=function(e){function t(t,n,i,o,r,s,a,u,l,c){var h,d=e.call(this)||this;d._onDidDispose=d._register(new qe),d.onDidDispose=d._onDidDispose.event,d._onDidChangeModelContent=d._register(new qe),d.onDidChangeModelContent=d._onDidChangeModelContent.event,d._onDidChangeModelLanguage=d._register(new qe),d.onDidChangeModelLanguage=d._onDidChangeModelLanguage.event,d._onDidChangeModelLanguageConfiguration=d._register(new qe),d.onDidChangeModelLanguageConfiguration=d._onDidChangeModelLanguageConfiguration.event,d._onDidChangeModelOptions=d._register(new qe),d.onDidChangeModelOptions=d._onDidChangeModelOptions.event,d._onDidChangeModelDecorations=d._register(new qe),d.onDidChangeModelDecorations=d._onDidChangeModelDecorations.event,d._onDidChangeConfiguration=d._register(new qe),d.onDidChangeConfiguration=d._onDidChangeConfiguration.event,d._onDidChangeModel=d._register(new qe),d.onDidChangeModel=d._onDidChangeModel.event,d._onDidChangeCursorPosition=d._register(new qe),d.onDidChangeCursorPosition=d._onDidChangeCursorPosition.event,d._onDidChangeCursorSelection=d._register(new qe),d.onDidChangeCursorSelection=d._onDidChangeCursorSelection.event,d._onDidAttemptReadOnlyEdit=d._register(new qe),d.onDidAttemptReadOnlyEdit=d._onDidAttemptReadOnlyEdit.event,d._onDidLayoutChange=d._register(new qe),d.onDidLayoutChange=d._onDidLayoutChange.event,d._editorTextFocus=d._register(new dD),d.onDidFocusEditorText=d._editorTextFocus.onDidChangeToTrue,d.onDidBlurEditorText=d._editorTextFocus.onDidChangeToFalse,d._editorWidgetFocus=d._register(new dD),d.onDidFocusEditorWidget=d._editorWidgetFocus.onDidChangeToTrue,d.onDidBlurEditorWidget=d._editorWidgetFocus.onDidChangeToFalse,d._onWillType=d._register(new qe),d.onWillType=d._onWillType.event,d._onDidType=d._register(new qe),d.onDidType=d._onDidType.event,d._onDidCompositionStart=d._register(new qe),d.onDidCompositionStart=d._onDidCompositionStart.event,d._onDidCompositionEnd=d._register(new qe),d.onDidCompositionEnd=d._onDidCompositionEnd.event,d._onDidPaste=d._register(new qe),d.onDidPaste=d._onDidPaste.event,d._onMouseUp=d._register(new qe),d.onMouseUp=d._onMouseUp.event,d._onMouseDown=d._register(new qe),d.onMouseDown=d._onMouseDown.event,d._onMouseDrag=d._register(new qe),d.onMouseDrag=d._onMouseDrag.event,d._onMouseDrop=d._register(new qe),d.onMouseDrop=d._onMouseDrop.event,d._onContextMenu=d._register(new qe),d.onContextMenu=d._onContextMenu.event,d._onMouseMove=d._register(new qe),d.onMouseMove=d._onMouseMove.event,d._onMouseLeave=d._register(new qe),d.onMouseLeave=d._onMouseLeave.event,d._onMouseWheel=d._register(new qe),d.onMouseWheel=d._onMouseWheel.event,d._onKeyUp=d._register(new qe),d.onKeyUp=d._onKeyUp.event,d._onKeyDown=d._register(new qe),d.onKeyDown=d._onKeyDown.event,d._onDidContentSizeChange=d._register(new qe),d.onDidContentSizeChange=d._onDidContentSizeChange.event,d._onDidScrollChange=d._register(new qe),d.onDidScrollChange=d._onDidScrollChange.event,d._onDidChangeViewZones=d._register(new qe),d.onDidChangeViewZones=d._onDidChangeViewZones.event,d._domElement=t,d._id=++lD,d._decorationTypeKeysToIds={},d._decorationTypeSubtypes={},d.isSimpleWidget=i.isSimpleWidget||!1,d._telemetryData=i.telemetryData,n=n||{},d._configuration=d._register(d._createConfiguration(n,c)),d._register(d._configuration.onDidChange((function(e){d._onDidChangeConfiguration.fire(e);var t=d._configuration.options;if(e.hasChanged(107)){var n=t.get(107);d._onDidLayoutChange.fire(n)}}))),d._contextKeyService=d._register(a.createScoped(d._domElement)),d._notificationService=l,d._codeEditorService=r,d._commandService=s,d._themeService=u,d._register(new fD(d,d._contextKeyService)),d._register(new pD(d,d._contextKeyService)),d._instantiationService=o.createChild(new BN([Ff,d._contextKeyService])),d._modelData=null,d._contributions={},d._actions={},d._focusTracker=new gD(t),d._focusTracker.onChange((function(){d._editorWidgetFocus.setValue(d._focusTracker.hasFocus())})),d._contentWidgets={},d._overlayWidgets={},h=Array.isArray(i.contributions)?i.contributions:sg.getEditorContributions();for(var f=0,p=h;f<p.length;f++){var g=p[f];try{var m=d._instantiationService.createInstance(g.ctor,d);d._contributions[g.id]=m}catch(v){ge(v)}}return sg.getEditorActions().forEach((function(e){var t=new hN(e.id,e.label,e.alias,Ys(e.precondition),(function(){return d._instantiationService.invokeFunction((function(t){return Promise.resolve(e.runEditorCommand(t,d,null))}))}),d._contextKeyService);d._actions[t.id]=t})),d._codeEditorService.addCodeEditor(d),d}return sD(t,e),t.prototype._createConfiguration=function(e,t){return new Zp(this.isSimpleWidget,e,this._domElement,t)},t.prototype.getId=function(){return this.getEditorType()+":"+this._id},t.prototype.getEditorType=function(){return Ba.ICodeEditor},t.prototype.dispose=function(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();for(var t=Object.keys(this._contributions),n=0,i=t.length;n<i;n++){var o=t[n];this._contributions[o].dispose()}this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),e.prototype.dispose.call(this)},t.prototype.invokeWithinContext=function(e){return this._instantiationService.invokeFunction(e)},t.prototype.updateOptions=function(e){this._configuration.updateOptions(e)},t.prototype.getOptions=function(){return this._configuration.options},t.prototype.getOption=function(e){return this._configuration.options.get(e)},t.prototype.getRawOptions=function(){return this._configuration.getRawOptions()},t.prototype.getValue=function(e){if(void 0===e&&(e=null),!this._modelData)return"";var t=!(!e||!e.preserveBOM),n=0;return e&&e.lineEnding&&"\n"===e.lineEnding?n=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(n=2),this._modelData.model.getValue(n,t)},t.prototype.setValue=function(e){this._modelData&&this._modelData.model.setValue(e)},t.prototype.getModel=function(){return this._modelData?this._modelData.model:null},t.prototype.setModel=function(e){void 0===e&&(e=null);var t=e;if((null!==this._modelData||null!==t)&&(!this._modelData||this._modelData.model!==t)){var n=this.hasTextFocus(),i=this._detachModel();this._attachModel(t),n&&this.hasModel()&&this.focus();var o={oldModelUrl:i?i.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(o),this._postDetachModelCleanup(i)}},t.prototype._removeDecorationTypes=function(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(var e in this._decorationTypeSubtypes){var t=this._decorationTypeSubtypes[e];for(var n in t)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}},t.prototype.getVisibleRanges=function(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]},t.prototype.getWhitespaces=function(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]},t._getVerticalOffsetForPosition=function(e,t,n){var i=e.model.validatePosition({lineNumber:t,column:n}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber)},t.prototype.getTopForLineNumber=function(e){return this._modelData?t._getVerticalOffsetForPosition(this._modelData,e,1):-1},t.prototype.getTopForPosition=function(e,n){return this._modelData?t._getVerticalOffsetForPosition(this._modelData,e,n):-1},t.prototype.setHiddenAreas=function(e){this._modelData&&this._modelData.viewModel.setHiddenAreas(e.map((function(e){return pn.lift(e)})))},t.prototype.getVisibleColumnFromPosition=function(e){if(!this._modelData)return e.column;var t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return ey.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,n)+1},t.prototype.getPosition=function(){return this._modelData?this._modelData.cursor.getPosition():null},t.prototype.setPosition=function(e){if(this._modelData){if(!fn.isIPosition(e))throw new Error("Invalid arguments");this._modelData.cursor.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}},t.prototype._sendRevealRange=function(e,t,n,i){if(this._modelData){if(!pn.isIRange(e))throw new Error("Invalid arguments");var o=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.cursor.emitCursorRevealRange("api",r,t,n,i)}},t.prototype.revealLine=function(e,t){void 0===t&&(t=0),this._revealLine(e,0,t)},t.prototype.revealLineInCenter=function(e,t){void 0===t&&(t=0),this._revealLine(e,1,t)},t.prototype.revealLineInCenterIfOutsideViewport=function(e,t){void 0===t&&(t=0),this._revealLine(e,2,t)},t.prototype._revealLine=function(e,t,n){if("number"!==typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new pn(e,1,e,1),t,!1,n)},t.prototype.revealPosition=function(e,t){void 0===t&&(t=0),this._revealPosition(e,0,!0,t)},t.prototype.revealPositionInCenter=function(e,t){void 0===t&&(t=0),this._revealPosition(e,1,!0,t)},t.prototype.revealPositionInCenterIfOutsideViewport=function(e,t){void 0===t&&(t=0),this._revealPosition(e,2,!0,t)},t.prototype._revealPosition=function(e,t,n,i){if(!fn.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new pn(e.lineNumber,e.column,e.lineNumber,e.column),t,n,i)},t.prototype.getSelection=function(){return this._modelData?this._modelData.cursor.getSelection():null},t.prototype.getSelections=function(){return this._modelData?this._modelData.cursor.getSelections():null},t.prototype.setSelection=function(e){var t=mn.isISelection(e),n=pn.isIRange(e);if(!t&&!n)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(n){var i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i)}},t.prototype._setSelectionImpl=function(e){if(this._modelData){var t=new mn(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.cursor.setSelections("api",[t])}},t.prototype.revealLines=function(e,t,n){void 0===n&&(n=0),this._revealLines(e,t,0,n)},t.prototype.revealLinesInCenter=function(e,t,n){void 0===n&&(n=0),this._revealLines(e,t,1,n)},t.prototype.revealLinesInCenterIfOutsideViewport=function(e,t,n){void 0===n&&(n=0),this._revealLines(e,t,2,n)},t.prototype._revealLines=function(e,t,n,i){if("number"!==typeof e||"number"!==typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new pn(e,1,t,1),n,!1,i)},t.prototype.revealRange=function(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=!1),void 0===i&&(i=!0),this._revealRange(e,n?1:0,i,t)},t.prototype.revealRangeInCenter=function(e,t){void 0===t&&(t=0),this._revealRange(e,1,!0,t)},t.prototype.revealRangeInCenterIfOutsideViewport=function(e,t){void 0===t&&(t=0),this._revealRange(e,2,!0,t)},t.prototype.revealRangeAtTop=function(e,t){void 0===t&&(t=0),this._revealRange(e,3,!0,t)},t.prototype._revealRange=function(e,t,n,i){if(!pn.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(pn.lift(e),t,n,i)},t.prototype.setSelections=function(e,t){if(void 0===t&&(t="api"),this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(var n=0,i=e.length;n<i;n++)if(!mn.isISelection(e[n]))throw new Error("Invalid arguments");this._modelData.cursor.setSelections(t,e)}},t.prototype.getContentWidth=function(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1},t.prototype.getScrollWidth=function(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1},t.prototype.getScrollLeft=function(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1},t.prototype.getContentHeight=function(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1},t.prototype.getScrollHeight=function(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1},t.prototype.getScrollTop=function(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1},t.prototype.setScrollLeft=function(e){if(this._modelData){if("number"!==typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPositionNow({scrollLeft:e})}},t.prototype.setScrollTop=function(e){if(this._modelData){if("number"!==typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPositionNow({scrollTop:e})}},t.prototype.setScrollPosition=function(e){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPositionNow(e)},t.prototype.saveViewState=function(){if(!this._modelData)return null;for(var e={},t=Object.keys(this._contributions),n=0,i=t;n<i.length;n++){var o=i[n],r=this._contributions[o];"function"===typeof r.saveViewState&&(e[o]=r.saveViewState())}var s=this._modelData.cursor.saveState(),a=this._modelData.viewModel.saveState();return{cursorState:s,viewState:a,contributionsState:e}},t.prototype.restoreViewState=function(e){if(this._modelData&&this._modelData.hasRealView){var t=e;if(t&&t.cursorState&&t.viewState){var n=t.cursorState;Array.isArray(n)?this._modelData.cursor.restoreState(n):this._modelData.cursor.restoreState([n]);for(var i=t.contributionsState||{},o=Object.keys(this._contributions),r=0,s=o.length;r<s;r++){var a=o[r],u=this._contributions[a];"function"===typeof u.restoreViewState&&u.restoreViewState(i[a])}var l=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(l)}}},t.prototype.getContribution=function(e){return this._contributions[e]||null},t.prototype.getActions=function(){for(var e=[],t=Object.keys(this._actions),n=0,i=t.length;n<i;n++){var o=t[n];e.push(this._actions[o])}return e},t.prototype.getSupportedActions=function(){var e=this.getActions();return e=e.filter((function(e){return e.isSupported()})),e},t.prototype.getAction=function(e){return this._actions[e]||null},t.prototype.trigger=function(e,t,n){if(n=n||{},t===Ha.Type){if(!this._modelData||"string"!==typeof n.text||0===n.text.length)return;return"keyboard"===e&&this._onWillType.fire(n.text),this._modelData.cursor.trigger(e,t,n),void("keyboard"===e&&this._onDidType.fire(n.text))}if(t!==Ha.Paste){var i=this.getAction(t);i?Promise.resolve(i.run()).then(void 0,ge):this._modelData&&(this._triggerEditorCommand(e,t,n)||(this._modelData.cursor.trigger(e,t,n),t===Ha.CompositionStart&&this._onDidCompositionStart.fire(),t===Ha.CompositionEnd&&this._onDidCompositionEnd.fire()))}else{if(!this._modelData||"string"!==typeof n.text||0===n.text.length)return;var o=this._modelData.cursor.getSelection().getStartPosition();this._modelData.cursor.trigger(e,t,n);var r=this._modelData.cursor.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new pn(o.lineNumber,o.column,r.lineNumber,r.column),mode:n.mode})}},t.prototype._triggerEditorCommand=function(e,t,n){var i=this,o=sg.getEditorCommand(t);return!!o&&(n=n||{},n.source=e,this._instantiationService.invokeFunction((function(e){Promise.resolve(o.runEditorCommand(e,i,n)).then(void 0,ge)})),!0)},t.prototype._getCursors=function(){return this._modelData?this._modelData.cursor:null},t.prototype.pushUndoStop=function(){return!!this._modelData&&(!this._configuration.options.get(68)&&(this._modelData.model.pushStackElement(),!0))},t.prototype.executeEdits=function(e,t,n){return!!this._modelData&&(!this._configuration.options.get(68)&&(i=n?Array.isArray(n)?function(){return n}:n:function(){return null},this._modelData.cursor.executeEdits(e,t,i),!0));var i},t.prototype.executeCommand=function(e,t){this._modelData&&this._modelData.cursor.trigger(e,Ha.ExecuteCommand,t)},t.prototype.executeCommands=function(e,t){this._modelData&&this._modelData.cursor.trigger(e,Ha.ExecuteCommands,t)},t.prototype.changeDecorations=function(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null},t.prototype.getLineDecorations=function(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,$(this._configuration.options)):null},t.prototype.deltaDecorations=function(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]},t.prototype.removeDecorations=function(e){var t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]},t.prototype.getLayoutInfo=function(){var e=this._configuration.options,t=e.get(107);return t},t.prototype.createOverviewRuler=function(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null},t.prototype.getContainerDomNode=function(){return this._domElement},t.prototype.getDomNode=function(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarMouseDown(e)},t.prototype.layout=function(e){this._configuration.observeReferenceElement(e),this.render()},t.prototype.focus=function(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()},t.prototype.hasTextFocus=function(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()},t.prototype.hasWidgetFocus=function(){return this._focusTracker&&this._focusTracker.hasFocus()},t.prototype.addContentWidget=function(e){var 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)},t.prototype.layoutContentWidget=function(e){var t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){var n=this._contentWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}},t.prototype.removeContentWidget=function(e){var t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){var n=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(n)}},t.prototype.addOverlayWidget=function(e){var 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)},t.prototype.layoutOverlayWidget=function(e){var t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){var n=this._overlayWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}},t.prototype.removeOverlayWidget=function(e){var t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){var n=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(n)}},t.prototype.changeViewZones=function(e){if(this._modelData&&this._modelData.hasRealView){var t=this._modelData.view.change(e);t&&this._onDidChangeViewZones.fire()}},t.prototype.getTargetAtClientPoint=function(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null},t.prototype.getScrolledVisiblePosition=function(e){if(!this._modelData||!this._modelData.hasRealView)return null;var n=this._modelData.model.validatePosition(e),i=this._configuration.options,o=i.get(107),r=t._getVerticalOffsetForPosition(this._modelData,n.lineNumber,n.column)-this.getScrollTop(),s=this._modelData.view.getOffsetForColumn(n.lineNumber,n.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft();return{top:r,left:s,height:i.get(49)}},t.prototype.getOffsetForColumn=function(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1},t.prototype.render=function(e){void 0===e&&(e=!1),this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)},t.prototype.setAriaOptions=function(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)},t.prototype.applyFontInfo=function(e){Zp.applyFontInfoSlow(e,this._configuration.options.get(34))},t.prototype._attachModel=function(e){var t=this;if(e){var n=[];this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setMaxLineNumber(e.getLineCount()),e.onBeforeAttached();var i=new VN(this._id,this._configuration,e,eD.create(),GN.create(this._configuration.options),(function(e){return co(e)}));n.push(e.onDidChangeDecorations((function(e){return t._onDidChangeModelDecorations.fire(e)}))),n.push(e.onDidChangeLanguage((function(n){t._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),t._onDidChangeModelLanguage.fire(n)}))),n.push(e.onDidChangeLanguageConfiguration((function(e){return t._onDidChangeModelLanguageConfiguration.fire(e)}))),n.push(e.onDidChangeContent((function(e){return t._onDidChangeModelContent.fire(e)}))),n.push(e.onDidChangeOptions((function(e){return t._onDidChangeModelOptions.fire(e)}))),n.push(e.onWillDispose((function(){return t.setModel(null)})));var o=new lN(this._configuration,e,i);n.push(o.onDidReachMaxCursorCount((function(){t._notificationService.warn(r("cursors.maximum","The number of cursors has been limited to {0}.",lN.MAX_CURSOR_COUNT))}))),n.push(o.onDidAttemptReadOnlyEdit((function(){t._onDidAttemptReadOnlyEdit.fire(void 0)}))),n.push(o.onDidChange((function(e){for(var n=[],i=0,o=e.selections.length;i<o;i++)n[i]=e.selections[i].getPosition();var r={position:n[0],secondaryPositions:n.slice(1),reason:e.reason,source:e.source};t._onDidChangeCursorPosition.fire(r);var s={selection:e.selections[0],secondarySelections:e.selections.slice(1),modelVersionId:e.modelVersionId,oldSelections:e.oldSelections,oldModelVersionId:e.oldModelVersionId,source:e.source,reason:e.reason};t._onDidChangeCursorSelection.fire(s)})));var s=this._createView(i,o),a=s[0],u=s[1];if(u){this._domElement.appendChild(a.domNode.domNode);for(var l=Object.keys(this._contentWidgets),c=0,h=l.length;c<h;c++){var d=l[c];a.addContentWidget(this._contentWidgets[d])}l=Object.keys(this._overlayWidgets);for(c=0,h=l.length;c<h;c++){d=l[c];a.addOverlayWidget(this._overlayWidgets[d])}a.render(!1,!0),a.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new cD(e,i,o,a,u,n)}else this._modelData=null},t.prototype._createView=function(e,t){var n,i=this;n=this.isSimpleWidget?{executeEditorCommand:function(e,n){e.runCoreEditorCommand(t,n)},paste:function(e,t,n,o,r){i.trigger(e,Ha.Paste,{text:t,pasteOnNewLine:n,multicursorText:o,mode:r})},type:function(e,t){i.trigger(e,Ha.Type,{text:t})},replacePreviousChar:function(e,t,n){i.trigger(e,Ha.ReplacePreviousChar,{text:t,replaceCharCnt:n})},compositionStart:function(e){i.trigger(e,Ha.CompositionStart,void 0)},compositionEnd:function(e){i.trigger(e,Ha.CompositionEnd,void 0)},cut:function(e){i.trigger(e,Ha.Cut,void 0)}}:{executeEditorCommand:function(e,n){e.runCoreEditorCommand(t,n)},paste:function(e,t,n,o,r){i._commandService.executeCommand(Ha.Paste,{text:t,pasteOnNewLine:n,multicursorText:o,mode:r})},type:function(e,t){i._commandService.executeCommand(Ha.Type,{text:t})},replacePreviousChar:function(e,t,n){i._commandService.executeCommand(Ha.ReplacePreviousChar,{text:t,replaceCharCnt:n})},compositionStart:function(e){i._commandService.executeCommand(Ha.CompositionStart,{})},compositionEnd:function(e){i._commandService.executeCommand(Ha.CompositionEnd,{})},cut:function(e){i._commandService.executeCommand(Ha.Cut,{})}};var o=new Pw(e);o.onDidContentSizeChange=function(e){return i._onDidContentSizeChange.fire(e)},o.onDidScroll=function(e){return i._onDidScrollChange.fire(e)},o.onDidGainFocus=function(){return i._editorTextFocus.setValue(!0)},o.onDidLoseFocus=function(){return i._editorTextFocus.setValue(!1)},o.onContextMenu=function(e){return i._onContextMenu.fire(e)},o.onMouseDown=function(e){return i._onMouseDown.fire(e)},o.onMouseUp=function(e){return i._onMouseUp.fire(e)},o.onMouseDrag=function(e){return i._onMouseDrag.fire(e)},o.onMouseDrop=function(e){return i._onMouseDrop.fire(e)},o.onKeyUp=function(e){return i._onKeyUp.fire(e)},o.onMouseMove=function(e){return i._onMouseMove.fire(e)},o.onMouseLeave=function(e){return i._onMouseLeave.fire(e)},o.onMouseWheel=function(e){return i._onMouseWheel.fire(e)},o.onKeyDown=function(e){return i._onKeyDown.fire(e)};var r=new eN(n,this._configuration,this._themeService,e,t,o);return[r,!0]},t.prototype._postDetachModelCleanup=function(e){e&&e.removeAllDecorationsWithOwnerId(this._id)},t.prototype._detachModel=function(){if(!this._modelData)return null;var 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.removeChild(t),e},t.prototype._removeDecorationType=function(e){this._codeEditorService.removeDecorationType(e)},t.prototype.hasModel=function(){return null!==this._modelData},t=aD([uD(3,Sn),uD(4,En),uD(5,ua),uD(6,Ff),uD(7,tm),uD(8,np),uD(9,HN)],t),t}(Me),dD=function(e){function t(){var t=e.call(this)||this;return t._onDidChangeToTrue=t._register(new qe),t.onDidChangeToTrue=t._onDidChangeToTrue.event,t._onDidChangeToFalse=t._register(new qe),t.onDidChangeToFalse=t._onDidChangeToFalse.event,t._value=0,t}return sD(t,e),t.prototype.setValue=function(e){var t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())},t}(Me),fD=function(e){function t(t,n){var i=e.call(this)||this;return i._editor=t,n.createKey("editorId",t.getId()),i._editorSimpleInput=mw.editorSimpleInput.bindTo(n),i._editorFocus=mw.focus.bindTo(n),i._textInputFocus=mw.textInputFocus.bindTo(n),i._editorTextFocus=mw.editorTextFocus.bindTo(n),i._editorTabMovesFocus=mw.tabMovesFocus.bindTo(n),i._editorReadonly=mw.readOnly.bindTo(n),i._hasMultipleSelections=mw.hasMultipleSelections.bindTo(n),i._hasNonEmptySelection=mw.hasNonEmptySelection.bindTo(n),i._canUndo=mw.canUndo.bindTo(n),i._canRedo=mw.canRedo.bindTo(n),i._register(i._editor.onDidChangeConfiguration((function(){return i._updateFromConfig()}))),i._register(i._editor.onDidChangeCursorSelection((function(){return i._updateFromSelection()}))),i._register(i._editor.onDidFocusEditorWidget((function(){return i._updateFromFocus()}))),i._register(i._editor.onDidBlurEditorWidget((function(){return i._updateFromFocus()}))),i._register(i._editor.onDidFocusEditorText((function(){return i._updateFromFocus()}))),i._register(i._editor.onDidBlurEditorText((function(){return i._updateFromFocus()}))),i._register(i._editor.onDidChangeModel((function(){return i._updateFromModel()}))),i._register(i._editor.onDidChangeConfiguration((function(){return i._updateFromModel()}))),i._updateFromConfig(),i._updateFromSelection(),i._updateFromFocus(),i._updateFromModel(),i._editorSimpleInput.set(i._editor.isSimpleWidget),i}return sD(t,e),t.prototype._updateFromConfig=function(){var e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(106)),this._editorReadonly.set(e.get(68))},t.prototype._updateFromSelection=function(){var e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((function(e){return!e.isEmpty()})))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())},t.prototype._updateFromFocus=function(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())},t.prototype._updateFromModel=function(){var e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))},t}(Me),pD=function(e){function t(t,n){var i=e.call(this)||this;i._editor=t,i._contextKeyService=n,i._langId=mw.languageId.bindTo(n),i._hasCompletionItemProvider=mw.hasCompletionItemProvider.bindTo(n),i._hasCodeActionsProvider=mw.hasCodeActionsProvider.bindTo(n),i._hasCodeLensProvider=mw.hasCodeLensProvider.bindTo(n),i._hasDefinitionProvider=mw.hasDefinitionProvider.bindTo(n),i._hasDeclarationProvider=mw.hasDeclarationProvider.bindTo(n),i._hasImplementationProvider=mw.hasImplementationProvider.bindTo(n),i._hasTypeDefinitionProvider=mw.hasTypeDefinitionProvider.bindTo(n),i._hasHoverProvider=mw.hasHoverProvider.bindTo(n),i._hasDocumentHighlightProvider=mw.hasDocumentHighlightProvider.bindTo(n),i._hasDocumentSymbolProvider=mw.hasDocumentSymbolProvider.bindTo(n),i._hasReferenceProvider=mw.hasReferenceProvider.bindTo(n),i._hasRenameProvider=mw.hasRenameProvider.bindTo(n),i._hasSignatureHelpProvider=mw.hasSignatureHelpProvider.bindTo(n),i._hasDocumentFormattingProvider=mw.hasDocumentFormattingProvider.bindTo(n),i._hasDocumentSelectionFormattingProvider=mw.hasDocumentSelectionFormattingProvider.bindTo(n),i._hasMultipleDocumentFormattingProvider=mw.hasMultipleDocumentFormattingProvider.bindTo(n),i._hasMultipleDocumentSelectionFormattingProvider=mw.hasMultipleDocumentSelectionFormattingProvider.bindTo(n),i._isInWalkThrough=mw.isInEmbeddedEditor.bindTo(n);var o=function(){return i._update()};return i._register(t.onDidChangeModel(o)),i._register(t.onDidChangeModelLanguage(o)),i._register(Fu.onDidChange(o)),i._register(Gu.onDidChange(o)),i._register(qu.onDidChange(o)),i._register(zu.onDidChange(o)),i._register(ju.onDidChange(o)),i._register(Uu.onDidChange(o)),i._register(Ku.onDidChange(o)),i._register(Vu.onDidChange(o)),i._register(Hu.onDidChange(o)),i._register(Bu.onDidChange(o)),i._register(Pu.onDidChange(o)),i._register(Ru.onDidChange(o)),i._register(Yu.onDidChange(o)),i._register(Zu.onDidChange(o)),i._register(Wu.onDidChange(o)),o(),i}return sD(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.reset=function(){var e=this;this._contextKeyService.bufferChangeEvents((function(){e._langId.reset(),e._hasCompletionItemProvider.reset(),e._hasCodeActionsProvider.reset(),e._hasCodeLensProvider.reset(),e._hasDefinitionProvider.reset(),e._hasDeclarationProvider.reset(),e._hasImplementationProvider.reset(),e._hasTypeDefinitionProvider.reset(),e._hasHoverProvider.reset(),e._hasDocumentHighlightProvider.reset(),e._hasDocumentSymbolProvider.reset(),e._hasReferenceProvider.reset(),e._hasRenameProvider.reset(),e._hasDocumentFormattingProvider.reset(),e._hasDocumentSelectionFormattingProvider.reset(),e._hasSignatureHelpProvider.reset(),e._isInWalkThrough.reset()}))},t.prototype._update=function(){var e=this,t=this._editor.getModel();t?this._contextKeyService.bufferChangeEvents((function(){e._langId.set(t.getLanguageIdentifier().language),e._hasCompletionItemProvider.set(Fu.has(t)),e._hasCodeActionsProvider.set(Gu.has(t)),e._hasCodeLensProvider.set(qu.has(t)),e._hasDefinitionProvider.set(zu.has(t)),e._hasDeclarationProvider.set(ju.has(t)),e._hasImplementationProvider.set(Uu.has(t)),e._hasTypeDefinitionProvider.set(Ku.has(t)),e._hasHoverProvider.set(Vu.has(t)),e._hasDocumentHighlightProvider.set(Hu.has(t)),e._hasDocumentSymbolProvider.set(Bu.has(t)),e._hasReferenceProvider.set(Pu.has(t)),e._hasRenameProvider.set(Ru.has(t)),e._hasSignatureHelpProvider.set(Wu.has(t)),e._hasDocumentFormattingProvider.set(Yu.has(t)||Zu.has(t)),e._hasDocumentSelectionFormattingProvider.set(Zu.has(t)),e._hasMultipleDocumentFormattingProvider.set(Yu.all(t).length+Zu.all(t).length>1),e._hasMultipleDocumentSelectionFormattingProvider.set(Zu.all(t).length>1),e._isInWalkThrough.set(t.uri.scheme===vi.walkThroughSnippet)})):this.reset()},t}(Me),gD=function(e){function t(t){var n=e.call(this)||this;return n._onChange=n._register(new qe),n.onChange=n._onChange.event,n._hasFocus=!1,n._domFocusTracker=n._register(qo(t)),n._register(n._domFocusTracker.onDidFocus((function(){n._hasFocus=!0,n._onChange.fire(void 0)}))),n._register(n._domFocusTracker.onDidBlur((function(){n._hasFocus=!1,n._onChange.fire(void 0)}))),n}return sD(t,e),t.prototype.hasFocus=function(){return this._hasFocus},t}(Me),mD=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),vD=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function _D(e){return mD+encodeURIComponent(e.toString())+vD}var yD=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),bD=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function CD(e){return yD+encodeURIComponent(e.toString())+bD}lm((function(e,t){var n=e.getColor(Qy);n&&t.addRule(".monaco-editor .squiggly-error { border-bottom: 4px double "+n+"; }");var i=e.getColor($y);i&&t.addRule('.monaco-editor .squiggly-error { background: url("data:image/svg+xml,'+_D(i)+'") repeat-x bottom left; }');var o=e.getColor(eb);o&&t.addRule(".monaco-editor .squiggly-warning { border-bottom: 4px double "+o+"; }");var r=e.getColor(Jy);r&&t.addRule('.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,'+_D(r)+'") repeat-x bottom left; }');var s=e.getColor(nb);s&&t.addRule(".monaco-editor .squiggly-info { border-bottom: 4px double "+s+"; }");var a=e.getColor(tb);a&&t.addRule('.monaco-editor .squiggly-info { background: url("data:image/svg+xml,'+_D(a)+'") repeat-x bottom left; }');var u=e.getColor(ob);u&&t.addRule(".monaco-editor .squiggly-hint { border-bottom: 2px dotted "+u+"; }");var l=e.getColor(ib);l&&t.addRule('.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,'+CD(l)+'") no-repeat bottom left; }');var c=e.getColor(yC);c&&t.addRule(".monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: "+c.rgba.a+"; }");var h=e.getColor(_C);h&&t.addRule(".monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed "+h+"; }");var d=e.getColor(sb)||"inherit";t.addRule(".monaco-editor .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: "+d+"}")}));n("94a7"),n("ba77");var wD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),SD=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i},LD=!1,ND=function(e){function t(t,n,i){void 0===i&&(i={});var o=e.call(this)||this;return o._state=3,o._onDidEnablementChange=o._register(new qe),o.onDidEnablementChange=o._onDidEnablementChange.event,o._onDidStart=o._register(new qe),o.onDidStart=o._onDidStart.event,o._onDidChange=o._register(new qe),o.onDidChange=o._onDidChange.event,o._onDidReset=o._register(new qe),o.onDidReset=o._onDidReset.event,o._onDidEnd=o._register(new qe),o.onDidEnd=o._onDidEnd.event,o.linkedSash=void 0,o.orthogonalStartSashDisposables=o._register(new Te),o.orthogonalEndSashDisposables=o._register(new Te),o.el=Go(t,$o(".monaco-sash")),s["e"]&&$i(o.el,"mac"),o._register(Kn(o.el,"mousedown")(o.onMouseDown,o)),o._register(Kn(o.el,"dblclick")(o.onMouseDoubleClick,o)),o._register(kg.addTarget(o.el)),o._register(Kn(o.el,Dg.Start)(o.onTouchStart,o)),zn&&$i(o.el,"touch"),o.setOrientation(i.orientation||0),o.hidden=!1,o.layoutProvider=n,o.orthogonalStartSash=i.orthogonalStartSash,o.orthogonalEndSash=i.orthogonalEndSash,to(o.el,"debug",LD),o}return wD(t,e),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){this._state!==e&&(to(this.el,"disabled",0===e),to(this.el,"minimum",1===e),to(this.el,"maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orthogonalStartSash",{get:function(){return this._orthogonalStartSash},set:function(e){this.orthogonalStartSashDisposables.clear(),e?(this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange,this)),this.onOrthogonalStartSashEnablementChange(e.state)):this.onOrthogonalStartSashEnablementChange(0),this._orthogonalStartSash=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orthogonalEndSash",{get:function(){return this._orthogonalEndSash},set:function(e){this.orthogonalEndSashDisposables.clear(),e?(this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange,this)),this.onOrthogonalEndSashEnablementChange(e.state)):this.onOrthogonalEndSashEnablementChange(0),this._orthogonalEndSash=e},enumerable:!0,configurable:!0}),t.prototype.setOrientation=function(e){this.orientation=e,1===this.orientation?($i(this.el,"horizontal"),Ji(this.el,"vertical")):(Ji(this.el,"horizontal"),$i(this.el,"vertical")),this.layoutProvider&&this.layout()},t.prototype.onMouseDown=function(e){var t=this;zo.stop(e,!1);var n=!1;if(!e.__orthogonalSashEvent){var i=this.getOrthogonalSash(e);i&&(n=!0,e.__orthogonalSashEvent=!0,i.onMouseDown(e))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onMouseDown(e)),this.state){for(var o=SD(nr("iframe"),nr("webview")),r=0,a=o;r<a.length;r++){var u=a[r];u.style.pointerEvents="none"}var l=new si(e),c=l.posx,h=l.posy,d=l.altKey,f={startX:c,currentX:c,startY:h,currentY:h,altKey:d};$i(this.el,"active"),this._onDidStart.fire(f);var p=Po(this.el),g=function(){var e="";e=n?"all-scroll":1===t.orientation?1===t.state?"s-resize":2===t.state?"n-resize":s["e"]?"row-resize":"ns-resize":1===t.state?"e-resize":2===t.state?"w-resize":s["e"]?"col-resize":"ew-resize",p.innerHTML="* { cursor: "+e+" !important; }"},m=new Te;g(),n||this.onDidEnablementChange(g,null,m);var v=function(e){zo.stop(e,!1);var n=new si(e),i={startX:c,currentX:n.posx,startY:h,currentY:n.posy,altKey:d};t._onDidChange.fire(i)},_=function(e){zo.stop(e,!1),t.el.removeChild(p),Ji(t.el,"active"),t._onDidEnd.fire(),m.dispose();for(var n=0,i=o;n<i.length;n++){var r=i[n];r.style.pointerEvents="auto"}};Kn(window,"mousemove")(v,null,m),Kn(window,"mouseup")(_,null,m)}},t.prototype.onMouseDoubleClick=function(e){var t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()},t.prototype.onTouchStart=function(e){var t=this;zo.stop(e);var n=[],i=e.pageX,o=e.pageY,r=e.altKey;this._onDidStart.fire({startX:i,currentX:i,startY:o,currentY:o,altKey:r}),n.push(io(this.el,Dg.Change,(function(e){Rs(e.pageX)&&Rs(e.pageY)&&t._onDidChange.fire({startX:i,currentX:e.pageX,startY:o,currentY:e.pageY,altKey:r})}))),n.push(io(this.el,Dg.End,(function(e){t._onDidEnd.fire(),Ee(n)})))},t.prototype.layout=function(){var e=zn?20:4;if(0===this.orientation){var t=this.layoutProvider;this.el.style.left=t.getVerticalSashLeft(this)-e/2+"px",t.getVerticalSashTop&&(this.el.style.top=t.getVerticalSashTop(this)+"px"),t.getVerticalSashHeight&&(this.el.style.height=t.getVerticalSashHeight(this)+"px")}else{var n=this.layoutProvider;this.el.style.top=n.getHorizontalSashTop(this)-e/2+"px",n.getHorizontalSashLeft&&(this.el.style.left=n.getHorizontalSashLeft(this)+"px"),n.getHorizontalSashWidth&&(this.el.style.width=n.getHorizontalSashWidth(this)+"px")}},t.prototype.hide=function(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")},t.prototype.onOrthogonalStartSashEnablementChange=function(e){to(this.el,"orthogonal-start",0!==e)},t.prototype.onOrthogonalEndSashEnablementChange=function(e){to(this.el,"orthogonal-end",0!==e)},t.prototype.getOrthogonalSash=function(e){if(0===this.orientation){if(e.offsetY<=4)return this.orthogonalStartSash;if(e.offsetY>=this.el.clientHeight-4)return this.orthogonalEndSash}else{if(e.offsetX<=4)return this.orthogonalStartSash;if(e.offsetX>=this.el.clientWidth-4)return this.orthogonalEndSash}},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.el.remove()},t}(Me),DD=function(){function e(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=!1),this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}return e}(),ED=[];function xD(e,t,n){ED.push([e,new DD(t,[],n)])}function kD(){return ED}var OD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),TD=Nn("IEditorCancelService"),MD=new Rf("cancellableOperation",!1);xD(TD,function(){function e(){this._tokens=new WeakMap}return e.prototype.add=function(e,t){var n,i=this._tokens.get(e);return i||(i=e.invokeWithinContext((function(e){var t=MD.bindTo(e.get(Ff)),n=new He;return{key:t,tokens:n}})),this._tokens.set(e,i)),i.key.set(!0),n=i.tokens.push(t),function(){n&&(n(),i.key.set(!i.tokens.isEmpty()),n=void 0)}},e.prototype.cancel=function(e){var t=this._tokens.get(e);if(t){var n=t.tokens.pop();n&&(n.cancel(),t.key.set(!t.tokens.isEmpty()))}},e}(),!0);var ID=function(e){function t(t,n){var i=e.call(this,n)||this;return i.editor=t,i._unregister=t.invokeWithinContext((function(e){return e.get(TD).add(t,i)})),i}return OD(t,e),t.prototype.dispose=function(){this._unregister(),e.prototype.dispose.call(this)},t}(Je);vg(new(function(e){function t(){return e.call(this,{id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:MD})||this}return OD(t,e),t.prototype.runEditorCommand=function(e,t){e.get(TD).cancel(t)},t}(gg)));var AD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),PD=(function(){function e(e,t){if(this.flags=t,0!==(1&this.flags)){var n=e.getModel();this.modelVersionId=n?dr("{0}#{1}",n.uri.toString(),n.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)}e.prototype._equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.modelVersionId===n.modelVersionId&&(this.scrollLeft===n.scrollLeft&&this.scrollTop===n.scrollTop&&(!(!this.position&&n.position||this.position&&!n.position||this.position&&n.position&&!this.position.equals(n.position))&&!(!this.selection&&n.selection||this.selection&&!n.selection||this.selection&&n.selection&&!this.selection.equalsRange(n.selection))))},e.prototype.validate=function(t){return this._equals(new e(t,this.flags))}}(),function(e){function t(t,n,i){var o=e.call(this,t,i)||this;return o.editor=t,o._listener=new Te,4&n&&o._listener.add(t.onDidChangeCursorPosition((function(e){return o.cancel()}))),2&n&&o._listener.add(t.onDidChangeCursorSelection((function(e){return o.cancel()}))),8&n&&o._listener.add(t.onDidScrollChange((function(e){return o.cancel()}))),1&n&&(o._listener.add(t.onDidChangeModel((function(e){return o.cancel()}))),o._listener.add(t.onDidChangeModelContent((function(e){return o.cancel()})))),o}AD(t,e),t.prototype.dispose=function(){this._listener.dispose(),e.prototype.dispose.call(this)}}(ID),function(e){function t(t,n){var i=e.call(this,n)||this;return i._listener=t.onDidChangeContent((function(){return i.cancel()})),i}AD(t,e),t.prototype.dispose=function(){this._listener.dispose(),e.prototype.dispose.call(this)}}(Je),function(){function e(e,t){this._visiblePosition=e,this._visiblePositionScrollDelta=t}return e.capture=function(t){var n=null,i=0;if(0!==t.getScrollTop()){var o=t.getVisibleRanges();if(o.length>0){n=o[0].getStartPosition();var r=t.getTopForPosition(n.lineNumber,n.column);i=t.getScrollTop()-r}}return new e(n,i)},e.prototype.restore=function(e){if(this._visiblePosition){var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}},e}()),RD=(n("0d30"),n("c84a"),{RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:"text/plain"}),FD=function(){function e(e){this.data=e}return e.prototype.update=function(){},e.prototype.getData=function(){return this.data},e}(),WD={CurrentDragAndDropData:void 0},VD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),BD=function(e){function t(t,n,i){var o=e.call(this)||this;return o.options=i,o._context=t||o,o._action=n,n instanceof Jp&&o._register(n.onDidChange((function(e){o.element&&o.handleActionChangeEvent(e)}))),o}return VD(t,e),t.prototype.handleActionChangeEvent=function(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()},Object.defineProperty(t.prototype,"actionRunner",{get:function(){return this._actionRunner||(this._actionRunner=this._register(new eg)),this._actionRunner},set:function(e){this._actionRunner=e},enumerable:!0,configurable:!0}),t.prototype.getAction=function(){return this._action},t.prototype.isEnabled=function(){return this._action.enabled},t.prototype.setActionContext=function(e){this._context=e},t.prototype.render=function(e){var t=this,n=this.element=e;this._register(kg.addTarget(e));var i=this.options&&this.options.draggable;i&&(e.draggable=!0,Fn&&this._register(io(e,Ho.DRAG_START,(function(e){var n;return null===(n=e.dataTransfer)||void 0===n?void 0:n.setData(RD.TEXT,t._action.label)})))),this._register(io(n,Dg.Tap,(function(e){return t.onClick(e)}))),this._register(io(n,Ho.MOUSE_DOWN,(function(e){i||zo.stop(e,!0),t._action.enabled&&0===e.button&&$i(n,"active")}))),this._register(io(n,Ho.CLICK,(function(e){zo.stop(e,!0),t.options&&t.options.isMenu?t.onClick(e):s["i"]((function(){return t.onClick(e)}))}))),this._register(io(n,Ho.DBLCLICK,(function(e){zo.stop(e,!0)}))),[Ho.MOUSE_UP,Ho.MOUSE_OUT].forEach((function(e){t._register(io(n,e,(function(e){zo.stop(e),Ji(n,"active")})))}))},t.prototype.onClick=function(e){var t;zo.stop(e,!0),Vs(this._context)?t=e:(t=this._context,Ps(t)&&(t.event=e)),this.actionRunner.run(this._action,t)},t.prototype.focus=function(){this.element&&(this.element.focus(),$i(this.element,"focused"))},t.prototype.blur=function(){this.element&&(this.element.blur(),Ji(this.element,"focused"))},t.prototype.updateEnabled=function(){},t.prototype.updateLabel=function(){},t.prototype.updateTooltip=function(){},t.prototype.updateClass=function(){},t.prototype.updateChecked=function(){},t.prototype.dispose=function(){this.element&&(Ki(this.element),this.element=void 0),e.prototype.dispose.call(this)},t}(Me),HD=function(e){function t(n){var i=e.call(this,t.ID,n,n?"separator text":"separator")||this;return i.checked=!1,i.enabled=!1,i}return VD(t,e),t.ID="vs.actions.separator",t}(Jp),zD=function(e){function t(t,n,i){void 0===i&&(i={});var o=e.call(this,t,n,i)||this;return o.options=i,o.options.icon=void 0!==i.icon&&i.icon,o.options.label=void 0===i.label||i.label,o.cssClass="",o}return VD(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),this.element&&(this.label=Go(this.element,$o("a.action-label"))),this.label&&(this._action.id===HD.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&&(Go(this.element,$o("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()},t.prototype.focus=function(){e.prototype.focus.call(this),this.label&&this.label.focus()},t.prototype.updateLabel=function(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)},t.prototype.updateTooltip=function(){var 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=r({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)},t.prototype.updateClass=function(){this.cssClass&&this.label&&eo(this.label,this.cssClass),this.options.icon?(this.cssClass=this.getAction().class,this.label&&($i(this.label,"codicon"),this.cssClass&&Qi(this.label,this.cssClass)),this.updateEnabled()):this.label&&Ji(this.label,"codicon")},t.prototype.updateEnabled=function(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),Ji(this.label,"disabled"),this.label.tabIndex=0),this.element&&Ji(this.element,"disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),$i(this.label,"disabled"),tr(this.label)),this.element&&$i(this.element,"disabled"))},t.prototype.updateChecked=function(){this.label&&(this.getAction().checked?$i(this.label,"checked"):Ji(this.label,"checked"))},t}(BD),jD={orientation:0,context:null,triggerKeys:{keys:[3,10],keyDown:!1}},UD=function(e){function t(t,n){void 0===n&&(n=jD);var i,o,r=e.call(this)||this;switch(r._onDidBlur=r._register(new qe),r.onDidBlur=r._onDidBlur.event,r._onDidCancel=r._register(new qe),r.onDidCancel=r._onDidCancel.event,r._onDidRun=r._register(new qe),r.onDidRun=r._onDidRun.event,r._onDidBeforeRun=r._register(new qe),r.onDidBeforeRun=r._onDidBeforeRun.event,r.options=n,r._context=n.context,r.options.triggerKeys||(r.options.triggerKeys=jD.triggerKeys),r.options.actionRunner?r._actionRunner=r.options.actionRunner:(r._actionRunner=new eg,r._register(r._actionRunner)),r._register(r._actionRunner.onDidRun((function(e){return r._onDidRun.fire(e)}))),r._register(r._actionRunner.onDidBeforeRun((function(e){return r._onDidBeforeRun.fire(e)}))),r.viewItems=[],r.focusedItem=void 0,r.domNode=document.createElement("div"),r.domNode.className="monaco-action-bar",!1!==n.animated&&$i(r.domNode,"animated"),r.options.orientation){case 0:i=15,o=17;break;case 1:i=17,o=15,r.domNode.className+=" reverse";break;case 2:i=16,o=18,r.domNode.className+=" vertical";break;case 3:i=18,o=16,r.domNode.className+=" vertical reverse";break}return r._register(io(r.domNode,Ho.KEY_DOWN,(function(e){var t=new Jn(e),n=!0;t.equals(i)?r.focusPrevious():t.equals(o)?r.focusNext():t.equals(9)?r.cancel():r.isTriggerKeyEvent(t)?r.options.triggerKeys&&r.options.triggerKeys.keyDown&&r.doTrigger(t):n=!1,n&&(t.preventDefault(),t.stopPropagation())}))),r._register(io(r.domNode,Ho.KEY_UP,(function(e){var t=new Jn(e);r.isTriggerKeyEvent(t)?(r.options.triggerKeys&&!r.options.triggerKeys.keyDown&&r.doTrigger(t),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&r.updateFocusedItem()}))),r.focusTracker=r._register(qo(r.domNode)),r._register(r.focusTracker.onDidBlur((function(){document.activeElement!==r.domNode&&Oo(document.activeElement,r.domNode)||(r._onDidBlur.fire(),r.focusedItem=void 0)}))),r._register(r.focusTracker.onDidFocus((function(){return r.updateFocusedItem()}))),r.actionsList=document.createElement("ul"),r.actionsList.className="actions-container",r.actionsList.setAttribute("role","toolbar"),r.options.ariaLabel&&r.actionsList.setAttribute("aria-label",r.options.ariaLabel),r.domNode.appendChild(r.actionsList),t.appendChild(r.domNode),r}return VD(t,e),t.prototype.isTriggerKeyEvent=function(e){var t=!1;return this.options.triggerKeys&&this.options.triggerKeys.keys.forEach((function(n){t=t||e.equals(n)})),t},t.prototype.updateFocusedItem=function(){for(var e=0;e<this.actionsList.children.length;e++){var t=this.actionsList.children[e];if(Oo(document.activeElement,t)){this.focusedItem=e;break}}},Object.defineProperty(t.prototype,"context",{get:function(){return this._context},set:function(e){this._context=e,this.viewItems.forEach((function(t){return t.setActionContext(e)}))},enumerable:!0,configurable:!0}),t.prototype.getContainer=function(){return this.domNode},t.prototype.push=function(e,t){var n=this;void 0===t&&(t={});var i=Array.isArray(e)?e:[e],o=Rs(t.index)?t.index:null;i.forEach((function(e){var i,r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation"),n._register(io(r,Ho.CONTEXT_MENU,(function(e){e.preventDefault(),e.stopPropagation()}))),n.options.actionViewItemProvider&&(i=n.options.actionViewItemProvider(e)),i||(i=new zD(n.context,e,t)),i.actionRunner=n._actionRunner,i.setActionContext(n.context),i.render(r),null===o||o<0||o>=n.actionsList.children.length?(n.actionsList.appendChild(r),n.viewItems.push(i)):(n.actionsList.insertBefore(r,n.actionsList.children[o]),n.viewItems.splice(o,0,i),o++)}))},t.prototype.clear=function(){this.viewItems=Ee(this.viewItems),Ui(this.actionsList)},t.prototype.isEmpty=function(){return 0===this.viewItems.length},t.prototype.focus=function(e){var t=!1,n=void 0;void 0===e?t=!0:"number"===typeof e?n=e:"boolean"===typeof e&&(t=e),t&&"undefined"===typeof this.focusedItem?(this.focusedItem=this.viewItems.length-1,this.focusNext()):(void 0!==n&&(this.focusedItem=n),this.updateFocus())},t.prototype.focusNext=function(){"undefined"===typeof this.focusedItem&&(this.focusedItem=this.viewItems.length-1);var e,t=this.focusedItem;do{this.focusedItem=(this.focusedItem+1)%this.viewItems.length,e=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus()},t.prototype.focusPrevious=function(){"undefined"===typeof this.focusedItem&&(this.focusedItem=0);var e,t=this.focusedItem;do{this.focusedItem=this.focusedItem-1,this.focusedItem<0&&(this.focusedItem=this.viewItems.length-1),e=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus(!0)},t.prototype.updateFocus=function(e,t){"undefined"===typeof this.focusedItem&&this.actionsList.focus({preventScroll:t});for(var n=0;n<this.viewItems.length;n++){var i=this.viewItems[n],o=i;n===this.focusedItem?zs(o.isEnabled)&&(o.isEnabled()&&zs(o.focus)?o.focus(e):this.actionsList.focus({preventScroll:t})):zs(o.blur)&&o.blur()}},t.prototype.doTrigger=function(e){if("undefined"!==typeof this.focusedItem){var t=this.viewItems[this.focusedItem];if(t instanceof BD){var n=null===t._context||void 0===t._context?e:t._context;this.run(t._action,n)}}},t.prototype.cancel=function(){document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this._onDidCancel.fire()},t.prototype.run=function(e,t){return this._actionRunner.run(e,t)},t.prototype.dispose=function(){Ee(this.viewItems),this.viewItems=[],Ki(this.getContainer()),e.prototype.dispose.call(this)},t}(Me),KD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),qD=3,GD=function(){function e(e,t,n,i){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=n,this.modifiedLineEnd=i}return e.prototype.getType=function(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0},e}(),YD=function(){function e(e){this.entries=e}return e}(),ZD=function(e){function t(t){var n=e.call(this)||this;return n._width=0,n._diffEditor=t,n._isVisible=!1,n.shadow=wg(document.createElement("div")),n.shadow.setClassName("diff-review-shadow"),n.actionBarContainer=wg(document.createElement("div")),n.actionBarContainer.setClassName("diff-review-actions"),n._actionBar=n._register(new UD(n.actionBarContainer.domNode)),n._actionBar.push(new Jp("diffreview.close",r("label.close","Close"),"close-diff-review",!0,(function(){return n.hide(),Promise.resolve(null)})),{label:!1,icon:!0}),n.domNode=wg(document.createElement("div")),n.domNode.setClassName("diff-review monaco-editor-background"),n._content=wg(document.createElement("div")),n._content.setClassName("diff-review-content"),n.scrollbar=n._register(new RS(n._content.domNode,{})),n.domNode.domNode.appendChild(n.scrollbar.getDomNode()),n._register(t.onDidUpdateDiff((function(){n._isVisible&&(n._diffs=n._compute(),n._render())}))),n._register(t.getModifiedEditor().onDidChangeCursorPosition((function(){n._isVisible&&n._render()}))),n._register(t.getOriginalEditor().onDidFocusEditorWidget((function(){n._isVisible&&n.hide()}))),n._register(t.getModifiedEditor().onDidFocusEditorWidget((function(){n._isVisible&&n.hide()}))),n._register(so(n.domNode.domNode,"click",(function(e){e.preventDefault();var t=To(e.target,"diff-review-row");t&&n._goToRow(t)}))),n._register(so(n.domNode.domNode,"keydown",(function(e){(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),n._goToRow(n._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),n._goToRow(n._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),n.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),n.accept())}))),n._diffs=[],n._currentDiff=null,n}return KD(t,e),t.prototype.prev=function(){var e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){for(var t=-1,n=0,i=this._diffs.length;n<i;n++)if(this._diffs[n]===this._currentDiff){t=n;break}e=this._diffs.length+t-1}else e=this._findDiffIndex(this._diffEditor.getPosition());0!==this._diffs.length&&(e%=this._diffs.length,this._diffEditor.setPosition(new fn(this._diffs[e].entries[0].modifiedLineStart,1)),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow()))},t.prototype.next=function(){var e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){for(var t=-1,n=0,i=this._diffs.length;n<i;n++)if(this._diffs[n]===this._currentDiff){t=n;break}e=t+1}else e=this._findDiffIndex(this._diffEditor.getPosition());0!==this._diffs.length&&(e%=this._diffs.length,this._diffEditor.setPosition(new fn(this._diffs[e].entries[0].modifiedLineStart,1)),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow()))},t.prototype.accept=function(){var e=-1,t=this._getCurrentFocusedRow();if(t){var n=parseInt(t.getAttribute("data-line"),10);isNaN(n)||(e=n)}this.hide(),-1!==e&&(this._diffEditor.setPosition(new fn(e,1)),this._diffEditor.revealPosition(new fn(e,1),1))},t.prototype.hide=function(){this._isVisible=!1,this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()},t.prototype._getPrevRow=function(){var e=this._getCurrentFocusedRow();return e?e.previousElementSibling?e.previousElementSibling:e:this._getFirstRow()},t.prototype._getNextRow=function(){var e=this._getCurrentFocusedRow();return e?e.nextElementSibling?e.nextElementSibling:e:this._getFirstRow()},t.prototype._getFirstRow=function(){return this.domNode.domNode.querySelector(".diff-review-row")},t.prototype._getCurrentFocusedRow=function(){var e=document.activeElement;return e&&/diff-review-row/.test(e.className)?e:null},t.prototype._goToRow=function(e){var t=this._getCurrentFocusedRow();e.tabIndex=0,e.focus(),t&&t!==e&&(t.tabIndex=-1),this.scrollbar.scanDomNode()},t.prototype.isVisible=function(){return this._isVisible},t.prototype.layout=function(e,t,n){this._width=t,this.shadow.setTop(e-6),this.shadow.setWidth(t),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(e),this.domNode.setWidth(t),this.domNode.setHeight(n),this._content.setHeight(n),this._content.setWidth(t),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))},t.prototype._compute=function(){var e=this._diffEditor.getLineChanges();if(!e||0===e.length)return[];var n=this._diffEditor.getOriginalEditor().getModel(),i=this._diffEditor.getModifiedEditor().getModel();return n&&i?t._mergeAdjacent(e,n.getLineCount(),i.getLineCount()):[]},t._mergeAdjacent=function(e,t,n){if(!e||0===e.length)return[];for(var i=[],o=0,r=0,s=e.length;r<s;r++){var a=e[r],u=a.originalStartLineNumber,l=a.originalEndLineNumber,c=a.modifiedStartLineNumber,h=a.modifiedEndLineNumber,d=[],f=0,p=0===l?u:u-1,g=0===h?c:c-1,m=1,v=1;if(r>0){var _=e[r-1];m=0===_.originalEndLineNumber?_.originalStartLineNumber+1:_.originalEndLineNumber+1,v=0===_.modifiedEndLineNumber?_.modifiedStartLineNumber+1:_.modifiedEndLineNumber+1}var y=p-qD+1,b=g-qD+1;if(y<m){var C=m-y;y+=C,b+=C}if(b<v){C=v-b;y+=C,b+=C}d[f++]=new GD(y,p,b,g),0!==l&&(d[f++]=new GD(u,l,0,0)),0!==h&&(d[f++]=new GD(0,0,c,h));var w=0===l?u+1:l+1,S=0===h?c+1:h+1,L=t,N=n;if(r+1<s){var D=e[r+1];L=0===D.originalEndLineNumber?D.originalStartLineNumber:D.originalStartLineNumber-1,N=0===D.modifiedEndLineNumber?D.modifiedStartLineNumber:D.modifiedStartLineNumber-1}var E=w+qD-1,x=S+qD-1;if(E>L){C=L-E;E+=C,x+=C}if(x>N){C=N-x;E+=C,x+=C}d[f++]=new GD(w,E,S,x),i[o++]=new YD(d)}var k=i[0].entries,O=[],T=0;for(r=1,s=i.length;r<s;r++){var M=i[r].entries,I=k[k.length-1],A=M[0];0===I.getType()&&0===A.getType()&&A.originalLineStart<=I.originalLineEnd?(k[k.length-1]=new GD(I.originalLineStart,A.originalLineEnd,I.modifiedLineStart,A.modifiedLineEnd),k=k.concat(M.slice(1))):(O[T++]=new YD(k),k=M)}return O[T++]=new YD(k),O},t.prototype._findDiffIndex=function(e){for(var t=e.lineNumber,n=0,i=this._diffs.length;n<i;n++){var o=this._diffs[n].entries,r=o[o.length-1].modifiedLineEnd;if(t<=r)return n}return 0},t.prototype._render=function(){var e=this._diffEditor.getOriginalEditor().getOptions(),n=this._diffEditor.getModifiedEditor().getOptions(),i=this._diffEditor.getOriginalEditor().getModel(),o=this._diffEditor.getModifiedEditor().getModel(),s=i.getOptions(),a=o.getOptions();if(!this._isVisible||!i||!o)return Ui(this._content.domNode),this._currentDiff=null,void this.scrollbar.scanDomNode();var u=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[u]!==this._currentDiff){this._currentDiff=this._diffs[u];var l=this._diffs[u].entries,c=document.createElement("div");c.className="diff-review-table",c.setAttribute("role","list"),Zp.applyFontInfoSlow(c,n.get(34));for(var h=0,d=0,f=0,p=0,g=0,m=l.length;g<m;g++){var v=l[g],_=v.originalLineStart,y=v.originalLineEnd,b=v.modifiedLineStart,C=v.modifiedLineEnd;0!==_&&(0===h||_<h)&&(h=_),0!==y&&(0===d||y>d)&&(d=y),0!==b&&(0===f||b<f)&&(f=b),0!==C&&(0===p||C>p)&&(p=C)}var w=document.createElement("div");w.className="diff-review-row";var S=document.createElement("div");S.className="diff-review-cell diff-review-summary";var L=d-h+1,N=p-f+1;S.appendChild(document.createTextNode(u+1+"/"+this._diffs.length+": @@ -"+h+","+L+" +"+f+","+N+" @@")),w.setAttribute("data-line",String(f));var D=function(e){return 0===e?r("no_lines","no lines"):1===e?r("one_line","1 line"):r("more_lines","{0} lines",e)},E=D(L),x=D(N);w.setAttribute("aria-label",r({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines", "1 line" or "X lines", localized separately.']},"Difference {0} of {1}: original {2}, {3}, modified {4}, {5}",u+1,this._diffs.length,h,E,f,x)),w.appendChild(S),w.setAttribute("role","listitem"),c.appendChild(w);var k=f;for(g=0,m=l.length;g<m;g++){v=l[g];t._renderSection(c,v,k,this._width,e,i,s,n,o,a),0!==v.modifiedLineStart&&(k=v.modifiedLineEnd)}Ui(this._content.domNode),this._content.domNode.appendChild(c),this.scrollbar.scanDomNode()}},t._renderSection=function(e,t,n,i,o,s,a,u,l,c){var h=t.getType(),d="diff-review-row",f="",p="diff-review-spacer";switch(h){case 1:d="diff-review-row line-insert",f=" char-insert",p="diff-review-spacer insert-sign";break;case 2:d="diff-review-row line-delete",f=" char-delete",p="diff-review-spacer delete-sign";break}for(var g=t.originalLineStart,m=t.originalLineEnd,v=t.modifiedLineStart,_=t.modifiedLineEnd,y=Math.max(_-v,m-g),b=o.get(107),C=b.glyphMarginWidth+b.lineNumbersWidth,w=u.get(107),S=10+w.glyphMarginWidth+w.lineNumbersWidth,L=0;L<=y;L++){var N=0===g?0:g+L,D=0===v?0:v+L,E=document.createElement("div");E.style.minWidth=i+"px",E.className=d,E.setAttribute("role","listitem"),0!==D&&(n=D),E.setAttribute("data-line",String(n));var x=document.createElement("div");x.className="diff-review-cell",E.appendChild(x);var k=document.createElement("span");k.style.width=C+"px",k.style.minWidth=C+"px",k.className="diff-review-line-number"+f,0!==N?k.appendChild(document.createTextNode(String(N))):k.innerHTML="&#160;",x.appendChild(k);var O=document.createElement("span");O.style.width=S+"px",O.style.minWidth=S+"px",O.style.paddingRight="10px",O.className="diff-review-line-number"+f,0!==D?O.appendChild(document.createTextNode(String(D))):O.innerHTML="&#160;",x.appendChild(O);var T=document.createElement("span");T.className=p,T.innerHTML="&#160;&#160;",x.appendChild(T);var M=void 0;0!==D?(x.insertAdjacentHTML("beforeend",this._renderLine(l,u,c.tabSize,D)),M=l.getLineContent(D)):(x.insertAdjacentHTML("beforeend",this._renderLine(s,o,a.tabSize,N)),M=s.getLineContent(N)),0===M.length&&(M=r("blankLine","blank"));var I="";switch(h){case 0:I=r("equalLine","original {0}, modified {1}: {2}",N,D,M);break;case 1:I=r("insertLine","+ modified {0}: {1}",D,M);break;case 2:I=r("deleteLine","- original {0}: {1}",N,M);break}E.setAttribute("aria-label",I),e.appendChild(E)}},t._renderLine=function(e,t,n,i){var o=e.getLineContent(i),r=t.get(34),s=16793600,a=new Uint32Array(2);a[0]=o.length,a[1]=s;var u=new uh(a,o),l=Ah.isBasicASCII(o,e.mightContainNonBasicASCII()),c=Ah.containsRTL(o,l,e.mightContainRTL()),h=Sh(new _h(r.isMonospace&&!t.get(23),r.canUseHalfwidthRightwardsArrow,o,!1,l,c,0,u,[],n,0,r.spaceWidth,r.middotWidth,t.get(88),t.get(74),t.get(69),t.get(35)!==F.OFF,null));return h.html},t}(Me);lm((function(e,t){var n=e.getColor(dC);n&&t.addRule(".monaco-diff-editor .diff-review-line-number { color: "+n+"; }");var i=e.getColor(Gy);i&&t.addRule(".monaco-diff-editor .diff-review-shadow { box-shadow: "+i+" 0 -6px 6px -6px inset; }")}));var XD=function(e){function t(){return e.call(this,{id:"editor.action.diffReview.next",label:r("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:Df.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})||this}return KD(t,e),t.prototype.run=function(e,t){var n=QD(e);n&&n.diffReviewNext()},t}(mg),$D=function(e){function t(){return e.call(this,{id:"editor.action.diffReview.prev",label:r("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:Df.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})||this}return KD(t,e),t.prototype.run=function(e,t){var n=QD(e);n&&n.diffReviewPrev()},t}(mg);function QD(e){for(var t=e.get(En),n=t.listDiffEditors(),i=0,o=n.length;i<o;i++){var r=n[i];if(r.hasWidgetFocus())return r}return null}_g(XD),_g($D);var JD=Nn("contextViewService"),eE=Nn("contextMenuService"),tE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),nE=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{u(i.next(e))}catch(t){r(t)}}function a(e){try{u(i["throw"](e))}catch(t){r(t)}}function u(e){e.done?n(e.value):o(e.value).then(s,a)}u((i=i.apply(e,t||[])).next())}))},iE=function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return u([e,t])}}function u(r){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(o=2&r[0]?i["return"]:r[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(a){r=[6,a],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}},oE=function(e){function t(t,n,i,o,s,a){var u=e.call(this)||this;u._viewZoneId=t,u._marginDomNode=n,u.editor=i,u.diff=o,u._contextMenuService=s,u._clipboardService=a,u._visibility=!1,u._marginDomNode.style.zIndex="10",u._diffActions=document.createElement("div"),u._diffActions.className="codicon codicon-lightbulb lightbulb-glyph",u._diffActions.style.position="absolute";var l=i.getOption(49),c=i.getModel().getEOL();u._diffActions.style.right="0px",u._diffActions.style.visibility="hidden",u._diffActions.style.height=l+"px",u._diffActions.style.lineHeight=l+"px",u._marginDomNode.appendChild(u._diffActions);var h=[];h.push(new Jp("diff.clipboard.copyDeletedContent",o.originalEndLineNumber>o.modifiedStartLineNumber?r("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):r("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"),void 0,!0,(function(){return nE(u,void 0,void 0,(function(){return iE(this,(function(e){switch(e.label){case 0:return[4,this._clipboardService.writeText(o.originalContent.join(c)+c)];case 1:return e.sent(),[2]}}))}))})));var d=0,f=void 0;o.originalEndLineNumber>o.modifiedStartLineNumber&&(f=new Jp("diff.clipboard.copyDeletedLineContent",r("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",o.originalStartLineNumber),void 0,!0,(function(){return nE(u,void 0,void 0,(function(){return iE(this,(function(e){switch(e.label){case 0:return[4,this._clipboardService.writeText(o.originalContent[d])];case 1:return e.sent(),[2]}}))}))})),h.push(f));var p=i.getOption(68);p||h.push(new Jp("diff.inline.revertChange",r("diff.inline.revertChange.label","Revert this change"),void 0,!0,(function(){return nE(u,void 0,void 0,(function(){var e;return iE(this,(function(t){return 0===o.modifiedEndLineNumber?(e=i.getModel().getLineMaxColumn(o.modifiedStartLineNumber),i.executeEdits("diffEditor",[{range:new pn(o.modifiedStartLineNumber,e,o.modifiedStartLineNumber,e),text:c+o.originalContent.join(c)}])):(e=i.getModel().getLineMaxColumn(o.modifiedEndLineNumber),i.executeEdits("diffEditor",[{range:new pn(o.modifiedStartLineNumber,1,o.modifiedEndLineNumber,e),text:o.originalContent.join(c)}])),[2]}))}))})));var g=function(e,t){u._contextMenuService.showContextMenu({getAnchor:function(){return{x:e,y:t}},getActions:function(){return f&&(f.label=r("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",o.originalStartLineNumber+d)),h},autoSelectFirstItem:!0})};return u._register(so(u._diffActions,"mousedown",(function(e){var t=Lo(u._diffActions),n=t.top,i=t.height,o=Math.floor(l/3);e.preventDefault(),g(e.posx,n+i+o)}))),u._register(i.onMouseMove((function(e){if(8===e.target.type||5===e.target.type){var t=e.target.detail.viewZoneId;t===u._viewZoneId?(u.visibility=!0,d=u._updateLightBulbPosition(u._marginDomNode,e.event.browserEvent.y,l)):u.visibility=!1}else u.visibility=!1}))),u._register(i.onMouseDown((function(e){if(e.event.rightButton&&(8===e.target.type||5===e.target.type)){var t=e.target.detail.viewZoneId;t===u._viewZoneId&&(e.event.preventDefault(),d=u._updateLightBulbPosition(u._marginDomNode,e.event.browserEvent.y,l),g(e.event.posx,e.event.posy+l))}}))),u}return tE(t,e),Object.defineProperty(t.prototype,"visibility",{get:function(){return this._visibility},set:function(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")},enumerable:!0,configurable:!0}),t.prototype._updateLightBulbPosition=function(e,t,n){var i=Lo(e).top,o=t-i,r=Math.floor(o/n),s=r*n;return this._diffActions.style.top=s+"px",r},t}(Me),rE=Nn("editorProgressService"),sE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),aE=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},uE=function(e,t){return function(n,i){t(n,i,e)}},lE=function(){function e(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this.inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}return e.prototype.getForeignViewZones=function(e){var t=this;return e.filter((function(e){return!t._zonesMap[String(e.id)]}))},e.prototype.clean=function(e){var t=this;this._zones.length>0&&e.changeViewZones((function(e){for(var n=0,i=t._zones.length;n<i;n++)e.removeZone(t._zones[n])})),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])},e.prototype.apply=function(e,t,n,i){var o=this,r=i?PD.capture(e):null;e.changeViewZones((function(t){for(var i=0,r=o._zones.length;i<r;i++)t.removeZone(o._zones[i]);i=0;for(var s=o.inlineDiffMargins.length;i<s;i++)o.inlineDiffMargins[i].dispose();o._zones=[],o._zonesMap={},o.inlineDiffMargins=[];i=0;for(var a=n.zones.length;i<a;i++){var u=n.zones[i];u.suppressMouseDown=!0;var l=t.addZone(u);o._zones.push(l),o._zonesMap[String(l)]=!0,n.zones[i].diff&&u.marginDomNode&&o._clipboardService&&(u.suppressMouseDown=!1,o.inlineDiffMargins.push(new oE(l,u.marginDomNode,e,n.zones[i].diff,o._contextMenuService,o._clipboardService)))}})),r&&r.restore(e),this._decorations=e.deltaDecorations(this._decorations,n.decorations),t&&t.setZones(n.overviewZones)},e}(),cE=0,hE=function(e){function t(n,i,o,r,s,a,u,l,c,h,d){var f=e.call(this)||this;f._editorProgressService=d,f._onDidDispose=f._register(new qe),f.onDidDispose=f._onDidDispose.event,f._onDidUpdateDiff=f._register(new qe),f.onDidUpdateDiff=f._onDidUpdateDiff.event,f._lastOriginalWarning=null,f._lastModifiedWarning=null,f._editorWorkerService=r,f._codeEditorService=u,f._contextKeyService=f._register(s.createScoped(n)),f._contextKeyService.createKey("isInDiffEditor",!0),f._themeService=l,f._notificationService=c,f.id=++cE,f._state=0,f._updatingDiffProgress=null,f._domElement=n,i=i||{},f._renderSideBySide=!0,"undefined"!==typeof i.renderSideBySide&&(f._renderSideBySide=i.renderSideBySide),f._maxComputationTime=5e3,"undefined"!==typeof i.maxComputationTime&&(f._maxComputationTime=i.maxComputationTime),f._ignoreTrimWhitespace=!0,"undefined"!==typeof i.ignoreTrimWhitespace&&(f._ignoreTrimWhitespace=i.ignoreTrimWhitespace),f._renderIndicators=!0,"undefined"!==typeof i.renderIndicators&&(f._renderIndicators=i.renderIndicators),f._originalIsEditable=!1,"undefined"!==typeof i.originalEditable&&(f._originalIsEditable=Boolean(i.originalEditable)),f._updateDecorationsRunner=f._register(new mi((function(){return f._updateDecorations()}),0)),f._containerDomElement=document.createElement("div"),f._containerDomElement.className=t._getClassName(f._themeService.getTheme(),f._renderSideBySide),f._containerDomElement.style.position="relative",f._containerDomElement.style.height="100%",f._domElement.appendChild(f._containerDomElement),f._overviewViewportDomElement=wg(document.createElement("div")),f._overviewViewportDomElement.setClassName("diffViewport"),f._overviewViewportDomElement.setPosition("absolute"),f._overviewDomElement=document.createElement("div"),f._overviewDomElement.className="diffOverview",f._overviewDomElement.style.position="absolute",f._overviewDomElement.appendChild(f._overviewViewportDomElement.domNode),f._register(so(f._overviewDomElement,"mousedown",(function(e){f.modifiedEditor.delegateVerticalScrollbarMouseDown(e)}))),f._containerDomElement.appendChild(f._overviewDomElement),f._originalDomNode=document.createElement("div"),f._originalDomNode.className="editor original",f._originalDomNode.style.position="absolute",f._originalDomNode.style.height="100%",f._containerDomElement.appendChild(f._originalDomNode),f._modifiedDomNode=document.createElement("div"),f._modifiedDomNode.className="editor modified",f._modifiedDomNode.style.position="absolute",f._modifiedDomNode.style.height="100%",f._containerDomElement.appendChild(f._modifiedDomNode),f._beginUpdateDecorationsTimeout=-1,f._currentlyChangingViewZones=!1,f._diffComputationToken=0,f._originalEditorState=new lE(h,o),f._modifiedEditorState=new lE(h,o),f._isVisible=!0,f._isHandlingScrollEvent=!1,f._elementSizeObserver=f._register(new Up(f._containerDomElement,void 0,(function(){return f._onDidContainerSizeChanged()}))),i.automaticLayout&&f._elementSizeObserver.startObserving(),f._diffComputationResult=null;var p=f._contextKeyService.createScoped();p.createKey("isInDiffLeftEditor",!0);var g=new BN;g.set(Ff,p);var m=a.createChild(g),v=f._contextKeyService.createScoped();v.createKey("isInDiffRightEditor",!0);var _=new BN;_.set(Ff,v);var y=a.createChild(_);f.originalEditor=f._createLeftHandSideEditor(i,m),f.modifiedEditor=f._createRightHandSideEditor(i,y),f._originalOverviewRuler=null,f._modifiedOverviewRuler=null,f._reviewPane=new ZD(f),f._containerDomElement.appendChild(f._reviewPane.domNode.domNode),f._containerDomElement.appendChild(f._reviewPane.shadow.domNode),f._containerDomElement.appendChild(f._reviewPane.actionBarContainer.domNode),f._enableSplitViewResizing=!0,"undefined"!==typeof i.enableSplitViewResizing&&(f._enableSplitViewResizing=i.enableSplitViewResizing),f._renderSideBySide?f._setStrategy(new vE(f._createDataSource(),f._enableSplitViewResizing)):f._setStrategy(new yE(f._createDataSource(),f._enableSplitViewResizing)),f._register(l.onThemeChange((function(e){f._strategy&&f._strategy.applyColors(e)&&f._updateDecorationsRunner.schedule(),f._containerDomElement.className=t._getClassName(f._themeService.getTheme(),f._renderSideBySide)})));for(var b=sg.getDiffEditorContributions(),C=0,w=b;C<w.length;C++){var S=w[C];try{f._register(a.createInstance(S.ctor,f))}catch(L){ge(L)}}return f._codeEditorService.addDiffEditor(f),f}return sE(t,e),t.prototype._setState=function(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)))},t.prototype.hasWidgetFocus=function(){return Oo(document.activeElement,this._domElement)},t.prototype.diffReviewNext=function(){this._reviewPane.next()},t.prototype.diffReviewPrev=function(){this._reviewPane.prev()},t._getClassName=function(e,t){var n="monaco-diff-editor monaco-editor-background ";return t&&(n+="side-by-side "),n+=rm(e.type),n},t.prototype._recreateOverviewRulers=function(){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()},t.prototype._createLeftHandSideEditor=function(e,t){var n=this,i=this._createInnerEditor(t,this._originalDomNode,this._adjustOptionsForLeftHandSide(e,this._originalIsEditable));return this._register(i.onDidScrollChange((function(e){n._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(n._isHandlingScrollEvent=!0,n.modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),n._isHandlingScrollEvent=!1,n._layoutOverviewViewport())}))),this._register(i.onDidChangeViewZones((function(){n._onViewZonesChanged()}))),this._register(i.onDidChangeModelContent((function(){n._isVisible&&n._beginUpdateDecorationsSoon()}))),i},t.prototype._createRightHandSideEditor=function(e,t){var n=this,i=this._createInnerEditor(t,this._modifiedDomNode,this._adjustOptionsForRightHandSide(e));return this._register(i.onDidScrollChange((function(e){n._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(n._isHandlingScrollEvent=!0,n.originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),n._isHandlingScrollEvent=!1,n._layoutOverviewViewport())}))),this._register(i.onDidChangeViewZones((function(){n._onViewZonesChanged()}))),this._register(i.onDidChangeConfiguration((function(e){e.hasChanged(34)&&i.getModel()&&n._onViewZonesChanged()}))),this._register(i.onDidChangeModelContent((function(){n._isVisible&&n._beginUpdateDecorationsSoon()}))),this._register(i.onDidChangeModelOptions((function(e){e.tabSize&&n._updateDecorationsRunner.schedule()}))),i},t.prototype._createInnerEditor=function(e,t,n){return e.createInstance(hD,t,n,{})},t.prototype.dispose=function(){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._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(),e.prototype.dispose.call(this)},t.prototype.getId=function(){return this.getEditorType()+":"+this.id},t.prototype.getEditorType=function(){return Ba.IDiffEditor},t.prototype.getLineChanges=function(){return this._diffComputationResult?this._diffComputationResult.changes:null},t.prototype.getOriginalEditor=function(){return this.originalEditor},t.prototype.getModifiedEditor=function(){return this.modifiedEditor},t.prototype.updateOptions=function(e){var n=!1;"undefined"!==typeof e.renderSideBySide&&this._renderSideBySide!==e.renderSideBySide&&(this._renderSideBySide=e.renderSideBySide,n=!0),"undefined"!==typeof e.maxComputationTime&&(this._maxComputationTime=e.maxComputationTime,this._isVisible&&this._beginUpdateDecorationsSoon());var i=!1;"undefined"!==typeof e.ignoreTrimWhitespace&&this._ignoreTrimWhitespace!==e.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=e.ignoreTrimWhitespace,i=!0),"undefined"!==typeof e.renderIndicators&&this._renderIndicators!==e.renderIndicators&&(this._renderIndicators=e.renderIndicators,i=!0),i&&this._beginUpdateDecorations(),"undefined"!==typeof e.originalEditable&&(this._originalIsEditable=Boolean(e.originalEditable)),this.modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(e)),this.originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(e,this._originalIsEditable)),"undefined"!==typeof e.enableSplitViewResizing&&(this._enableSplitViewResizing=e.enableSplitViewResizing),this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing),n&&(this._renderSideBySide?this._setStrategy(new vE(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new yE(this._createDataSource(),this._enableSplitViewResizing)),this._containerDomElement.className=t._getClassName(this._themeService.getTheme(),this._renderSideBySide))},t.prototype.getModel=function(){return{original:this.originalEditor.getModel(),modified:this.modifiedEditor.getModel()}},t.prototype.setModel=function(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()},t.prototype.getDomNode=function(){return this._domElement},t.prototype.getVisibleColumnFromPosition=function(e){return this.modifiedEditor.getVisibleColumnFromPosition(e)},t.prototype.getPosition=function(){return this.modifiedEditor.getPosition()},t.prototype.setPosition=function(e){this.modifiedEditor.setPosition(e)},t.prototype.revealLine=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealLine(e,t)},t.prototype.revealLineInCenter=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealLineInCenter(e,t)},t.prototype.revealLineInCenterIfOutsideViewport=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)},t.prototype.revealPosition=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealPosition(e,t)},t.prototype.revealPositionInCenter=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealPositionInCenter(e,t)},t.prototype.revealPositionInCenterIfOutsideViewport=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)},t.prototype.getSelection=function(){return this.modifiedEditor.getSelection()},t.prototype.getSelections=function(){return this.modifiedEditor.getSelections()},t.prototype.setSelection=function(e){this.modifiedEditor.setSelection(e)},t.prototype.setSelections=function(e){this.modifiedEditor.setSelections(e)},t.prototype.revealLines=function(e,t,n){void 0===n&&(n=0),this.modifiedEditor.revealLines(e,t,n)},t.prototype.revealLinesInCenter=function(e,t,n){void 0===n&&(n=0),this.modifiedEditor.revealLinesInCenter(e,t,n)},t.prototype.revealLinesInCenterIfOutsideViewport=function(e,t,n){void 0===n&&(n=0),this.modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,n)},t.prototype.revealRange=function(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=!1),void 0===i&&(i=!0),this.modifiedEditor.revealRange(e,t,n,i)},t.prototype.revealRangeInCenter=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealRangeInCenter(e,t)},t.prototype.revealRangeInCenterIfOutsideViewport=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)},t.prototype.revealRangeAtTop=function(e,t){void 0===t&&(t=0),this.modifiedEditor.revealRangeAtTop(e,t)},t.prototype.getSupportedActions=function(){return this.modifiedEditor.getSupportedActions()},t.prototype.saveViewState=function(){var e=this.originalEditor.saveViewState(),t=this.modifiedEditor.saveViewState();return{original:e,modified:t}},t.prototype.restoreViewState=function(e){if(e.original&&e.modified){var t=e;this.originalEditor.restoreViewState(t.original),this.modifiedEditor.restoreViewState(t.modified)}},t.prototype.layout=function(e){this._elementSizeObserver.observe(e)},t.prototype.focus=function(){this.modifiedEditor.focus()},t.prototype.hasTextFocus=function(){return this.originalEditor.hasTextFocus()||this.modifiedEditor.hasTextFocus()},t.prototype.trigger=function(e,t,n){this.modifiedEditor.trigger(e,t,n)},t.prototype.changeDecorations=function(e){return this.modifiedEditor.changeDecorations(e)},t.prototype._onDidContainerSizeChanged=function(){this._doLayout()},t.prototype._getReviewHeight=function(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0},t.prototype._layoutOverviewRulers=function(){if(this._originalOverviewRuler&&this._modifiedOverviewRuler){var e=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),i=t.ENTIRE_DIFF_OVERVIEW_WIDTH-2*t.ONE_OVERVIEW_WIDTH,o=this.modifiedEditor.getLayoutInfo();o&&(this._originalOverviewRuler.setLayout({top:0,width:t.ONE_OVERVIEW_WIDTH,right:i+t.ONE_OVERVIEW_WIDTH,height:e-n}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:t.ONE_OVERVIEW_WIDTH,height:e-n}))}},t.prototype._onViewZonesChanged=function(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()},t.prototype._beginUpdateDecorationsSoon=function(){var e=this;-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout((function(){return e._beginUpdateDecorations()}),t.UPDATE_DIFF_DECORATIONS_DELAY)},t._equals=function(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()},t.prototype._beginUpdateDecorations=function(){var e=this;this._beginUpdateDecorationsTimeout=-1;var n=this.originalEditor.getModel(),i=this.modifiedEditor.getModel();if(n&&i){this._diffComputationToken++;var o=this._diffComputationToken;this._setState(1),this._editorWorkerService.canComputeDiff(n.uri,i.uri)?this._editorWorkerService.computeDiff(n.uri,i.uri,this._ignoreTrimWhitespace,this._maxComputationTime).then((function(t){o===e._diffComputationToken&&n===e.originalEditor.getModel()&&i===e.modifiedEditor.getModel()&&(e._setState(2),e._diffComputationResult=t,e._updateDecorationsRunner.schedule(),e._onDidUpdateDiff.fire())}),(function(t){o===e._diffComputationToken&&n===e.originalEditor.getModel()&&i===e.modifiedEditor.getModel()&&(e._setState(2),e._diffComputationResult=null,e._updateDecorationsRunner.schedule())})):t._equals(n.uri,this._lastOriginalWarning)&&t._equals(i.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=n.uri,this._lastModifiedWarning=i.uri,this._notificationService.warn(r("diff.tooLarge","Cannot compare files because one file is too large.")))}},t.prototype._cleanViewZonesAndDecorations=function(){this._originalEditorState.clean(this.originalEditor),this._modifiedEditorState.clean(this.modifiedEditor)},t.prototype._updateDecorations=function(){if(this.originalEditor.getModel()&&this.modifiedEditor.getModel()&&this._originalOverviewRuler&&this._modifiedOverviewRuler){var e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this.originalEditor.getWhitespaces()),n=this._modifiedEditorState.getForeignViewZones(this.modifiedEditor.getWhitespaces()),i=this._strategy.getEditorsDiffDecorations(e,this._ignoreTrimWhitespace,this._renderIndicators,t,n,this.originalEditor,this.modifiedEditor);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this.originalEditor,this._originalOverviewRuler,i.original,!1),this._modifiedEditorState.apply(this.modifiedEditor,this._modifiedOverviewRuler,i.modified,!0)}finally{this._currentlyChangingViewZones=!1}}},t.prototype._adjustOptionsForSubEditor=function(e){var t=Sa(e||{});return t.inDiffEditor=!0,t.wordWrap="off",t.wordWrapMinified=!1,t.automaticLayout=!1,t.scrollbar=t.scrollbar||{},t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=!1,t.fixedOverflowWidgets=!0,t.minimap||(t.minimap={}),t.minimap.enabled=!1,t},t.prototype._adjustOptionsForLeftHandSide=function(e,t){var n=this._adjustOptionsForSubEditor(e);return n.readOnly=!t,n.extraEditorClassName="original-in-monaco-diff-editor",n},t.prototype._adjustOptionsForRightHandSide=function(e){var n=this._adjustOptionsForSubEditor(e);return n.revealHorizontalRightPadding=de.revealHorizontalRightPadding.defaultValue+t.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",n},t.prototype.doLayout=function(){this._elementSizeObserver.observe(),this._doLayout()},t.prototype._doLayout=function(){var e=this._elementSizeObserver.getWidth(),n=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),o=this._strategy.layout();this._originalDomNode.style.width=o+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=e-o+"px",this._modifiedDomNode.style.left=o+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=n-i+"px",this._overviewDomElement.style.width=t.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=e-t.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(t.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this.originalEditor.layout({width:o,height:n-i}),this.modifiedEditor.layout({width:e-o-t.ENTIRE_DIFF_OVERVIEW_WIDTH,height:n-i}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(n-i,e,i),this._layoutOverviewViewport()},t.prototype._layoutOverviewViewport=function(){var e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))},t.prototype._computeOverviewViewport=function(){var e=this.modifiedEditor.getLayoutInfo();if(!e)return null;var t=this.modifiedEditor.getScrollTop(),n=this.modifiedEditor.getScrollHeight(),i=Math.max(0,e.height),o=Math.max(0,i-0),r=n>0?o/n:0,s=Math.max(0,Math.floor(e.height*r)),a=Math.floor(t*r);return{height:s,top:a}},t.prototype._createDataSource=function(){var e=this;return{getWidth:function(){return e._elementSizeObserver.getWidth()},getHeight:function(){return e._elementSizeObserver.getHeight()-e._getReviewHeight()},getContainerDomNode:function(){return e._containerDomElement},relayoutEditors:function(){e._doLayout()},getOriginalEditor:function(){return e.originalEditor},getModifiedEditor:function(){return e.modifiedEditor}}},t.prototype._setStrategy=function(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()},t.prototype._getLineChangeAtOrBeforeLineNumber=function(e,t){var n=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===n.length||e<t(n[0]))return null;var i=0,o=n.length-1;while(i<o){var r=Math.floor((i+o)/2),s=t(n[r]),a=r+1<=o?t(n[r+1]):1073741824;e<s?o=r-1:e>=a?i=r+1:(i=r,o=r)}return n[i]},t.prototype._getEquivalentLineForOriginalLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.originalStartLineNumber}));if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=o?i+Math.min(s,r):i+r-o+s},t.prototype._getEquivalentLineForModifiedLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.modifiedStartLineNumber}));if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=r?n+Math.min(s,o):n+o-r+s},t.prototype.getDiffLineInformationForOriginal=function(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null},t.prototype.getDiffLineInformationForModified=function(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null},t.ONE_OVERVIEW_WIDTH=15,t.ENTIRE_DIFF_OVERVIEW_WIDTH=30,t.UPDATE_DIFF_DECORATIONS_DELAY=200,t=aE([uE(3,hl),uE(4,Ff),uE(5,Sn),uE(6,En),uE(7,tm),uE(8,np),uE(9,eE),uE(10,rE)],t),t}(Me),dE=function(e){function t(t){var n=e.call(this)||this;return n._dataSource=t,n._insertColor=null,n._removeColor=null,n}return sE(t,e),t.prototype.applyColors=function(e){var t=(e.getColor(_b)||mb).transparent(2),n=(e.getColor(yb)||vb).transparent(2),i=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,i},t.prototype.getEditorsDiffDecorations=function(e,t,n,i,o,r,s){o=o.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber})),i=i.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber}));var a=this._getViewZones(e,i,o,r,s,n),u=this._getOriginalEditorDecorations(e,t,n,r,s),l=this._getModifiedEditorDecorations(e,t,n,r,s);return{original:{decorations:u.decorations,overviewZones:u.overviewZones,zones:a.original},modified:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.modified}}},t}(Me),fE=function(){function e(e){this._source=e,this._index=-1,this.current=null,this.advance()}return e.prototype.advance=function(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null},e}(),pE=function(){function e(e,t,n,i,o){this.lineChanges=e,this.originalForeignVZ=t,this.originalLineHeight=n,this.modifiedForeignVZ=i,this.modifiedLineHeight=o}return e.prototype.getViewZones=function(){for(var t={original:[],modified:[]},n=0,i=0,o=0,r=0,s=0,a=0,u=function(e,t){return e.afterLineNumber-t.afterLineNumber},l=function(e,t){if(null===t.domNode&&e.length>0){var n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines)}e.push(t)},c=new fE(this.modifiedForeignVZ),h=new fE(this.originalForeignVZ),d=0,f=this.lineChanges.length;d<=f;d++){var p=d<f?this.lineChanges[d]:null;null!==p?(o=p.originalStartLineNumber+(p.originalEndLineNumber>0?-1:0),r=p.modifiedStartLineNumber+(p.modifiedEndLineNumber>0?-1:0),i=p.originalEndLineNumber>0?p.originalEndLineNumber-p.originalStartLineNumber+1:0,n=p.modifiedEndLineNumber>0?p.modifiedEndLineNumber-p.modifiedStartLineNumber+1:0,s=Math.max(p.originalStartLineNumber,p.originalEndLineNumber),a=Math.max(p.modifiedStartLineNumber,p.modifiedEndLineNumber)):(o+=1e7+i,r+=1e7+n,s=o,a=r);var g=[],m=[];while(c.current&&c.current.afterLineNumber<=a){var v=void 0;v=c.current.afterLineNumber<=r?o-r+c.current.afterLineNumber:s;var _=null;p&&p.modifiedStartLineNumber<=c.current.afterLineNumber&&c.current.afterLineNumber<=p.modifiedEndLineNumber&&(_=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),g.push({afterLineNumber:v,heightInLines:c.current.height/this.modifiedLineHeight,domNode:null,marginDomNode:_}),c.advance()}while(h.current&&h.current.afterLineNumber<=s){v=void 0;v=h.current.afterLineNumber<=o?r-o+h.current.afterLineNumber:a,m.push({afterLineNumber:v,heightInLines:h.current.height/this.originalLineHeight,domNode:null}),h.advance()}if(null!==p&&CE(p)){var y=this._produceOriginalFromDiff(p,i,n);y&&g.push(y)}if(null!==p&&wE(p)){y=this._produceModifiedFromDiff(p,i,n);y&&m.push(y)}var b=0,C=0;g=g.sort(u),m=m.sort(u);while(b<g.length&&C<m.length){var w=g[b],S=m[C],L=w.afterLineNumber-o,N=S.afterLineNumber-r;L<N?(l(t.original,w),b++):N<L?(l(t.modified,S),C++):w.shouldNotShrink?(l(t.original,w),b++):S.shouldNotShrink?(l(t.modified,S),C++):w.heightInLines>=S.heightInLines?(w.heightInLines-=S.heightInLines,C++):(S.heightInLines-=w.heightInLines,b++)}while(b<g.length)l(t.original,g[b]),b++;while(C<m.length)l(t.modified,m[C]),C++}return{original:e._ensureDomNodes(t.original),modified:e._ensureDomNodes(t.modified)}},e._ensureDomNodes=function(e){return e.map((function(e){return e.domNode||(e.domNode=SE()),e}))},e}();function gE(e,t,n,i,o){return{range:new pn(e,t,n,i),options:o}}var mE={charDelete:W_.register({className:"char-delete"}),charDeleteWholeLine:W_.register({className:"char-delete",isWholeLine:!0}),charInsert:W_.register({className:"char-insert"}),charInsertWholeLine:W_.register({className:"char-insert",isWholeLine:!0}),lineInsert:W_.register({className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:W_.register({className:"line-insert",linesDecorationsClassName:"insert-sign codicon codicon-add",marginClassName:"line-insert",isWholeLine:!0}),lineDelete:W_.register({className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:W_.register({className:"line-delete",linesDecorationsClassName:"delete-sign codicon codicon-remove",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:W_.register({marginClassName:"line-delete"})},vE=function(e){function t(t,n){var i=e.call(this,t)||this;return i._disableSash=!1===n,i._sashRatio=null,i._sashPosition=null,i._startSashPosition=null,i._sash=i._register(new ND(i._dataSource.getContainerDomNode(),i)),i._disableSash&&(i._sash.state=0),i._sash.onDidStart((function(){return i.onSashDragStart()})),i._sash.onDidChange((function(e){return i.onSashDrag(e)})),i._sash.onDidEnd((function(){return i.onSashDragEnd()})),i._sash.onDidReset((function(){return i.onSashReset()})),i}return sE(t,e),t.prototype.setEnableSplitViewResizing=function(e){var t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)},t.prototype.layout=function(e){void 0===e&&(e=this._sashRatio);var n=this._dataSource.getWidth(),i=n-hE.ENTIRE_DIFF_OVERVIEW_WIDTH,o=Math.floor((e||.5)*i),r=Math.floor(.5*i);return o=this._disableSash?r:o||r,i>2*t.MINIMUM_EDITOR_WIDTH?(o<t.MINIMUM_EDITOR_WIDTH&&(o=t.MINIMUM_EDITOR_WIDTH),o>i-t.MINIMUM_EDITOR_WIDTH&&(o=i-t.MINIMUM_EDITOR_WIDTH)):o=r,this._sashPosition!==o&&(this._sashPosition=o,this._sash.layout()),this._sashPosition},t.prototype.onSashDragStart=function(){this._startSashPosition=this._sashPosition},t.prototype.onSashDrag=function(e){var t=this._dataSource.getWidth(),n=t-hE.ENTIRE_DIFF_OVERVIEW_WIDTH,i=this.layout((this._startSashPosition+(e.currentX-e.startX))/n);this._sashRatio=i/n,this._dataSource.relayoutEditors()},t.prototype.onSashDragEnd=function(){this._sash.layout()},t.prototype.onSashReset=function(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()},t.prototype.getVerticalSashTop=function(e){return 0},t.prototype.getVerticalSashLeft=function(e){return this._sashPosition},t.prototype.getVerticalSashHeight=function(e){return this._dataSource.getHeight()},t.prototype._getViewZones=function(e,t,n,i,o){var r=new _E(e,t,i.getOption(49),n,o.getOption(49));return r.getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r=String(this._removeColor),s={decorations:[],overviewZones:[]},a=i.getModel(),u=0,l=e.length;u<l;u++){var c=e[u];if(wE(c)&&(s.decorations.push({range:new pn(c.originalStartLineNumber,1,c.originalEndLineNumber,1073741824),options:n?mE.lineDeleteWithSign:mE.lineDelete}),CE(c)&&c.charChanges||s.decorations.push(gE(c.originalStartLineNumber,1,c.originalEndLineNumber,1073741824,mE.charDeleteWholeLine)),s.overviewZones.push(new DL(c.originalStartLineNumber,c.originalEndLineNumber,r)),c.charChanges))for(var h=0,d=c.charChanges.length;h<d;h++){var f=c.charChanges[h];if(wE(f))if(t)for(var p=f.originalStartLineNumber;p<=f.originalEndLineNumber;p++){var g=void 0,m=void 0;g=p===f.originalStartLineNumber?f.originalStartColumn:a.getLineFirstNonWhitespaceColumn(p),m=p===f.originalEndLineNumber?f.originalEndColumn:a.getLineLastNonWhitespaceColumn(p),s.decorations.push(gE(p,g,p,m,mE.charDelete))}else s.decorations.push(gE(f.originalStartLineNumber,f.originalStartColumn,f.originalEndLineNumber,f.originalEndColumn,mE.charDelete))}}return s},t.prototype._getModifiedEditorDecorations=function(e,t,n,i,o){for(var r=String(this._insertColor),s={decorations:[],overviewZones:[]},a=o.getModel(),u=0,l=e.length;u<l;u++){var c=e[u];if(CE(c)&&(s.decorations.push({range:new pn(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824),options:n?mE.lineInsertWithSign:mE.lineInsert}),wE(c)&&c.charChanges||s.decorations.push(gE(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824,mE.charInsertWholeLine)),s.overviewZones.push(new DL(c.modifiedStartLineNumber,c.modifiedEndLineNumber,r)),c.charChanges))for(var h=0,d=c.charChanges.length;h<d;h++){var f=c.charChanges[h];if(CE(f))if(t)for(var p=f.modifiedStartLineNumber;p<=f.modifiedEndLineNumber;p++){var g=void 0,m=void 0;g=p===f.modifiedStartLineNumber?f.modifiedStartColumn:a.getLineFirstNonWhitespaceColumn(p),m=p===f.modifiedEndLineNumber?f.modifiedEndColumn:a.getLineLastNonWhitespaceColumn(p),s.decorations.push(gE(p,g,p,m,mE.charInsert))}else s.decorations.push(gE(f.modifiedStartLineNumber,f.modifiedStartColumn,f.modifiedEndLineNumber,f.modifiedEndColumn,mE.charInsert))}}return s},t.MINIMUM_EDITOR_WIDTH=100,t}(dE),_E=function(e){function t(t,n,i,o,r){return e.call(this,t,n,i,o,r)||this}return sE(t,e),t.prototype._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion=function(){return null},t.prototype._produceOriginalFromDiff=function(e,t,n){return n>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null},t.prototype._produceModifiedFromDiff=function(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null},t}(pE),yE=function(e){function t(t,n){var i=e.call(this,t)||this;return i.decorationsLeft=t.getOriginalEditor().getLayoutInfo().decorationsLeft,i._register(t.getOriginalEditor().onDidLayoutChange((function(e){i.decorationsLeft!==e.decorationsLeft&&(i.decorationsLeft=e.decorationsLeft,t.relayoutEditors())}))),i}return sE(t,e),t.prototype.setEnableSplitViewResizing=function(e){},t.prototype._getViewZones=function(e,t,n,i,o,r){var s=new bE(e,t,n,i,o,r);return s.getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r=String(this._removeColor),s={decorations:[],overviewZones:[]},a=0,u=e.length;a<u;a++){var l=e[a];wE(l)&&(s.decorations.push({range:new pn(l.originalStartLineNumber,1,l.originalEndLineNumber,1073741824),options:mE.lineDeleteMargin}),s.overviewZones.push(new DL(l.originalStartLineNumber,l.originalEndLineNumber,r)))}return s},t.prototype._getModifiedEditorDecorations=function(e,t,n,i,o){for(var r=String(this._insertColor),s={decorations:[],overviewZones:[]},a=o.getModel(),u=0,l=e.length;u<l;u++){var c=e[u];if(CE(c))if(s.decorations.push({range:new pn(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824),options:n?mE.lineInsertWithSign:mE.lineInsert}),s.overviewZones.push(new DL(c.modifiedStartLineNumber,c.modifiedEndLineNumber,r)),c.charChanges)for(var h=0,d=c.charChanges.length;h<d;h++){var f=c.charChanges[h];if(CE(f))if(t)for(var p=f.modifiedStartLineNumber;p<=f.modifiedEndLineNumber;p++){var g=void 0,m=void 0;g=p===f.modifiedStartLineNumber?f.modifiedStartColumn:a.getLineFirstNonWhitespaceColumn(p),m=p===f.modifiedEndLineNumber?f.modifiedEndColumn:a.getLineLastNonWhitespaceColumn(p),s.decorations.push(gE(p,g,p,m,mE.charInsert))}else s.decorations.push(gE(f.modifiedStartLineNumber,f.modifiedStartColumn,f.modifiedEndLineNumber,f.modifiedEndColumn,mE.charInsert))}else s.decorations.push(gE(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824,mE.charInsertWholeLine))}return s},t.prototype.layout=function(){return Math.max(5,this.decorationsLeft)},t}(dE),bE=function(e){function t(t,n,i,o,r,s){var a=e.call(this,t,n,o.getOption(49),i,r.getOption(49))||this;return a.originalModel=o.getModel(),a.modifiedEditorOptions=r.getOptions(),a.modifiedEditorTabSize=r.getModel().getOptions().tabSize,a.renderIndicators=s,a}return sE(t,e),t.prototype._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion=function(){var e=document.createElement("div");return e.className="inline-added-margin-view-zone",e},t.prototype._produceOriginalFromDiff=function(e,t,n){var i=document.createElement("div");return i.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n,domNode:document.createElement("div"),marginDomNode:i}},t.prototype._produceModifiedFromDiff=function(e,t,n){var i=[];if(e.charChanges)for(var o=0,r=e.charChanges.length;o<r;o++){var s=e.charChanges[o];wE(s)&&i.push(new Ph(new pn(s.originalStartLineNumber,s.originalStartColumn,s.originalEndLineNumber,s.originalEndColumn),"char-delete",0))}for(var a=sh(1e4),u=[],l=this.modifiedEditorOptions.get(107),c=this.modifiedEditorOptions.get(34),h=l.decorationsWidth,d=this.modifiedEditorOptions.get(49),f=c.typicalHalfwidthCharacterWidth,p=0,g=[],m=e.originalStartLineNumber;m<=e.originalEndLineNumber;m++)if(p=Math.max(p,this._renderOriginalLine(m-e.originalStartLineNumber,this.originalModel,this.modifiedEditorOptions,this.modifiedEditorTabSize,m,i,a)),g.push(this.originalModel.getLineContent(m)),this.renderIndicators){var v=m-e.originalStartLineNumber;u=u.concat(['<div class="delete-sign codicon codicon-remove" style="position:absolute;top:'+v*d+"px;width:"+h+"px;height:"+d+'px;right:0;"></div>'])}p+=this.modifiedEditorOptions.get(79);var _=document.createElement("div");_.className="view-lines line-delete",_.innerHTML=a.build(),Zp.applyFontInfoSlow(_,c);var y=document.createElement("div");return y.className="inline-deleted-margin-view-zone",y.innerHTML=u.join(""),Zp.applyFontInfoSlow(y,c),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:p*f,domNode:_,marginDomNode:y,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalContent:g}}},t.prototype._renderOriginalLine=function(e,t,n,i,o,r,s){var a=t.getLineTokens(o),u=a.getLineContent(),l=n.get(34),c=dh.filter(r,o,1,u.length+1);s.appendASCIIString('<div class="view-line'),0===r.length&&s.appendASCIIString(" char-delete"),s.appendASCIIString('" style="top:'),s.appendASCIIString(String(e*n.get(49))),s.appendASCIIString('px;width:1000000px;">');var h=Ah.isBasicASCII(u,t.mightContainNonBasicASCII()),d=Ah.containsRTL(u,h,t.mightContainRTL()),f=Ch(new _h(l.isMonospace&&!n.get(23),l.canUseHalfwidthRightwardsArrow,u,!1,h,d,0,a,c,i,0,l.spaceWidth,l.middotWidth,n.get(88),n.get(74),n.get(69),n.get(35)!==F.OFF,null),s);s.appendASCIIString("</div>");var p=f.characterMapping.getAbsoluteOffsets();return p.length>0?p[p.length-1]:0},t}(pE);function CE(e){return e.modifiedEndLineNumber>0}function wE(e){return e.originalEndLineNumber>0}function SE(){var e=document.createElement("div");return e.className="diagonal-fill",e}lm((function(e,t){var n=e.getColor(_b);n&&(t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: "+n+"; }"));var i=e.getColor(yb);i&&(t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: "+i+"; }"));var o=e.getColor(bb);o&&t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+o+"; }");var r=e.getColor(Cb);r&&t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+r+"; }");var s=e.getColor(Gy);s&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px "+s+"; }");var a=e.getColor(wb);a&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid "+a+"; }")}));var LE=Nn("themeService"),NE=Nn("keybindingService"),DE=Nn("clipboardService"),EE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xE=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},kE=function(e,t){return function(n,i){t(n,i,e)}},OE=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i},TE=0,ME=!1;function IE(){ME||(ME=!0,Vp(document.body))}var AE=function(e){function t(t,n,i,o,r,s,a,u,l,c){var h=this;return n=n||{},n.ariaLabel=n.ariaLabel||cp.editorViewAccessibleLabel,n.ariaLabel=n.ariaLabel+";"+(An?cp.accessibilityHelpMessageIE:cp.accessibilityHelpMessage),h=e.call(this,t,n,{},i,o,r,s,u,l,c)||this,h._standaloneKeybindingService=a instanceof Np?a:null,IE(),h}return EE(t,e),t.prototype.addCommand=function(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;var i="DYNAMIC_"+ ++TE,o=Df.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(i,e,t,o),i},t.prototype.createContextKey=function(e,t){return this._contextKeyService.createKey(e,t)},t.prototype.addAction=function(e){var t=this;if("string"!==typeof e.id||"string"!==typeof e.label||"function"!==typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),Me.None;var n=e.id,i=e.label,o=Df.and(Df.equals("editorId",this.getId()),Df.deserialize(e.precondition)),r=e.keybindings,s=Df.and(o,Df.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,u=e.contextMenuOrder||0,l=function(n){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return Promise.resolve(e.run.apply(e,OE([t],i)))},c=new Te,h=this.getId()+":"+n;if(c.add(la.registerCommand(h,l)),a){var d={command:{id:h,title:i},when:o,group:a,order:u};c.add(ug.appendMenuItem(7,d))}if(Array.isArray(r))for(var f=0,p=r;f<p.length;f++){var g=p[f];c.add(this._standaloneKeybindingService.addDynamicKeybinding(h,g,l,s))}var m=new hN(h,i,i,o,l,this._contextKeyService);return this._actions[n]=m,c.add(ke((function(){delete t._actions[n]}))),c},t=xE([kE(2,Sn),kE(3,En),kE(4,ua),kE(5,Ff),kE(6,NE),kE(7,tm),kE(8,np),kE(9,HN)],t),t}(hD),PE=function(e){function t(t,n,i,o,r,s,a,u,l,c,h,d,f){var p=this;Mp(d,n,!1);var g=c.registerEditorContainer(t);n=n||{},"string"===typeof n.theme&&c.setTheme(n.theme);var m,v=n.model;if(delete n.model,p=e.call(this,t,n,o,r,s,a,u,c,h,f)||this,p._contextViewService=l,p._configurationService=d,p._register(i),p._register(g),"undefined"===typeof v?(m=self.monaco.editor.createModel(n.value||"",n.language||"text/plain"),p._ownsModel=!0):(m=v,p._ownsModel=!1),p._attachModel(m),m){var _={oldModelUrl:null,newModelUrl:m.uri};p._onDidChangeModel.fire(_)}return p}return EE(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.updateOptions=function(t){Mp(this._configurationService,t,!1),e.prototype.updateOptions.call(this,t)},t.prototype._attachModel=function(t){e.prototype._attachModel.call(this,t),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)},t.prototype._postDetachModelCleanup=function(t){e.prototype._postDetachModelCleanup.call(this,t),t&&this._ownsModel&&(t.dispose(),this._ownsModel=!1)},t=xE([kE(3,Sn),kE(4,En),kE(5,ua),kE(6,Ff),kE(7,NE),kE(8,JD),kE(9,LE),kE(10,np),kE(11,uf),kE(12,HN)],t),t}(AE),RE=function(e){function t(t,n,i,o,r,s,a,u,l,c,h,d,f,p,g){var m=this;Mp(d,n,!0);var v=c.registerEditorContainer(t);return n=n||{},"string"===typeof n.theme&&(n.theme=c.setTheme(n.theme)),m=e.call(this,t,n,g,u,r,o,l,c,h,f,p)||this,m._contextViewService=a,m._configurationService=d,m._register(i),m._register(v),m._contextViewService.setContainer(m._containerDomElement),m}return EE(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.updateOptions=function(t){Mp(this._configurationService,t,!0),e.prototype.updateOptions.call(this,t)},t.prototype._createInnerEditor=function(e,t,n){return e.createInstance(AE,t,n)},t.prototype.getOriginalEditor=function(){return e.prototype.getOriginalEditor.call(this)},t.prototype.getModifiedEditor=function(){return e.prototype.getModifiedEditor.call(this)},t.prototype.addCommand=function(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)},t.prototype.createContextKey=function(e,t){return this.getModifiedEditor().createContextKey(e,t)},t.prototype.addAction=function(e){return this.getModifiedEditor().addAction(e)},t=xE([kE(3,Sn),kE(4,Ff),kE(5,NE),kE(6,JD),kE(7,hl),kE(8,En),kE(9,LE),kE(10,np),kE(11,uf),kE(12,eE),kE(13,rE),kE(14,Dn(DE))],t),t}(hE),FE=Nn("IWorkspaceEditService"),WE=Nn("modeService"),VE=function(){function e(e){this._languageIdentifier=e}return e.prototype.getId=function(){return this._languageIdentifier.language},e}(),BE="text/plain",HE="application/unknown",zE=[],jE=[],UE=[];function KE(e,t){void 0===t&&(t=!1);var n=qE(e);zE.push(n),n.userConfigured?UE.push(n):jE.push(n),t&&!n.userConfigured&&zE.forEach((function(e){e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn("Overwriting extension <<"+n.extension+">> to now point to mime <<"+n.mime+">>"),n.filename&&e.filename===n.filename&&console.warn("Overwriting filename <<"+n.filename+">> to now point to mime <<"+n.mime+">>"),n.filepattern&&e.filepattern===n.filepattern&&console.warn("Overwriting filepattern <<"+n.filepattern+">> to now point to mime <<"+n.mime+">>"),n.firstline&&e.firstline===n.firstline&&console.warn("Overwriting firstline <<"+n.firstline+">> to now point to mime <<"+n.mime+">>"))}))}function qE(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(_s.sep)>=0}}function GE(e,t){var n;if(e)switch(e.scheme){case vi.file:n=e.fsPath;break;case vi.data:var i=xs.parseMetaData(e);n=i.get(xs.META_DATA_LABEL);break;default:n=e.path}if(!n)return[HE];n=n.toLowerCase();var o=Ss(n),r=YE(n,o,UE);if(r)return[r,BE];var s=YE(n,o,jE);if(s)return[s,BE];if(t){var a=ZE(t);if(a)return[a,BE]}return[HE]}function YE(e,t,n){for(var i=null,o=null,r=null,s=n.length-1;s>=0;s--){var a=n[s];if(t===a.filenameLowercase){i=a;break}if(a.filepattern&&(!o||a.filepattern.length>o.filepattern.length)){var u=a.filepatternOnPath?e:t;gu(a.filepatternLowercase,u)&&(o=a)}a.extension&&(!r||a.extension.length>r.extension.length)&&mr(t,a.extensionLowercase)&&(r=a)}return i?i.mime:o?o.mime:r?r.mime:null}function ZE(e){if(Gr(e)&&(e=e.substr(1)),e.length>0)for(var t=zE.length-1;t>=0;t--){var n=zE[t];if(n.firstline){var i=e.match(n.firstline);if(i&&i.length>0)return n.mime}}return null}var XE={ModesRegistry:"editor.modesRegistry"},$E=function(){function e(){this._onDidChangeLanguages=new qe,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}return e.prototype.registerLanguage=function(e){this._languages.push(e),this._onDidChangeLanguages.fire(void 0)},e.prototype.getLanguages=function(){return[].concat(this._languages).concat(this._dynamicLanguages)},e}(),QE=new $E;pd.add(XE.ModesRegistry,QE);var JE="plaintext",ex=new Ou(JE,1);QE.registerLanguage({id:JE,extensions:[".txt",".gitignore"],aliases:[r("plainText.alias","Plain Text"),"text"],mimetypes:["text/plain"]}),Zl.register(ex,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],folding:{offSide:!0}});var tx=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),nx=Object.prototype.hasOwnProperty,ix=function(e){function t(t,n){void 0===t&&(t=!0),void 0===n&&(n=!1);var i=e.call(this)||this;return i._onDidChange=i._register(new qe),i.onDidChange=i._onDidChange.event,i._warnOnOverwrite=n,i._nextLanguageId2=1,i._languageIdToLanguage=[],i._languageToLanguageId=Object.create(null),i._languages={},i._mimeTypesMap={},i._nameMap={},i._lowercaseNameMap={},t&&(i._initializeFromRegistry(),i._register(QE.onDidChangeLanguages((function(e){return i._initializeFromRegistry()})))),i}return tx(t,e),t.prototype._initializeFromRegistry=function(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={};var e=QE.getLanguages();this._registerLanguages(e)},t.prototype._registerLanguages=function(e){for(var t=this,n=0,i=e;n<i.length;n++){var o=i[n];this._registerLanguage(o)}this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((function(e){var n=t._languages[e];n.name&&(t._nameMap[n.name]=n.identifier),n.aliases.forEach((function(e){t._lowercaseNameMap[e.toLowerCase()]=n.identifier})),n.mimetypes.forEach((function(e){t._mimeTypesMap[e]=n.identifier}))})),pd.as(yd.Configuration).registerOverrideIdentifiers(QE.getLanguages().map((function(e){return e.id}))),this._onDidChange.fire()},t.prototype._getLanguageId=function(e){if(this._languageToLanguageId[e])return this._languageToLanguageId[e];var t=this._nextLanguageId2++;return this._languageIdToLanguage[t]=e,this._languageToLanguageId[e]=t,t},t.prototype._registerLanguage=function(e){var t,n=e.id;if(nx.call(this._languages,n))t=this._languages[n];else{var i=this._getLanguageId(n);t={identifier:new Ou(n,i),name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[n]=t}this._mergeLanguage(t,e)},t.prototype._mergeLanguage=function(e,t){var n,i=t.id,o=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&((n=e.mimetypes).push.apply(n,t.mimetypes),o=t.mimetypes[0]),o||(o="text/x-"+i,e.mimetypes.push(o)),Array.isArray(t.extensions))for(var r=0,s=t.extensions;r<s.length;r++){var a=s[r];KE({id:i,mime:o,extension:a},this._warnOnOverwrite),e.extensions.push(a)}if(Array.isArray(t.filenames))for(var u=0,l=t.filenames;u<l.length;u++){var c=l[u];KE({id:i,mime:o,filename:c},this._warnOnOverwrite),e.filenames.push(c)}if(Array.isArray(t.filenamePatterns))for(var h=0,d=t.filenamePatterns;h<d.length;h++){var f=d[h];KE({id:i,mime:o,filepattern:f},this._warnOnOverwrite)}if("string"===typeof t.firstLine&&t.firstLine.length>0){var p=t.firstLine;"^"!==p.charAt(0)&&(p="^"+p);try{var g=new RegExp(p);_r(g)||KE({id:i,mime:o,firstline:g},this._warnOnOverwrite)}catch(w){ge(w)}}e.aliases.push(i);var m=null;if("undefined"!==typeof t.aliases&&Array.isArray(t.aliases)&&(m=0===t.aliases.length?[null]:t.aliases),null!==m)for(var v=0,_=m;v<_.length;v++){var y=_[v];y&&0!==y.length&&e.aliases.push(y)}var b=null!==m&&m.length>0;if(b&&null===m[0]);else{var C=(b?m[0]:null)||i;!b&&e.name||(e.name=C)}t.configuration&&e.configurationFiles.push(t.configuration)},t.prototype.isRegisteredMode=function(e){return!!nx.call(this._mimeTypesMap,e)||nx.call(this._languages,e)},t.prototype.getModeIdForLanguageNameLowercase=function(e){return nx.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null},t.prototype.extractModeIds=function(e){var t=this;return e?e.split(",").map((function(e){return e.trim()})).map((function(e){return nx.call(t._mimeTypesMap,e)?t._mimeTypesMap[e].language:e})).filter((function(e){return nx.call(t._languages,e)})):[]},t.prototype.getLanguageIdentifier=function(e){if(e===sl||0===e)return al;var t;if("string"===typeof e)t=e;else if(t=this._languageIdToLanguage[e],!t)return null;return nx.call(this._languages,t)?this._languages[t].identifier:null},t.prototype.getModeIdsFromFilepathOrFirstLine=function(e,t){if(!e&&!t)return[];var n=GE(e,t);return this.extractModeIds(n.join(","))},t}(Me),ox=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),rx=function(e){function t(t,n){var i=e.call(this)||this;return i._onDidChange=i._register(new qe),i.onDidChange=i._onDidChange.event,i._selector=n,i.languageIdentifier=i._selector(),i._register(t((function(){return i._evaluate()}))),i}return ox(t,e),t.prototype._evaluate=function(){var e=this._selector();e.id!==this.languageIdentifier.id&&(this.languageIdentifier=e,this._onDidChange.fire(this.languageIdentifier))},t}(Me),sx=function(){function e(e){var t=this;void 0===e&&(e=!1),this._onDidCreateMode=new qe,this.onDidCreateMode=this._onDidCreateMode.event,this._onLanguagesMaybeChanged=new qe,this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,this._instantiatedModes={},this._registry=new ix(!0,e),this._registry.onDidChange((function(){return t._onLanguagesMaybeChanged.fire()}))}return e.prototype.isRegisteredMode=function(e){return this._registry.isRegisteredMode(e)},e.prototype.getModeIdForLanguageName=function(e){return this._registry.getModeIdForLanguageNameLowercase(e)},e.prototype.getModeIdByFilepathOrFirstLine=function(e,t){var n=this._registry.getModeIdsFromFilepathOrFirstLine(e,t);return Ai(n,null)},e.prototype.getModeId=function(e){var t=this._registry.extractModeIds(e);return Ai(t,null)},e.prototype.getLanguageIdentifier=function(e){return this._registry.getLanguageIdentifier(e)},e.prototype.create=function(e){var t=this;return new rx(this.onLanguagesMaybeChanged,(function(){var n=t.getModeId(e);return t._createModeAndGetLanguageIdentifier(n)}))},e.prototype.createByFilepathOrFirstLine=function(e,t){var n=this;return new rx(this.onLanguagesMaybeChanged,(function(){var i=n.getModeIdByFilepathOrFirstLine(e,t);return n._createModeAndGetLanguageIdentifier(i)}))},e.prototype._createModeAndGetLanguageIdentifier=function(e){var t=this.getLanguageIdentifier(e||"plaintext")||al;return this._getOrCreateMode(t.language),t},e.prototype.triggerMode=function(e){var t=this.getModeId(e);this._getOrCreateMode(t||"plaintext")},e.prototype._getOrCreateMode=function(e){if(!this._instantiatedModes.hasOwnProperty(e)){var t=this.getLanguageIdentifier(e)||al;this._instantiatedModes[e]=new VE(t),this._onDidCreateMode.fire(this._instantiatedModes[e])}return this._instantiatedModes[e]},e}(),ax=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ux=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},lx=function(e,t){return function(n,i){t(n,i,e)}};function cx(e){return e.toString()}var hx=function(){function e(e,t,n){this._modelEventListeners=new Te,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose((function(){return t(e)}))),this._modelEventListeners.add(e.onDidChangeLanguage((function(t){return n(e,t)})))}return e.prototype._disposeLanguageSelection=function(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null),this._languageSelection&&(this._languageSelection.dispose(),this._languageSelection=null)},e.prototype.dispose=function(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()},e.prototype.setLanguage=function(e){var t=this;this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange((function(){return t.model.setMode(e.languageIdentifier)})),this.model.setMode(e.languageIdentifier)},e}(),dx=s["d"]||s["e"]?1:2,fx=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r._onModelAdded=r._register(new qe),r.onModelAdded=r._onModelAdded.event,r._onModelRemoved=r._register(new qe),r.onModelRemoved=r._onModelRemoved.event,r._onModelModeChanged=r._register(new qe),r.onModelModeChanged=r._onModelModeChanged.event,r._configurationService=t,r._resourcePropertiesService=n,r._models={},r._modelCreationOptionsByLanguageAndResource=Object.create(null),r._configurationServiceSubscription=r._configurationService.onDidChangeConfiguration((function(e){return r._updateModelOptions()})),r._updateModelOptions(),r._register(new px(r,i,t,o)),r}return ax(t,e),t._readModelOptions=function(e,t){var n=le.tabSize;if(e.editor&&"undefined"!==typeof e.editor.tabSize){var i=parseInt(e.editor.tabSize,10);isNaN(i)||(n=i),n<1&&(n=1)}var o=n;if(e.editor&&"undefined"!==typeof e.editor.indentSize&&"tabSize"!==e.editor.indentSize){var r=parseInt(e.editor.indentSize,10);isNaN(r)||(o=r),o<1&&(o=1)}var s=le.insertSpaces;e.editor&&"undefined"!==typeof e.editor.insertSpaces&&(s="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));var a=dx,u=e.eol;"\r\n"===u?a=2:"\n"===u&&(a=1);var l=le.trimAutoWhitespace;e.editor&&"undefined"!==typeof e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));var c=le.detectIndentation;e.editor&&"undefined"!==typeof e.editor.detectIndentation&&(c="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));var h=le.largeFileOptimizations;return e.editor&&"undefined"!==typeof e.editor.largeFileOptimizations&&(h="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations)),{isForSimpleWidget:t,tabSize:n,indentSize:o,insertSpaces:s,detectIndentation:c,defaultEOL:a,trimAutoWhitespace:l,largeFileOptimizations:h}},t.prototype.getCreationOptions=function(e,n,i){var o=this._modelCreationOptionsByLanguageAndResource[e+n];if(!o){var r=this._configurationService.getValue("editor",{overrideIdentifier:e,resource:n}),s=this._resourcePropertiesService.getEOL(n,e);o=t._readModelOptions({editor:r,eol:s},i),this._modelCreationOptionsByLanguageAndResource[e+n]=o}return o},t.prototype._updateModelOptions=function(){var e=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);for(var n=Object.keys(this._models),i=0,o=n.length;i<o;i++){var r=n[i],s=this._models[r],a=s.model.getLanguageIdentifier().language,u=s.model.uri,l=e[a+u],c=this.getCreationOptions(a,u,s.model.isForSimpleWidget);t._setModelOptionsForModel(s.model,c,l)}},t._setModelOptionsForModel=function(e,t,n){n&&n.defaultEOL!==t.defaultEOL&&1===e.getLineCount()&&e.setEOL(1===t.defaultEOL?0:1),n&&n.detectIndentation===t.detectIndentation&&n.insertSpaces===t.insertSpaces&&n.tabSize===t.tabSize&&n.indentSize===t.indentSize&&n.trimAutoWhitespace===t.trimAutoWhitespace||(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace}))},t.prototype.dispose=function(){this._configurationServiceSubscription.dispose(),e.prototype.dispose.call(this)},t.prototype._createModelData=function(e,t,n,i){var o=this,r=this.getCreationOptions(t.language,n,i),s=new M_(e,r,t,n),a=cx(s.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");var u=new hx(s,(function(e){return o._onWillDispose(e)}),(function(e,t){return o._onDidChangeLanguage(e,t)}));return this._models[a]=u,u},t.prototype.createModel=function(e,t,n,i){var o;return void 0===i&&(i=!1),t?(o=this._createModelData(e,t.languageIdentifier,n,i),this.setMode(o.model,t)):o=this._createModelData(e,ex,n,i),this._onModelAdded.fire(o.model),o.model},t.prototype.setMode=function(e,t){if(t){var n=this._models[cx(e.uri)];n&&n.setLanguage(t)}},t.prototype.getModels=function(){for(var e=[],t=Object.keys(this._models),n=0,i=t.length;n<i;n++){var o=t[n];e.push(this._models[o].model)}return e},t.prototype.getModel=function(e){var t=cx(e),n=this._models[t];return n?n.model:null},t.prototype._onWillDispose=function(e){var t=cx(e.uri),n=this._models[t];delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageIdentifier().language+e.uri],this._onModelRemoved.fire(e)},t.prototype._onDidChangeLanguage=function(e,n){var i=n.oldLanguage,o=e.getLanguageIdentifier().language,r=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(o,e.uri,e.isForSimpleWidget);t._setModelOptionsForModel(e,s,r),this._onModelModeChanged.fire({model:e,oldModeId:i})},t=ux([lx(0,uf),lx(1,Wc),lx(2,tm),lx(3,Vc)],t),t}(Me),px=function(e){function t(n,i,o,r){var s=e.call(this)||this;s._configurationService=o,s._watchers=Object.create(null),s._semanticStyling=s._register(new gx(i,r));var a=function(e){var n=o.getValue(t.SETTING_ID,{overrideIdentifier:e.getLanguageIdentifier().language,resource:e.uri});return n&&n.enabled},u=function(e){s._watchers[e.uri.toString()]=new bx(e,i,s._semanticStyling)},l=function(e,t){t.dispose(),delete s._watchers[e.uri.toString()]};return s._register(n.onModelAdded((function(e){a(e)&&u(e)}))),s._register(n.onModelRemoved((function(e){var t=s._watchers[e.uri.toString()];t&&l(e,t)}))),s._configurationService.onDidChangeConfiguration((function(e){if(e.affectsConfiguration(t.SETTING_ID))for(var i=0,o=n.getModels();i<o.length;i++){var r=o[i],c=s._watchers[r.uri.toString()];a(r)?c||u(r):c&&l(r,c)}})),s}return ax(t,e),t.SETTING_ID="editor.semanticHighlighting",t}(Me),gx=function(e){function t(t,n){var i=e.call(this)||this;return i._themeService=t,i._logService=n,i._caches=new WeakMap,i._themeService&&i._register(i._themeService.onThemeChange((function(){i._caches=new WeakMap}))),i}return ax(t,e),t.prototype.get=function(e){return this._caches.has(e)||this._caches.set(e,new _x(e.getLegend(),this._themeService,this._logService)),this._caches.get(e)},t}(Me),mx=function(){function e(e,t,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.metadata=n,this.next=null}return e}(),vx=function(){function e(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=e._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<e._SIZES.length?2/3*this._currentLength:0),this._elements=[],e._nullOutEntries(this._elements,this._currentLength)}return e._nullOutEntries=function(e,t){for(var n=0;n<t;n++)e[n]=null},e.prototype._hashFunc=function(e,t){return((e<<5)-e+t|0)%this._currentLength},e.prototype.get=function(e,t){var n=this._hashFunc(e,t),i=this._elements[n];while(i){if(i.tokenTypeIndex===e&&i.tokenModifierSet===t)return i;i=i.next}return null},e.prototype.add=function(t,n,i){if(this._elementsCount++,0!==this._growCount&&this._elementsCount>=this._growCount){var o=this._elements;this._currentLengthIndex++,this._currentLength=e._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<e._SIZES.length?2/3*this._currentLength:0),this._elements=[],e._nullOutEntries(this._elements,this._currentLength);for(var r=0,s=o;r<s.length;r++){var a=s[r],u=a;while(u){var l=u.next;u.next=null,this._add(u),u=l}}}this._add(new mx(t,n,i))},e.prototype._add=function(e){var t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet);e.next=this._elements[t],this._elements[t]=e},e._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143],e}(),_x=function(){function e(e,t,n){this._legend=e,this._themeService=t,this._logService=n,this._hashTable=new vx}return e.prototype.getMetadata=function(e,t){var n,i=this._hashTable.get(e,t);if(i)n=i.metadata;else{for(var o=this._legend.tokenTypes[e],r=[],s=t,a=0;s>0&&a<this._legend.tokenModifiers.length;a++)1&s&&r.push(this._legend.tokenModifiers[a]),s>>=1;var u=this._themeService.getTheme().getTokenStyleMetadata(o,r);if("undefined"===typeof u)n=2147483647;else{if(n=0,"undefined"!==typeof u.italic){var l=(u.italic?1:0)<<11;n|=1|l}if("undefined"!==typeof u.bold){var c=(u.bold?2:0)<<11;n|=2|c}if("undefined"!==typeof u.underline){var h=(u.underline?4:0)<<11;n|=4|h}if(u.foreground){var d=u.foreground<<14;n|=8|d}0===n&&(n=2147483647)}this._hashTable.add(e,t,n)}if(this._logService.getLevel()===Rc.Trace){var f=this._legend.tokenTypes[e],p=t?" "+this._legend.tokenModifiers.filter((function(e,n){return t&1<<n})).join(" "):"";this._logService.trace("tokenStyleMetadata "+(i?"[CACHED] ":"")+f+p+": foreground "+Tu.getForeground(n)+", fontStyle "+Tu.getFontStyle(n).toString(2))}return n},e}(),yx=function(){function e(e,t,n){this._provider=e,this.resultId=t,this.data=n}return e.prototype.dispose=function(){this._provider.releaseDocumentSemanticTokens(this.resultId)},e}(),bx=function(e){function t(t,n,i){var o=e.call(this)||this;return o._isDisposed=!1,o._model=t,o._semanticStyling=i,o._fetchSemanticTokens=o._register(new mi((function(){return o._fetchSemanticTokensNow()}),300)),o._currentResponse=null,o._currentRequestCancellationTokenSource=null,o._register(o._model.onDidChangeContent((function(e){o._fetchSemanticTokens.isScheduled()||o._fetchSemanticTokens.schedule()}))),o._register(tl.onDidChange((function(e){return o._fetchSemanticTokens.schedule()}))),n&&o._register(n.onThemeChange((function(e){o._setSemanticTokens(null,null,null,[]),o._fetchSemanticTokens.schedule()}))),o._fetchSemanticTokens.schedule(0),o}return ax(t,e),t.prototype.dispose=function(){this._currentResponse&&(this._currentResponse.dispose(),this._currentResponse=null),this._currentRequestCancellationTokenSource&&(this._currentRequestCancellationTokenSource.cancel(),this._currentRequestCancellationTokenSource=null),this._setSemanticTokens(null,null,null,[]),this._isDisposed=!0,e.prototype.dispose.call(this)},t.prototype._fetchSemanticTokensNow=function(){var e=this;if(!this._currentRequestCancellationTokenSource){var t=this._getSemanticColoringProvider();if(t){this._currentRequestCancellationTokenSource=new Je;var n=[],i=this._model.onDidChangeContent((function(e){n.push(e)})),o=this._semanticStyling.get(t),r=this._currentResponse&&this._currentResponse.resultId||null,s=Promise.resolve(t.provideDocumentSemanticTokens(this._model,r,this._currentRequestCancellationTokenSource.token));s.then((function(r){e._currentRequestCancellationTokenSource=null,i.dispose(),e._setSemanticTokens(t,r||null,o,n)}),(function(t){t&&"string"===typeof t.message&&-1!==t.message.indexOf("busy")||ge(t),e._currentRequestCancellationTokenSource=null,i.dispose(),n.length>0&&(e._fetchSemanticTokens.isScheduled()||e._fetchSemanticTokens.schedule())}))}}},t._isSemanticTokens=function(e){return e&&!!e.data},t._isSemanticTokensEdits=function(e){return e&&Array.isArray(e.edits)},t._copy=function(e,t,n,i,o){for(var r=0;r<o;r++)n[i+r]=e[t+r]},t.prototype._setSemanticTokens=function(e,n,i,o){var r=this._currentResponse;if(this._currentResponse&&(this._currentResponse.dispose(),this._currentResponse=null),this._isDisposed)e&&n&&e.releaseDocumentSemanticTokens(n.resultId);else if(e&&n&&i){if(t._isSemanticTokensEdits(n)){if(!r)return void this._model.setSemanticTokens(null);if(0===n.edits.length)n={resultId:n.resultId,data:r.data};else{for(var s=0,a=0,u=n.edits;a<u.length;a++){var l=u[a];s+=(l.data?l.data.length:0)-l.deleteCount}for(var c=r.data,h=new Uint32Array(c.length+s),d=c.length,f=h.length,p=n.edits.length-1;p>=0;p--){l=n.edits[p];var g=d-(l.start+l.deleteCount);g>0&&(t._copy(c,d-g,h,f-g,g),f-=g),l.data&&(t._copy(l.data,0,h,f-l.data.length,l.data.length),f-=l.data.length),d=l.start}d>0&&t._copy(c,0,h,0,d),n={resultId:n.resultId,data:h}}}if(t._isSemanticTokens(n)){this._currentResponse=new yx(e,n.resultId,n.data);c=n.data;var m=n.data.length/5|0,v=Math.max(Math.ceil(m/1024),400),_=[],y=0,b=1,C=0;while(y<m){var w=y,S=Math.min(w+v,m);if(S<m){var L=S;while(L-1>w&&0===c[5*L])L--;if(L-1===w){var N=S;while(N+1<m&&0===c[5*N])N++;S=N}else S=L}h=new Uint32Array(4*(S-w));var D=0,E=0;while(y<S){var x=5*y,k=c[x],O=c[x+1],T=b+k,M=0===k?C+O:O,I=c[x+2],A=c[x+3],P=c[x+4],R=i.getMetadata(A,P);2147483647!==R&&(0===E&&(E=T),h[D]=T-E,h[D+1]=M,h[D+2]=M+I,h[D+3]=R,D+=4),b=T,C=M,y++}D!==h.length&&(h=h.subarray(0,D));var F=new l_(E,new a_(h));_.push(F)}if(o.length>0){for(var W=0,V=o;W<V.length;W++)for(var B=V[W],H=0,z=_;H<z.length;H++)for(var j=z[H],U=0,K=B.changes;U<K.length;U++){var q=K[U];j.applyEdit(q.range,q.text)}this._fetchSemanticTokens.isScheduled()||this._fetchSemanticTokens.schedule()}this._model.setSemanticTokens(_)}else this._model.setSemanticTokens(null)}else this._model.setSemanticTokens(null)},t.prototype._getSemanticColoringProvider=function(){var e=tl.ordered(this._model);return e.length>0?e[0]:null},t}(Me),Cx=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wx=function(e){function t(){var t=e.call(this)||this;return t._onCodeEditorAdd=t._register(new qe),t.onCodeEditorAdd=t._onCodeEditorAdd.event,t._onCodeEditorRemove=t._register(new qe),t.onCodeEditorRemove=t._onCodeEditorRemove.event,t._onDiffEditorAdd=t._register(new qe),t._onDiffEditorRemove=t._register(new qe),t._codeEditors=Object.create(null),t._diffEditors=Object.create(null),t}return Cx(t,e),t.prototype.addCodeEditor=function(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)},t.prototype.removeCodeEditor=function(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)},t.prototype.listCodeEditors=function(){var e=this;return Object.keys(this._codeEditors).map((function(t){return e._codeEditors[t]}))},t.prototype.addDiffEditor=function(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)},t.prototype.removeDiffEditor=function(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)},t.prototype.listDiffEditors=function(){var e=this;return Object.keys(this._diffEditors).map((function(t){return e._diffEditors[t]}))},t.prototype.getFocusedCodeEditor=function(){for(var e=null,t=this.listCodeEditors(),n=0,i=t;n<i.length;n++){var o=i[n];if(o.hasTextFocus())return o;o.hasWidgetFocus()&&(e=o)}return e},t}(Me),Sx=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Lx=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Nx=function(e,t){return function(n,i){t(n,i,e)}},Dx=function(){function e(e,t,n){this._parent=e,this._editorId=t,this.styleSheet=n,this._refCount=0}return e.prototype.ref=function(){this._refCount++},e.prototype.unref=function(){var e;this._refCount--,0===this._refCount&&(null===(e=this.styleSheet.parentNode)||void 0===e||e.removeChild(this.styleSheet),this._parent._removeEditorStyleSheets(this._editorId))},e}(),Ex=function(){function e(e){this.styleSheet=e}return e.prototype.ref=function(){},e.prototype.unref=function(){},e}(),xx=function(e){function t(t,n){void 0===n&&(n=null);var i=e.call(this)||this;return i._decorationOptionProviders=new Map,i._editorStyleSheets=new Map,i._globalStyleSheet=n?new Ex(n):null,i._themeService=t,i}return Sx(t,e),t.prototype._getOrCreateGlobalStyleSheet=function(){return this._globalStyleSheet||(this._globalStyleSheet=new Ex(Po())),this._globalStyleSheet},t.prototype._getOrCreateStyleSheet=function(e){if(!e)return this._getOrCreateGlobalStyleSheet();var t=e.getContainerDomNode();if(!Io(t))return this._getOrCreateGlobalStyleSheet();var n=e.getId();if(!this._editorStyleSheets.has(n)){var i=new Dx(this,n,Po(t));this._editorStyleSheets.set(n,i)}return this._editorStyleSheets.get(n)},t.prototype._removeEditorStyleSheets=function(e){this._editorStyleSheets.delete(e)},t.prototype.registerDecorationType=function(e,t,n,i){var o=this._decorationOptionProviders.get(e);if(!o){var r=this._getOrCreateStyleSheet(i),s={styleSheet:r.styleSheet,key:e,parentTypeKey:n,options:t||Object.create(null)};o=n?new kx(this._themeService,r,s):new Ox(this._themeService,r,s),this._decorationOptionProviders.set(e,o)}o.refCount++},t.prototype.removeDecorationType=function(e){var t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((function(t){return t.removeDecorations(e)}))))},t.prototype.resolveDecorationOptions=function(e,t){var n=this._decorationOptionProviders.get(e);if(!n)throw new Error("Unknown decoration type key: "+e);return n.getOptions(this,t)},t=Lx([Nx(0,tm)],t),t}(wx),kx=function(){function e(e,t,n){this._styleSheet=t,this._styleSheet.ref(),this._parentTypeKey=n.parentTypeKey,this.refCount=0,this._beforeContentRules=new Mx(3,n,e),this._afterContentRules=new Mx(4,n,e)}return e.prototype.getOptions=function(e,t){var n=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(n.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(n.afterContentClassName=this._afterContentRules.className),n},e.prototype.dispose=function(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()},e}(),Ox=function(){function e(e,t,n){var i=this;this._disposables=new Te,this._styleSheet=t,this._styleSheet.ref(),this.refCount=0;var o=function(t){var o=new Mx(t,n,e);if(i._disposables.add(o),o.hasContent)return o.className},r=function(t){var o=new Mx(t,n,e);return i._disposables.add(o),o.hasContent?{className:o.className,hasLetterSpacing:o.hasLetterSpacing}:null};this.className=o(0);var s=r(1);s&&(this.inlineClassName=s.className,this.inlineClassNameAffectsLetterSpacing=s.hasLetterSpacing),this.beforeContentClassName=o(3),this.afterContentClassName=o(4),this.glyphMarginClassName=o(2);var a=n.options;this.isWholeLine=Boolean(a.isWholeLine),this.stickiness=a.rangeBehavior;var u=a.light&&a.light.overviewRulerColor||a.overviewRulerColor,l=a.dark&&a.dark.overviewRulerColor||a.overviewRulerColor;"undefined"===typeof u&&"undefined"===typeof l||(this.overviewRuler={color:u||l,darkColor:l||u,position:a.overviewRulerLane||Wa.Center})}return e.prototype.getOptions=function(e,t){return t?{inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness}:this},e.prototype.dispose=function(){this._disposables.dispose(),this._styleSheet.unref()},e}(),Tx={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",width:"width:{0};",height:"height:{0};"},Mx=function(){function e(e,t,n){var i=this;this._theme=n.getTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;var o=Ix.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(o=o+" "+Ix.getClassName(this._providerArgs.parentTypeKey,e)),this._className=o,this._unThemedSelector=Ix.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=n.onThemeChange((function(e){i._theme=n.getTheme(),i._removeCSS(),i._buildCSS()})):this._themeListener=null}return e.prototype.dispose=function(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)},Object.defineProperty(e.prototype,"hasContent",{get:function(){return this._hasContent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasLetterSpacing",{get:function(){return this._hasLetterSpacing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),e.prototype._buildCSS=function(){var e,t,n,i=this._providerArgs.options;switch(this._ruleType){case 0:e=this.getCSSTextForModelDecorationClassName(i),t=this.getCSSTextForModelDecorationClassName(i.light),n=this.getCSSTextForModelDecorationClassName(i.dark);break;case 1:e=this.getCSSTextForModelDecorationInlineClassName(i),t=this.getCSSTextForModelDecorationInlineClassName(i.light),n=this.getCSSTextForModelDecorationInlineClassName(i.dark);break;case 2:e=this.getCSSTextForModelDecorationGlyphMarginClassName(i),t=this.getCSSTextForModelDecorationGlyphMarginClassName(i.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(i.dark);break;case 3:e=this.getCSSTextForModelDecorationContentClassName(i.before),t=this.getCSSTextForModelDecorationContentClassName(i.light&&i.light.before),n=this.getCSSTextForModelDecorationContentClassName(i.dark&&i.dark.before);break;case 4:e=this.getCSSTextForModelDecorationContentClassName(i.after),t=this.getCSSTextForModelDecorationContentClassName(i.light&&i.light.after),n=this.getCSSTextForModelDecorationContentClassName(i.dark&&i.dark.after);break;default:throw new Error("Unknown rule type: "+this._ruleType)}var o=this._providerArgs.styleSheet.sheet,r=!1;e.length>0&&(o.insertRule(this._unThemedSelector+" {"+e+"}",0),r=!0),t.length>0&&(o.insertRule(".vs"+this._unThemedSelector+" {"+t+"}",0),r=!0),n.length>0&&(o.insertRule(".vs-dark"+this._unThemedSelector+", .hc-black"+this._unThemedSelector+" {"+n+"}",0),r=!0),this._hasContent=r},e.prototype._removeCSS=function(){Vo(this._unThemedSelector,this._providerArgs.styleSheet)},e.prototype.getCSSTextForModelDecorationClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")},e.prototype.getCSSTextForModelDecorationInlineClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")},e.prototype.getCSSTextForModelDecorationContentClassName=function(e){if(!e)return"";var t=[];if("undefined"!==typeof e){if(this.collectBorderSettingsCSSText(e,t),"undefined"!==typeof e.contentIconPath&&t.push(dr(Tx.contentIconPath,ar(wt.revive(e.contentIconPath)))),"string"===typeof e.contentText){var n=e.contentText.match(/^.*$/m)[0],i=n.replace(/['\\]/g,"\\$&");t.push(dr(Tx.contentText,i))}this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","color","opacity","backgroundColor","margin"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")},e.prototype.getCSSTextForModelDecorationGlyphMarginClassName=function(e){if(!e)return"";var t=[];return"undefined"!==typeof e.gutterIconPath&&(t.push(dr(Tx.gutterIconPath,ar(wt.revive(e.gutterIconPath)))),"undefined"!==typeof e.gutterIconSize&&t.push(dr(Tx.gutterIconSize,e.gutterIconSize))),t.join("")},e.prototype.collectBorderSettingsCSSText=function(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(dr("box-sizing: border-box;")),!0)},e.prototype.collectCSSText=function(e,t,n){for(var i=n.length,o=0,r=t;o<r.length;o++){var s=r[o],a=this.resolveValue(e[s]);"string"===typeof a&&n.push(dr(Tx[s],a))}return n.length!==i},e.prototype.resolveValue=function(e){if(Fa(e)){this._usesThemeColors=!0;var t=this._theme.getColor(e.id);return t?t.toString():"transparent"}return e},e}(),Ix=function(){function e(){}return e.getClassName=function(e,t){return"ced-"+e+"-"+t},e.getSelector=function(e,t,n){var i=".monaco-editor ."+this.getClassName(e,n);return t&&(i=i+"."+this.getClassName(t,n)),3===n?i+="::before":4===n&&(i+="::after"),i},e}(),Ax=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Px=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ax(t,e),t.prototype.getActiveCodeEditor=function(){return null},t.prototype.openCodeEditor=function(e,t,n){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)},t.prototype.doOpenEditor=function(e,t){var n=this.findModel(e,t.resource);if(!n){if(t.resource){var i=t.resource.scheme;if(i===vi.http||i===vi.https)return or(t.resource.toString()),e}return null}var o=t.options?t.options.selection:null;if(o)if("number"===typeof o.endLineNumber&&"number"===typeof o.endColumn)e.setSelection(o),e.revealRangeInCenter(o,1);else{var r={lineNumber:o.startLineNumber,column:o.startColumn};e.setPosition(r),e.revealPositionInCenter(r,1)}return e},t.prototype.findModel=function(e,t){var n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n},t}(xx),Rx=function(){function e(e,t,n,i,o){this.token=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}return e}();function Fx(e){if(!e||!Array.isArray(e))return[];for(var t=[],n=0,i=0,o=e.length;i<o;i++){var r=e[i],s=-1;if("string"===typeof r.fontStyle){s=0;for(var a=r.fontStyle.split(" "),u=0,l=a.length;u<l;u++){var c=a[u];switch(c){case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4;break}}}var h=null;"string"===typeof r.foreground&&(h=r.foreground);var d=null;"string"===typeof r.background&&(d=r.background),t[n++]=new Rx(r.token||"",i,s,h,d)}return t}function Wx(e,t){e.sort((function(e,t){var n=Ux(e.token,t.token);return 0!==n?n:e.index-t.index}));var n=0,i="000000",o="ffffff";while(e.length>=1&&""===e[0].token){var r=e.shift();-1!==r.fontStyle&&(n=r.fontStyle),null!==r.foreground&&(i=r.foreground),null!==r.background&&(o=r.background)}for(var s=new Bx,a=0,u=t;a<u.length;a++){var l=u[a];s.getId(l)}for(var c=s.getId(i),h=s.getId(o),d=new Yx(n,c,h),f=new Zx(d),p=0,g=e.length;p<g;p++){var m=e[p];f.insert(m.token,m.fontStyle,s.getId(m.foreground),s.getId(m.background))}return new Hx(s,f)}var Vx=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/,Bx=function(){function e(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}return e.prototype.getId=function(e){if(null===e)return 0;var t=e.match(Vx);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();var n=this._color2id.get(e);return n||(n=++this._lastColorId,this._color2id.set(e,n),this._id2color[n]=S_.fromHex("#"+e),n)},e.prototype.getColorMap=function(){return this._id2color.slice(0)},e}(),Hx=function(){function e(e,t){this._colorMap=e,this._root=t,this._cache=new Map}return e.createFromRawTokenTheme=function(e,t){return this.createFromParsedTokenTheme(Fx(e),t)},e.createFromParsedTokenTheme=function(e,t){return Wx(e,t)},e.prototype.getColorMap=function(){return this._colorMap.getColorMap()},e.prototype._match=function(e){return this._root.match(e)},e.prototype.match=function(e,t){var n=this._cache.get(t);if("undefined"===typeof n){var i=this._match(t),o=jx(t);n=(i.metadata|o<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0},e}(),zx=/\b(comment|string|regex|regexp)\b/;function jx(e){var t=e.match(zx);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 4;case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}function Ux(e,t){return e<t?-1:e>t?1:0}var Kx,qx,Gx,Yx=function(){function e(e,t,n){this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}return e.prototype.clone=function(){return new e(this._fontStyle,this._foreground,this._background)},e.prototype.acceptOverwrite=function(e,t,n){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==n&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0},e}(),Zx=function(){function e(e){this._mainRule=e,this._children=new Map}return e.prototype.match=function(e){if(""===e)return this._mainRule;var t,n,i=e.indexOf(".");-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1));var o=this._children.get(t);return"undefined"!==typeof o?o.match(n):this._mainRule},e.prototype.insert=function(t,n,i,o){if(""!==t){var r,s,a=t.indexOf(".");-1===a?(r=t,s=""):(r=t.substring(0,a),s=t.substring(a+1));var u=this._children.get(r);"undefined"===typeof u&&(u=new e(this._mainRule.clone()),this._children.set(r,u)),u.insert(s,n,i,o)}else this._mainRule.acceptOverwrite(n,i,o)},e}();function Xx(e){for(var t=[],n=1,i=e.length;n<i;n++){var o=e[n];t[n]=".mtk"+n+" { color: "+o+"; }"}return t.push(".mtki { font-style: italic; }"),t.push(".mtkb { font-weight: bold; }"),t.push(".mtku { text-decoration: underline; text-underline-position: under; }"),t.join("\n")}var $x={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"FF00FF"}],colors:(Kx={},Kx[rb]="#FFFFFE",Kx[sb]="#000000",Kx[db]="#E5EBF1",Kx[cC]="#D3D3D3",Kx[hC]="#939393",Kx[fb]="#ADD6FF4D",Kx)},Qx={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:(qx={},qx[rb]="#1E1E1E",qx[sb]="#D4D4D4",qx[db]="#3A3D41",qx[cC]="#404040",qx[hC]="#707070",qx[fb]="#ADD6FF26",qx)},Jx={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:(Gx={},Gx[rb]="#000000",Gx[sb]="#FFFFFF",Gx[cC]="#FFFFFF",Gx[hC]="#FFFFFF",Gx)},ek=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),tk="vs",nk="vs-dark",ik="hc-black",ok=pd.as(Ry.ColorContribution),rk=pd.as(sm.ThemingContribution),sk=function(){function e(e,t){this.themeData=t;var n=t.base;e.length>0?(this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}return Object.defineProperty(e.prototype,"base",{get:function(){return this.themeData.base},enumerable:!0,configurable:!0}),e.prototype.notifyBaseUpdated=function(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)},e.prototype.getColors=function(){if(!this.colors){var e=new Map;for(var t in this.themeData.colors)e.set(t,S_.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){var n=uk(this.themeData.base);for(var t in n.colors)e.has(t)||e.set(t,S_.fromHex(n.colors[t]))}this.colors=e}return this.colors},e.prototype.getColor=function(e,t){var n=this.getColors().get(e);return n||(!1!==t?this.getDefault(e):void 0)},e.prototype.getDefault=function(e){var t=this.defaultColors[e];return t||(t=ok.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)},e.prototype.defines=function(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)},Object.defineProperty(e.prototype,"type",{get:function(){switch(this.base){case tk:return"light";case ik:return"hc";default:return"dark"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tokenTheme",{get:function(){if(!this._tokenTheme){var e=[],t=[];if(this.themeData.inherit){var n=uk(this.themeData.base);e=n.rules,n.encodedTokensColors&&(t=n.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=Hx.createFromRawTokenTheme(e,t)}return this._tokenTheme},enumerable:!0,configurable:!0}),e.prototype.getTokenStyleMetadata=function(e,t){},e}();function ak(e){return e===tk||e===nk||e===ik}function uk(e){switch(e){case tk:return $x;case nk:return Qx;case ik:return Jx}}function lk(e){var t=uk(e);return new sk(e,t)}var ck=function(e){function t(){var t=e.call(this)||this;return t._onThemeChange=t._register(new qe),t.onThemeChange=t._onThemeChange.event,t._environment=Object.create(null),t._knownThemes=new Map,t._knownThemes.set(tk,lk(tk)),t._knownThemes.set(nk,lk(nk)),t._knownThemes.set(ik,lk(ik)),t._css="",t._globalStyleElement=null,t._styleElements=[],t.setTheme(tk),t}return ek(t,e),t.prototype.registerEditorContainer=function(e){return Io(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()},t.prototype._registerRegularEditorContainer=function(){return this._globalStyleElement||(this._globalStyleElement=Po(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.innerHTML=this._css,this._styleElements.push(this._globalStyleElement)),Me.None},t.prototype._registerShadowDomContainer=function(e){var t=this,n=Po(e);return n.className="monaco-colors",n.innerHTML=this._css,this._styleElements.push(n),{dispose:function(){for(var e=0;e<t._styleElements.length;e++)if(t._styleElements[e]===n)return void t._styleElements.splice(e,1)}}},t.prototype.defineTheme=function(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!ak(t.base)&&!ak(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new sk(e,t)),ak(e)&&this._knownThemes.forEach((function(t){t.base===e&&t.notifyBaseUpdated()})),this._theme&&this._theme.themeName===e&&this.setTheme(e)},t.prototype.getTheme=function(){return this._theme},t.prototype.setTheme=function(e){var t,n=this;if(t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(tk),this._theme===t)return t.id;this._theme=t;var i=[],o={},r={addRule:function(e){o[e]||(i.push(e),o[e]=!0)}};rk.getThemingParticipants().forEach((function(e){return e(t,r,n._environment)}));var s=t.tokenTheme,a=s.getColorMap();return r.addRule(Xx(a)),this._css=i.join("\n"),this._styleElements.forEach((function(e){return e.innerHTML=n._css})),il.setColorMap(a),this._onThemeChange.fire(t),t.id},t.prototype.getIconTheme=function(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}},t}(Me),hk=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),dk=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},fk=function(e,t){return function(n,i){t(n,i,e)}},pk="data-keybinding-context",gk=function(){function e(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value["_contextId"]=e}return e.prototype.setValue=function(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)},e.prototype.removeValue=function(e){return e in this._value&&(delete this._value[e],!0)},e.prototype.getValue=function(e){var t=this._value[e];return"undefined"===typeof t&&this._parent?this._parent.getValue(e):t},e}(),mk=function(e){function t(){return e.call(this,-1,null)||this}return hk(t,e),t.prototype.setValue=function(e,t){return!1},t.prototype.removeValue=function(e){return!1},t.prototype.getValue=function(e){},t.INSTANCE=new t,t}(gk),vk=function(e){function t(t,n,i){var o=e.call(this,t,null)||this;return o._configurationService=n,o._values=new Map,o._listener=o._configurationService.onDidChangeConfiguration((function(e){if(6===e.source){var t=Qs(o._values);o._values.clear(),i.fire(new bk(t))}else{for(var n=[],r=0,s=e.affectedKeys;r<s.length;r++){var a=s[r],u="config."+a;o._values.has(u)&&(o._values.delete(u),n.push(u))}i.fire(new bk(n))}})),o}return hk(t,e),t.prototype.dispose=function(){this._listener.dispose()},t.prototype.getValue=function(n){if(0!==n.indexOf(t._keyPrefix))return e.prototype.getValue.call(this,n);if(this._values.has(n))return this._values.get(n);var i=n.substr(t._keyPrefix.length),o=this._configurationService.getValue(i),r=void 0;switch(typeof o){case"number":case"boolean":case"string":r=o;break}return this._values.set(n,r),r},t.prototype.setValue=function(t,n){return e.prototype.setValue.call(this,t,n)},t.prototype.removeValue=function(t){return e.prototype.removeValue.call(this,t)},t._keyPrefix="config.",t}(gk),_k=function(){function e(e,t,n){this._service=e,this._key=t,this._defaultValue=n,this.reset()}return e.prototype.set=function(e){this._service.setContext(this._key,e)},e.prototype.reset=function(){"undefined"===typeof this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)},e.prototype.get=function(){return this._service.getContextKeyValue(this._key)},e}(),yk=function(){function e(e){this.key=e}return e.prototype.affectsSome=function(e){return e.has(this.key)},e}(),bk=function(){function e(e){this.keys=e}return e.prototype.affectsSome=function(e){for(var t=0,n=this.keys;t<n.length;t++){var i=n[t];if(e.has(i))return!0}return!1},e}(),Ck=function(){function e(e){this.events=e}return e.prototype.affectsSome=function(e){for(var t=0,n=this.events;t<n.length;t++){var i=n[t];if(i.affectsSome(e))return!0}return!1},e}(),wk=function(){function e(e){this._onDidChangeContext=new Ge({merge:function(e){return new Ck(e)}}),this._isDisposed=!1,this._myContextId=e}return e.prototype.createKey=function(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new _k(this,e,t)},Object.defineProperty(e.prototype,"onDidChangeContext",{get:function(){return this._onDidChangeContext.event},enumerable:!0,configurable:!0}),e.prototype.bufferChangeEvents=function(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}},e.prototype.createScoped=function(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Lk(this,e)},e.prototype.contextMatchesRules=function(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");var t=this.getContextValuesContainer(this._myContextId),n=Vf.contextMatchesRules(t,e);return n},e.prototype.getContextKeyValue=function(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)},e.prototype.setContext=function(e,t){if(!this._isDisposed){var n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,t)&&this._onDidChangeContext.fire(new yk(e))}},e.prototype.removeContext=function(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new yk(e))},e.prototype.getContext=function(e){return this._isDisposed?mk.INSTANCE:this.getContextValuesContainer(Nk(e))},e}(),Sk=function(e){function t(t){var n=e.call(this,0)||this;n._contexts=new Map,n._toDispose=new Te,n._lastContextId=0;var i=new vk(n._myContextId,t,n._onDidChangeContext);return n._contexts.set(n._myContextId,i),n._toDispose.add(i),n}return hk(t,e),t.prototype.dispose=function(){this._isDisposed=!0,this._toDispose.dispose()},t.prototype.getContextValuesContainer=function(e){return this._isDisposed?mk.INSTANCE:this._contexts.get(e)||mk.INSTANCE},t.prototype.createChildContext=function(e){if(void 0===e&&(e=this._myContextId),this._isDisposed)throw new Error("ContextKeyService has been disposed");var t=++this._lastContextId;return this._contexts.set(t,new gk(t,this.getContextValuesContainer(e))),t},t.prototype.disposeContext=function(e){this._isDisposed||this._contexts.delete(e)},t=dk([fk(0,uf)],t),t}(wk),Lk=function(e){function t(t,n){var i=e.call(this,t.createChildContext())||this;return i._parent=t,n&&(i._domNode=n,i._domNode.setAttribute(pk,String(i._myContextId))),i}return hk(t,e),t.prototype.dispose=function(){this._isDisposed=!0,this._parent.disposeContext(this._myContextId),this._domNode&&(this._domNode.removeAttribute(pk),this._domNode=void 0)},Object.defineProperty(t.prototype,"onDidChangeContext",{get:function(){return We.any(this._parent.onDidChangeContext,this._onDidChangeContext.event)},enumerable:!0,configurable:!0}),t.prototype.getContextValuesContainer=function(e){return this._isDisposed?mk.INSTANCE:this._parent.getContextValuesContainer(e)},t.prototype.createChildContext=function(e){if(void 0===e&&(e=this._myContextId),this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)},t.prototype.disposeContext=function(e){this._isDisposed||this._parent.disposeContext(e)},t}(wk);function Nk(e){while(e){if(e.hasAttribute(pk)){var t=e.getAttribute(pk);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}la.registerCommand(Wf,(function(e,t,n){e.get(Ff).createKey(String(t),n)}));n("7a2c"),n("0876");var Dk,Ek=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xk=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i},kk=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,Ok=/(&amp;)?(&amp;)([^\s&])/g;(function(e){e[e["Right"]=0]="Right",e[e["Left"]=1]="Left"})(Dk||(Dk={}));var Tk=function(e){function t(t,n,i){var o=e.call(this,i||"submenu",t,"",!0)||this;return o.entries=n,o}return Ek(t,e),t}(Jp),Mk=function(e){function t(t,n,i){void 0===i&&(i={});var o=this;$i(t,"monaco-menu-container"),t.setAttribute("role","presentation");var r=document.createElement("div");$i(r,"monaco-menu"),r.setAttribute("role","presentation"),o=e.call(this,r,{orientation:2,actionViewItemProvider:function(e){return o.doGetActionViewItem(e,i,a)},context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,triggerKeys:{keys:xk([3],s["e"]?[10]:[]),keyDown:!0}})||this,o.menuElement=r,o.actionsList.setAttribute("role","menu"),o.actionsList.tabIndex=0,o.menuDisposables=o._register(new Te),io(r,Ho.KEY_DOWN,(function(e){var t=new Jn(e);t.equals(2)&&e.preventDefault()})),i.enableMnemonics&&o.menuDisposables.add(io(r,Ho.KEY_DOWN,(function(e){var t=e.key.toLocaleLowerCase();if(o.mnemonics.has(t)){zo.stop(e,!0);var n=o.mnemonics.get(t);if(1===n.length&&(n[0]instanceof Ak&&n[0].container&&o.focusItemByElement(n[0].container),n[0].onClick(e)),n.length>1){var i=n.shift();i&&i.container&&(o.focusItemByElement(i.container),n.push(i)),o.mnemonics.set(t,n)}}}))),s["d"]&&o._register(io(r,Ho.KEY_DOWN,(function(e){var t=new Jn(e);t.equals(14)||t.equals(11)?(o.focusedItem=o.viewItems.length-1,o.focusNext(),zo.stop(e,!0)):(t.equals(13)||t.equals(12))&&(o.focusedItem=0,o.focusPrevious(),zo.stop(e,!0))}))),o._register(io(o.domNode,Ho.MOUSE_OUT,(function(e){var t=e.relatedTarget;Oo(t,o.domNode)||(o.focusedItem=void 0,o.updateFocus(),e.stopPropagation())}))),o._register(io(o.actionsList,Ho.MOUSE_OVER,(function(e){var t=e.target;if(t&&Oo(t,o.actionsList)&&t!==o.actionsList){while(t.parentElement!==o.actionsList&&null!==t.parentElement)t=t.parentElement;if(Xi(t,"action-item")){var n=o.focusedItem;o.setFocusedItem(t),n!==o.focusedItem&&o.updateFocus()}}})));var a={parent:o};o.mnemonics=new Map,o.scrollableElement=o._register(new RS(r,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));var u=o.scrollableElement.getDomNode();return u.style.position="",o._register(io(u,Ho.MOUSE_UP,(function(e){e.preventDefault()}))),r.style.maxHeight=Math.max(10,window.innerHeight-t.getBoundingClientRect().top-30)+"px",o.push(n,{icon:!0,label:!0,isMenu:!0}),t.appendChild(o.scrollableElement.getDomNode()),o.scrollableElement.scanDomNode(),o.viewItems.filter((function(e){return!(e instanceof Pk)})).forEach((function(e,t,n){e.updatePositionInSet(t+1,n.length)})),o}return Ek(t,e),t.prototype.style=function(e){var t=this.getContainer(),n=e.foregroundColor?""+e.foregroundColor:"",i=e.backgroundColor?""+e.backgroundColor:"",o=e.borderColor?"1px solid "+e.borderColor:"",r=e.shadowColor?"0 2px 4px "+e.shadowColor:"";t.style.border=o,this.domNode.style.color=n,this.domNode.style.backgroundColor=i,t.style.boxShadow=r,this.viewItems&&this.viewItems.forEach((function(t){(t instanceof Ik||t instanceof Pk)&&t.style(e)}))},t.prototype.getContainer=function(){return this.scrollableElement.getDomNode()},Object.defineProperty(t.prototype,"onScroll",{get:function(){return this.scrollableElement.onScroll},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scrollOffset",{get:function(){return this.menuElement.scrollTop},enumerable:!0,configurable:!0}),t.prototype.focusItemByElement=function(e){var t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()},t.prototype.setFocusedItem=function(e){for(var t=0;t<this.actionsList.children.length;t++){var n=this.actionsList.children[t];if(e===n){this.focusedItem=t;break}}},t.prototype.updateFocus=function(t){e.prototype.updateFocus.call(this,t,!0),"undefined"!==typeof this.focusedItem&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})},t.prototype.doGetActionViewItem=function(e,t,n){if(e instanceof HD)return new Pk(t.context,e,{icon:!0});if(e instanceof Tk){var i=new Ak(e,e.entries,n,t);if(t.enableMnemonics){var o=i.getMnemonic();if(o&&i.isEnabled()){var r=[];this.mnemonics.has(o)&&(r=this.mnemonics.get(o)),r.push(i),this.mnemonics.set(o,r)}}return i}var s={enableMnemonics:t.enableMnemonics};if(t.getKeyBinding){var a=t.getKeyBinding(e);if(a){var u=a.getLabel();u&&(s.keybinding=u)}}i=new Ik(t.context,e,s);if(t.enableMnemonics){o=i.getMnemonic();if(o&&i.isEnabled()){r=[];this.mnemonics.has(o)&&(r=this.mnemonics.get(o)),r.push(i),this.mnemonics.set(o,r)}}return i},t}(UD),Ik=function(e){function t(t,n,i){void 0===i&&(i={});var o=this;if(i.isMenu=!0,o=e.call(this,n,n,i)||this,o.options=i,o.options.icon=void 0!==i.icon&&i.icon,o.options.label=void 0===i.label||i.label,o.cssClass="",o.options.label&&i.enableMnemonics){var r=o.getAction().label;if(r){var s=kk.exec(r);s&&(o.mnemonic=(s[1]?s[1]:s[3]).toLocaleLowerCase())}}return o.runOnceToEnableMouseUp=new mi((function(){o.element&&o._register(io(o.element,Ho.MOUSE_UP,(function(e){e.defaultPrevented||(zo.stop(e,!0),o.onClick(e))})))}),100),o._register(o.runOnceToEnableMouseUp),o}return Ek(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),this.element&&(this.container=t,this.item=Go(this.element,$o("a.action-menu-item")),this._action.id===HD.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",""+this.mnemonic)),this.check=Go(this.item,$o("span.menu-item-check.codicon.codicon-check")),this.check.setAttribute("role","none"),this.label=Go(this.item,$o("span.action-label")),this.options.label&&this.options.keybinding&&(Go(this.item,$o("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())},t.prototype.blur=function(){e.prototype.blur.call(this),this.applyStyle()},t.prototype.focus=function(){e.prototype.focus.call(this),this.item&&this.item.focus(),this.applyStyle()},t.prototype.updatePositionInSet=function(e,t){this.item&&(this.item.setAttribute("aria-posinset",""+e),this.item.setAttribute("aria-setsize",""+t))},t.prototype.updateLabel=function(){if(this.options.label){var e=this.getAction().label;if(e){var t=Rk(e);this.options.enableMnemonics||(e=t),this.label&&this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));var n=kk.exec(e);if(n){e=fr(e),Ok.lastIndex=0;var i=Ok.exec(e);while(i&&i[1])i=Ok.exec(e);i&&(e=e.substr(0,i.index)+'<u aria-hidden="true">'+i[3]+"</u>"+e.substr(i.index+i[0].length)),e=e.replace(/&amp;&amp;/g,"&amp;"),this.item&&this.item.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else e=e.replace(/&&/g,"&")}this.label&&(this.label.innerHTML=e.trim())}},t.prototype.updateTooltip=function(){var 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=r({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)},t.prototype.updateClass=function(){this.cssClass&&this.item&&eo(this.item,this.cssClass),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",$i(this.label,"icon"),this.cssClass&&Qi(this.label,this.cssClass),this.updateEnabled()):this.label&&Ji(this.label,"icon")},t.prototype.updateEnabled=function(){this.getAction().enabled?(this.element&&Ji(this.element,"disabled"),this.item&&(Ji(this.item,"disabled"),this.item.tabIndex=0)):(this.element&&$i(this.element,"disabled"),this.item&&($i(this.item,"disabled"),tr(this.item)))},t.prototype.updateChecked=function(){this.item&&(this.getAction().checked?($i(this.item,"checked"),this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked","true")):(Ji(this.item,"checked"),this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked","false")))},t.prototype.getMnemonic=function(){return this.mnemonic},t.prototype.applyStyle=function(){if(this.menuStyle){var e=this.element&&Xi(this.element,"focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,i=e&&this.menuStyle.selectionBorderColor?"thin solid "+this.menuStyle.selectionBorderColor:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=n?n.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=i)}},t.prototype.style=function(e){this.menuStyle=e,this.applyStyle()},t}(BD),Ak=function(e){function t(t,n,i,o){var r=e.call(this,t,t,o)||this;return r.submenuActions=n,r.parentData=i,r.submenuOptions=o,r.mysubmenu=null,r.submenuDisposables=r._register(new Te),r.mouseOver=!1,r.expandDirection=o&&void 0!==o.expandDirection?o.expandDirection:Dk.Right,r.showScheduler=new mi((function(){r.mouseOver&&(r.cleanupExistingSubmenu(!1),r.createSubmenu(!1))}),250),r.hideScheduler=new mi((function(){r.element&&!Oo(document.activeElement,r.element)&&r.parentData.submenu===r.mysubmenu&&(r.parentData.parent.focus(!1),r.cleanupExistingSubmenu(!0))}),750),r}return Ek(t,e),t.prototype.render=function(t){var n=this;e.prototype.render.call(this,t),this.element&&(this.item&&($i(this.item,"monaco-submenu-item"),this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=Go(this.item,$o("span.submenu-indicator.codicon.codicon-chevron-right")),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(io(this.element,Ho.KEY_UP,(function(e){var t=new Jn(e);(t.equals(17)||t.equals(3))&&(zo.stop(e,!0),n.createSubmenu(!0))}))),this._register(io(this.element,Ho.KEY_DOWN,(function(e){var t=new Jn(e);document.activeElement===n.item&&(t.equals(17)||t.equals(3))&&zo.stop(e,!0)}))),this._register(io(this.element,Ho.MOUSE_OVER,(function(e){n.mouseOver||(n.mouseOver=!0,n.showScheduler.schedule())}))),this._register(io(this.element,Ho.MOUSE_LEAVE,(function(e){n.mouseOver=!1}))),this._register(io(this.element,Ho.FOCUS_OUT,(function(e){n.element&&!Oo(document.activeElement,n.element)&&n.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((function(){n.parentData.parent.focus(!1),n.cleanupExistingSubmenu(!1)}))))},t.prototype.onClick=function(e){zo.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)},t.prototype.cleanupExistingSubmenu=function(e){this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)&&(this.parentData.submenu.dispose(),this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0))},t.prototype.createSubmenu=function(e){var t=this;if(void 0===e&&(e=!0),this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=Go(this.element,$o("div.monaco-submenu")),Qi(this.submenuContainer,"menubar-menu-items-holder","context-view");var n=getComputedStyle(this.parentData.parent.domNode),i=parseFloat(n.paddingTop||"0")||0;this.submenuContainer.style.top=this.element.offsetTop-this.parentData.parent.scrollOffset-i+"px",this.parentData.submenu=new Mk(this.submenuContainer,this.submenuActions,this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);var o=this.element.getBoundingClientRect(),r=this.submenuContainer.getBoundingClientRect();this.expandDirection===Dk.Right?window.innerWidth<=o.right+r.width?(this.submenuContainer.style.left="10px",this.submenuContainer.style.top=this.element.offsetTop-this.parentData.parent.scrollOffset+o.height+"px"):(this.submenuContainer.style.left=this.element.offsetWidth+"px",this.submenuContainer.style.top=this.element.offsetTop-this.parentData.parent.scrollOffset-i+"px"):this.expandDirection===Dk.Left&&(this.submenuContainer.style.right=this.element.offsetWidth+"px",this.submenuContainer.style.left="auto",this.submenuContainer.style.top=this.element.offsetTop-this.parentData.parent.scrollOffset-i+"px"),this.submenuDisposables.add(io(this.submenuContainer,Ho.KEY_UP,(function(e){var n=new Jn(e);n.equals(15)&&(zo.stop(e,!0),t.parentData.parent.focus(),t.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add(io(this.submenuContainer,Ho.KEY_DOWN,(function(e){var t=new Jn(e);t.equals(15)&&zo.stop(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((function(){t.parentData.parent.focus(),t.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}},t.prototype.updateAriaExpanded=function(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))},t.prototype.applyStyle=function(){if(e.prototype.applyStyle.call(this),this.menuStyle){var t=this.element&&Xi(this.element,"focused"),n=t&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=n?""+n:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)},t}(Ik),Pk=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ek(t,e),t.prototype.style=function(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?""+e.separatorColor:"")},t}(zD);function Rk(e){var t=kk,n=t.exec(e);if(!n)return e;var i=!n[1];return e.replace(t,i?"$2$3":"").trim()}var Fk=function(){return Fk=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Fk.apply(this,arguments)};function Wk(e,t){var n=Object.create(null);for(var i in t){var o=t[i];o&&(n[i]=$b(o,e))}return n}function Vk(e,t,n){function i(i){var o=Wk(e.getTheme(),t);"function"===typeof n?n(o):n.style(o)}return i(e.getTheme()),e.onThemeChange(i)}function Bk(e,t,n){return Vk(t,Fk(Fk({},Hk),n||{}),e)}var Hk={listFocusBackground:Sb,listFocusForeground:Lb,listActiveSelectionBackground:Gb(Nb,.1),listActiveSelectionForeground:Db,listFocusAndSelectionBackground:Nb,listFocusAndSelectionForeground:Db,listInactiveSelectionBackground:Eb,listInactiveSelectionForeground:xb,listInactiveFocusBackground:kb,listHoverBackground:Ob,listHoverForeground:Tb,listDropBackground:Mb,listFocusOutline:jy,listSelectionOutline:jy,listHoverOutline:jy,listFilterWidgetBackground:Ib,listFilterWidgetOutline:Ab,listFilterWidgetNoMatchesOutline:Pb,listMatchesShadow:Uy,treeIndentGuidesStroke:Rb},zk={shadowColor:Uy,borderColor:Fb,foregroundColor:Wb,backgroundColor:Vb,selectionForegroundColor:Bb,selectionBackgroundColor:Hb,selectionBorderColor:zb,separatorColor:jb};function jk(e,t,n){return Vk(t,Fk(Fk({},zk),n),e)}var Uk,Kk=function(){function e(e,t,n,i,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=n,this.keybindingService=i,this.themeService=o,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}return e.prototype.configure=function(e){this.options=e},e.prototype.showContextMenu=function(e){var t,n=this,i=e.getActions();i.length&&(this.focusToReturn=document.activeElement,this.contextViewService.showContextView({getAnchor:function(){return e.getAnchor()},canRelayout:!1,anchorAlignment:e.anchorAlignment,render:function(o){var r=e.getMenuClassName?e.getMenuClassName():"";r&&(o.className+=" "+r),n.options.blockMouse&&(n.block=o.appendChild($o(".context-view-block")));var s=new Te,a=e.actionRunner||new eg;return a.onDidBeforeRun(n.onActionRun,n,s),a.onDidRun(n.onDidActionRun,n,s),t=new Mk(o,i,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:a,getKeyBinding:e.getKeyBinding?e.getKeyBinding:function(e){return n.keybindingService.lookupKeybinding(e.id)}}),s.add(jk(t,n.themeService)),t.onDidCancel((function(){return n.contextViewService.hideContextView(!0)}),null,s),t.onDidBlur((function(){return n.contextViewService.hideContextView(!0)}),null,s),Kn(window,Ho.BLUR)((function(){n.contextViewService.hideContextView(!0)}),null,s),Kn(window,Ho.MOUSE_DOWN)((function(e){if(!e.defaultPrevented){var t=new si(e),i=t.target;if(!t.rightButton){while(i){if(i===o)return;i=i.parentElement}n.contextViewService.hideContextView(!0)}}}),null,s),xe(s,t)},focus:function(){t&&t.focus(!!e.autoSelectFirstItem)},onHide:function(t){e.onHide&&e.onHide(!!t),n.block&&(Ki(n.block),n.block=null),n.focusToReturn&&n.focusToReturn.focus()}}))},e.prototype.onActionRun=function(e){this.telemetryService&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()},e.prototype.onDidActionRun=function(e){e.error&&this.notificationService&&this.notificationService.error(e.error)},e}(),qk=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Gk=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Yk=function(e,t){return function(n,i){t(n,i,e)}},Zk=function(e){function t(t,n,i,o,r){var s=e.call(this)||this;return s._onDidContextMenu=s._register(new qe),s.contextMenuHandler=new Kk(i,t,n,o,r),s}return qk(t,e),t.prototype.configure=function(e){this.contextMenuHandler.configure(e)},t.prototype.showContextMenu=function(e){this.contextMenuHandler.showContextMenu(e),this._onDidContextMenu.fire()},t=Gk([Yk(0,dg),Yk(1,np),Yk(2,JD),Yk(3,NE),Yk(4,tm)],t),t}(Me);n("4d3d");(function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};var n=Math.max(e.start,t.start),i=Math.min(e.end,t.end);return i-n<=0?{start:0,end:0}:{start:n,end:i}}function n(e){return e.end-e.start<=0}function i(e,i){return!n(t(e,i))}function o(e,t){var i=[],o={start:e.start,end:Math.min(t.start,e.end)},r={start:Math.max(t.end,e.start),end:e.end};return n(o)||i.push(o),n(r)||i.push(r),i}e.intersect=t,e.isEmpty=n,e.intersects=i,e.relativeComplement=o})(Uk||(Uk={}));var Xk=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function $k(e,t,n){var i=n.offset+n.size;return 0===n.position?t<=e-i?i:t<=n.offset?n.offset-t:Math.max(e-t,0):t<=n.offset?n.offset-t:t<=e-i?i:0}var Qk=function(e){function t(t){var n=e.call(this)||this;return n.container=null,n.delegate=null,n.toDisposeOnClean=Me.None,n.toDisposeOnSetContainer=Me.None,n.view=$o(".context-view"),Jo(n.view),n.setContainer(t),n._register(ke((function(){return n.setContainer(null)}))),n}return Xk(t,e),t.prototype.setContainer=function(e){var n=this;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.container.removeChild(this.view),this.container=null),e){this.container=e,this.container.appendChild(this.view);var i=new Te;t.BUBBLE_UP_EVENTS.forEach((function(e){i.add(so(n.container,e,(function(e){n.onDOMEvent(e,!1)})))})),t.BUBBLE_DOWN_EVENTS.forEach((function(e){i.add(so(n.container,e,(function(e){n.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=i}},t.prototype.show=function(e){this.isVisible()&&this.hide(),Ui(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",Qo(this.view),this.toDisposeOnClean=e.render(this.view)||Me.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()},t.prototype.layout=function(){this.isVisible()&&(!1!==this.delegate.canRelayout||s["c"]&&Bi.pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())},t.prototype.doLayout=function(){if(this.isVisible()){var e,t=this.delegate.getAnchor();if(Bo(t)){var n=Lo(t);e={top:n.top,left:n.left,width:n.width,height:n.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};var i,o=Do(this.view),r=ko(this.view),s=this.delegate.anchorPosition||0,a=this.delegate.anchorAlignment||0,u={offset:e.top-window.pageYOffset,size:e.height,position:0===s?0:1};i=0===a?{offset:e.left,size:0,position:0}:{offset:e.left+e.width,size:0,position:1};var l=$k(window.innerHeight,r,u)+window.pageYOffset;Uk.intersects({start:l,end:l+r},{start:u.offset,end:u.offset+u.size})&&(i.size=e.width,1===a&&(i.offset=e.left));var c=$k(window.innerWidth,o,i);eo(this.view,"top","bottom","left","right"),$i(this.view,0===s?"bottom":"top"),$i(this.view,0===a?"left":"right");var h=Lo(this.container);this.view.style.top=l-h.top+"px",this.view.style.left=c-h.left+"px",this.view.style.width="initial"}},t.prototype.hide=function(e){var t=this.delegate;this.delegate=null,(null===t||void 0===t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),Jo(this.view)},t.prototype.isVisible=function(){return!!this.delegate},t.prototype.onDOMEvent=function(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!Oo(e.target,this.container)&&this.hide())},t.prototype.dispose=function(){this.hide(),e.prototype.dispose.call(this)},t.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],t.BUBBLE_DOWN_EVENTS=["click"],t}(Me),Jk=Nn("layoutService"),eO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),tO=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},nO=function(e,t){return function(n,i){t(n,i,e)}},iO=function(e){function t(t){var n=e.call(this)||this;return n.layoutService=t,n.contextView=n._register(new Qk(t.container)),n.layout(),n._register(t.onLayout((function(){return n.layout()}))),n}return eO(t,e),t.prototype.setContainer=function(e){this.contextView.setContainer(e)},t.prototype.showContextView=function(e){this.contextView.show(e)},t.prototype.layout=function(){this.contextView.layout()},t.prototype.hideContextView=function(e){this.contextView.hide(e)},t=tO([nO(0,Jk)],t),t}(Me),oO=Nn("dialogService");function rO(e){return{data:e,incoming:Object.create(null),outgoing:Object.create(null)}}var sO,aO=function(){function e(e){this._hashFn=e,this._nodes=Object.create(null)}return e.prototype.roots=function(){var e=[];return Pd(this._nodes,(function(t){Hs(t.value.outgoing)&&e.push(t.value)})),e},e.prototype.insertEdge=function(e,t){var n=this.lookupOrInsertNode(e),i=this.lookupOrInsertNode(t);n.outgoing[this._hashFn(t)]=i,i.incoming[this._hashFn(e)]=n},e.prototype.removeNode=function(e){var t=this._hashFn(e);delete this._nodes[t],Pd(this._nodes,(function(e){delete e.value.outgoing[t],delete e.value.incoming[t]}))},e.prototype.lookupOrInsertNode=function(e){var t=this._hashFn(e),n=this._nodes[t];return n||(n=rO(e),this._nodes[t]=n),n},e.prototype.isEmpty=function(){for(var e in this._nodes)return!1;return!0},e.prototype.toString=function(){var e=[];return Pd(this._nodes,(function(t){e.push(t.key+", (incoming)["+Object.keys(t.value.incoming).join(", ")+"], (outgoing)["+Object.keys(t.value.outgoing).join(",")+"]")})),e.join("\n")},e}(),uO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),lO=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i},cO=!1,hO="function"===typeof Proxy,dO=function(e){function t(t){var n=e.call(this,"cyclic dependency between services")||this;return n.message=t.toString(),n}return uO(t,e),t}(Error),fO=function(){function e(e,t,n){void 0===e&&(e=new BN),void 0===t&&(t=!1),this._services=e,this._strict=t,this._parent=n,this._services.set(Sn,this)}return e.prototype.createChild=function(t){return new e(t,this._strict,this)},e.prototype.invokeFunction=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=pO.traceInvocation(e),r=!1;try{var s={get:function(e,n){if(r)throw Ce("service accessor is only valid during the invocation of its target method");var i=t._getOrCreateServiceInstance(e,o);if(!i&&n!==Dn)throw new Error("[invokeFunction] unknown service '"+e+"'");return i}};return e.apply(void 0,lO([s],n))}finally{r=!0,o.stop()}},e.prototype.createInstance=function(e){for(var t,n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return e instanceof DD?(t=pO.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(i),t)):(t=pO.traceCreation(e),n=this._createInstance(e,i,t)),t.stop(),n},e.prototype._createInstance=function(e,t,n){void 0===t&&(t=[]);for(var i=wn.getServiceDependencies(e).sort((function(e,t){return e.index-t.index})),o=[],r=0,s=i;r<s.length;r++){var a=s[r],u=this._getOrCreateServiceInstance(a.id,n);if(!u&&this._strict&&!a.optional)throw new Error("[createInstance] "+e.name+" depends on UNKNOWN service "+a.id+".");o.push(u)}var l=i.length>0?i[0].index:t.length;if(t.length!==l){console.warn("[createInstance] First service dependency of "+e.name+" at position "+(l+1)+" conflicts with "+t.length+" static arguments");var c=l-t.length;t=c>0?t.concat(new Array(c)):t.slice(0,l)}return new(e.bind.apply(e,lO([void 0],lO(t,o))))},e.prototype._setServiceInstance=function(e,t){if(this._services.get(e)instanceof DD)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}},e.prototype._getServiceInstanceOrDescriptor=function(e){var t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t},e.prototype._getOrCreateServiceInstance=function(e,t){var n=this._getServiceInstanceOrDescriptor(e);return n instanceof DD?this._createAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)},e.prototype._createAndCacheServiceInstance=function(e,t,n){var i=new aO((function(e){return e.id.toString()})),o=0,r=[{id:e,desc:t,_trace:n}];while(r.length){var s=r.pop();if(i.lookupOrInsertNode(s),o++>150)throw new dO(i);for(var a=0,u=wn.getServiceDependencies(s.desc.ctor);a<u.length;a++){var l=u[a],c=this._getServiceInstanceOrDescriptor(l.id);if(c||l.optional||console.warn("[createInstance] "+e+" depends on "+l.id+" which is NOT registered."),c instanceof DD){var h={id:l.id,desc:c,_trace:s._trace.branch(l.id,!0)};i.insertEdge(s,h),r.push(h)}}}while(1){var d=i.roots();if(0===d.length){if(!i.isEmpty())throw new dO(i);break}for(var f=0,p=d;f<p.length;f++){var g=p[f].data,m=this._createServiceInstanceWithOwner(g.id,g.desc.ctor,g.desc.staticArguments,g.desc.supportsDelayedInstantiation,g._trace);this._setServiceInstance(g.id,m),i.removeNode(g)}}return this._getServiceInstanceOrDescriptor(e)},e.prototype._createServiceInstanceWithOwner=function(e,t,n,i,o){if(void 0===n&&(n=[]),this._services.get(e)instanceof DD)return this._createServiceInstance(t,n,i,o);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,i,o);throw new Error("illegalState - creating UNKNOWN service instance "+t.name)},e.prototype._createServiceInstance=function(e,t,n,i){var o=this;if(void 0===t&&(t=[]),n&&hO){var r=new _i((function(){return o._createInstance(e,t,i)}));return new Proxy(Object.create(null),{get:function(e,t){if(t in e)return e[t];var n=r.getValue(),i=n[t];return"function"!==typeof i?i:(i=i.bind(n),e[t]=i,i)},set:function(e,t,n){return r.getValue()[t]=n,!0}})}return this._createInstance(e,t,i)},e}(),pO=function(){function e(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}return e.traceInvocation=function(t){return cO?new e(1,t.name||t.toString().substring(0,42).replace(/\n/g,"")):e._None},e.traceCreation=function(t){return cO?new e(0,t.name):e._None},e.prototype.branch=function(t,n){var i=new e(2,t.toString());return this._dep.push([t,n,i]),i},e.prototype.stop=function(){var t=Date.now()-this._start;e._totals+=t;var n=!1;function i(e,t){for(var o=[],r=new Array(e+1).join("\t"),s=0,a=t._dep;s<a.length;s++){var u=a[s],l=u[0],c=u[1],h=u[2];if(c&&h){n=!0,o.push(r+"CREATES -> "+l);var d=i(e+1,h);d&&o.push(d)}else o.push(r+"uses -> "+l)}return o.join("\n")}var o=[(0===this.type?"CREATE":"CALL")+" "+this.name,""+i(1,this),"DONE, took "+t.toFixed(2)+"ms (grand total "+e._totals.toFixed(2)+"ms)"];(t>2||n)&&console.log(o.join("\n"))},e._None=new(function(e){function t(){return e.call(this,-1,null)||this}return uO(t,e),t.prototype.stop=function(){},t.prototype.branch=function(){return this},t}(e)),e._totals=0,e}(),gO="label",mO=Nn(gO),vO=(n("e2b8"),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}());(function(e){e["TREE"]="tree",e["FORM"]="form"})(sO||(sO={}));var _O=function(e){function t(t,n){return e.call(this,"ListError ["+t+"] "+n)||this}return vO(t,e),t}(Error);function yO(e,t){for(var n=[],i=0,o=t;i<o.length;i++){var r=o[i];if(!(e.start>=r.range.end)){if(e.end<r.range.start)break;var s=Uk.intersect(e,r.range);Uk.isEmpty(s)||n.push({range:s,size:r.size})}}return n}function bO(e,t){var n=e.start,i=e.end;return{start:n+t,end:i+t}}function CO(e){for(var t=[],n=null,i=0,o=e;i<o.length;i++){var r=o[i],s=r.range.start,a=r.range.end,u=r.size;n&&u===n.size?n.range.end=a:(n={range:{start:s,end:a},size:u},t.push(n))}return t}function wO(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return CO(e.reduce((function(e,t){return e.concat(t)}),[]))}var SO=function(){function e(){this.groups=[],this._size=0}return e.prototype.splice=function(e,t,n){void 0===n&&(n=[]);var i=n.length-t,o=yO({start:0,end:e},this.groups),r=yO({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map((function(e){return{range:bO(e.range,i),size:e.size}})),s=n.map((function(t,n){return{range:{start:e+n,end:e+n+1},size:t.size}}));this.groups=wO(o,s,r),this._size=this.groups.reduce((function(e,t){return e+t.size*(t.range.end-t.range.start)}),0)},Object.defineProperty(e.prototype,"count",{get:function(){var e=this.groups.length;return e?this.groups[e-1].range.end:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.indexAt=function(e){if(e<0)return-1;for(var t=0,n=0,i=0,o=this.groups;i<o.length;i++){var r=o[i],s=r.range.end-r.range.start,a=n+s*r.size;if(e<a)return t+Math.floor((e-n)/r.size);t+=s,n=a}return t},e.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.count)},e.prototype.positionAt=function(e){if(e<0)return-1;for(var t=0,n=0,i=0,o=this.groups;i<o.length;i++){var r=o[i],s=r.range.end-r.range.start,a=n+s;if(e<a)return t+(e-n)*r.size;t+=s*r.size,n=a}return-1},e}();function LO(e){try{e.parentElement&&e.parentElement.removeChild(e)}catch(t){}}var NO=function(){function e(e){this.renderers=e,this.cache=new Map}return e.prototype.alloc=function(e){var t=this.getTemplateCache(e).pop();if(!t){var n=$o(".monaco-list-row"),i=this.getRenderer(e),o=i.renderTemplate(n);t={domNode:n,templateId:e,templateData:o}}return t},e.prototype.release=function(e){e&&this.releaseRow(e)},e.prototype.releaseRow=function(e){var t=e.domNode,n=e.templateId;t&&(Ji(t,"scrolling"),LO(t));var i=this.getTemplateCache(n);i.push(e)},e.prototype.getTemplateCache=function(e){var t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t},e.prototype.dispose=function(){var e=this;this.cache.forEach((function(t,n){for(var i=0,o=t;i<o.length;i++){var r=o[i],s=e.getRenderer(n);s.disposeTemplate(r.templateData),r.domNode=null,r.templateData=null}})),this.cache.clear()},e.prototype.getRenderer=function(e){var t=this.renderers.get(e);if(!t)throw new Error("No renderer found for "+e);return t},e}(),DO=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},EO=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i},xO={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:function(e){return[e]},getDragURI:function(){return null},onDragStart:function(){},onDragOver:function(){return!1},drop:function(){}},horizontalScrolling:!1},kO=function(){function e(e){this.elements=e}return e.prototype.update=function(){},e.prototype.getData=function(){return this.elements},e}(),OO=function(){function e(e){this.elements=e}return e.prototype.update=function(){},e.prototype.getData=function(){return this.elements},e}(),TO=function(){function e(){this.types=[],this.files=[]}return e.prototype.update=function(e){var t;if(e.types&&(t=this.types).splice.apply(t,EO([0,this.types.length],e.types)),e.files){this.files.splice(0,this.files.length);for(var n=0;n<e.files.length;n++){var i=e.files.item(n);i&&(i.size||i.type)&&this.files.push(i)}}},e.prototype.getData=function(){return{types:this.types,files:this.files}},e}();function MO(e,t){return Array.isArray(e)&&Array.isArray(t)?Ci(e,t):e===t}var IO=function(){function e(t,n,i,o){var r=this;if(void 0===o&&(o=xO),this.virtualDelegate=n,this.domId="list_id_"+ ++e.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new ci(50),this.splicing=!1,this.dragOverAnimationStopDisposable=Me.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=Me.None,this.onDragLeaveTimeout=Me.None,this.disposables=new Te,this._onDidChangeContentHeight=new qe,o.horizontalScrolling&&o.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new SO;for(var s=0,a=i;s<a.length;s++){var u=a[s];this.renderers.set(u.templateId,u)}this.cache=this.disposables.add(new NO(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",$i(this.domNode,this.domId),this.domNode.tabIndex=0,to(this.domNode,"mouse-support","boolean"!==typeof o.mouseSupport||o.mouseSupport),this.horizontalScrolling=Ea(o,(function(e){return e.horizontalScrolling}),xO.horizontalScrolling),to(this.domNode,"horizontal-scrolling",this.horizontalScrolling),this.additionalScrollHeight="undefined"===typeof o.additionalScrollHeight?0:o.additionalScrollHeight,this.ariaProvider=o.ariaProvider||{getSetSize:function(e,t,n){return n},getPosInSet:function(e,t){return t+1}},this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.disposables.add(kg.addTarget(this.rowsContainer)),this.scrollableElement=this.disposables.add(new AS(this.rowsContainer,{alwaysConsumeMouseWheel:!0,horizontal:this.horizontalScrolling?1:2,vertical:Ea(o,(function(e){return e.verticalScrollMode}),xO.verticalScrollMode),useShadows:Ea(o,(function(e){return e.useShadows}),xO.useShadows)})),this.domNode.appendChild(this.scrollableElement.getDomNode()),t.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),Kn(this.rowsContainer,Dg.Change)(this.onTouchChange,this,this.disposables),Kn(this.scrollableElement.getDomNode(),"scroll")((function(e){return e.target.scrollTop=0}),null,this.disposables),We.map(Kn(this.domNode,"dragover"),(function(e){return r.toDragEvent(e)}))(this.onDragOver,this,this.disposables),We.map(Kn(this.domNode,"drop"),(function(e){return r.toDragEvent(e)}))(this.onDrop,this,this.disposables),Kn(this.domNode,"dragleave")(this.onDragLeave,this,this.disposables),Kn(window,"dragend")(this.onDragEnd,this,this.disposables),this.setRowLineHeight=Ea(o,(function(e){return e.setRowLineHeight}),xO.setRowLineHeight),this.supportDynamicHeights=Ea(o,(function(e){return e.supportDynamicHeights}),xO.supportDynamicHeights),this.dnd=Ea(o,(function(e){return e.dnd}),xO.dnd),this.layout()}return Object.defineProperty(e.prototype,"contentHeight",{get:function(){return this.rangeMap.size},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){if(void 0===n&&(n=[]),this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}},e.prototype._splice=function(e,t,n){var i,o=this;void 0===n&&(n=[]);for(var r=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},a=Uk.intersect(r,s),u=a.start;u<a.end;u++)this.removeItemFromDOM(u);var l,c={start:e+t,end:this.items.length},h=Uk.intersect(c,r),d=Uk.relativeComplement(c,r),f=n.map((function(e){return{id:String(o.itemId++),element:e,templateId:o.virtualDelegate.getTemplateId(e),size:o.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!o.virtualDelegate.hasDynamicHeight&&o.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:Me.None}}));0===e&&t>=this.items.length?(this.rangeMap=new SO,this.rangeMap.splice(0,0,f),this.items=f,l=[]):(this.rangeMap.splice(e,t,f),l=(i=this.items).splice.apply(i,EO([e,t],f)));var p=n.length-t,g=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),m=bO(h,p),v=Uk.intersect(g,m);for(u=v.start;u<v.end;u++)this.updateItemInDOM(this.items[u],u);for(var _=Uk.relativeComplement(m,g),y=0,b=_;y<b.length;y++){var C=b[y];for(u=C.start;u<C.end;u++)this.removeItemFromDOM(u)}for(var w=d.map((function(e){return bO(e,p)})),S={start:e,end:e+n.length},L=EO([S],w).map((function(e){return Uk.intersect(g,e)})),N=this.getNextToLastElement(L),D=0,E=L;D<E.length;D++)for(C=E[D],u=C.start;u<C.end;u++)this.insertItemInDOM(u,N);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),l.map((function(e){return e.element}))},e.prototype.eventuallyUpdateScrollDimensions=function(){var e=this;this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=this._scrollHeight+"px",this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=co((function(){e.scrollableElement.setScrollDimensions({scrollHeight:e.scrollHeight}),e.updateScrollWidth(),e.scrollableElementUpdateDisposable=null})))},e.prototype.eventuallyUpdateScrollWidth=function(){var e=this;this.horizontalScrolling&&this.scrollableElementWidthDelayer.trigger((function(){return e.updateScrollWidth()}))},e.prototype.updateScrollWidth=function(){if(this.horizontalScrolling){0===this.items.length&&this.scrollableElement.setScrollDimensions({scrollWidth:0});for(var e=0,t=0,n=this.items;t<n.length;t++){var i=n[t];"undefined"!==typeof i.width&&(e=Math.max(e,i.width))}this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e+10})}},e.prototype.rerender=function(){if(this.supportDynamicHeights){for(var e=0,t=this.items;e<t.length;e++){var n=t[e];n.lastDynamicHeightWidth=void 0}this._rerender(this.lastRenderTop,this.lastRenderHeight)}},Object.defineProperty(e.prototype,"length",{get:function(){return this.items.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderHeight",{get:function(){var e=this.scrollableElement.getScrollDimensions();return e.height},enumerable:!0,configurable:!0}),e.prototype.element=function(e){return this.items[e].element},e.prototype.domElement=function(e){var t=this.items[e].row;return t&&t.domNode},e.prototype.elementHeight=function(e){return this.items[e].size},e.prototype.elementTop=function(e){return this.rangeMap.positionAt(e)},e.prototype.indexAt=function(e){return this.rangeMap.indexAt(e)},e.prototype.indexAfter=function(e){return this.rangeMap.indexAfter(e)},e.prototype.layout=function(e,t){var n={height:"number"===typeof e?e:xo(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,n.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(n),"undefined"!==typeof t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"===typeof t?t:Eo(this.domNode)}))},e.prototype.render=function(e,t,n,i){for(var o=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r=this.getRenderRange(e,t),s=Uk.relativeComplement(r,o),a=Uk.relativeComplement(o,r),u=this.getNextToLastElement(s),l=0,c=s;l<c.length;l++)for(var h=c[l],d=h.start;d<h.end;d++)this.insertItemInDOM(d,u);for(var f=0,p=a;f<p.length;f++)for(h=p[f],d=h.start;d<h.end;d++)this.removeItemFromDOM(d);this.rowsContainer.style.left="-"+n+"px",this.rowsContainer.style.top="-"+e+"px",this.horizontalScrolling&&(this.rowsContainer.style.width=Math.max(i,this.renderWidth)+"px"),this.lastRenderTop=e,this.lastRenderHeight=t},e.prototype.insertItemInDOM=function(e,t){var n=this,i=this.items[e];if(!i.row){i.row=this.cache.alloc(i.templateId);var o=this.ariaProvider.getRole?this.ariaProvider.getRole(i.element):"treeitem";i.row.domNode.setAttribute("role",o);var r=this.ariaProvider.isChecked?this.ariaProvider.isChecked(i.element):void 0;"undefined"!==typeof r&&i.row.domNode.setAttribute("aria-checked",String(r))}i.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(i.row.domNode,t):this.rowsContainer.appendChild(i.row.domNode)),this.updateItemInDOM(i,e);var s=this.renderers.get(i.templateId);if(!s)throw new Error("No renderer found for template id "+i.templateId);s&&s.renderElement(i.element,e,i.row.templateData,i.size);var a=this.dnd.getDragURI(i.element);if(i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!a,a){var u=Kn(i.row.domNode,"dragstart");i.dragStartDisposable=u((function(e){return n.onDragStart(i.element,a,e)}))}this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())},e.prototype.measureItemWidth=function(e){if(e.row&&e.row.domNode){e.row.domNode.style.width=Fn?"-moz-fit-content":"fit-content",e.width=Eo(e.row.domNode);var 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=""}},e.prototype.updateItemInDOM=function(e,t){e.row.domNode.style.top=this.elementTop(t)+"px",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("aria-setsize",String(this.ariaProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.ariaProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),to(e.row.domNode,"drop-target",e.dropTarget)},e.prototype.removeItemFromDOM=function(e){var t=this.items[e];t.dragStartDisposable.dispose();var n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null,this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()},e.prototype.getScrollTop=function(){var e=this.scrollableElement.getScrollPosition();return e.scrollTop},e.prototype.setScrollTop=function(e){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e})},Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.getScrollTop()},set:function(e){this.setScrollTop(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollHeight",{get:function(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseClick",{get:function(){var e=this;return We.map(Kn(this.domNode,"click"),(function(t){return e.toMouseEvent(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDblClick",{get:function(){var e=this;return We.map(Kn(this.domNode,"dblclick"),(function(t){return e.toMouseEvent(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseMiddleClick",{get:function(){var e=this;return We.filter(We.map(Kn(this.domNode,"auxclick"),(function(t){return e.toMouseEvent(t)})),(function(e){return 1===e.browserEvent.button}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDown",{get:function(){var e=this;return We.map(Kn(this.domNode,"mousedown"),(function(t){return e.toMouseEvent(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this;return We.map(Kn(this.domNode,"contextmenu"),(function(t){return e.toMouseEvent(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTouchStart",{get:function(){var e=this;return We.map(Kn(this.domNode,"touchstart"),(function(t){return e.toTouchEvent(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTap",{get:function(){var e=this;return We.map(Kn(this.rowsContainer,Dg.Tap),(function(t){return e.toGestureEvent(t)}))},enumerable:!0,configurable:!0}),e.prototype.toMouseEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target||null),n="undefined"===typeof t?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}},e.prototype.toTouchEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target||null),n="undefined"===typeof t?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}},e.prototype.toGestureEvent=function(e){var t=this.getItemIndexFromEventTarget(e.initialTarget||null),n="undefined"===typeof t?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}},e.prototype.toDragEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target||null),n="undefined"===typeof t?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}},e.prototype.onScroll=function(e){try{this.render(e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height)}catch(t){throw console.error("Got bad scroll event:",e),t}},e.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},e.prototype.onDragStart=function(e,t,n){if(n.dataTransfer){var i=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(RD.RESOURCES,JSON.stringify([t])),n.dataTransfer.setDragImage){var o=void 0;this.dnd.getDragLabel&&(o=this.dnd.getDragLabel(i,n)),"undefined"===typeof o&&(o=String(i.length));var r=$o(".monaco-drag-image");r.textContent=o,document.body.appendChild(r),n.dataTransfer.setDragImage(r,-10,-10),setTimeout((function(){return document.body.removeChild(r)}),0)}this.currentDragData=new kO(i),WD.CurrentDragAndDropData=new OO(i),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,n)}},e.prototype.onDragOver=function(e){var t=this;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),WD.CurrentDragAndDropData&&"vscode-ui"===WD.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(WD.CurrentDragAndDropData)this.currentDragData=WD.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new TO}var n,i=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"===typeof i?i:i.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;if(e.browserEvent.dataTransfer.dropEffect="boolean"!==typeof i&&0===i.effect?"copy":"move",n="boolean"!==typeof i&&i.feedback?i.feedback:"undefined"===typeof e.index?[-1]:[e.index],n=ki(n).filter((function(e){return e>=-1&&e<t.length})).sort((function(e,t){return e-t})),n=-1===n[0]?[-1]:n,MO(this.currentDragFeedback,n))return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),-1===n[0])$i(this.domNode,"drop-target"),$i(this.rowsContainer,"drop-target"),this.currentDragFeedbackDisposable=ke((function(){Ji(t.domNode,"drop-target"),Ji(t.rowsContainer,"drop-target")}));else{for(var o=0,r=n;o<r.length;o++){var s=r[o],a=this.items[s];a.dropTarget=!0,a.row&&a.row.domNode&&$i(a.row.domNode,"drop-target")}this.currentDragFeedbackDisposable=ke((function(){for(var e=0,i=n;e<i.length;e++){var o=i[e],r=t.items[o];r.dropTarget=!1,r.row&&r.row.domNode&&Ji(r.row.domNode,"drop-target")}}))}return!0},e.prototype.onDragLeave=function(){var e=this;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=di((function(){return e.clearDragOverFeedback()}),100)},e.prototype.onDrop=function(e){if(this.canDrop){var t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,WD.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))}},e.prototype.onDragEnd=function(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,WD.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)},e.prototype.clearDragOverFeedback=function(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=Me.None},e.prototype.setupDragAndDropScrollTopAnimation=function(e){var t=this;if(!this.dragOverAnimationDisposable){var n=So(this.domNode).top;this.dragOverAnimationDisposable=rr(this.animateDragAndDropScrollTop.bind(this,n))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=di((function(){t.dragOverAnimationDisposable&&(t.dragOverAnimationDisposable.dispose(),t.dragOverAnimationDisposable=void 0)}),1e3),this.dragOverMouseY=e.pageY},e.prototype.animateDragAndDropScrollTop=function(e){if(void 0!==this.dragOverMouseY){var t=this.dragOverMouseY-e,n=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}},e.prototype.teardownDragAndDropScrollTopAnimation=function(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},e.prototype.getItemIndexFromEventTarget=function(e){var t=e;while(t instanceof HTMLElement&&t!==this.rowsContainer){var n=t.getAttribute("data-index");if(n){var i=Number(n);if(!isNaN(i))return i}t=t.parentElement}},e.prototype.getRenderRange=function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}},e.prototype._rerender=function(e,t){var n,i,o=this.getRenderRange(e,t);e===this.elementTop(o.start)?(n=o.start,i=0):o.end-o.start>1&&(n=o.start+1,i=this.elementTop(n)-e);var r=0;while(1){for(var s=this.getRenderRange(e,t),a=!1,u=s.start;u<s.end;u++){var l=this.probeDynamicHeight(u);0!==l&&this.rangeMap.splice(u,1,[this.items[u]]),r+=l,a=a||0!==l}if(!a){0!==r&&this.eventuallyUpdateScrollDimensions();for(var c=Uk.relativeComplement(o,s),h=0,d=c;h<d.length;h++){var f=d[h];for(u=f.start;u<f.end;u++)this.items[u].row&&this.removeItemFromDOM(u)}for(var p=Uk.relativeComplement(s,o),g=0,m=p;g<m.length;g++)for(f=m[g],u=f.start;u<f.end;u++){var v=u+1,_=v<this.items.length?this.items[v].row:null,y=_?_.domNode:null;this.insertItemInDOM(u,y)}for(u=s.start;u<s.end;u++)this.items[u].row&&this.updateItemInDOM(this.items[u],u);return"number"===typeof n&&(this.scrollTop=this.elementTop(n)-i),void this._onDidChangeContentHeight.fire(this.contentHeight)}}},e.prototype.probeDynamicHeight=function(e){var t=this.items[e];if(!t.hasDynamicHeight||t.lastDynamicHeightWidth===this.renderWidth)return 0;var n=t.size,i=this.cache.alloc(t.templateId);i.domNode.style.height="",this.rowsContainer.appendChild(i.domNode);var o=this.renderers.get(t.templateId);return o&&(o.renderElement(t.element,e,i.templateData,void 0),o.disposeElement&&o.disposeElement(t.element,e,i.templateData,void 0)),t.size=i.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(t.element,t.size),t.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(i.domNode),this.cache.release(i),t.size-n},e.prototype.getNextToLastElement=function(e){var t=e[e.length-1];if(!t)return null;var n=this.items[t.end];return n&&n.row?n.row.domNode:null},e.prototype.getElementDomId=function(e){return this.domId+"_"+e},e.prototype.dispose=function(){if(this.items){for(var e=0,t=this.items;e<t.length;e++){var n=t[e];if(n.row){var i=this.renderers.get(n.row.templateId);i&&i.disposeTemplate(n.row.templateData)}}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),Ee(this.disposables)},e.InstanceCount=0,DO([Ng],e.prototype,"onMouseClick",null),DO([Ng],e.prototype,"onMouseDblClick",null),DO([Ng],e.prototype,"onMouseMiddleClick",null),DO([Ng],e.prototype,"onMouseDown",null),DO([Ng],e.prototype,"onContextMenu",null),DO([Ng],e.prototype,"onTouchStart",null),DO([Ng],e.prototype,"onTap",null),e}(),AO=function(){function e(e){this.spliceables=e}return e.prototype.splice=function(e,t,n){this.spliceables.forEach((function(i){return i.splice(e,t,n)}))},e}();function PO(e,t,n){return Math.min(Math.max(e,t),n)}function RO(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n){for(var i=0,o=e.length;i<o;i++){var r=e[i](t,n);if(r)return r}return null}}var FO=WO.bind(void 0,!0);function WO(e,t,n){return!n||n.length<t.length?null:(i=e?xr(n,t):0===n.indexOf(t),i?t.length>0?[{start:0,end:t.length}]:[]:null);var i}function VO(e,t){var n=t.toLowerCase().indexOf(e.toLowerCase());return-1===n?null:[{start:n,end:n+e.length}]}function BO(e,t){return HO(e.toLowerCase(),t.toLowerCase(),0,0)}function HO(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]===t[i]){var o=null;return(o=HO(e,t,n+1,i+1))?YO({start:i,end:i+1},o):null}return HO(e,t,n,i+1)}function zO(e){return 97<=e&&e<=122}function jO(e){return 65<=e&&e<=90}function UO(e){return 48<=e&&e<=57}function KO(e){return 32===e||9===e||10===e||13===e}var qO=new Set;function GO(e){return zO(e)||jO(e)||UO(e)}function YO(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function ZO(e,t){for(var n=t;n<e.length;n++){var i=e.charCodeAt(n);if(jO(i)||UO(i)||n>0&&!GO(e.charCodeAt(n-1)))return n}return e.length}function XO(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]!==t[i].toLowerCase())return null;var o=null,r=i+1;o=XO(e,t,n+1,i+1);while(!o&&(r=ZO(t,r))<t.length)o=XO(e,t,n+1,r),r++;return null===o?null:YO({start:i,end:i+1},o)}function $O(e){for(var t=0,n=0,i=0,o=0,r=0,s=0;s<e.length;s++)r=e.charCodeAt(s),jO(r)&&t++,zO(r)&&n++,GO(r)&&i++,UO(r)&&o++;var a=t/e.length,u=n/e.length,l=i/e.length,c=o/e.length;return{upperPercent:a,lowerPercent:u,alphaPercent:l,numericPercent:c}}function QO(e){var t=e.upperPercent,n=e.lowerPercent;return 0===n&&t>.6}function JO(e){var t=e.upperPercent,n=e.lowerPercent,i=e.alphaPercent,o=e.numericPercent;return n>.2&&t<.8&&i>.6&&o<.2}function eT(e){for(var t=0,n=0,i=0,o=0,r=0;r<e.length;r++)i=e.charCodeAt(r),jO(i)&&t++,zO(i)&&n++,KO(i)&&o++;return 0!==t&&0!==n||0!==o?t<=5:e.length<=30}function tT(e,t){if(!t)return null;if(t=t.trim(),0===t.length)return null;if(!eT(e))return null;if(t.length>60)return null;var n=$O(t);if(!JO(n)){if(!QO(n))return null;t=t.toLowerCase()}var i=null,o=0;e=e.toLowerCase();while(o<t.length&&null===(i=XO(e,t,0,o)))o=ZO(t,o+1);return i}"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach((function(e){return qO.add(e.charCodeAt(0))}));RO(FO,tT,VO),RO(FO,tT,BO),new sa(1e4);var nT=128;function iT(){for(var e=[],t=[0],n=1;n<=nT;n++)t.push(-n);for(n=0;n<=nT;n++){var i=t.slice(0);i[0]=-n,e.push(i)}return e}var oT,rT=iT(),sT=iT(),aT=iT(),uT=!1;function lT(e,t,n,i,o){function r(e,t,n){void 0===n&&(n=" ");while(e.length<t)e=n+e;return e}for(var s=" | |"+i.split("").map((function(e){return r(e,3)})).join("|")+"\n",a=0;a<=n;a++)s+=0===a?" |":t[a-1]+"|",s+=e[a].slice(0,o+1).map((function(e){return r(e.toString(),3)})).join("|")+"\n";return s}function cT(e,t,n,i){e=e.substr(t),n=n.substr(i),console.log(lT(rT,e,e.length,n,n.length)),console.log(lT(aT,e,e.length,n,n.length)),console.log(lT(sT,e,e.length,n,n.length))}function hT(e,t){if(t<0||t>=e.length)return!1;var n=e.charCodeAt(t);switch(n){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:return!0;default:return!1}}function dT(e,t){if(t<0||t>=e.length)return!1;var n=e.charCodeAt(t);switch(n){case 32:case 9:return!0;default:return!1}}function fT(e,t,n){return t[e]!==n[e]}function pT(e,t,n,i,o,r){while(t<n&&o<r)e[t]===i[o]&&(t+=1),o+=1;return t===n}function gT(e,t,n,i,o,r,s){var a=e.length>nT?nT:e.length,u=i.length>nT?nT:i.length;if(!(n>=a||r>=u||a-n>u-r)&&pT(t,n,a,o,r,u)){var l=1,c=1,h=n,d=r;for(l=1,h=n;h<a;l++,h++)for(c=1,d=r;d<u;c++,d++){var f=mT(e,t,h,n,i,o,d);sT[l][c]=f;var p=rT[l-1][c-1]+(f>1?1:f),g=rT[l-1][c]+-1,m=rT[l][c-1]+-1;m>=g?m>p?(rT[l][c]=m,aT[l][c]=4):m===p?(rT[l][c]=m,aT[l][c]=6):(rT[l][c]=p,aT[l][c]=2):g>p?(rT[l][c]=g,aT[l][c]=1):g===p?(rT[l][c]=g,aT[l][c]=3):(rT[l][c]=p,aT[l][c]=2)}if(uT&&cT(e,n,i,r),vT=0,yT=-100,bT=r,CT=s,wT(l-1,c-1,a===u?1:0,0,!1),0!==vT)return[yT,_T,r]}}function mT(e,t,n,i,o,r,s){return t[n]!==r[s]?-1:s===n-i?e[n]===o[s]?7:5:!fT(s,o,r)||0!==s&&fT(s-1,o,r)?!hT(r,s)||0!==s&&hT(r,s-1)?hT(r,s-1)||dT(r,s-1)?5:1:5:e[n]===o[s]?7:5}(function(e){function t(e){return!e||-100===e[0]&&0===e[1]&&0===e[2]}e.Default=Object.freeze([-100,0,0]),e.isDefault=t})(oT||(oT={}));var vT=0,_T=0,yT=0,bT=0,CT=!1;function wT(e,t,n,i,o){if(!(vT>=10||n<-25)){var r=0;while(e>0&&t>0){var s=sT[e][t],a=aT[e][t];if(4===a)t-=1,o?n-=5:0!==i&&(n-=1),o=!1,r=0;else{if(!(2&a))return;if(4&a&&wT(e,t-1,0!==i?n-1:n,i,o),n+=s,e-=1,t-=1,o=!0,i+=Math.pow(2,t+bT),1===s){if(r+=1,0===e&&!CT)return}else n+=1+r*(s-1),r=0}}n-=t>=3?9:3*t,vT+=1,n>yT&&(yT=n,_T=i)}}var ST=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),LT=function(){return LT=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},LT.apply(this,arguments)},NT=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},DT=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i},ET=function(){function e(e){this.trait=e,this.renderedElements=[]}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"template:"+this.trait.trait},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){return e},e.prototype.renderElement=function(e,t,n){var i=Mi(this.renderedElements,(function(e){return e.templateData===n}));if(i>=0){var o=this.renderedElements[i];this.trait.unrender(n),o.index=t}else{o={index:t,templateData:n};this.renderedElements.push(o)}this.trait.renderIndex(t,n)},e.prototype.splice=function(e,t,n){for(var i=[],o=0,r=this.renderedElements;o<r.length;o++){var s=r[o];s.index<e?i.push(s):s.index>=e+t&&i.push({index:s.index+n-t,templateData:s.templateData})}this.renderedElements=i},e.prototype.renderIndexes=function(e){for(var t=0,n=this.renderedElements;t<n.length;t++){var i=n[t],o=i.index,r=i.templateData;e.indexOf(o)>-1&&this.trait.renderIndex(o,r)}},e.prototype.disposeTemplate=function(e){var t=Mi(this.renderedElements,(function(t){return t.templateData===e}));t<0||this.renderedElements.splice(t,1)},e}(),xT=function(){function e(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new qe,this.onChange=this._onChange.event}return Object.defineProperty(e.prototype,"trait",{get:function(){return this._trait},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return new ET(this)},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){var i=n.length-t,o=e+t,r=DT(this.sortedIndexes.filter((function(t){return t<e})),n.map((function(t,n){return t?n+e:-1})).filter((function(e){return-1!==e})),this.sortedIndexes.filter((function(e){return e>=o})).map((function(e){return e+i})));this.renderer.splice(e,t,n.length),this._set(r,r)},e.prototype.renderIndex=function(e,t){to(t,this._trait,this.contains(e))},e.prototype.unrender=function(e){Ji(e,this._trait)},e.prototype.set=function(e,t){return this._set(e,DT(e).sort(ZT),t)},e.prototype._set=function(e,t,n){var i=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;var r=GT(o,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:n}),i},e.prototype.get=function(){return this.indexes},e.prototype.contains=function(e){return wi(this.sortedIndexes,e,ZT)>=0},e.prototype.dispose=function(){Ee(this._onChange)},NT([Ng],e.prototype,"renderer",null),e}(),kT=function(e){function t(){return e.call(this,"focused")||this}return ST(t,e),t.prototype.renderIndex=function(t,n){e.prototype.renderIndex.call(this,t,n),this.contains(t)?n.setAttribute("aria-selected","true"):n.removeAttribute("aria-selected")},t}(xT),OT=function(){function e(e,t,n){this.trait=e,this.view=t,this.identityProvider=n}return e.prototype.splice=function(e,t,n){var i=this;if(!this.identityProvider)return this.trait.splice(e,t,n.map((function(){return!1})));var o=this.trait.get().map((function(e){return i.identityProvider.getId(i.view.element(e)).toString()})),r=n.map((function(e){return o.indexOf(i.identityProvider.getId(e).toString())>-1}));this.trait.splice(e,t,r)},e}();function TT(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}var MT,IT=function(){function e(e,t,n){this.list=e,this.view=t,this.disposables=new Te;var i=!1!==n.multipleSelectionSupport;this.openController=n.openController||HT;var o=We.chain(Kn(t.domNode,"keydown")).filter((function(e){return!TT(e.target)})).map((function(e){return new Jn(e)}));o.filter((function(e){return 3===e.keyCode})).on(this.onEnter,this,this.disposables),o.filter((function(e){return 16===e.keyCode})).on(this.onUpArrow,this,this.disposables),o.filter((function(e){return 18===e.keyCode})).on(this.onDownArrow,this,this.disposables),o.filter((function(e){return 11===e.keyCode})).on(this.onPageUpArrow,this,this.disposables),o.filter((function(e){return 12===e.keyCode})).on(this.onPageDownArrow,this,this.disposables),o.filter((function(e){return 9===e.keyCode})).on(this.onEscape,this,this.disposables),i&&o.filter((function(e){return(s["e"]?e.metaKey:e.ctrlKey)&&31===e.keyCode})).on(this.onCtrlA,this,this.disposables)}return e.prototype.onEnter=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent),this.openController.shouldOpen(e.browserEvent)&&this.list.open(this.list.getFocus(),e.browserEvent)},e.prototype.onUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onCtrlA=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Ri(this.list.length),e.browserEvent),this.view.domNode.focus()},e.prototype.onEscape=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.view.domNode.focus()},e.prototype.dispose=function(){this.disposables.dispose()},e}();(function(e){e[e["Idle"]=0]="Idle",e[e["Typing"]=1]="Typing"})(MT||(MT={}));var AT=new(function(){function e(){}return e.prototype.mightProducePrintableCharacter=function(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)},e}()),PT=function(){function e(e,t,n,i){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.delegate=i,this.enabled=!1,this.state=MT.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.enabledDisposables=new Te,this.disposables=new Te,this.updateOptions(e.options)}return e.prototype.updateOptions=function(e){var t="undefined"===typeof e.enableKeyboardNavigation||!!e.enableKeyboardNavigation;t?this.enable():this.disable(),"undefined"!==typeof e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)},e.prototype.enable=function(){var e=this;if(!this.enabled){var t=We.chain(Kn(this.view.domNode,"keydown")).filter((function(e){return!TT(e.target)})).filter((function(){return e.automaticKeyboardNavigation||e.triggered})).map((function(e){return new Jn(e)})).filter((function(t){return e.delegate.mightProducePrintableCharacter(t)})).forEach((function(e){e.stopPropagation(),e.preventDefault()})).map((function(e){return e.browserEvent.key})).event,n=We.debounce(t,(function(){return null}),800),i=We.reduce(We.any(t,n),(function(e,t){return null===t?null:(e||"")+t}));i(this.onInput,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}},e.prototype.disable=function(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)},e.prototype.onInput=function(e){if(!e)return this.state=MT.Idle,void(this.triggered=!1);var t=this.list.getFocus(),n=t.length>0?t[0]:0,i=this.state===MT.Idle?1:0;this.state=MT.Typing;for(var o=0;o<this.list.length;o++){var r=(n+o+i)%this.list.length,s=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(r)),a=s&&s.toString();if("undefined"===typeof a||FO(e,a))return this.list.setFocus([r]),void this.list.reveal(r)}},e.prototype.dispose=function(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()},e}(),RT=function(){function e(e,t){this.list=e,this.view=t,this.disposables=new Te;var n=We.chain(Kn(t.domNode,"keydown")).filter((function(e){return!TT(e.target)})).map((function(e){return new Jn(e)}));n.filter((function(e){return 2===e.keyCode&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey})).on(this.onTab,this,this.disposables)}return e.prototype.onTab=function(e){if(e.target===this.view.domNode){var t=this.list.getFocus();if(0!==t.length){var n=this.view.domElement(t[0]);if(n){var i=n.querySelector("[tabIndex]");if(i&&i instanceof HTMLElement&&-1!==i.tabIndex){var o=window.getComputedStyle(i);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),i.focus())}}}}},e.prototype.dispose=function(){this.disposables.dispose()},e}();function FT(e){return s["e"]?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function WT(e){return e.browserEvent.shiftKey}function VT(e){return e instanceof MouseEvent&&2===e.button}var BT={isSelectionSingleChangeEvent:FT,isSelectionRangeChangeEvent:WT},HT={shouldOpen:function(e){return!(e instanceof MouseEvent)||!VT(e)}},zT=function(){function e(e){this.list=e,this.disposables=new Te,this.multipleSelectionSupport=!(!1===e.options.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=e.options.multipleSelectionController||BT),this.openController=e.options.openController||HT,this.mouseSupport="undefined"===typeof 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(kg.addTarget(e.getHTMLElement()))),e.onMouseClick(this.onPointer,this,this.disposables),e.onMouseMiddleClick(this.onPointer,this,this.disposables),e.onTap(this.onPointer,this,this.disposables)}return e.prototype.isSelectionSingleChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):s["e"]?e.browserEvent.metaKey:e.browserEvent.ctrlKey},e.prototype.isSelectionRangeChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey},e.prototype.isSelectionChangeEvent=function(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)},e.prototype.onMouseDown=function(e){document.activeElement!==e.browserEvent.target&&this.list.domFocus()},e.prototype.onContextMenu=function(e){var t="undefined"===typeof e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)},e.prototype.onPointer=function(e){if(this.mouseSupport&&!TT(e.browserEvent.target)){var t=this.list.getFocus()[0],n=this.list.getSelection();t=void 0===t?n[0]:t;var i=e.index;if("undefined"===typeof i)return this.list.setFocus([],e.browserEvent),void this.list.setSelection([],e.browserEvent);if(this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e))return this.changeSelection(e,t);if(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return this.changeSelection(e,t);this.list.setFocus([i],e.browserEvent),VT(e.browserEvent)||(this.list.setSelection([i],e.browserEvent),this.openController.shouldOpen(e.browserEvent)&&this.list.open([i],e.browserEvent))}},e.prototype.onDoubleClick=function(e){if(!TT(e.browserEvent.target)&&(!this.multipleSelectionSupport||!this.isSelectionChangeEvent(e))){var t=this.list.getFocus();this.list.setSelection(t,e.browserEvent),this.list.pin(t)}},e.prototype.changeSelection=function(e,t){var n=e.index;if(this.isSelectionRangeChangeEvent(e)&&void 0!==t){var i=Math.min(t,n),o=Math.max(t,n),r=Ri(i,o+1),s=this.list.getSelection(),a=qT(GT(s,[t]),t);if(0===a.length)return;var u=GT(r,YT(s,a));this.list.setSelection(u,e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){s=this.list.getSelection(),u=s.filter((function(e){return e!==n}));this.list.setFocus([n]),s.length===u.length?this.list.setSelection(DT(u,[n]),e.browserEvent):this.list.setSelection(u,e.browserEvent)}},e.prototype.dispose=function(){this.disposables.dispose()},e}(),jT=function(){function e(e,t){this.styleElement=e,this.selectorSuffix=t}return e.prototype.style=function(e){var t=this.selectorSuffix&&"."+this.selectorSuffix,n=[];e.listBackground&&(e.listBackground.isOpaque()?n.push(".monaco-list"+t+" .monaco-list-rows { background: "+e.listBackground+"; }"):s["e"]||console.warn("List with id '"+this.selectorSuffix+"' was styled with a non-opaque background color. This will break sub-pixel antialiasing.")),e.listFocusBackground&&(n.push(".monaco-list"+t+":focus .monaco-list-row.focused { background-color: "+e.listFocusBackground+"; }"),n.push(".monaco-list"+t+":focus .monaco-list-row.focused:hover { background-color: "+e.listFocusBackground+"; }")),e.listFocusForeground&&n.push(".monaco-list"+t+":focus .monaco-list-row.focused { color: "+e.listFocusForeground+"; }"),e.listActiveSelectionBackground&&(n.push(".monaco-list"+t+":focus .monaco-list-row.selected { background-color: "+e.listActiveSelectionBackground+"; }"),n.push(".monaco-list"+t+":focus .monaco-list-row.selected:hover { background-color: "+e.listActiveSelectionBackground+"; }")),e.listActiveSelectionForeground&&n.push(".monaco-list"+t+":focus .monaco-list-row.selected { color: "+e.listActiveSelectionForeground+"; }"),e.listFocusAndSelectionBackground&&n.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&&n.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.listInactiveFocusBackground&&(n.push(".monaco-list"+t+" .monaco-list-row.focused { background-color: "+e.listInactiveFocusBackground+"; }"),n.push(".monaco-list"+t+" .monaco-list-row.focused:hover { background-color: "+e.listInactiveFocusBackground+"; }")),e.listInactiveSelectionBackground&&(n.push(".monaco-list"+t+" .monaco-list-row.selected { background-color: "+e.listInactiveSelectionBackground+"; }"),n.push(".monaco-list"+t+" .monaco-list-row.selected:hover { background-color: "+e.listInactiveSelectionBackground+"; }")),e.listInactiveSelectionForeground&&n.push(".monaco-list"+t+" .monaco-list-row.selected { color: "+e.listInactiveSelectionForeground+"; }"),e.listHoverBackground&&n.push(".monaco-list"+t+":not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: "+e.listHoverBackground+"; }"),e.listHoverForeground&&n.push(".monaco-list"+t+" .monaco-list-row:hover:not(.selected):not(.focused) { color: "+e.listHoverForeground+"; }"),e.listSelectionOutline&&n.push(".monaco-list"+t+" .monaco-list-row.selected { outline: 1px dotted "+e.listSelectionOutline+"; outline-offset: -1px; }"),e.listFocusOutline&&n.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"),e.listInactiveFocusOutline&&n.push(".monaco-list"+t+" .monaco-list-row.focused { outline: 1px dotted "+e.listInactiveFocusOutline+"; outline-offset: -1px; }"),e.listHoverOutline&&n.push(".monaco-list"+t+" .monaco-list-row:hover { outline: 1px dashed "+e.listHoverOutline+"; outline-offset: -1px; }"),e.listDropBackground&&n.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&&n.push(".monaco-list-type-filter { background-color: "+e.listFilterWidgetBackground+" }"),e.listFilterWidgetOutline&&n.push(".monaco-list-type-filter { border: 1px solid "+e.listFilterWidgetOutline+"; }"),e.listFilterWidgetNoMatchesOutline&&n.push(".monaco-list-type-filter.no-matches { border: 1px solid "+e.listFilterWidgetNoMatchesOutline+"; }"),e.listMatchesShadow&&n.push(".monaco-list-type-filter { box-shadow: 1px 1px 1px "+e.listMatchesShadow+"; }");var i=n.join("\n");i!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=i)},e}(),UT={listFocusBackground:S_.fromHex("#7FB0D0"),listActiveSelectionBackground:S_.fromHex("#0E639C"),listActiveSelectionForeground:S_.fromHex("#FFFFFF"),listFocusAndSelectionBackground:S_.fromHex("#094771"),listFocusAndSelectionForeground:S_.fromHex("#FFFFFF"),listInactiveSelectionBackground:S_.fromHex("#3F3F46"),listHoverBackground:S_.fromHex("#2A2D2E"),listDropBackground:S_.fromHex("#383B3D"),treeIndentGuidesStroke:S_.fromHex("#a9a9a9")},KT={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:function(){return null},onDragStart:function(){},onDragOver:function(){return!1},drop:function(){}},ariaRootRole:sO.TREE};function qT(e,t){var n=e.indexOf(t);if(-1===n)return[];var i=[],o=n-1;while(o>=0&&e[o]===t-(n-o))i.push(e[o--]);i.reverse(),o=n;while(o<e.length&&e[o]===t+(o-n))i.push(e[o++]);return i}function GT(e,t){var n=[],i=0,o=0;while(i<e.length||o<t.length)if(i>=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){n.push(e[i]),i++,o++;continue}e[i]<t[o]?n.push(e[i++]):n.push(t[o++])}return n}function YT(e,t){var n=[],i=0,o=0;while(i<e.length||o<t.length)if(i>=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){i++,o++;continue}e[i]<t[o]?n.push(e[i++]):o++}return n}var ZT=function(e,t){return e-t},XT=function(){function e(e,t){this._templateId=e,this.renderers=t}return Object.defineProperty(e.prototype,"templateId",{get:function(){return this._templateId},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){return this.renderers.map((function(t){return t.renderTemplate(e)}))},e.prototype.renderElement=function(e,t,n,i){for(var o=0,r=0,s=this.renderers;r<s.length;r++){var a=s[r];a.renderElement(e,t,n[o++],i)}},e.prototype.disposeElement=function(e,t,n,i){for(var o=0,r=0,s=this.renderers;r<s.length;r++){var a=s[r];a.disposeElement&&a.disposeElement(e,t,n[o],i),o+=1}},e.prototype.disposeTemplate=function(e){for(var t=0,n=0,i=this.renderers;n<i.length;n++){var o=i[n];o.disposeTemplate(e[t++])}},e}(),$T=function(){function e(e){this.accessibilityProvider=e,this.templateId="a18n"}return e.prototype.renderTemplate=function(e){return e},e.prototype.renderElement=function(e,t,n){var i=this.accessibilityProvider.getAriaLabel(e);i?n.setAttribute("aria-label",i):n.removeAttribute("aria-label");var o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"===typeof o?n.setAttribute("aria-level",""+o):n.removeAttribute("aria-level")},e.prototype.disposeTemplate=function(e){},e}(),QT=function(){function e(e,t){this.list=e,this.dnd=t}return e.prototype.getDragElements=function(e){var t=this.list.getSelectedElements(),n=t.indexOf(e)>-1?t:[e];return n},e.prototype.getDragURI=function(e){return this.dnd.getDragURI(e)},e.prototype.getDragLabel=function(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)},e.prototype.onDragStart=function(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)},e.prototype.onDragOver=function(e,t,n,i){return this.dnd.onDragOver(e,t,n,i)},e.prototype.onDragEnd=function(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)},e.prototype.drop=function(e,t,n,i){this.dnd.drop(e,t,n,i)},e}(),JT=function(){function e(e,t,n,i,o){void 0===o&&(o=KT),this.user=e,this._options=o,this.eventBufferer=new Ye,this.disposables=new Te,this._onDidOpen=new qe,this.onDidOpen=this._onDidOpen.event,this._onDidPin=new qe,this.didJustPressContextMenuKey=!1,this._onDidDispose=new qe,this.onDidDispose=this._onDidDispose.event,this.focus=new kT,this.selection=new xT("selected"),Da(o,UT,!1);var s=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(s.push(new $T(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),i=i.map((function(e){return new XT(e.templateId,DT(s,[e]))}));var a=LT(LT({},o),{dnd:o.dnd&&new QT(this,o.dnd)});if(this.view=new IO(t,n,i,a),"string"!==typeof o.ariaRole?this.view.domNode.setAttribute("role",sO.TREE):this.view.domNode.setAttribute("role",o.ariaRole),o.styleController)this.styleController=o.styleController(this.view.domId);else{var u=Po(this.view.domNode);this.styleController=new jT(u,this.view.domId)}if(this.spliceable=new AO([new OT(this.focus,this.view,o.identityProvider),new OT(this.selection,this.view,o.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.onDidFocus=We.map(Kn(this.view.domNode,"focus",!0),(function(){return null})),this.onDidBlur=We.map(Kn(this.view.domNode,"blur",!0),(function(){return null})),this.disposables.add(new RT(this,this.view)),"boolean"!==typeof o.keyboardSupport||o.keyboardSupport){var l=new IT(this,this.view,o);this.disposables.add(l)}if(o.keyboardNavigationLabelProvider){var c=o.keyboardNavigationDelegate||AT;this.typeLabelController=new PT(this,this.view,o.keyboardNavigationLabelProvider,c),this.disposables.add(this.typeLabelController)}this.disposables.add(this.createMouseController(o)),this.onFocusChange(this._onFocusChange,this,this.disposables),this.onSelectionChange(this._onSelectionChange,this,this.disposables),o.ariaLabel&&this.view.domNode.setAttribute("aria-label",r("aria list","{0}. Use the navigation keys to navigate.",o.ariaLabel))}return Object.defineProperty(e.prototype,"onFocusChange",{get:function(){var e=this;return We.map(this.eventBufferer.wrapEvent(this.focus.onChange),(function(t){return e.toListEvent(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){var e=this;return We.map(this.eventBufferer.wrapEvent(this.selection.onChange),(function(t){return e.toListEvent(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"domId",{get:function(){return this.view.domId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseClick",{get:function(){return this.view.onMouseClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDblClick",{get:function(){return this.view.onMouseDblClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseMiddleClick",{get:function(){return this.view.onMouseMiddleClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDown",{get:function(){return this.view.onMouseDown},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTouchStart",{get:function(){return this.view.onTouchStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTap",{get:function(){return this.view.onTap},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this,t=We.chain(Kn(this.view.domNode,"keydown")).map((function(e){return new Jn(e)})).filter((function(t){return e.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode})).filter((function(e){return e.preventDefault(),e.stopPropagation(),!1})).event,n=We.chain(Kn(this.view.domNode,"keyup")).filter((function(){var t=e.didJustPressContextMenuKey;return e.didJustPressContextMenuKey=!1,t})).filter((function(){return e.getFocus().length>0&&!!e.view.domElement(e.getFocus()[0])})).map((function(t){var n=e.getFocus()[0],i=e.view.element(n),o=e.view.domElement(n);return{index:n,element:i,anchor:o,browserEvent:t}})).event,i=We.chain(this.view.onContextMenu).filter((function(){return!e.didJustPressContextMenuKey})).map((function(e){var t=e.element,n=e.index,i=e.browserEvent;return{element:t,index:n,anchor:{x:i.clientX+1,y:i.clientY},browserEvent:i}})).event;return We.any(t,n,i)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onKeyDown",{get:function(){return Kn(this.view.domNode,"keydown")},enumerable:!0,configurable:!0}),e.prototype.createMouseController=function(e){return new zT(this)},e.prototype.updateOptions=function(e){void 0===e&&(e={}),this._options=LT(LT({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options)},Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){var i=this;if(void 0===n&&(n=[]),e<0||e>this.view.length)throw new _O(this.user,"Invalid start index: "+e);if(t<0)throw new _O(this.user,"Invalid delete count: "+t);0===t&&0===n.length||this.eventBufferer.bufferEvents((function(){return i.spliceable.splice(e,t,n)}))},e.prototype.rerender=function(){this.view.rerender()},e.prototype.element=function(e){return this.view.element(e)},Object.defineProperty(e.prototype,"length",{get:function(){return this.view.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentHeight",{get:function(){return this.view.contentHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.view.getScrollTop()},set:function(e){this.view.setScrollTop(e)},enumerable:!0,configurable:!0}),e.prototype.domFocus=function(){this.view.domNode.focus()},e.prototype.layout=function(e,t){this.view.layout(e,t)},e.prototype.setSelection=function(e,t){for(var n=0,i=e;n<i.length;n++){var o=i[n];if(o<0||o>=this.length)throw new _O(this.user,"Invalid index "+o)}this.selection.set(e,t)},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.getSelectedElements=function(){var e=this;return this.getSelection().map((function(t){return e.view.element(t)}))},e.prototype.setFocus=function(e,t){for(var n=0,i=e;n<i.length;n++){var o=i[n];if(o<0||o>=this.length)throw new _O(this.user,"Invalid index "+o)}this.focus.set(e,t)},e.prototype.focusNext=function(e,t,n,i){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var o=this.focus.get(),r=this.findNextIndex(o.length>0?o[0]+e:0,t,i);r>-1&&this.setFocus([r],n)}},e.prototype.focusPrevious=function(e,t,n,i){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var o=this.focus.get(),r=this.findPreviousIndex(o.length>0?o[0]-e:0,t,i);r>-1&&this.setFocus([r],n)}},e.prototype.focusNextPage=function(e,t){var n=this,i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;var o=this.view.element(i),r=this.getFocusedElements()[0];if(r!==o){var s=this.findPreviousIndex(i,!1,t);s>-1&&r!==this.view.element(s)?this.setFocus([s],e):this.setFocus([i],e)}else{var a=this.view.getScrollTop();this.view.setScrollTop(a+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==a&&setTimeout((function(){return n.focusNextPage(e,t)}),0)}},e.prototype.focusPreviousPage=function(e,t){var n,i=this,o=this.view.getScrollTop();n=0===o?this.view.indexAt(o):this.view.indexAfter(o-1);var r=this.view.element(n),s=this.getFocusedElements()[0];if(s!==r){var a=this.findNextIndex(n,!1,t);a>-1&&s!==this.view.element(a)?this.setFocus([a],e):this.setFocus([n],e)}else{var u=o;this.view.setScrollTop(o-this.view.renderHeight),this.view.getScrollTop()!==u&&setTimeout((function(){return i.focusPreviousPage(e,t)}),0)}},e.prototype.focusLast=function(e,t){if(0!==this.length){var n=this.findPreviousIndex(this.length-1,!1,t);n>-1&&this.setFocus([n],e)}},e.prototype.focusFirst=function(e,t){if(0!==this.length){var n=this.findNextIndex(0,!1,t);n>-1&&this.setFocus([n],e)}},e.prototype.findNextIndex=function(e,t,n){void 0===t&&(t=!1);for(var i=0;i<this.length;i++){if(e>=this.length&&!t)return-1;if(e%=this.length,!n||n(this.element(e)))return e;e++}return-1},e.prototype.findPreviousIndex=function(e,t,n){void 0===t&&(t=!1);for(var i=0;i<this.length;i++){if(e<0&&!t)return-1;if(e=(this.length+e%this.length)%this.length,!n||n(this.element(e)))return e;e--}return-1},e.prototype.getFocus=function(){return this.focus.get()},e.prototype.getFocusedElements=function(){var e=this;return this.getFocus().map((function(t){return e.view.element(t)}))},e.prototype.reveal=function(e,t){if(e<0||e>=this.length)throw new _O(this.user,"Invalid index "+e);var n=this.view.getScrollTop(),i=this.view.elementTop(e),o=this.view.elementHeight(e);if(Rs(t)){var r=o-this.view.renderHeight;this.view.setScrollTop(r*PO(t,0,1)+i)}else{var s=i+o,a=n+this.view.renderHeight;i<n&&s>=a||(i<n?this.view.setScrollTop(i):s>=a&&this.view.setScrollTop(s-this.view.renderHeight))}},e.prototype.getRelativeTop=function(e){if(e<0||e>=this.length)throw new _O(this.user,"Invalid index "+e);var t=this.view.getScrollTop(),n=this.view.elementTop(e),i=this.view.elementHeight(e);if(n<t||n+i>t+this.view.renderHeight)return null;var o=i-this.view.renderHeight;return Math.abs((t-n)/o)},e.prototype.getHTMLElement=function(){return this.view.domNode},e.prototype.open=function(e,t){for(var n=this,i=0,o=e;i<o.length;i++){var r=o[i];if(r<0||r>=this.length)throw new _O(this.user,"Invalid index "+r)}this._onDidOpen.fire({indexes:e,elements:e.map((function(e){return n.view.element(e)})),browserEvent:t})},e.prototype.pin=function(e,t){for(var n=this,i=0,o=e;i<o.length;i++){var r=o[i];if(r<0||r>=this.length)throw new _O(this.user,"Invalid index "+r)}this._onDidPin.fire({indexes:e,elements:e.map((function(e){return n.view.element(e)})),browserEvent:t})},e.prototype.style=function(e){this.styleController.style(e)},e.prototype.toListEvent=function(e){var t=this,n=e.indexes,i=e.browserEvent;return{indexes:n,elements:n.map((function(e){return t.view.element(e)})),browserEvent:i}},e.prototype._onFocusChange=function(){var e=this.focus.get();to(this.view.domNode,"element-focused",e.length>0),this.onDidChangeActiveDescendant()},e.prototype.onDidChangeActiveDescendant=function(){var e,t=this.focus.get();if(t.length>0){var n=void 0;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(n=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",n||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")},e.prototype._onSelectionChange=function(){var e=this.selection.get();to(this.view.domNode,"selection-none",0===e.length),to(this.view.domNode,"selection-single",1===e.length),to(this.view.domNode,"selection-multiple",e.length>1)},e.prototype.dispose=function(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidOpen.dispose(),this._onDidPin.dispose(),this._onDidDispose.dispose()},NT([Ng],e.prototype,"onFocusChange",null),NT([Ng],e.prototype,"onSelectionChange",null),NT([Ng],e.prototype,"onContextMenu",null),e}(),eM="inputFocus",tM=(n("d95f"),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),nM=function(e){function t(t,n){return e.call(this,"TreeError ["+t+"] "+n)||this}return tM(t,e),t}(Error),iM=function(){function e(e){this.fn=e,this._map=new WeakMap}return e.prototype.map=function(e){var t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t},e}(),oM=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i};function rM(e){return"object"===typeof e&&"visibility"in e&&"data"in e}function sM(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function aM(e){return"boolean"===typeof e.collapsible}var uM=function(){function e(e,t,n,i){void 0===i&&(i={}),this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new Ye,this._onDidChangeCollapseState=new qe,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new qe,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new qe,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault="undefined"!==typeof i.collapseByDefault&&i.collapseByDefault,this.filter=i.filter,this.autoExpandSingleChildren="undefined"!==typeof i.autoExpandSingleChildren&&i.autoExpandSingleChildren,this.root={parent:void 0,element:n,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visible:!0,filterData:void 0}}return e.prototype.splice=function(e,t,n,i,o){var r,s=this;if(0===e.length)throw new nM(this.user,"Invalid tree location");for(var a=this.getParentNodeWithListIndex(e),u=a.parentNode,l=a.listIndex,c=a.revealed,h=a.visible,d=[],f=Oe.map(Oe.from(n),(function(e){return s.createTreeNode(e,u,u.visible?1:0,c,d,i)})),p=e[e.length-1],g=0,m=p;m>=0&&m<u.children.length;m--){var v=u.children[m];if(v.visible){g=v.visibleChildIndex;break}}var _=[],y=0,b=0;Oe.forEach(f,(function(e){_.push(e),b+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=g+y++)}));for(var C=(r=u.children).splice.apply(r,oM([p,t],_)),w=0,S=0,L=C;S<L.length;S++){v=L[S];v.visible&&w++}if(0!==w)for(m=p+_.length;m<u.children.length;m++){v=u.children[m];v.visible&&(v.visibleChildIndex-=w)}if(u.visibleChildrenCount+=y-w,c&&h){var N=C.reduce((function(e,t){return e+(t.visible?t.renderNodeCount:0)}),0);this._updateAncestorsRenderNodeCount(u,b-N),this.list.splice(l,N,d)}if(C.length>0&&o){var D=function(e){o(e),e.children.forEach(D)};C.forEach(D)}this._onDidSplice.fire({insertedNodes:_,deletedNodes:C})},e.prototype.rerender=function(e){if(0===e.length)throw new nM(this.user,"Invalid tree location");var t=this.getTreeNodeWithListIndex(e),n=t.node,i=t.listIndex,o=t.revealed;o&&this.list.splice(i,1,[n])},e.prototype.has=function(e){return this.hasTreeNode(e)},e.prototype.getListIndex=function(e){var t=this.getTreeNodeWithListIndex(e),n=t.listIndex,i=t.visible,o=t.revealed;return i&&o?n:-1},e.prototype.getListRenderCount=function(e){return this.getTreeNode(e).renderNodeCount},e.prototype.isCollapsible=function(e){return this.getTreeNode(e).collapsible},e.prototype.setCollapsible=function(e,t){var n=this,i=this.getTreeNode(e);"undefined"===typeof t&&(t=!i.collapsible);var o={collapsible:t};return this.eventBufferer.bufferEvents((function(){return n._setCollapseState(e,o)}))},e.prototype.isCollapsed=function(e){return this.getTreeNode(e).collapsed},e.prototype.setCollapsed=function(e,t,n){var i=this,o=this.getTreeNode(e);"undefined"===typeof t&&(t=!o.collapsed);var r={collapsed:t,recursive:n||!1};return this.eventBufferer.bufferEvents((function(){return i._setCollapseState(e,r)}))},e.prototype._setCollapseState=function(e,t){var n=this.getTreeNodeWithListIndex(e),i=n.node,o=n.listIndex,r=n.revealed,s=this._setListNodeCollapseState(i,o,r,t);if(i!==this.root&&this.autoExpandSingleChildren&&s&&!aM(t)&&i.collapsible&&!i.collapsed&&!t.recursive){for(var a=-1,u=0;u<i.children.length;u++){var l=i.children[u];if(l.visible){if(a>-1){a=-1;break}a=u}}a>-1&&this._setCollapseState(oM(e,[a]),t)}return s},e.prototype._setListNodeCollapseState=function(e,t,n,i){var o=this._setNodeCollapseState(e,i,!1);if(!n||!e.visible||!o)return o;var r=e.renderNodeCount,s=this.updateNodeAfterCollapseChange(e),a=r-(-1===t?0:1);return this.list.splice(t+1,a,s.slice(1)),o},e.prototype._setNodeCollapseState=function(e,t,n){var i;if(e===this.root?i=!1:(aM(t)?(i=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(i=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):i=!1,i&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!aM(t)&&t.recursive)for(var o=0,r=e.children;o<r.length;o++){var s=r[o];i=this._setNodeCollapseState(s,t,!0)||i}return i},e.prototype.expandTo=function(e){var t=this;this.eventBufferer.bufferEvents((function(){var n=t.getTreeNode(e);while(n.parent)n=n.parent,e=e.slice(0,e.length-1),n.collapsed&&t._setCollapseState(e,{collapsed:!1,recursive:!1})}))},e.prototype.refilter=function(){var e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t)},e.prototype.createTreeNode=function(e,t,n,i,o,r){var s=this,a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"===typeof e.collapsible?e.collapsible:"undefined"!==typeof e.collapsed,collapsed:"undefined"===typeof e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visible:!0,filterData:void 0},u=this._filterNode(a,n);i&&o.push(a);var l=Oe.from(e.children),c=i&&0!==u&&!a.collapsed,h=Oe.map(l,(function(e){return s.createTreeNode(e,a,u,c,o,r)})),d=0,f=1;return Oe.forEach(h,(function(e){a.children.push(e),f+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=d++)})),a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=d,a.visible=2===u?d>0:1===u,a.visible?a.collapsed||(a.renderNodeCount=f):(a.renderNodeCount=0,i&&o.pop()),r&&r(a),a},e.prototype.updateNodeAfterCollapseChange=function(e){var t=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n},e.prototype._updateNodeAfterCollapseChange=function(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(var n=0,i=e.children;n<i.length;n++){var o=i[n];e.renderNodeCount+=this._updateNodeAfterCollapseChange(o,t)}return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount},e.prototype.updateNodeAfterFilterChange=function(e){var t=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n},e.prototype._updateNodeAfterFilterChange=function(e,t,n,i){var o;if(void 0===i&&(i=!0),e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;i&&n.push(e)}var r=n.length;e.renderNodeCount=e===this.root?0:1;var s=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{for(var a=0,u=0,l=e.children;u<l.length;u++){var c=l[u];s=this._updateNodeAfterFilterChange(c,o,n,i&&!e.collapsed)||s,c.visible&&(c.visibleChildIndex=a++)}e.visibleChildrenCount=a}return e!==this.root&&(e.visible=2===o?s:1===o),e.visible?e.collapsed||(e.renderNodeCount+=n.length-r):(e.renderNodeCount=0,i&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible},e.prototype._updateAncestorsRenderNodeCount=function(e,t){if(0!==t)while(e)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent},e.prototype._filterNode=function(e,t){var n=this.filter?this.filter.filter(e.element,t):1;return"boolean"===typeof n?(e.filterData=void 0,n?1:0):rM(n)?(e.filterData=n.data,sM(n.visibility)):(e.filterData=void 0,sM(n))},e.prototype.hasTreeNode=function(e,t){if(void 0===t&&(t=this.root),!e||0===e.length)return!0;var n=e[0],i=e.slice(1);return!(n<0||n>t.children.length)&&this.hasTreeNode(i,t.children[n])},e.prototype.getTreeNode=function(e,t){if(void 0===t&&(t=this.root),!e||0===e.length)return t;var n=e[0],i=e.slice(1);if(n<0||n>t.children.length)throw new nM(this.user,"Invalid tree location");return this.getTreeNode(i,t.children[n])},e.prototype.getTreeNodeWithListIndex=function(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};var t=this.getParentNodeWithListIndex(e),n=t.parentNode,i=t.listIndex,o=t.revealed,r=t.visible,s=e[e.length-1];if(s<0||s>n.children.length)throw new nM(this.user,"Invalid tree location");var a=n.children[s];return{node:a,listIndex:i,revealed:o,visible:r&&a.visible}},e.prototype.getParentNodeWithListIndex=function(e,t,n,i,o){void 0===t&&(t=this.root),void 0===n&&(n=0),void 0===i&&(i=!0),void 0===o&&(o=!0);var r=e[0],s=e.slice(1);if(r<0||r>t.children.length)throw new nM(this.user,"Invalid tree location");for(var a=0;a<r;a++)n+=t.children[a].renderNodeCount;return i=i&&!t.collapsed,o=o&&t.visible,0===s.length?{parentNode:t,listIndex:n,revealed:i,visible:o}:this.getParentNodeWithListIndex(s,t.children[r],n+1,i,o)},e.prototype.getNode=function(e){return void 0===e&&(e=[]),this.getTreeNode(e)},e.prototype.getNodeLocation=function(e){var t=[],n=e;while(n.parent)t.push(n.parent.children.indexOf(n)),n=n.parent;return t.reverse()},e.prototype.getParentNodeLocation=function(e){return 0===e.length?void 0:1===e.length?[]:bi(e)[0]},e}(),lM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cM=function(){return cM=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cM.apply(this,arguments)},hM=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i},dM=function(e){function t(t){var n=e.call(this,t.elements.map((function(e){return e.element})))||this;return n.data=t,n}return lM(t,e),t}(kO);function fM(e){return e instanceof kO?new dM(e):e}var pM=function(){function e(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=Me.None}return e.prototype.getDragURI=function(e){return this.dnd.getDragURI(e.element)},e.prototype.getDragLabel=function(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((function(e){return e.element})),t)},e.prototype.onDragStart=function(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(fM(e),t)},e.prototype.onDragOver=function(e,t,n,i,o){var r=this;void 0===o&&(o=!0);var s=this.dnd.onDragOver(fM(e),t&&t.element,n,i),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),"undefined"===typeof t)return s;if(a&&"boolean"!==typeof s&&s.autoExpand&&(this.autoExpandDisposable=di((function(){var e=r.modelProvider(),n=e.getNodeLocation(t);e.isCollapsed(n)&&e.setCollapsed(n,!1),r.autoExpandNode=void 0}),500)),"boolean"===typeof s||!s.accept||"undefined"===typeof s.bubble||s.feedback){if(!o){var u="boolean"===typeof s?s:s.accept,l="boolean"===typeof s?void 0:s.effect;return{accept:u,effect:l,feedback:[n]}}return s}if(1===s.bubble){var c=this.modelProvider(),h=c.getNodeLocation(t),d=c.getParentNodeLocation(h),f=c.getNode(d),p=d&&c.getListIndex(d);return this.onDragOver(e,f,p,i,!1)}var g=this.modelProvider(),m=g.getNodeLocation(t),v=g.getListIndex(m),_=g.getListRenderCount(m);return cM(cM({},s),{feedback:Ri(v,v+_)})},e.prototype.drop=function(e,t,n,i){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(fM(e),t&&t.element,n,i)},e.prototype.onDragEnd=function(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)},e}();function gM(e,t){return t&&cM(cM({},t),{identityProvider:t.identityProvider&&{getId:function(e){return t.identityProvider.getId(e.element)}},dnd:t.dnd&&new pM(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent:function(e){return t.multipleSelectionController.isSelectionSingleChangeEvent(cM(cM({},e),{element:e.element}))},isSelectionRangeChangeEvent:function(e){return t.multipleSelectionController.isSelectionRangeChangeEvent(cM(cM({},e),{element:e.element}))}},accessibilityProvider:t.accessibilityProvider&&cM(cM({},t.accessibilityProvider),{getAriaLabel:function(e){return t.accessibilityProvider.getAriaLabel(e.element)},getAriaLevel:function(e){return e.depth},getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&function(e){return t.accessibilityProvider.getActiveDescendantId(e.element)}}),keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&cM(cM({},t.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:function(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),enableKeyboardNavigation:t.simpleKeyboardNavigation,ariaProvider:{getSetSize:function(t){var n=e(),i=n.getNodeLocation(t),o=n.getParentNodeLocation(i),r=n.getNode(o);return r.visibleChildrenCount},getPosInSet:function(e){return e.visibleChildIndex+1},isChecked:t.ariaProvider&&t.ariaProvider.isChecked?function(e){return t.ariaProvider.isChecked(e.element)}:void 0,getRole:t.ariaProvider&&t.ariaProvider.getRole?function(e){return t.ariaProvider.getRole(e.element)}:void 0}})}var mM,vM=function(){function e(e){this.delegate=e}return e.prototype.getHeight=function(e){return this.delegate.getHeight(e.element)},e.prototype.getTemplateId=function(e){return this.delegate.getTemplateId(e.element)},e.prototype.hasDynamicHeight=function(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)},e.prototype.setDynamicHeight=function(e,t){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)},e}();(function(e){e["None"]="none",e["OnHover"]="onHover",e["Always"]="always"})(mM||(mM={}));var _M=function(){function e(e,t){var n=this;void 0===t&&(t=[]),this._elements=t,this.onDidChange=We.forEach(e,(function(e){return n._elements=e}))}return Object.defineProperty(e.prototype,"elements",{get:function(){return this._elements},enumerable:!0,configurable:!0}),e}(),yM=function(){function e(t,n,i,o,r){void 0===r&&(r={}),this.renderer=t,this.modelProvider=n,this.activeNodes=o,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=e.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new Rd,this.activeIndentNodes=new Set,this.indentGuidesDisposable=Me.None,this.disposables=new Te,this.templateId=t.templateId,this.updateOptions(r),We.map(i,(function(e){return e.node}))(this.onDidChangeNodeTwistieState,this,this.disposables),t.onDidChangeTwistieState&&t.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}return e.prototype.updateOptions=function(e){if(void 0===e&&(e={}),"undefined"!==typeof e.indent&&(this.indent=PO(e.indent,0,40)),"undefined"!==typeof e.renderIndentGuides){var t=e.renderIndentGuides!==mM.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){var n=new Te;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,n),this.indentGuidesDisposable=n,this._onDidChangeActiveNodes(this.activeNodes.elements)}}"undefined"!==typeof e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)},e.prototype.renderTemplate=function(e){var t=Go(e,$o(".monaco-tl-row")),n=Go(t,$o(".monaco-tl-indent")),i=Go(t,$o(".monaco-tl-twistie")),o=Go(t,$o(".monaco-tl-contents")),r=this.renderer.renderTemplate(o);return{container:e,indent:n,twistie:i,indentGuidesDisposable:Me.None,templateData:r}},e.prototype.renderElement=function(t,n,i,o){"number"===typeof o&&(this.renderedNodes.set(t,{templateData:i,height:o}),this.renderedElements.set(t.element,t));var r=e.DefaultIndent+(t.depth-1)*this.indent;i.twistie.style.paddingLeft=r+"px",i.indent.style.width=r+this.indent-16+"px",this.renderTwistie(t,i),"number"===typeof o&&this.renderIndentGuides(t,i),this.renderer.renderElement(t,n,i.templateData,o)},e.prototype.disposeElement=function(e,t,n,i){n.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,n.templateData,i),"number"===typeof i&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))},e.prototype.disposeTemplate=function(e){this.renderer.disposeTemplate(e.templateData)},e.prototype.onDidChangeTwistieState=function(e){var t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)},e.prototype.onDidChangeNodeTwistieState=function(e){var t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))},e.prototype.renderTwistie=function(e,t){this.renderer.renderTwistie&&this.renderer.renderTwistie(e.element,t.twistie),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(Qi(t.twistie,"codicon","codicon-chevron-down","collapsible"),to(t.twistie,"collapsed",e.collapsed)):eo(t.twistie,"codicon","codicon-chevron-down","collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")},e.prototype.renderIndentGuides=function(e,t){var n=this;if(Ui(t.indent),t.indentGuidesDisposable.dispose(),this.shouldRenderIndentGuides){var i=new Te,o=this.modelProvider(),r=e,s=function(){var e=o.getNodeLocation(r),s=o.getParentNodeLocation(e);if(!s)return"break";var u=o.getNode(s),l=$o(".indent-guide",{style:"width: "+a.indent+"px"});a.activeIndentNodes.has(u)&&$i(l,"active"),0===t.indent.childElementCount?t.indent.appendChild(l):t.indent.insertBefore(l,t.indent.firstElementChild),a.renderedIndentGuides.add(u,l),i.add(ke((function(){return n.renderedIndentGuides.delete(u,l)}))),r=u},a=this;while(1){var u=s();if("break"===u)break}t.indentGuidesDisposable=i}},e.prototype._onDidChangeActiveNodes=function(e){var t=this;if(this.shouldRenderIndentGuides){var n=new Set,i=this.modelProvider();e.forEach((function(e){var t=i.getNodeLocation(e);try{var o=i.getParentNodeLocation(t);e.collapsible&&e.children.length>0&&!e.collapsed?n.add(e):o&&n.add(i.getNode(o))}catch(r){}})),this.activeIndentNodes.forEach((function(e){n.has(e)||t.renderedIndentGuides.forEach(e,(function(e){return Ji(e,"active")}))})),n.forEach((function(e){t.activeIndentNodes.has(e)||t.renderedIndentGuides.forEach(e,(function(e){return $i(e,"active")}))})),this.activeIndentNodes=n}},e.prototype.dispose=function(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Ee(this.disposables)},e.DefaultIndent=8,e}(),bM=function(){function e(e,t,n){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=n,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new Te,e.onWillRefilter(this.reset,this,this.disposables)}return Object.defineProperty(e.prototype,"totalCount",{get:function(){return this._totalCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matchCount",{get:function(){return this._matchCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pattern",{set:function(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()},enumerable:!0,configurable:!0}),e.prototype.filter=function(e,t){if(this._filter){var n=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return n;var i=void 0;if(i="boolean"===typeof n?n?1:0:rM(n)?sM(n.visibility):n,0===i)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:oT.Default,visibility:!0};var o=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),r=o&&o.toString();if("undefined"===typeof r)return{data:oT.Default,visibility:!0};var s=gT(this._pattern,this._lowercasePattern,0,r,r.toLowerCase(),0,!0);return s?(this._matchCount++,{data:s,visibility:!0}):this.tree.options.filterOnType?2:{data:oT.Default,visibility:!0}},e.prototype.reset=function(){this._totalCount=0,this._matchCount=0},e.prototype.dispose=function(){Ee(this.disposables)},e}(),CM=function(){function e(e,t,n,i,o){this.tree=e,this.view=n,this.filter=i,this.keyboardNavigationDelegate=o,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new qe,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new qe,this.enabledDisposables=new Te,this.disposables=new Te,this.domNode=$o(".monaco-list-type-filter."+this.positionClassName),this.domNode.draggable=!0,Kn(this.domNode,"dragstart")(this.onDragStart,this,this.disposables),this.messageDomNode=Go(n.getHTMLElement(),$o(".monaco-list-type-filter-message")),this.labelDomNode=Go(this.domNode,$o("span.label"));var s=Go(this.domNode,$o(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=Go(s,$o("input.filter.codicon.codicon-list-selection")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitle(),Kn(this.filterOnTypeDomNode,"input")(this.onDidChangeFilterOnType,this,this.disposables),this.clearDomNode=Go(s,$o("button.clear.codicon.codicon-close")),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=r("clear","Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pattern",{get:function(){return this._pattern},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filterOnType",{get:function(){return this._filterOnType},enumerable:!0,configurable:!0}),e.prototype.updateOptions=function(e){e.simpleKeyboardNavigation?this.disable():this.enable(),"undefined"!==typeof e.filterOnType&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType),"undefined"!==typeof e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")},e.prototype.enable=function(){var e=this;if(!this._enabled){var t=We.chain(Kn(this.view.getHTMLElement(),"keydown")).filter((function(t){return!wM(t.target)||t.target===e.filterOnTypeDomNode})).filter((function(e){return"Dead"!==e.key&&!/^Media/.test(e.key)})).map((function(e){return new Jn(e)})).filter(this.keyboardNavigationEventFilter||function(){return!0}).filter((function(){return e.automaticKeyboardNavigation||e.triggered})).filter((function(t){return e.keyboardNavigationDelegate.mightProducePrintableCharacter(t)||(e.pattern.length>0||e.triggered)&&(9===t.keyCode||1===t.keyCode)&&!t.altKey&&!t.ctrlKey&&!t.metaKey||1===t.keyCode&&(s["e"]?t.altKey&&!t.metaKey:t.ctrlKey)&&!t.shiftKey})).forEach((function(e){e.stopPropagation(),e.preventDefault()})).event,n=Kn(this.clearDomNode,"click");We.chain(We.any(t,n)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}},e.prototype.disable=function(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)},e.prototype.onEventOrInput=function(e){"string"===typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(s["e"]?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)},e.prototype.onInput=function(e){var 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,(function(e){return!oT.isDefault(e.filterData)}));var n=this.tree.getFocus();if(n.length>0){var i=n[0];null===this.tree.getRelativeTop(i)&&this.tree.reveal(i,.5)}this.render(),e||(this.triggered=!1)},e.prototype.onDragStart=function(){var e=this,t=this.view.getHTMLElement(),n=Lo(t).left,i=t.clientWidth,o=i/2,r=this.domNode.clientWidth,s=new Te,a=this.positionClassName,u=function(){switch(a){case"nw":e.domNode.style.top="4px",e.domNode.style.left="4px";break;case"ne":e.domNode.style.top="4px",e.domNode.style.left=i-r-6+"px";break}},l=function(e){e.preventDefault();var t=e.screenX-n;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),a=t<o?"nw":"ne",u()},c=function(){e.positionClassName=a,e.domNode.className="monaco-list-type-filter "+e.positionClassName,e.domNode.style.top="",e.domNode.style.left="",Ee(s)};u(),Ji(this.domNode,a),$i(this.domNode,"dragging"),s.add(ke((function(){return Ji(e.domNode,"dragging")}))),Kn(document,"dragover")(l,null,s),Kn(this.domNode,"dragend")(c,null,s),WD.CurrentDragAndDropData=new FD("vscode-ui"),s.add(ke((function(){return WD.CurrentDragAndDropData=void 0})))},e.prototype.onDidSpliceModel=function(){this._enabled&&0!==this.pattern.length&&(this.tree.refilter(),this.render())},e.prototype.onDidChangeFilterOnType=function(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitle()},e.prototype.updateFilterOnTypeTitle=function(){this.filterOnType?this.filterOnTypeDomNode.title=r("disable filter on type","Disable Filter on Type"):this.filterOnTypeDomNode.title=r("enable filter on type","Enable Filter on Type")},e.prototype.render=function(){var e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=r("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerHTML="",this._empty=!1),to(this.domNode,"no-matches",e),this.domNode.title=r("found","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)},e.prototype.shouldAllowFocus=function(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||(this.filter.totalCount>0&&this.filter.matchCount<=1||!oT.isDefault(e.filterData))},e.prototype.dispose=function(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),Ee(this.disposables)},e}();function wM(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function SM(e){return{elements:e.elements.map((function(e){return e.element})),browserEvent:e.browserEvent}}function LM(e,t){t(e),e.children.forEach((function(e){return LM(e,t)}))}var NM=function(){function e(e){this.identityProvider=e,this.nodes=[],this._onDidChange=new qe,this.onDidChange=this._onDidChange.event}return Object.defineProperty(e.prototype,"nodeSet",{get:function(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t){Ci(this.nodes,e)||this._set(e,!1,t)},e.prototype._set=function(e,t,n){if(this.nodes=hM(e),this.elements=void 0,this._nodeSet=void 0,!t){var i=this;this._onDidChange.fire({get elements(){return i.get()},browserEvent:n})}},e.prototype.get=function(){return this.elements||(this.elements=this.nodes.map((function(e){return e.element}))),hM(this.elements)},e.prototype.getNodes=function(){return this.nodes},e.prototype.has=function(e){return this.nodeSet.has(e)},e.prototype.onDidModelSplice=function(e){var t=this,n=e.insertedNodes,i=e.deletedNodes;if(!this.identityProvider){var o=this.createNodeSet(),r=function(e){return o.delete(e)};return i.forEach((function(e){return LM(e,r)})),void this.set($s(o))}var s=new Set,a=function(e){return s.add(t.identityProvider.getId(e.element).toString())};i.forEach((function(e){return LM(e,a)}));var u=new Map,l=function(e){return u.set(t.identityProvider.getId(e.element).toString(),e)};n.forEach((function(e){return LM(e,l)}));for(var c=[],h=0,d=this.nodes;h<d.length;h++){var f=d[h],p=this.identityProvider.getId(f.element).toString(),g=s.has(p);if(g){var m=u.get(p);m&&c.push(m)}else c.push(f)}this._set(c,!0)},e.prototype.createNodeSet=function(){for(var e=new Set,t=0,n=this.nodes;t<n.length;t++){var i=n[t];e.add(i)}return e},e}(),DM=function(e){function t(t,n){var i=e.call(this,t)||this;return i.tree=n,i}return lM(t,e),t.prototype.onPointer=function(t){if(!wM(t.browserEvent.target)){var n=t.element;if(!n)return e.prototype.onPointer.call(this,t);if(this.isSelectionRangeChangeEvent(t)||this.isSelectionSingleChangeEvent(t))return e.prototype.onPointer.call(this,t);var i=Xi(t.browserEvent.target,"monaco-tl-twistie");if(!this.tree.openOnSingleClick&&2!==t.browserEvent.detail&&!i)return e.prototype.onPointer.call(this,t);var o=!1;if(o="function"===typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(n.element):!!this.tree.expandOnlyOnTwistieClick,o&&!i)return e.prototype.onPointer.call(this,t);if(n.collapsible){var r=this.tree.model,s=r.getNodeLocation(n),a=t.browserEvent.altKey;if(r.setCollapsed(s,void 0,a),o&&i)return}e.prototype.onPointer.call(this,t)}},t.prototype.onDoubleClick=function(t){var n=Xi(t.browserEvent.target,"monaco-tl-twistie");n||e.prototype.onDoubleClick.call(this,t)},t}(zT),EM=function(e){function t(t,n,i,o,r,s,a){var u=e.call(this,t,n,i,o,a)||this;return u.focusTrait=r,u.selectionTrait=s,u}return lM(t,e),t.prototype.createMouseController=function(e){return new DM(this,e.tree)},t.prototype.splice=function(t,n,i){var o=this;if(void 0===i&&(i=[]),e.prototype.splice.call(this,t,n,i),0!==i.length){var r=[],s=[];i.forEach((function(e,n){o.focusTrait.has(e)&&r.push(t+n),o.selectionTrait.has(e)&&s.push(t+n)})),r.length>0&&e.prototype.setFocus.call(this,Oi(hM(e.prototype.getFocus.call(this),r))),s.length>0&&e.prototype.setSelection.call(this,Oi(hM(e.prototype.getSelection.call(this),s)))}},t.prototype.setFocus=function(t,n,i){var o=this;void 0===i&&(i=!1),e.prototype.setFocus.call(this,t,n),i||this.focusTrait.set(t.map((function(e){return o.element(e)})),n)},t.prototype.setSelection=function(t,n,i){var o=this;void 0===i&&(i=!1),e.prototype.setSelection.call(this,t,n),i||this.selectionTrait.set(t.map((function(e){return o.element(e)})),n)},t}(JT),xM=function(){function e(e,t,n,i,o){var r=this;void 0===o&&(o={}),this._options=o,this.eventBufferer=new Ye,this.disposables=new Te,this._onWillRefilter=new qe,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new qe;var s,a=new vM(n),u=new Ze,l=new Ze,c=new _M(l.event);this.renderers=i.map((function(e){return new yM(e,(function(){return r.model}),u.event,c,o)}));for(var h=0,d=this.renderers;h<d.length;h++){var f=d[h];this.disposables.add(f)}o.keyboardNavigationLabelProvider&&(s=new bM(this,o.keyboardNavigationLabelProvider,o.filter),o=cM(cM({},o),{filter:s}),this.disposables.add(s)),this.focus=new NM(o.identityProvider),this.selection=new NM(o.identityProvider),this.view=new EM(e,t,a,this.renderers,this.focus,this.selection,cM(cM({},gM((function(){return r.model}),o)),{tree:this})),this.model=this.createModel(e,this.view,o),u.input=this.model.onDidChangeCollapseState;var p=We.forEach(this.model.onDidSplice,(function(e){r.eventBufferer.bufferEvents((function(){r.focus.onDidModelSplice(e),r.selection.onDidModelSplice(e)}))}));if(p((function(){return null}),null,this.disposables),l.input=We.chain(We.any(p,this.focus.onDidChange,this.selection.onDidChange)).debounce((function(){return null}),0).map((function(){for(var e=new Set,t=0,n=r.focus.getNodes();t<n.length;t++){var i=n[t];e.add(i)}for(var o=0,s=r.selection.getNodes();o<s.length;o++){i=s[o];e.add(i)}return Ti(e)})).event,!1!==o.keyboardSupport){var g=We.chain(this.view.onKeyDown).filter((function(e){return!wM(e.target)})).map((function(e){return new Jn(e)}));g.filter((function(e){return 15===e.keyCode})).on(this.onLeftArrow,this,this.disposables),g.filter((function(e){return 17===e.keyCode})).on(this.onRightArrow,this,this.disposables),g.filter((function(e){return 10===e.keyCode})).on(this.onSpace,this,this.disposables)}if(o.keyboardNavigationLabelProvider){var m=o.keyboardNavigationDelegate||AT;this.typeFilterController=new CM(this,this.model,this.view,s,m),this.focusNavigationFilter=function(e){return r.typeFilterController.shouldAllowFocus(e)},this.disposables.add(this.typeFilterController)}this.styleElement=Po(this.view.getHTMLElement()),to(this.getHTMLElement(),"always",this._options.renderIndentGuides===mM.Always)}return Object.defineProperty(e.prototype,"onDidChangeFocus",{get:function(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeSelection",{get:function(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidOpen",{get:function(){return We.map(this.view.onDidOpen,SM)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidFocus",{get:function(){return this.view.onDidFocus},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeCollapseState",{get:function(){return this.model.onDidChangeCollapseState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openOnSingleClick",{get:function(){return"undefined"===typeof this._options.openOnSingleClick||this._options.openOnSingleClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expandOnlyOnTwistieClick",{get:function(){return"undefined"!==typeof this._options.expandOnlyOnTwistieClick&&this._options.expandOnlyOnTwistieClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidDispose",{get:function(){return this.view.onDidDispose},enumerable:!0,configurable:!0}),e.prototype.updateOptions=function(e){void 0===e&&(e={}),this._options=cM(cM({},this._options),e);for(var t=0,n=this.renderers;t<n.length;t++){var i=n[t];i.updateOptions(e)}this.view.updateOptions({enableKeyboardNavigation:this._options.simpleKeyboardNavigation,automaticKeyboardNavigation:this._options.automaticKeyboardNavigation}),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),to(this.getHTMLElement(),"always",this._options.renderIndentGuides===mM.Always)},Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),e.prototype.getHTMLElement=function(){return this.view.getHTMLElement()},Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.view.scrollTop},set:function(e){this.view.scrollTop=e},enumerable:!0,configurable:!0}),e.prototype.domFocus=function(){this.view.domFocus()},e.prototype.layout=function(e,t){this.view.layout(e,t)},e.prototype.style=function(e){var t="."+this.view.domId,n=[];e.treeIndentGuidesStroke&&(n.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)+"; }"),n.push(".monaco-list"+t+" .monaco-tl-indent > .indent-guide.active { border-color: "+e.treeIndentGuidesStroke+"; }"));var i=n.join("\n");i!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=i),this.view.style(e)},e.prototype.collapse=function(e,t){return void 0===t&&(t=!1),this.model.setCollapsed(e,!0,t)},e.prototype.expand=function(e,t){return void 0===t&&(t=!1),this.model.setCollapsed(e,!1,t)},e.prototype.isCollapsible=function(e){return this.model.isCollapsible(e)},e.prototype.setCollapsible=function(e,t){return this.model.setCollapsible(e,t)},e.prototype.isCollapsed=function(e){return this.model.isCollapsed(e)},e.prototype.refilter=function(){this._onWillRefilter.fire(void 0),this.model.refilter()},e.prototype.setSelection=function(e,t){var n=this,i=e.map((function(e){return n.model.getNode(e)}));this.selection.set(i,t);var o=e.map((function(e){return n.model.getListIndex(e)})).filter((function(e){return e>-1}));this.view.setSelection(o,t,!0)},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.setFocus=function(e,t){var n=this,i=e.map((function(e){return n.model.getNode(e)}));this.focus.set(i,t);var o=e.map((function(e){return n.model.getListIndex(e)})).filter((function(e){return e>-1}));this.view.setFocus(o,t,!0)},e.prototype.focusNext=function(e,t,n,i){void 0===e&&(e=1),void 0===t&&(t=!1),void 0===i&&(i=this.focusNavigationFilter),this.view.focusNext(e,t,n,i)},e.prototype.getFocus=function(){return this.focus.get()},e.prototype.reveal=function(e,t){this.model.expandTo(e);var n=this.model.getListIndex(e);-1!==n&&this.view.reveal(n,t)},e.prototype.getRelativeTop=function(e){var t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(t)},e.prototype.onLeftArrow=function(e){e.preventDefault(),e.stopPropagation();var t=this.view.getFocusedElements();if(0!==t.length){var n=t[0],i=this.model.getNodeLocation(n),o=this.model.setCollapsed(i,!0);if(!o){var r=this.model.getParentNodeLocation(i);if(!r)return;var s=this.model.getListIndex(r);this.view.reveal(s),this.view.setFocus([s])}}},e.prototype.onRightArrow=function(e){e.preventDefault(),e.stopPropagation();var t=this.view.getFocusedElements();if(0!==t.length){var n=t[0],i=this.model.getNodeLocation(n),o=this.model.setCollapsed(i,!1);if(!o){if(!n.children.some((function(e){return e.visible})))return;var r=this.view.getFocus()[0],s=r+1;this.view.reveal(s),this.view.setFocus([s])}}},e.prototype.onSpace=function(e){e.preventDefault(),e.stopPropagation();var t=this.view.getFocusedElements();if(0!==t.length){var n=t[0],i=this.model.getNodeLocation(n),o=e.browserEvent.altKey;this.model.setCollapsed(i,void 0,o)}},e.prototype.dispose=function(){Ee(this.disposables),this.view.dispose()},e}(),kM=function(){return kM=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},kM.apply(this,arguments)},OM=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i},TM=function(){function e(e,t,n){void 0===n&&(n={}),this.user=e,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new uM(e,t,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare:function(e,t){return n.sorter.compare(e.element,t.element)}}),this.identityProvider=n.identityProvider}return e.prototype.setChildren=function(e,t,n,i){var o=this.getElementLocation(e);this._setChildren(o,this.preserveCollapseState(t),n,i)},e.prototype._setChildren=function(e,t,n,i){var o=this,r=new Set,s=new Set,a=function(e){if(r.add(e.element),o.nodes.set(e.element,e),o.identityProvider){var t=o.identityProvider.getId(e.element).toString();s.add(t),o.nodesByIdentity.set(t,e)}n&&n(e)},u=function(e){if(r.has(e.element)||o.nodes.delete(e.element),o.identityProvider){var t=o.identityProvider.getId(e.element).toString();s.has(t)||o.nodesByIdentity.delete(t)}i&&i(e)};this.model.splice(OM(e,[0]),Number.MAX_VALUE,t,a,u)},e.prototype.preserveCollapseState=function(e){var t=this,n=e?Fe(e):Oe.empty();return this.sorter&&(n=Oe.fromArray(Si(Oe.collect(n),this.sorter.compare.bind(this.sorter)))),Oe.map(n,(function(e){var n=t.nodes.get(e.element);if(!n&&t.identityProvider){var i=t.identityProvider.getId(e.element).toString();n=t.nodesByIdentity.get(i)}if(!n)return kM(kM({},e),{children:t.preserveCollapseState(e.children)});var o="boolean"===typeof e.collapsible?e.collapsible:n.collapsible,r="undefined"!==typeof e.collapsed?e.collapsed:n.collapsed;return kM(kM({},e),{collapsible:o,collapsed:r,children:t.preserveCollapseState(e.children)})}))},e.prototype.rerender=function(e){var t=this.getElementLocation(e);this.model.rerender(t)},e.prototype.has=function(e){return this.nodes.has(e)},e.prototype.getListIndex=function(e){var t=this.getElementLocation(e);return this.model.getListIndex(t)},e.prototype.getListRenderCount=function(e){var t=this.getElementLocation(e);return this.model.getListRenderCount(t)},e.prototype.isCollapsible=function(e){var t=this.getElementLocation(e);return this.model.isCollapsible(t)},e.prototype.setCollapsible=function(e,t){var n=this.getElementLocation(e);return this.model.setCollapsible(n,t)},e.prototype.isCollapsed=function(e){var t=this.getElementLocation(e);return this.model.isCollapsed(t)},e.prototype.setCollapsed=function(e,t,n){var i=this.getElementLocation(e);return this.model.setCollapsed(i,t,n)},e.prototype.expandTo=function(e){var t=this.getElementLocation(e);this.model.expandTo(t)},e.prototype.refilter=function(){this.model.refilter()},e.prototype.getNode=function(e){if(void 0===e&&(e=null),null===e)return this.model.getNode(this.model.rootRef);var t=this.nodes.get(e);if(!t)throw new nM(this.user,"Tree element not found: "+e);return t},e.prototype.getNodeLocation=function(e){return e.element},e.prototype.getParentNodeLocation=function(e){if(null===e)throw new nM(this.user,"Invalid getParentNodeLocation call");var t=this.nodes.get(e);if(!t)throw new nM(this.user,"Tree element not found: "+e);var n=this.model.getNodeLocation(t),i=this.model.getParentNodeLocation(n),o=this.model.getNode(i);return o.element},e.prototype.getElementLocation=function(e){if(null===e)return[];var t=this.nodes.get(e);if(!t)throw new nM(this.user,"Tree element not found: "+e);return this.model.getNodeLocation(t)},e}(),MM=function(){return MM=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},MM.apply(this,arguments)};function IM(e){var t=[e.element],n=e.incompressible||!1;return{element:{elements:t,incompressible:n},children:Oe.map(Oe.from(e.children),IM),collapsible:e.collapsible,collapsed:e.collapsed}}function AM(e){var t,n,i=[e.element],o=e.incompressible||!1;while(1){if(t=Oe.from(e.children),n=Oe.collect(t,2),1!==n.length)break;if(e=n[0],e.incompressible)break;i.push(e.element)}return{element:{elements:i,incompressible:o},children:Oe.map(Oe.concat(Oe.fromArray(n),t),AM),collapsible:e.collapsible,collapsed:e.collapsed}}function PM(e,t){var n;return void 0===t&&(t=0),n=t<e.element.elements.length-1?Oe.single(PM(e,t+1)):Oe.map(Oe.from(e.children),(function(e){return PM(e,0)})),0===t&&e.element.incompressible?{element:e.element.elements[t],children:n,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:n,collapsible:e.collapsible,collapsed:e.collapsed}}function RM(e){return PM(e,0)}function FM(e,t,n){return e.element===t?MM(MM({},e),{children:n}):MM(MM({},e),{children:Oe.map(Oe.from(e.children),(function(e){return FM(e,t,n)}))})}var WM=function(){function e(e,t,n){void 0===n&&(n={}),this.user=e,this.nodes=new Map,this.model=new TM(e,t,n),this.enabled="undefined"===typeof n.compressionEnabled||n.compressionEnabled}return Object.defineProperty(e.prototype,"onDidSplice",{get:function(){return this.model.onDidSplice},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeCollapseState",{get:function(){return this.model.onDidChangeCollapseState},enumerable:!0,configurable:!0}),e.prototype.setChildren=function(e,t){if(null!==e){var n=this.nodes.get(e);if(!n)throw new Error("Unknown compressed tree node");var i=this.model.getNode(n),o=this.model.getParentNodeLocation(n),r=this.model.getNode(o),s=RM(i),a=FM(s,e,Oe.from(t)),u=(this.enabled?AM:IM)(a),l=r.children.map((function(e){return e===i?u:e}));this._setChildren(r.element,l)}else{var c=Oe.map(Oe.from(t),this.enabled?AM:IM);this._setChildren(null,c)}},e.prototype.setCompressionEnabled=function(e){if(e!==this.enabled){this.enabled=e;var t=this.model.getNode(),n=Oe.from(t.children),i=Oe.map(n,RM),o=Oe.map(i,e?AM:IM);this._setChildren(null,o)}},e.prototype._setChildren=function(e,t){var n=this,i=new Set,o=function(e){for(var t=0,o=e.element.elements;t<o.length;t++){var r=o[t];i.add(r),n.nodes.set(r,e.element)}},r=function(e){for(var t=0,o=e.element.elements;t<o.length;t++){var r=o[t];i.has(r)||n.nodes.delete(r)}};this.model.setChildren(e,t,o,r)},e.prototype.has=function(e){return this.nodes.has(e)},e.prototype.getListIndex=function(e){var t=this.getCompressedNode(e);return this.model.getListIndex(t)},e.prototype.getListRenderCount=function(e){var t=this.getCompressedNode(e);return this.model.getListRenderCount(t)},e.prototype.getNode=function(e){if("undefined"===typeof e)return this.model.getNode();var t=this.getCompressedNode(e);return this.model.getNode(t)},e.prototype.getNodeLocation=function(e){var t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]},e.prototype.getParentNodeLocation=function(e){var t=this.getCompressedNode(e),n=this.model.getParentNodeLocation(t);return null===n?null:n.elements[n.elements.length-1]},e.prototype.isCollapsible=function(e){var t=this.getCompressedNode(e);return this.model.isCollapsible(t)},e.prototype.setCollapsible=function(e,t){var n=this.getCompressedNode(e);return this.model.setCollapsible(n,t)},e.prototype.isCollapsed=function(e){var t=this.getCompressedNode(e);return this.model.isCollapsed(t)},e.prototype.setCollapsed=function(e,t,n){var i=this.getCompressedNode(e);return this.model.setCollapsed(i,t,n)},e.prototype.expandTo=function(e){var t=this.getCompressedNode(e);this.model.expandTo(t)},e.prototype.rerender=function(e){var t=this.getCompressedNode(e);this.model.rerender(t)},e.prototype.refilter=function(){this.model.refilter()},e.prototype.getCompressedNode=function(e){if(null===e)return null;var t=this.nodes.get(e);if(!t)throw new nM(this.user,"Tree element not found: "+e);return t},e}(),VM=function(e){return e[e.length-1]},BM=function(){function e(e,t){this.unwrapper=e,this.node=t}return Object.defineProperty(e.prototype,"element",{get:function(){return null===this.node.element?null:this.unwrapper(this.node.element)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){var t=this;return this.node.children.map((function(n){return new e(t.unwrapper,n)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"depth",{get:function(){return this.node.depth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visibleChildrenCount",{get:function(){return this.node.visibleChildrenCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visibleChildIndex",{get:function(){return this.node.visibleChildIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapsible",{get:function(){return this.node.collapsible},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapsed",{get:function(){return this.node.collapsed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this.node.visible},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filterData",{get:function(){return this.node.filterData},enumerable:!0,configurable:!0}),e}();function HM(e,t){return{splice:function(n,i,o){t.splice(n,i,o.map((function(t){return e.map(t)})))}}}function zM(e,t){return MM(MM({},t),{sorter:t.sorter&&{compare:function(e,n){return t.sorter.compare(e.elements[0],n.elements[0])}},identityProvider:t.identityProvider&&{getId:function(n){return t.identityProvider.getId(e(n))}},filter:t.filter&&{filter:function(n,i){return t.filter.filter(e(n),i)}}})}var jM=function(){function e(e,t,n){var i=this;void 0===n&&(n={}),this.elementMapper=n.elementMapper||VM;var o=function(e){return i.elementMapper(e.elements)};this.nodeMapper=new iM((function(e){return new BM(o,e)})),this.model=new WM(e,HM(this.nodeMapper,t),zM(o,n))}return Object.defineProperty(e.prototype,"onDidSplice",{get:function(){var e=this;return We.map(this.model.onDidSplice,(function(t){var n=t.insertedNodes,i=t.deletedNodes;return{insertedNodes:n.map((function(t){return e.nodeMapper.map(t)})),deletedNodes:i.map((function(t){return e.nodeMapper.map(t)}))}}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeCollapseState",{get:function(){var e=this;return We.map(this.model.onDidChangeCollapseState,(function(t){var n=t.node,i=t.deep;return{node:e.nodeMapper.map(n),deep:i}}))},enumerable:!0,configurable:!0}),e.prototype.setChildren=function(e,t){this.model.setChildren(e,t)},e.prototype.setCompressionEnabled=function(e){this.model.setCompressionEnabled(e)},e.prototype.has=function(e){return this.model.has(e)},e.prototype.getListIndex=function(e){return this.model.getListIndex(e)},e.prototype.getListRenderCount=function(e){return this.model.getListRenderCount(e)},e.prototype.getNode=function(e){return this.nodeMapper.map(this.model.getNode(e))},e.prototype.getNodeLocation=function(e){return e.element},e.prototype.getParentNodeLocation=function(e){return this.model.getParentNodeLocation(e)},e.prototype.isCollapsible=function(e){return this.model.isCollapsible(e)},e.prototype.setCollapsible=function(e,t){return this.model.setCollapsible(e,t)},e.prototype.isCollapsed=function(e){return this.model.isCollapsed(e)},e.prototype.setCollapsed=function(e,t,n){return this.model.setCollapsed(e,t,n)},e.prototype.expandTo=function(e){return this.model.expandTo(e)},e.prototype.rerender=function(e){return this.model.rerender(e)},e.prototype.refilter=function(){return this.model.refilter()},e.prototype.getCompressedTreeNode=function(e){return void 0===e&&(e=null),this.model.getNode(e)},e}(),UM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),KM=function(){return KM=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},KM.apply(this,arguments)},qM=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},GM=function(e){function t(t,n,i,o,r){return void 0===r&&(r={}),e.call(this,t,n,i,o,r)||this}return UM(t,e),Object.defineProperty(t.prototype,"onDidChangeCollapseState",{get:function(){return this.model.onDidChangeCollapseState},enumerable:!0,configurable:!0}),t.prototype.setChildren=function(e,t){this.model.setChildren(e,t)},t.prototype.rerender=function(e){void 0!==e?this.model.rerender(e):this.view.rerender()},t.prototype.hasElement=function(e){return this.model.has(e)},t.prototype.createModel=function(e,t,n){return new TM(e,t,n)},t}(xM),YM=function(){function e(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}return Object.defineProperty(e.prototype,"compressedTreeNodeProvider",{get:function(){return this._compressedTreeNodeProvider()},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this.renderer.renderTemplate(e);return{compressedTreeNode:void 0,data:t}},e.prototype.renderElement=function(e,t,n,i){var o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===o.element.elements.length?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,t,n.data,i)):(n.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,n.data,i))},e.prototype.disposeElement=function(e,t,n,i){n.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(n.compressedTreeNode,t,n.data,i):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,n.data,i)},e.prototype.disposeTemplate=function(e){this.renderer.disposeTemplate(e.data)},e.prototype.renderTwistie=function(e,t){this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)},qM([Ng],e.prototype,"compressedTreeNodeProvider",null),e}();function ZM(e,t){return t&&KM(KM({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel:function(n){var i;try{i=e().getCompressedTreeNode(n)}catch(o){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n)}return 1===i.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}})}var XM=function(e){function t(t,n,i,o,r){void 0===r&&(r={});var s=this,a=function(){return s},u=o.map((function(e){return new YM(a,e)}));return s=e.call(this,t,n,i,u,ZM(a,r))||this,s}return UM(t,e),t.prototype.setChildren=function(e,t){this.model.setChildren(e,t)},t.prototype.createModel=function(e,t,n){return new jM(e,t,n)},t.prototype.updateOptions=function(t){void 0===t&&(t={}),e.prototype.updateOptions.call(this,t),"undefined"!==typeof t.compressionEnabled&&this.model.setCompressionEnabled(t.compressionEnabled)},t.prototype.getCompressedTreeNode=function(e){return void 0===e&&(e=null),this.model.getCompressedTreeNode(e)},t}(GM),$M=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),QM=function(){return QM=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},QM.apply(this,arguments)},JM=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{u(i.next(e))}catch(t){r(t)}}function a(e){try{u(i["throw"](e))}catch(t){r(t)}}function u(e){e.done?n(e.value):o(e.value).then(s,a)}u((i=i.apply(e,t||[])).next())}))},eI=function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return u([e,t])}}function u(r){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,i&&(o=2&r[0]?i["return"]:r[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(a){r=[6,a],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}},tI=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i};function nI(e){return QM(QM({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function iI(e,t){return!!t.parent&&(t.parent===e||iI(e,t.parent))}function oI(e,t){return e===t||iI(e,t)||iI(t,e)}var rI=function(){function e(e){this.node=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this.node.element.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.node.children.map((function(t){return new e(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"depth",{get:function(){return this.node.depth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visibleChildrenCount",{get:function(){return this.node.visibleChildrenCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visibleChildIndex",{get:function(){return this.node.visibleChildIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapsible",{get:function(){return this.node.collapsible},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapsed",{get:function(){return this.node.collapsed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this.node.visible},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filterData",{get:function(){return this.node.filterData},enumerable:!0,configurable:!0}),e}(),sI=function(){function e(e,t,n){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.templateId=e.templateId}return e.prototype.renderTemplate=function(e){var t=this.renderer.renderTemplate(e);return{templateData:t}},e.prototype.renderElement=function(e,t,n,i){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,i)},e.prototype.renderTwistie=function(e,t){return to(t,"codicon-loading",e.slow),!1},e.prototype.disposeElement=function(e,t,n,i){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,n.templateData,i)},e.prototype.disposeTemplate=function(e){this.renderer.disposeTemplate(e.templateData)},e.prototype.dispose=function(){this.renderedNodes.clear()},e}();function aI(e){return{browserEvent:e.browserEvent,elements:e.elements.map((function(e){return e.element}))}}var uI=function(e){function t(t){var n=e.call(this,t.elements.map((function(e){return e.element})))||this;return n.data=t,n}return $M(t,e),t}(kO);function lI(e){return e instanceof kO?new uI(e):e}var cI=function(){function e(e){this.dnd=e}return e.prototype.getDragURI=function(e){return this.dnd.getDragURI(e.element)},e.prototype.getDragLabel=function(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((function(e){return e.element})),t)},e.prototype.onDragStart=function(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(lI(e),t)},e.prototype.onDragOver=function(e,t,n,i,o){return void 0===o&&(o=!0),this.dnd.onDragOver(lI(e),t&&t.element,n,i)},e.prototype.drop=function(e,t,n,i){this.dnd.drop(lI(e),t&&t.element,n,i)},e.prototype.onDragEnd=function(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)},e}();function hI(e){return e&&QM(QM({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:function(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new cI(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:function(t){return e.multipleSelectionController.isSelectionSingleChangeEvent(QM(QM({},t),{element:t.element}))},isSelectionRangeChangeEvent:function(t){return e.multipleSelectionController.isSelectionRangeChangeEvent(QM(QM({},t),{element:t.element}))}},accessibilityProvider:e.accessibilityProvider&&QM(QM({},e.accessibilityProvider),{getAriaLabel:function(t){return e.accessibilityProvider.getAriaLabel(t.element)},getAriaLevel:e.accessibilityProvider.getAriaLevel&&function(t){return e.accessibilityProvider.getAriaLevel(t.element)},getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&function(t){return e.accessibilityProvider.getActiveDescendantId(t.element)}}),filter:e.filter&&{filter:function(t,n){return e.filter.filter(t.element,n)}},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&QM(QM({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:function(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}}),sorter:void 0,expandOnlyOnTwistieClick:"undefined"===typeof e.expandOnlyOnTwistieClick?void 0:"function"!==typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:function(t){return e.expandOnlyOnTwistieClick(t.element)},ariaProvider:e.ariaProvider&&{getPosInSet:function(t,n){return e.ariaProvider.getPosInSet(t.element,n)},getSetSize:function(t,n,i){return e.ariaProvider.getSetSize(t.element,n,i)},getRole:e.ariaProvider.getRole?function(t){return e.ariaProvider.getRole(t.element)}:void 0,isChecked:e.ariaProvider.isChecked?function(t){var n;return(null===(n=e.ariaProvider)||void 0===n?void 0:n.isChecked)(t.element)}:void 0},additionalScrollHeight:e.additionalScrollHeight})}function dI(e,t){t(e),e.children.forEach((function(e){return dI(e,t)}))}var fI=function(){function e(e,t,n,i,o,r){void 0===r&&(r={}),this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new qe,this._onDidChangeNodeSlowState=new qe,this.nodeMapper=new iM((function(e){return new rI(e)})),this.disposables=new Te,this.identityProvider=r.identityProvider,this.autoExpandSingleChildren="undefined"!==typeof r.autoExpandSingleChildren&&r.autoExpandSingleChildren,this.sorter=r.sorter,this.collapseByDefault=r.collapseByDefault,this.tree=this.createTree(e,t,n,i,r),this.root=nI({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=QM(QM({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}return Object.defineProperty(e.prototype,"onDidChangeFocus",{get:function(){return We.map(this.tree.onDidChangeFocus,aI)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChangeSelection",{get:function(){return We.map(this.tree.onDidChangeSelection,aI)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidOpen",{get:function(){return We.map(this.tree.onDidOpen,aI)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidFocus",{get:function(){return this.tree.onDidFocus},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidDispose",{get:function(){return this.tree.onDidDispose},enumerable:!0,configurable:!0}),e.prototype.createTree=function(e,t,n,i,o){var r=this,s=new vM(n),a=i.map((function(e){return new sI(e,r.nodeMapper,r._onDidChangeNodeSlowState.event)})),u=hI(o)||{};return new GM(e,t,s,a,u)},e.prototype.updateOptions=function(e){void 0===e&&(e={}),this.tree.updateOptions(e)},e.prototype.getHTMLElement=function(){return this.tree.getHTMLElement()},Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.tree.scrollTop},set:function(e){this.tree.scrollTop=e},enumerable:!0,configurable:!0}),e.prototype.domFocus=function(){this.tree.domFocus()},e.prototype.layout=function(e,t){this.tree.layout(e,t)},e.prototype.style=function(e){this.tree.style(e)},e.prototype.getInput=function(){return this.root.element},e.prototype.setInput=function(e,t){return JM(this,void 0,void 0,(function(){var n;return eI(this,(function(i){switch(i.label){case 0:return this.refreshPromises.forEach((function(e){return e.cancel()})),this.refreshPromises.clear(),this.root.element=e,n=t&&{viewState:t,focus:[],selection:[]},[4,this._updateChildren(e,!0,!1,n)];case 1:return i.sent(),n&&(this.tree.setFocus(n.focus),this.tree.setSelection(n.selection)),t&&"number"===typeof t.scrollTop&&(this.scrollTop=t.scrollTop),[2]}}))}))},e.prototype._updateChildren=function(e,t,n,i){return void 0===e&&(e=this.root.element),void 0===t&&(t=!0),void 0===n&&(n=!1),JM(this,void 0,void 0,(function(){var o;return eI(this,(function(r){switch(r.label){case 0:if("undefined"===typeof this.root.element)throw new nM(this.user,"Tree input not set");return this.root.refreshPromise?[4,this.root.refreshPromise]:[3,3];case 1:return r.sent(),[4,We.toPromise(this._onDidRender.event)];case 2:r.sent(),r.label=3;case 3:return o=this.getDataNode(e),[4,this.refreshAndRenderNode(o,t,i)];case 4:if(r.sent(),n)try{this.tree.rerender(o)}catch(s){}return[2]}}))}))},e.prototype.rerender=function(e){if(void 0!==e&&e!==this.root.element){var t=this.getDataNode(e);this.tree.rerender(t)}else this.tree.rerender()},e.prototype.collapse=function(e,t){void 0===t&&(t=!1);var n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,t)},e.prototype.expand=function(e,t){return void 0===t&&(t=!1),JM(this,void 0,void 0,(function(){var n,i;return eI(this,(function(o){switch(o.label){case 0:if("undefined"===typeof this.root.element)throw new nM(this.user,"Tree input not set");return this.root.refreshPromise?[4,this.root.refreshPromise]:[3,3];case 1:return o.sent(),[4,We.toPromise(this._onDidRender.event)];case 2:o.sent(),o.label=3;case 3:return n=this.getDataNode(e),this.tree.hasElement(n)&&!this.tree.isCollapsible(n)?[2,!1]:n.refreshPromise?[4,this.root.refreshPromise]:[3,6];case 4:return o.sent(),[4,We.toPromise(this._onDidRender.event)];case 5:o.sent(),o.label=6;case 6:return n===this.root||n.refreshPromise||this.tree.isCollapsed(n)?(i=this.tree.expand(n===this.root?null:n,t),n.refreshPromise?[4,this.root.refreshPromise]:[3,9]):[2,!1];case 7:return o.sent(),[4,We.toPromise(this._onDidRender.event)];case 8:o.sent(),o.label=9;case 9:return[2,i]}}))}))},e.prototype.setSelection=function(e,t){var n=this,i=e.map((function(e){return n.getDataNode(e)}));this.tree.setSelection(i,t)},e.prototype.getSelection=function(){var e=this.tree.getSelection();return e.map((function(e){return e.element}))},e.prototype.setFocus=function(e,t){var n=this,i=e.map((function(e){return n.getDataNode(e)}));this.tree.setFocus(i,t)},e.prototype.getFocus=function(){var e=this.tree.getFocus();return e.map((function(e){return e.element}))},e.prototype.reveal=function(e,t){this.tree.reveal(this.getDataNode(e),t)},e.prototype.getDataNode=function(e){var t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new nM(this.user,"Data tree node not found: "+e);return t},e.prototype.refreshAndRenderNode=function(e,t,n){return JM(this,void 0,void 0,(function(){return eI(this,(function(i){switch(i.label){case 0:return[4,this.refreshNode(e,t,n)];case 1:return i.sent(),this.render(e,n),[2]}}))}))},e.prototype.refreshNode=function(e,t,n){return JM(this,void 0,void 0,(function(){var i,o=this;return eI(this,(function(r){return this.subTreeRefreshPromises.forEach((function(r,s){!i&&oI(s,e)&&(i=r.then((function(){return o.refreshNode(e,t,n)})))})),i?[2,i]:[2,this.doRefreshSubTree(e,t,n)]}))}))},e.prototype.doRefreshSubTree=function(e,t,n){return JM(this,void 0,void 0,(function(){var i,o,r=this;return eI(this,(function(s){switch(s.label){case 0:e.refreshPromise=new Promise((function(e){return i=e})),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((function(){e.refreshPromise=void 0,r.subTreeRefreshPromises.delete(e)})),s.label=1;case 1:return s.trys.push([1,,4,5]),[4,this.doRefreshNode(e,t,n)];case 2:return o=s.sent(),e.stale=!1,[4,Promise.all(o.map((function(e){return r.doRefreshSubTree(e,t,n)})))];case 3:return s.sent(),[3,5];case 4:return i(),[7];case 5:return[2]}}))}))},e.prototype.doRefreshNode=function(e,t,n){return JM(this,void 0,void 0,(function(){var i,o,r,s,a=this;return eI(this,(function(u){switch(u.label){case 0:e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren?(o=hi(800),o.then((function(){e.slow=!0,a._onDidChangeNodeSlowState.fire(e)}),(function(e){return null})),i=this.doGetChildren(e).finally((function(){return o.cancel()}))):i=Promise.resolve([]),u.label=1;case 1:return u.trys.push([1,3,4,5]),[4,i];case 2:return r=u.sent(),[2,this.setChildren(e,r,t,n)];case 3:if(s=u.sent(),e!==this.root&&this.tree.collapse(e===this.root?null:e),_e(s))return[2,[]];throw s;case 4:return e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e)),[7];case 5:return[2]}}))}))},e.prototype.doGetChildren=function(e){var t=this,n=this.refreshPromises.get(e);return n||(n=li((function(){return JM(t,void 0,void 0,(function(){var t;return eI(this,(function(n){switch(n.label){case 0:return[4,this.dataSource.getChildren(e.element)];case 1:return t=n.sent(),[2,this.processChildren(t)]}}))}))})),this.refreshPromises.set(e,n),n.finally((function(){return t.refreshPromises.delete(e)})))},e.prototype._onDidChangeCollapseState=function(e){var t=e.node,n=e.deep;!t.collapsed&&t.element.stale&&(n?this.collapse(t.element.element):this.refreshAndRenderNode(t.element,!1).catch(ge))},e.prototype.setChildren=function(e,t,n,i){var o,r=this;if(0===e.children.length&&0===t.length)return[];for(var s=new Map,a=new Map,u=0,l=e.children;u<l.length;u++){var c=l[u];if(s.set(c.element,c),this.identityProvider){var h=this.tree.isCollapsed(c);a.set(c.id,{node:c,collapsed:h})}}for(var d=[],f=t.map((function(t){var o=!!r.dataSource.hasChildren(t);if(!r.identityProvider){var u=nI({element:t,parent:e,hasChildren:o});return o&&r.collapseByDefault&&!r.collapseByDefault(t)&&(u.collapsedByDefault=!1,d.push(u)),u}var l=r.identityProvider.getId(t).toString(),c=a.get(l);if(c){u=c.node;return s.delete(u.element),r.nodes.delete(u.element),r.nodes.set(t,u),u.element=t,u.hasChildren=o,n?c.collapsed?(u.children.forEach((function(e){return dI(e,(function(e){return r.nodes.delete(e.element)}))})),u.children.splice(0,u.children.length),u.stale=!0):d.push(u):o&&r.collapseByDefault&&!r.collapseByDefault(t)&&(u.collapsedByDefault=!1,d.push(u)),u}var h=nI({element:t,parent:e,id:l,hasChildren:o});return i&&i.viewState.focus&&i.viewState.focus.indexOf(l)>-1&&i.focus.push(h),i&&i.viewState.selection&&i.viewState.selection.indexOf(l)>-1&&i.selection.push(h),i&&i.viewState.expanded&&i.viewState.expanded.indexOf(l)>-1?d.push(h):o&&r.collapseByDefault&&!r.collapseByDefault(t)&&(h.collapsedByDefault=!1,d.push(h)),h})),p=0,g=$s(s);p<g.length;p++){var m=g[p];dI(m,(function(e){return r.nodes.delete(e.element)}))}for(var v=0,_=f;v<_.length;v++){c=_[v];this.nodes.set(c.element,c)}return(o=e.children).splice.apply(o,tI([0,e.children.length],f)),e!==this.root&&this.autoExpandSingleChildren&&1===f.length&&0===d.length&&(f[0].collapsedByDefault=!1,d.push(f[0])),d},e.prototype.render=function(e,t){var n=this,i=e.children.map((function(e){return n.asTreeElement(e,t)}));this.tree.setChildren(e===this.root?null:e,i),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()},e.prototype.asTreeElement=function(e,t){var n,i=this;return e.stale?{element:e,collapsible:e.hasChildren,collapsed:!0}:(n=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?Oe.map(Oe.fromArray(e.children),(function(e){return i.asTreeElement(e,t)})):[],collapsible:e.hasChildren,collapsed:n})},e.prototype.processChildren=function(e){return this.sorter&&e.sort(this.sorter.compare.bind(this.sorter)),e},e.prototype.dispose=function(){this.disposables.dispose()},e}(),pI=function(){function e(e){this.node=e}return Object.defineProperty(e.prototype,"element",{get:function(){return{elements:this.node.element.elements.map((function(e){return e.element})),incompressible:this.node.element.incompressible}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.node.children.map((function(t){return new e(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"depth",{get:function(){return this.node.depth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visibleChildrenCount",{get:function(){return this.node.visibleChildrenCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visibleChildIndex",{get:function(){return this.node.visibleChildIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapsible",{get:function(){return this.node.collapsible},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapsed",{get:function(){return this.node.collapsed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this.node.visible},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filterData",{get:function(){return this.node.filterData},enumerable:!0,configurable:!0}),e}(),gI=function(){function e(e,t,n,i){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}return e.prototype.renderTemplate=function(e){var t=this.renderer.renderTemplate(e);return{templateData:t}},e.prototype.renderElement=function(e,t,n,i){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,i)},e.prototype.renderCompressedElements=function(e,t,n,i){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,i)},e.prototype.renderTwistie=function(e,t){return to(t,"codicon-loading",e.slow),!1},e.prototype.disposeElement=function(e,t,n,i){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,n.templateData,i)},e.prototype.disposeCompressedElements=function(e,t,n,i){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,i)},e.prototype.disposeTemplate=function(e){this.renderer.disposeTemplate(e.templateData)},e.prototype.dispose=function(){this.renderedNodes.clear(),this.disposables=Ee(this.disposables)},e}();function mI(e){var t=e&&hI(e);return t&&QM(QM({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&QM(QM({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:function(t){return e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((function(e){return e.element})))}})})}var vI=function(e){function t(t,n,i,o,r,s,a){void 0===a&&(a={});var u=e.call(this,t,n,i,r,s,a)||this;return u.compressionDelegate=o,u.compressibleNodeMapper=new iM((function(e){return new pI(e)})),u.filter=a.filter,u}return $M(t,e),t.prototype.createTree=function(e,t,n,i,o){var r=this,s=new vM(n),a=i.map((function(e){return new gI(e,r.nodeMapper,(function(){return r.compressibleNodeMapper}),r._onDidChangeNodeSlowState.event)})),u=mI(o)||{};return new XM(e,t,s,a,u)},t.prototype.asTreeElement=function(t,n){return QM({incompressible:this.compressionDelegate.isIncompressible(t.element)},e.prototype.asTreeElement.call(this,t,n))},t.prototype.updateOptions=function(e){void 0===e&&(e={}),this.tree.updateOptions(e)},t.prototype.render=function(t,n){var i=this;if(!this.identityProvider)return e.prototype.render.call(this,t,n);var o=function(e){return i.identityProvider.getId(e).toString()},r=function(e){for(var t=new Set,n=0,r=e;n<r.length;n++){var s=r[n],a=i.tree.getCompressedTreeNode(s===i.root?null:s);if(a.element)for(var u=0,l=a.element.elements;u<l.length;u++){var c=l[u];t.add(o(c.element))}}return t},s=r(this.tree.getSelection()),a=r(this.tree.getFocus());e.prototype.render.call(this,t,n);var u=this.getSelection(),l=!1,c=this.getFocus(),h=!1,d=function(e){var t=e.element;if(t)for(var n=0;n<t.elements.length;n++){var i=o(t.elements[n].element),r=t.elements[t.elements.length-1].element;s.has(i)&&-1===u.indexOf(r)&&(u.push(r),l=!0),a.has(i)&&-1===c.indexOf(r)&&(c.push(r),h=!0)}e.children.forEach(d)};d(this.tree.getCompressedTreeNode(t===this.root?null:t)),l&&this.setSelection(u),h&&this.setFocus(c)},t.prototype.processChildren=function(t){var n=this;return this.filter&&(t=t.filter((function(e){var t=n.filter.filter(e,1),i=_I(t);if(2===i)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===i}))),e.prototype.processChildren.call(this,t)},t}(fI);function _I(e){return"boolean"===typeof e?e?1:0:rM(e)?sM(e.visibility):sM(e)}var yI,bI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),CI=function(e){function t(t,n,i,o,r,s){void 0===s&&(s={});var a=e.call(this,t,n,i,o,s)||this;return a.user=t,a.dataSource=r,a.identityProvider=s.identityProvider,a}return bI(t,e),t.prototype.createModel=function(e,t,n){return new TM(e,t,n)},t}(xM),wI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),SI=function(){return SI=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},SI.apply(this,arguments)},LI=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},NI=function(e,t){return function(n,i){t(n,i,e)}},DI=Nn("listService"),EI=function(){function e(e){this._themeService=e,this.disposables=new Te,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}return Object.defineProperty(e.prototype,"lastFocusedList",{get:function(){return this._lastFocusedWidget},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this;if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;var i=new jT(Po(),"");this.disposables.add(Bk(i,this._themeService))}if(this.lists.some((function(t){return t.widget===e})))throw new Error("Cannot register the same widget multiple times");var o={widget:e,extraContextKeys:t};return this.lists.push(o),e.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=e),xe(e.onDidFocus((function(){return n._lastFocusedWidget=e})),ke((function(){return n.lists.splice(n.lists.indexOf(o),1)})),e.onDidDispose((function(){n.lists=n.lists.filter((function(e){return e!==o})),n._lastFocusedWidget===e&&(n._lastFocusedWidget=void 0)})))},e.prototype.dispose=function(){this.disposables.dispose()},e=LI([NI(0,tm)],e),e}(),xI=new Rf("listFocus",!0),kI=new Rf("listSupportsMultiselect",!0),OI=(Df.and(xI,Df.not(eM)),new Rf("listHasSelectionOrFocus",!1)),TI=new Rf("listDoubleSelection",!1),MI=new Rf("listMultiSelection",!1),II=new Rf("listSupportsKeyboardNavigation",!0),AI="listAutomaticKeyboardNavigation",PI=new Rf(AI,!0),RI=!1;function FI(e,t){var n=e.createScoped(t.getHTMLElement());return xI.bindTo(n),n}var WI="workbench.list.multiSelectModifier",VI="workbench.list.openMode",BI="workbench.list.horizontalScrolling",HI="workbench.list.keyboardNavigation",zI="workbench.list.automaticKeyboardNavigation",jI="workbench.tree.indent",UI="workbench.tree.renderIndentGuides";function KI(e){return vf(e,BI,"workbench.tree.horizontalScrolling")}function qI(e){return"alt"===e.getValue(WI)}function GI(e){return"doubleClick"!==e.getValue(VI)}var YI=function(e){function t(t){var n=e.call(this)||this;return n.configurationService=t,n.useAltAsMultipleSelectionModifier=qI(t),n.registerListeners(),n}return wI(t,e),t.prototype.registerListeners=function(){var e=this;this._register(this.configurationService.onDidChangeConfiguration((function(t){t.affectsConfiguration(WI)&&(e.useAltAsMultipleSelectionModifier=qI(e.configurationService))})))},t.prototype.isSelectionSingleChangeEvent=function(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:FT(e)},t.prototype.isSelectionRangeChangeEvent=function(e){return WT(e)},t}(Me),ZI=function(e){function t(t,n){var i=e.call(this)||this;return i.configurationService=t,i.existingOpenController=n,i.openOnSingleClick=GI(t),i.registerListeners(),i}return wI(t,e),t.prototype.registerListeners=function(){var e=this;this._register(this.configurationService.onDidChangeConfiguration((function(t){t.affectsConfiguration(VI)&&(e.openOnSingleClick=GI(e.configurationService))})))},t.prototype.shouldOpen=function(e){if(e instanceof MouseEvent){var t=0===e.button,n=2===e.detail;return!(t&&!this.openOnSingleClick&&!n)&&(!(!t&&1!==e.button)&&(!this.existingOpenController||this.existingOpenController.shouldOpen(e)))}return!this.existingOpenController||this.existingOpenController.shouldOpen(e)},t}(Me);function XI(e,t,n){var i=new Te,o=SI({},e);if(!1!==e.multipleSelectionSupport&&!e.multipleSelectionController){var r=new YI(t);o.multipleSelectionController=r,i.add(r)}var s=new ZI(t,e.openController);return o.openController=s,i.add(s),o.keyboardNavigationDelegate={mightProducePrintableCharacter:function(e){return n.mightProducePrintableCharacter(e)}},[o,i]}function $I(e,t){var n=!1;return function(i){if(n)return n=!1,!1;var o=t.softDispatch(i,e);return o&&o.enterChord?(n=!0,!1):(n=!1,!0)}}(function(e){function t(t,n,i,o,r,s,a,u,l,c,h){var d=this,f=QI(n,r,s,l,c,h),p=f.options,g=f.getAutomaticKeyboardNavigation,m=f.disposable;return d=e.call(this,t,n,i,o,p)||this,d.disposables.add(m),d.internals=new tA(d,p,g,r.overrideStyles,s,a,u,l,h),d.disposables.add(d.internals),d}wI(t,e),t=LI([NI(5,Ff),NI(6,DI),NI(7,tm),NI(8,uf),NI(9,NE),NI(10,HN)],t)})(GM),function(e){function t(t,n,i,o,r,s,a,u,l,c,h,d){var f=this,p=QI(n,s,a,c,h,d),g=p.options,m=p.getAutomaticKeyboardNavigation,v=p.disposable;return f=e.call(this,t,n,i,o,r,g)||this,f.disposables.add(v),f.internals=new tA(f,g,m,s.overrideStyles,a,u,l,c,d),f.disposables.add(f.internals),f}wI(t,e),t.prototype.updateOptions=function(t){void 0===t&&(t={}),e.prototype.updateOptions.call(this,t),t.overrideStyles&&this.internals.updateStyleOverrides(t.overrideStyles)},t=LI([NI(6,Ff),NI(7,DI),NI(8,tm),NI(9,uf),NI(10,NE),NI(11,HN)],t)}(CI),function(e){function t(t,n,i,o,r,s,a,u,l,c,h,d){var f=this,p=QI(n,s,a,c,h,d),g=p.options,m=p.getAutomaticKeyboardNavigation,v=p.disposable;return f=e.call(this,t,n,i,o,r,g)||this,f.disposables.add(v),f.internals=new tA(f,g,m,s.overrideStyles,a,u,l,c,d),f.disposables.add(f.internals),f}wI(t,e),t.prototype.updateOptions=function(t){void 0===t&&(t={}),e.prototype.updateOptions.call(this,t),t.overrideStyles&&this.internals.updateStyleOverrides(t.overrideStyles)},t=LI([NI(6,Ff),NI(7,DI),NI(8,tm),NI(9,uf),NI(10,NE),NI(11,HN)],t)}(fI),function(e){function t(t,n,i,o,r,s,a,u,l,c,h,d,f){var p=this,g=QI(n,a,u,h,d,f),m=g.options,v=g.getAutomaticKeyboardNavigation,_=g.disposable;return p=e.call(this,t,n,i,o,r,s,m)||this,p.disposables.add(_),p.internals=new tA(p,m,v,a.overrideStyles,u,l,c,h,f),p.disposables.add(p.internals),p}wI(t,e),t=LI([NI(7,Ff),NI(8,DI),NI(9,tm),NI(10,uf),NI(11,NE),NI(12,HN)],t)}(vI);function QI(e,t,n,i,o,r){II.bindTo(n),RI||(PI.bindTo(n),RI=!0);var s=function(){var e=n.getContextKeyValue(AI);return e&&(e=i.getValue(zI)),e},a=r.isScreenReaderOptimized(),u=a?"simple":i.getValue(HI),l="undefined"!==typeof t.horizontalScrolling?t.horizontalScrolling:KI(i),c=GI(i),h=XI(t,i,o),d=h[0],f=h[1],p=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:s,disposable:f,options:SI(SI({keyboardSupport:!1},d),{indent:i.getValue(jI),renderIndentGuides:i.getValue(UI),automaticKeyboardNavigation:s(),simpleKeyboardNavigation:"simple"===u,filterOnType:"filter"===u,horizontalScrolling:l,openOnSingleClick:c,keyboardNavigationEventFilter:$I(e,o),additionalScrollHeight:p,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements})}}var JI,eA,tA=function(){function e(e,t,n,i,o,r,s,a,u){var l=this;this.tree=e,this.themeService=s,this.disposables=[],this.contextKeyService=FI(o,e);var c=kI.bindTo(this.contextKeyService);c.set(!(!1===t.multipleSelectionSupport)),this.hasSelectionOrFocus=OI.bindTo(this.contextKeyService),this.hasDoubleSelection=TI.bindTo(this.contextKeyService),this.hasMultiSelection=MI.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=qI(a);var h=new Set;h.add(AI);var d=function(){var t=u.isScreenReaderOptimized(),n=t?"simple":a.getValue(HI);e.updateOptions({simpleKeyboardNavigation:"simple"===n,filterOnType:"filter"===n})};this.updateStyleOverrides(i),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection((function(){var t=e.getSelection(),n=e.getFocus();l.hasSelectionOrFocus.set(t.length>0||n.length>0),l.hasMultiSelection.set(t.length>1),l.hasDoubleSelection.set(2===t.length)})),e.onDidChangeFocus((function(){var t=e.getSelection(),n=e.getFocus();l.hasSelectionOrFocus.set(t.length>0||n.length>0)})),a.onDidChangeConfiguration((function(t){if(t.affectsConfiguration(VI)&&e.updateOptions({openOnSingleClick:GI(a)}),t.affectsConfiguration(WI)&&(l._useAltAsMultipleSelectionModifier=qI(a)),t.affectsConfiguration(jI)){var i=a.getValue(jI);e.updateOptions({indent:i})}if(t.affectsConfiguration(UI)){var o=a.getValue(UI);e.updateOptions({renderIndentGuides:o})}t.affectsConfiguration(HI)&&d(),t.affectsConfiguration(zI)&&e.updateOptions({automaticKeyboardNavigation:n()})})),this.contextKeyService.onDidChangeContext((function(t){t.affectsSome(h)&&e.updateOptions({automaticKeyboardNavigation:n()})})),u.onDidChangeScreenReaderOptimized((function(){return d()})))}return e.prototype.updateStyleOverrides=function(e){Ee(this.styler),this.styler=e?Bk(this.tree,this.themeService,e):Me.None},e.prototype.dispose=function(){this.disposables=Ee(this.disposables),this.styler=Ee(this.styler)},e=LI([NI(4,Ff),NI(5,DI),NI(6,tm),NI(7,uf),NI(8,HN)],e),e}(),nA=pd.as(yd.Configuration);nA.registerConfiguration({id:"workbench",order:7,title:r("workbenchConfigurationTitle","Workbench"),type:"object",properties:(yI={},yI[WI]={type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[r("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),r("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:r({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},yI[VI]={type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:r({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). For parents with children in trees, this setting will control if a single click expands the parent or a double click. Note that some trees and lists might choose to ignore this setting if it is not applicable. ")},yI[BI]={type:"boolean",default:!1,description:r("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench.")},yI["workbench.tree.horizontalScrolling"]={type:"boolean",default:!1,description:r("tree horizontalScrolling setting","Controls whether trees support horizontal scrolling in the workbench."),deprecationMessage:r("deprecated","This setting is deprecated, please use '{0}' instead.",BI)},yI[jI]={type:"number",default:8,minimum:0,maximum:40,description:r("tree indent setting","Controls tree indentation in pixels.")},yI[UI]={type:"string",enum:["none","onHover","always"],default:"onHover",description:r("render tree indent guides","Controls whether the tree should render indent guides.")},yI[HI]={type:"string",enum:["simple","highlight","filter"],enumDescriptions:[r("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),r("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),r("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:r("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},yI[zI]={type:"boolean",default:!0,markdownDescription:r("automatic keyboard navigation setting","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.")},yI)}),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(JI||(JI={})),function(e){function t(e,t){return t-e}e.compare=t;var n=Object.create(null);function i(e){return n[e]||""}function o(t){switch(t){case hd.Error:return e.Error;case hd.Warning:return e.Warning;case hd.Info:return e.Info;case hd.Ignore:return e.Hint}}function s(t){switch(t){case e.Error:return hd.Error;case e.Warning:return hd.Warning;case e.Info:return hd.Info;case e.Hint:return hd.Ignore}}n[e.Error]=r("sev.error","Error"),n[e.Warning]=r("sev.warning","Warning"),n[e.Info]=r("sev.info","Info"),e.toString=i,e.fromSeverity=o,e.toSeverity=s}(JI||(JI={})),function(e){var t="";function n(e){return i(e,!0)}function i(e,n){var i=[t];return e.source?i.push(e.source.replace("¦","¦")):i.push(t),e.code?"string"===typeof e.code?i.push(e.code.replace("¦","¦")):i.push(e.code.value.replace("¦","¦")):i.push(t),void 0!==e.severity&&null!==e.severity?i.push(JI.toString(e.severity)):i.push(t),e.message&&n?i.push(e.message.replace("¦","¦")):i.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?i.push(e.startLineNumber.toString()):i.push(t),void 0!==e.startColumn&&null!==e.startColumn?i.push(e.startColumn.toString()):i.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?i.push(e.endLineNumber.toString()):i.push(t),void 0!==e.endColumn&&null!==e.endColumn?i.push(e.endColumn.toString()):i.push(t),i.push(t),i.join("¦")}e.makeKey=n,e.makeKeyOptionalMessage=i}(eA||(eA={}));var iA,oA=Nn("markerService");(function(e){function t(e,t,n){if(e[t])return e[t][n]}function n(e,t,n,i){e[t]||(e[t]=Object.create(null)),e[t][n]=i}function i(e,t,n){return!(!e[t]||!e[t][n])&&(delete e[t][n],Hs(e[t])&&delete e[t],!0)}e.get=t,e.set=n,e.remove=i})(iA||(iA={}));var rA,sA=function(){function e(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=Object.create(null),this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}return e.prototype.dispose=function(){this._subscription.dispose(),this._data=void 0},e.prototype._update=function(e){if(this._data)for(var t=0,n=e;t<n.length;t++){var i=n[t],o=i.toString(),r=this._data[o];r&&this._substract(r);var s=this._resourceStats(i);this._add(s),this._data[o]=s}},e.prototype._resourceStats=function(e){var t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===vi.inMemory||e.scheme===vi.walkThrough||e.scheme===vi.walkThroughSnippet)return t;for(var n=0,i=this._service.read({resource:e});n<i.length;n++){var o=i[n].severity;o===JI.Error?t.errors+=1:o===JI.Warning?t.warnings+=1:o===JI.Info?t.infos+=1:t.unknowns+=1}return t},e.prototype._substract=function(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns},e.prototype._add=function(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns},e}(),aA=function(){function e(){this._onMarkerChanged=new qe,this._onMarkerChangedEvent=We.debounce(this._onMarkerChanged.event,e._debouncer,0),this._byResource=Object.create(null),this._byOwner=Object.create(null),this._stats=new sA(this)}return e.prototype.dispose=function(){this._stats.dispose()},Object.defineProperty(e.prototype,"onMarkerChanged",{get:function(){return this._onMarkerChangedEvent},enumerable:!0,configurable:!0}),e.prototype.remove=function(e,t){for(var n=0,i=t||[];n<i.length;n++){var o=i[n];this.changeOne(e,o,[])}},e.prototype.changeOne=function(t,n,i){if(Ei(i)){var o=iA.remove(this._byResource,n.toString(),t),r=iA.remove(this._byOwner,t,n.toString());if(o!==r)throw new Error("invalid marker service state");o&&r&&this._onMarkerChanged.fire([n])}else{for(var s=[],a=0,u=i;a<u.length;a++){var l=u[a],c=e._toMarker(t,n,l);c&&s.push(c)}iA.set(this._byResource,n.toString(),t,s),iA.set(this._byOwner,t,n.toString(),s),this._onMarkerChanged.fire([n])}},e._toMarker=function(e,t,n){var i=n.code,o=n.severity,r=n.message,s=n.source,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn,h=n.relatedInformation,d=n.tags;if(r)return a=a>0?a:1,u=u>0?u:1,l=l>=a?l:a,c=c>0?c:u,{resource:t,owner:e,code:i,severity:o,message:r,source:s,startLineNumber:a,startColumn:u,endLineNumber:l,endColumn:c,relatedInformation:h,tags:d}},e.prototype.read=function(t){void 0===t&&(t=Object.create(null));var n=t.owner,i=t.resource,o=t.severities,r=t.take;if((!r||r<0)&&(r=-1),n&&i){var s=iA.get(this._byResource,i.toString(),n);if(s){for(var a=[],u=0,l=s;u<l.length;u++){var c=l[u];if(e._accept(c,o)){var h=a.push(c);if(r>0&&h===r)break}}return a}return[]}if(n||i){var d=n?this._byOwner[n]:i?this._byResource[i.toString()]:void 0;if(!d)return[];a=[];for(var f in d)for(var p=0,g=d[f];p<g.length;p++){s=g[p];if(e._accept(s,o)){h=a.push(s);if(r>0&&h===r)return a}}return a}var a=[];for(var m in this._byResource)for(var v in this._byResource[m])for(var _=0,y=this._byResource[m][v];_<y.length;_++){var s=y[_];if(e._accept(s,o)){var h=a.push(s);if(r>0&&h===r)return a}}return a},e._accept=function(e,t){return void 0===t||(t&e.severity)===e.severity},e._debouncer=function(t,n){t||(e._dedupeMap=Object.create(null),t=[]);for(var i=0,o=n;i<o.length;i++){var r=o[i];void 0===e._dedupeMap[r.toString()]&&(e._dedupeMap[r.toString()]=!0,t.push(r))}return t},e}(),uA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),lA=Nn("storageService");(function(e){e[e["NONE"]=0]="NONE",e[e["SHUTDOWN"]=1]="SHUTDOWN"})(rA||(rA={}));var cA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onDidChangeStorage=t._register(new qe),t.onDidChangeStorage=t._onDidChangeStorage.event,t._onWillSaveState=t._register(new qe),t.onWillSaveState=t._onWillSaveState.event,t.globalCache=new Map,t.workspaceCache=new Map,t}return uA(t,e),t.prototype.getCache=function(e){return 0===e?this.globalCache:this.workspaceCache},t.prototype.get=function(e,t,n){var i=this.getCache(t).get(e);return Vs(i)?n:i},t.prototype.getBoolean=function(e,t,n){var i=this.getCache(t).get(e);return Vs(i)?n:"true"===i},t.prototype.store=function(e,t,n){if(Vs(t))return this.remove(e,n);var i=String(t),o=this.getCache(n).get(e);return o===i?Promise.resolve():(this.getCache(n).set(e,i),this._onDidChangeStorage.fire({scope:n,key:e}),Promise.resolve())},t.prototype.remove=function(e,t){var n=this.getCache(t).delete(e);return n?(this._onDidChangeStorage.fire({scope:t,key:e}),Promise.resolve()):Promise.resolve()},t}(Me),hA=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},dA=function(e,t){return function(n,i){t(n,i,e)}},fA=function(){function e(e){this._commandService=e}return e.prototype.createMenu=function(e,t){return new pA(e,this._commandService,t)},e=hA([dA(0,ua)],e),e}(),pA=function(){function e(e,t,n){var i=this;this._id=e,this._commandService=t,this._contextKeyService=n,this._onDidChange=new qe,this._dispoables=new Te,this._menuGroups=[],this._contextKeys=new Set,this._build(),this._dispoables.add(We.debounce(We.filter(ug.onDidChangeMenu,(function(e){return e===i._id})),(function(){}),50)(this._build,this)),this._dispoables.add(We.debounce(this._contextKeyService.onDidChangeContext,(function(e,t){return e||t.affectsSome(i._contextKeys)}),50)((function(e){return e&&i._onDidChange.fire(void 0)}),this))}return e.prototype.dispose=function(){this._dispoables.dispose(),this._onDidChange.dispose()},e.prototype._build=function(){this._menuGroups.length=0,this._contextKeys.clear();var t,n=ug.getMenuItems(this._id);n.sort(e._compareMenuItems);for(var i=0,o=n;i<o.length;i++){var r=o[i],s=r.group||"";t&&t[0]===s||(t=[s,[]],this._menuGroups.push(t)),t[1].push(r),e._fillInKbExprKeys(r.when,this._contextKeys),rg(r)&&r.command.precondition&&e._fillInKbExprKeys(r.command.precondition,this._contextKeys),rg(r)&&r.command.toggled&&e._fillInKbExprKeys(r.command.toggled,this._contextKeys)}this._onDidChange.fire(this)},e.prototype.getActions=function(e){for(var t=[],n=0,i=this._menuGroups;n<i.length;n++){for(var o=i[n],r=o[0],s=o[1],a=[],u=0,l=s;u<l.length;u++){var c=l[u];if(this._contextKeyService.contextMatchesRules(c.when)){var h=rg(c)?new hg(c.command,c.alt,e,this._contextKeyService,this._commandService):new cg(c);a.push(h)}}a.length>0&&t.push([r,a])}return t},e._fillInKbExprKeys=function(e,t){if(e)for(var n=0,i=e.keys();n<i.length;n++){var o=i[n];t.add(o)}},e._compareMenuItems=function(t,n){var i=t.group,o=n.group;if(i!==o){if(!i)return 1;if(!o)return-1;if("navigation"===i)return-1;if("navigation"===o)return 1;var r=i.localeCompare(o);if(0!==r)return r}var s=t.order||0,a=n.order||0;return s<a?-1:s>a?1:e._compareTitles(rg(t)?t.command.title:t.title,rg(n)?n.command.title:n.title)},e._compareTitles=function(e,t){var n="string"===typeof e?e:e.value,i="string"===typeof t?t:t.value;return n.localeCompare(i)},e=hA([dA(1,ua),dA(2,Ff)],e),e}(),gA=Nn("markerDecorationsService"),mA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vA=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},_A=function(e,t){return function(n,i){t(n,i,e)}};function yA(e){return e.toString()}var bA,CA=function(e){function t(t){var n=e.call(this)||this;return n.model=t,n._markersData=new Map,n._register(ke((function(){n.model.deltaDecorations(Qs(n._markersData),[]),n._markersData.clear()}))),n}return mA(t,e),t.prototype.update=function(e,t){var n=Qs(this._markersData);this._markersData.clear();for(var i=this.model.deltaDecorations(n,t),o=0;o<i.length;o++)this._markersData.set(i[o],e[o])},t.prototype.getMarker=function(e){return this._markersData.get(e.id)},t}(Me),wA=function(e){function t(t,n){var i=e.call(this)||this;return i._markerService=n,i._onDidChangeMarker=i._register(new qe),i._markerDecorations=new Map,t.getModels().forEach((function(e){return i._onModelAdded(e)})),i._register(t.onModelAdded(i._onModelAdded,i)),i._register(t.onModelRemoved(i._onModelRemoved,i)),i._register(i._markerService.onMarkerChanged(i._handleMarkerChange,i)),i}return mA(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._markerDecorations.forEach((function(e){return e.dispose()})),this._markerDecorations.clear()},t.prototype.getMarker=function(e,t){var n=this._markerDecorations.get(yA(e.uri));return n?Zs(n.getMarker(t)):null},t.prototype._handleMarkerChange=function(e){var t=this;e.forEach((function(e){var n=t._markerDecorations.get(yA(e));n&&t._updateDecorations(n)}))},t.prototype._onModelAdded=function(e){var t=new CA(e);this._markerDecorations.set(yA(e.uri),t),this._updateDecorations(t)},t.prototype._onModelRemoved=function(e){var t=this,n=this._markerDecorations.get(yA(e.uri));n&&(n.dispose(),this._markerDecorations.delete(yA(e.uri))),e.uri.scheme!==vi.inMemory&&e.uri.scheme!==vi.internal&&e.uri.scheme!==vi.vscode||this._markerService&&this._markerService.read({resource:e.uri}).map((function(e){return e.owner})).forEach((function(n){return t._markerService.remove(n,[e.uri])}))},t.prototype._updateDecorations=function(e){var t=this,n=this._markerService.read({resource:e.model.uri,take:500}),i=n.map((function(n){return{range:t._createDecorationRange(e.model,n),options:t._createDecorationOption(n)}}));e.update(n,i),this._onDidChangeMarker.fire(e.model)},t.prototype._createDecorationRange=function(e,t){var n=pn.lift(t);if(t.severity!==JI.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(n=n.setEndPosition(n.startLineNumber,n.startColumn+2)),n=e.validateRange(n),n.isEmpty()){var i=e.getWordAtPosition(n.getStartPosition());if(i)n=new pn(n.startLineNumber,i.startColumn,n.endLineNumber,i.endColumn);else{var o=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);1===o||(n=n.endColumn>=o?new pn(n.startLineNumber,o-1,n.endLineNumber,o):new pn(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){var r=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);r<n.endColumn&&(n=new pn(n.startLineNumber,r,n.endLineNumber,n.endColumn),t.startColumn=r)}return n},t.prototype._createDecorationOption=function(e){var t,n,i,o=void 0,r=void 0;switch(e.severity){case JI.Hint:t=this._hasMarkerTag(e,2)?void 0:this._hasMarkerTag(e,1)?"squiggly-unnecessary":"squiggly-hint",n=0;break;case JI.Warning:t="squiggly-warning",o=nm(CC),n=20,i={color:nm(qb),position:Va.Inline};break;case JI.Info:t="squiggly-info",o=nm(wC),n=10;break;case JI.Error:default:t="squiggly-error",o=nm(bC),n=30,i={color:nm(Kb),position:Va.Inline};break}return e.tags&&(-1!==e.tags.indexOf(1)&&(r="squiggly-inline-unnecessary"),-1!==e.tags.indexOf(2)&&(r="squiggly-inline-deprecated")),{stickiness:1,className:t,showIfCollapsed:!0,overviewRuler:{color:o,position:Wa.Right},minimap:i,zIndex:n,inlineClassName:r}},t.prototype._hasMarkerTag=function(e,t){return!!e.tags&&e.tags.indexOf(t)>=0},t=vA([_A(0,wu),_A(1,oA)],t),t}(Me),SA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),LA=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},NA=function(e,t){return function(n,i){t(n,i,e)}},DA=function(e){function t(t,n){var i=e.call(this)||this;i._contextKeyService=t,i._configurationService=n,i._accessibilitySupport=0,i._onDidChangeScreenReaderOptimized=new qe,i._accessibilityModeEnabledContext=zN.bindTo(i._contextKeyService);var o=function(){return i._accessibilityModeEnabledContext.set(i.isScreenReaderOptimized())};return i._register(i._configurationService.onDidChangeConfiguration((function(e){e.affectsConfiguration("editor.accessibilitySupport")&&(o(),i._onDidChangeScreenReaderOptimized.fire())}))),o(),i.onDidChangeScreenReaderOptimized((function(){return o()})),i}return SA(t,e),Object.defineProperty(t.prototype,"onDidChangeScreenReaderOptimized",{get:function(){return this._onDidChangeScreenReaderOptimized.event},enumerable:!0,configurable:!0}),t.prototype.isScreenReaderOptimized=function(){var e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport},t.prototype.getAccessibilitySupport=function(){return this._accessibilitySupport},t=LA([NA(0,Ff),NA(1,uf)],t),t}(Me),EA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();(function(e){var t=new BN,n=function(){function e(e,t){this._serviceId=e,this._factory=t,this._value=null}return Object.defineProperty(e.prototype,"id",{get:function(){return this._serviceId},enumerable:!0,configurable:!0}),e.prototype.get=function(e){if(!this._value){if(e&&(this._value=e[this._serviceId.toString()]),this._value||(this._value=this._factory(e)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");t.set(this._serviceId,this._value)}return this._value},e}();e.LazyStaticService=n;var i=[];function o(e,t){var o=new n(e,t);return i.push(o),o}function r(e){for(var t=new BN,n=0,o=kD();n<o.length;n++){var r=o[n],s=r[0],a=r[1];t.set(s,a)}for(var u in e)e.hasOwnProperty(u)&&t.set(Nn(u),e[u]);i.forEach((function(n){return t.set(n.id,n.get(e))}));var l=new fO(t,!0);return t.set(Sn,l),[t,l]}e.init=r,e.instantiationService=o(Sn,(function(){return new fO(t,!0)}));var s=new Ep;e.configurationService=o(uf,(function(){return s})),e.resourceConfigurationService=o(Fc,(function(){return new xp(s)})),e.resourcePropertiesService=o(Wc,(function(){return new kp(s)})),e.contextService=o(op,(function(){return new Tp})),e.labelService=o(mO,(function(){return new Fp})),e.telemetryService=o(dg,(function(){return new Op})),e.dialogService=o(oO,(function(){return new wp})),e.notificationService=o(np,(function(){return new Sp})),e.markerService=o(oA,(function(){return new aA})),e.modeService=o(WE,(function(e){return new sx})),e.standaloneThemeService=o(LE,(function(){return new ck})),e.logService=o(Vc,(function(){return new Bc})),e.modelService=o(wu,(function(t){return new fx(e.configurationService.get(t),e.resourcePropertiesService.get(t),e.standaloneThemeService.get(t),e.logService.get(t))})),e.markerDecorationsService=o(gA,(function(t){return new wA(e.modelService.get(t),e.markerService.get(t))})),e.codeEditorService=o(En,(function(t){return new Px(e.standaloneThemeService.get(t))})),e.editorProgressService=o(rE,(function(){return new Cp})),e.storageService=o(lA,(function(){return new cA})),e.editorWorkerService=o(hl,(function(t){return new $c(e.modelService.get(t),e.resourceConfigurationService.get(t),e.logService.get(t))}))})(bA||(bA={}));var xA=function(e){function t(t,n){var i=e.call(this)||this,o=bA.init(n),r=o[0],s=o[1];i._serviceCollection=r,i._instantiationService=s;var a=i.get(uf),u=i.get(np),l=i.get(dg),c=i.get(tm),h=function(e,t){var o=null;return n&&(o=n[e.toString()]),o||(o=t()),i._serviceCollection.set(e,o),o},d=h(Ff,(function(){return i._register(new Sk(a))}));h(HN,(function(){return new DA(d,a)})),h(DI,(function(){return new EI(c)}));var f=h(ua,(function(){return new Lp(i._instantiationService)})),p=h(NE,(function(){return i._register(new Np(d,f,l,u,t))})),g=h(Jk,(function(){return new Wp(t)})),m=h(JD,(function(){return i._register(new iO(g))}));return h(eE,(function(){var e=new Zk(l,u,m,p,c);return e.configure({blockMouse:!1}),i._register(e)})),h(ag,(function(){return new fA(f)})),h(FE,(function(){return new Rp(bA.modelService.get(wu))})),i}return EA(t,e),t.prototype.get=function(e){var t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t},t.prototype.set=function(e,t){this._serviceCollection.set(e,t)},t.prototype.has=function(e){return this._serviceCollection.has(e)},t}(Me);function kA(e,t,n){var i=new xA(e,t),o=null;i.has(dl)||(o=new bp(bA.modelService.get()),i.set(dl,o)),i.has(da)||i.set(da,new Ca(i.get(En),i.get(ua)));var r=n(i);return o&&o.setEditor(r),r}function OA(e,t,n){return kA(e,n||{},(function(n){return new PE(e,t,n,n.get(Sn),n.get(En),n.get(ua),n.get(Ff),n.get(NE),n.get(JD),n.get(LE),n.get(np),n.get(uf),n.get(HN))}))}function TA(e){return bA.codeEditorService.get().onCodeEditorAdd((function(t){e(t)}))}function MA(e,t,n){return kA(e,n||{},(function(n){return new RE(e,t,n,n.get(Sn),n.get(Ff),n.get(NE),n.get(JD),n.get(hl),n.get(En),n.get(LE),n.get(np),n.get(uf),n.get(eE),n.get(rE),null)}))}function IA(e,t){return new Oa(e,t)}function AA(e,t,n){return bA.modelService.get().createModel(e,t,n)}function PA(e,t,n){if(e=e||"",!t){var i=e.indexOf("\n"),o=e;return-1!==i&&(o=e.substring(0,i)),AA(e,bA.modeService.get().createByFilepathOrFirstLine(n||null,o),n)}return AA(e,bA.modeService.get().create(t),n)}function RA(e,t){bA.modelService.get().setMode(e,bA.modeService.get().create(t))}function FA(e,t,n){e&&bA.markerService.get().changeOne(t,e.uri,n)}function WA(e){return bA.markerService.get().read(e)}function VA(e){return bA.modelService.get().getModel(e)}function BA(){return bA.modelService.get().getModels()}function HA(e){return bA.modelService.get().onModelAdded(e)}function zA(e){return bA.modelService.get().onModelRemoved(e)}function jA(e){return bA.modelService.get().onModelModeChanged((function(t){e({model:t.model,oldLanguage:t.oldModeId})}))}function UA(e){return rh(bA.modelService.get(),e)}function KA(e,t){return ad.colorizeElement(bA.standaloneThemeService.get(),bA.modeService.get(),e,t)}function qA(e,t,n){return ad.colorize(bA.modeService.get(),e,t,n)}function GA(e,t,n){return void 0===n&&(n=4),ad.colorizeModelLine(e,t,n)}function YA(e){var t=il.get(e);return t||{getInitialState:function(){return rl},tokenize:function(t,n,i){return ul(e,t,n,i)}}}function ZA(e,t){var n=bA.modeService.get();n.triggerMode(t);for(var i=YA(t),o=e.split(/\r\n|\r|\n/),r=[],s=i.getInitialState(),a=0,u=o.length;a<u;a++){var l=o[a],c=i.tokenize(l,s,0);r[a]=c.tokens,s=c.endState}return r}function XA(e,t){bA.standaloneThemeService.get().defineTheme(e,t)}function $A(e){bA.standaloneThemeService.get().setTheme(e)}function QA(){Gp()}function JA(){return{create:OA,onDidCreateEditor:TA,createDiffEditor:MA,createDiffNavigator:IA,createModel:PA,setModelLanguage:RA,setModelMarkers:FA,getModelMarkers:WA,getModels:BA,getModel:VA,onDidCreateModel:HA,onWillDisposeModel:zA,onDidChangeModelLanguage:jA,createWebWorker:UA,colorizeElement:KA,colorize:qA,colorizeModelLine:GA,tokenize:ZA,defineTheme:XA,setTheme:$A,remeasureFonts:QA,AccessibilitySupport:It,ContentWidgetPositionPreference:Wt,CursorChangeReason:Vt,DefaultEndOfLine:Bt,EditorAutoIndentStrategy:zt,EditorOption:jt,EndOfLinePreference:Ut,EndOfLineSequence:Kt,MinimapPosition:Xt,MouseTargetType:$t,OverlayWidgetPositionPreference:Qt,OverviewRulerLane:Jt,RenderLineNumbersType:en,RenderMinimap:tn,ScrollbarVisibility:on,ScrollType:nn,TextEditorCursorBlinkingStyle:ln,TextEditorCursorStyle:cn,TrackedRangeStickiness:hn,WrappingIndent:dn,ConfigurationChangedEvent:v,BareFontInfo:Pa,FontInfo:Ra,TextModelResolvedOptions:za,FindMatch:ja,EditorType:Ba,EditorOptions:de}}function eP(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(var n=0,i=t;n<i.length;n++){var o=i[n];if(!e(o))return!1}return!0}function tP(e,t){return"boolean"===typeof e?e:t}function nP(e,t){return"string"===typeof e?e:t}function iP(e){for(var t={},n=0,i=e;n<i.length;n++){var o=i[n];t[o]=!0}return t}function oP(e,t){void 0===t&&(t=!1),t&&(e=e.map((function(e){return e.toLowerCase()})));var n=iP(e);return t?function(e){return void 0!==n[e.toLowerCase()]&&n.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==n[e]&&n.hasOwnProperty(e)}}function rP(e,t){var n=0;while(t.indexOf("@")>=0&&n<5)n++,t=t.replace(/@(\w+)/g,(function(n,i){var o="";if("string"===typeof e[i])o=e[i];else{if(!(e[i]&&e[i]instanceof RegExp))throw void 0===e[i]?Kh(e,"language definition does not contain attribute '"+i+"', used at: "+t):Kh(e,"attribute reference '"+i+"' must be a string, used at: "+t);o=e[i].source}return Hh(o)?"":"(?:"+o+")"}));return new RegExp(t,e.ignoreCase?"i":"")}function sP(e,t,n,i){if(i<0)return e;if(i<t.length)return t[i];if(i>=100){i-=100;var o=n.split(".");if(o.unshift(n),i<o.length)return o[i]}return null}function aP(e,t,n,i){var o=-1,r=n,s=n.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);s&&(s[3]&&(o=parseInt(s[3]),s[2]&&(o+=100)),r=s[4]);var a,u="~",l=r;if(r&&0!==r.length?/^\w*$/.test(l)?u="==":(s=r.match(/^(@|!@|~|!~|==|!=)(.*)$/),s&&(u=s[1],l=s[2])):(u="!=",l=""),"~"!==u&&"!~"!==u||!/^(\w|\|)*$/.test(l))if("@"===u||"!@"===u){var c=e[l];if(!c)throw Kh(e,"the @ match target '"+l+"' is not defined, in rule: "+t);if(!eP((function(e){return"string"===typeof e}),c))throw Kh(e,"the @ match target '"+l+"' must be an array of strings, in rule: "+t);var h=oP(c,e.ignoreCase);a=function(e){return"@"===u?h(e):!h(e)}}else if("~"===u||"!~"===u)if(l.indexOf("$")<0){var d=rP(e,"^"+l+"$");a=function(e){return"~"===u?d.test(e):!d.test(e)}}else a=function(t,n,i,o){var r=rP(e,"^"+qh(e,l,n,i,o)+"$");return r.test(t)};else if(l.indexOf("$")<0){var f=zh(e,l);a=function(e){return"=="===u?e===f:e!==f}}else{var p=zh(e,l);a=function(t,n,i,o,r){var s=qh(e,p,n,i,o);return"=="===u?t===s:t!==s}}else{var g=oP(l.split("|"),e.ignoreCase);a=function(e){return"~"===u?g(e):!g(e)}}return-1===o?{name:n,value:i,test:function(e,t,n,i){return a(e,e,t,n,i)}}:{name:n,value:i,test:function(e,t,n,i){var r=sP(e,t,n,o);return a(r||"",e,t,n,i)}}}function uP(e,t,n){if(n){if("string"===typeof n)return n;if(n.token||""===n.token){if("string"!==typeof n.token)throw Kh(e,"a 'token' attribute must be of type string, in rule: "+t);var i={token:n.token};if(n.token.indexOf("$")>=0&&(i.tokenSubst=!0),"string"===typeof n.bracket)if("@open"===n.bracket)i.bracket=1;else{if("@close"!==n.bracket)throw Kh(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);i.bracket=-1}if(n.next){if("string"!==typeof n.next)throw Kh(e,"the next state must be a string value in rule: "+t);var o=n.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!Yh(e,qh(e,o,"",[],""))))throw Kh(e,"the next state '"+n.next+"' is not defined in rule: "+t);i.next=o}return"number"===typeof n.goBack&&(i.goBack=n.goBack),"string"===typeof n.switchTo&&(i.switchTo=n.switchTo),"string"===typeof n.log&&(i.log=n.log),"string"===typeof n.nextEmbedded&&(i.nextEmbedded=n.nextEmbedded,e.usesEmbedded=!0),i}if(Array.isArray(n)){for(var r=[],s=0,a=n.length;s<a;s++)r[s]=uP(e,t,n[s]);return{group:r}}if(n.cases){var u=[];for(var l in n.cases)if(n.cases.hasOwnProperty(l)){var c=uP(e,t,n.cases[l]);"@default"===l||"@"===l||""===l?u.push({test:void 0,value:c,name:l}):"@eos"===l?u.push({test:function(e,t,n,i){return i},value:c,name:l}):u.push(aP(e,t,l,c))}var h=e.defaultToken;return{test:function(e,t,n,i){for(var o=0,r=u;o<r.length;o++){var s=r[o],a=!s.test||s.test(e,t,n,i);if(a)return s.value}return h}}}throw Kh(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t)}return{token:""}}var lP=function(){function e(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}return e.prototype.setRegex=function(e,t){var n;if("string"===typeof t)n=t;else{if(!(t instanceof RegExp))throw Kh(e,"rules must start with a match string or regular expression: "+this.name);n=t.source}this.matchOnlyAtLineStart=n.length>0&&"^"===n[0],this.name=this.name+": "+n,this.regex=rP(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")},e.prototype.setAction=function(e,t){this.action=uP(e,this.name,t)},e}();function cP(e,t){if(!t||"object"!==typeof t)throw new Error("Monarch: expecting a language definition object");var n={};n.languageId=e,n.noThrow=!1,n.maxStack=100,n.start="string"===typeof t.start?t.start:null,n.ignoreCase=tP(t.ignoreCase,!1),n.tokenPostfix=nP(t.tokenPostfix,"."+n.languageId),n.defaultToken=nP(t.defaultToken,"source"),n.usesEmbedded=!1;var i=t;function o(e,r,s){for(var a=0,u=s;a<u.length;a++){var l=u[a],c=l.include;if(c){if("string"!==typeof c)throw Kh(n,"an 'include' attribute must be a string at: "+e);if("@"===c[0]&&(c=c.substr(1)),!t.tokenizer[c])throw Kh(n,"include target '"+c+"' is not defined at: "+e);o(e+"."+c,r,t.tokenizer[c])}else{var h=new lP(e);if(Array.isArray(l)&&l.length>=1&&l.length<=3)if(h.setRegex(i,l[0]),l.length>=3)if("string"===typeof l[1])h.setAction(i,{token:l[1],next:l[2]});else{if("object"!==typeof l[1])throw Kh(n,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);var d=l[1];d.next=l[2],h.setAction(i,d)}else h.setAction(i,l[1]);else{if(!l.regex)throw Kh(n,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);l.name&&"string"===typeof l.name&&(h.name=l.name),l.matchOnlyAtStart&&(h.matchOnlyAtLineStart=tP(l.matchOnlyAtLineStart,!1)),h.setRegex(i,l.regex),h.setAction(i,l.action)}r.push(h)}}}if(i.languageId=e,i.ignoreCase=n.ignoreCase,i.noThrow=n.noThrow,i.usesEmbedded=n.usesEmbedded,i.stateNames=t.tokenizer,i.defaultToken=n.defaultToken,!t.tokenizer||"object"!==typeof t.tokenizer)throw Kh(n,"a language definition must define the 'tokenizer' attribute as an object");for(var r in n.tokenizer=[],t.tokenizer)if(t.tokenizer.hasOwnProperty(r)){n.start||(n.start=r);var s=t.tokenizer[r];n.tokenizer[r]=new Array,o("tokenizer."+r,n.tokenizer[r],s)}if(n.usesEmbedded=i.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw Kh(n,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];for(var a=[],u=0,l=t.brackets;u<l.length;u++){var c=l[u],h=c;if(h&&Array.isArray(h)&&3===h.length&&(h={token:h[2],open:h[0],close:h[1]}),h.open===h.close)throw Kh(n,"open and close brackets in a 'brackets' attribute must be different: "+h.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!==typeof h.open||"string"!==typeof h.token||"string"!==typeof h.close)throw Kh(n,"every element in the 'brackets' array must be a '{open,close,token}' object or array");a.push({token:h.token+n.tokenPostfix,open:zh(n,h.open),close:zh(n,h.close)})}return n.brackets=a,n.noThrow=!0,n}function hP(e){QE.registerLanguage(e)}function dP(){var e=[];return e=e.concat(QE.getLanguages()),e}function fP(e){var t=bA.modeService.get().getLanguageIdentifier(e);return t?t.id:0}function pP(e,t){var n=bA.modeService.get().onDidCreateMode((function(i){i.getId()===e&&(n.dispose(),t())}));return n}function gP(e,t){var n=bA.modeService.get().getLanguageIdentifier(e);if(!n)throw new Error("Cannot set configuration for unknown language "+e);return Zl.register(n,t)}var mP=function(){function e(e){this._actual=e}return e.prototype.getInitialState=function(){return this._actual.getInitialState()},e.prototype.tokenize=function(e,t,n){throw new Error("Not supported!")},e.prototype.tokenize2=function(e,t){var n=this._actual.tokenizeEncoded(e,t);return new yn(n.tokens,n.endState)},e}(),vP=function(){function e(e,t,n){this._standaloneThemeService=e,this._languageIdentifier=t,this._actual=n}return e.prototype.getInitialState=function(){return this._actual.getInitialState()},e.prototype._toClassicTokens=function(e,t,n){for(var i=[],o=0,r=0,s=e.length;r<s;r++){var a=e[r],u=a.startIndex;0===r?u=0:u<o&&(u=o),i[r]=new vn(u+n,a.scopes,t),o=u}return i},e.prototype.tokenize=function(e,t,n){var i,o=this._actual.tokenize(e,t),r=this._toClassicTokens(o.tokens,this._languageIdentifier.language,n);return i=o.endState.equals(t)?t:o.endState,new _n(r,i)},e.prototype._toBinaryTokens=function(e,t){for(var n=this._languageIdentifier.id,i=this._standaloneThemeService.getTheme().tokenTheme,o=[],r=0,s=0,a=0,u=e.length;a<u;a++){var l=e[a],c=i.match(n,l.scopes);if(!(r>0&&o[r-1]===c)){var h=l.startIndex;0===a?h=0:h<s&&(h=s),o[r++]=h+t,o[r++]=c,s=h}}var d=new Uint32Array(r);for(a=0;a<r;a++)d[a]=o[a];return d},e.prototype.tokenize2=function(e,t,n){var i,o=this._actual.tokenize(e,t),r=this._toBinaryTokens(o.tokens,n);return i=o.endState.equals(t)?t:o.endState,new yn(r,i)},e}();function _P(e){return"tokenizeEncoded"in e}function yP(e){return e&&"function"===typeof e.then}function bP(e,t){var n=bA.modeService.get().getLanguageIdentifier(e);if(!n)throw new Error("Cannot set tokens provider for unknown language "+e);var i=function(e){return _P(e)?new mP(e):new vP(bA.standaloneThemeService.get(),n,e)};return yP(t)?il.registerPromise(e,t.then((function(e){return i(e)}))):il.register(e,i(t))}function CP(e,t){var n=function(t){return rd(bA.modeService.get(),bA.standaloneThemeService.get(),e,cP(e,t))};return yP(t)?il.registerPromise(e,t.then((function(e){return n(e)}))):il.register(e,n(t))}function wP(e,t){return Pu.register(e,t)}function SP(e,t){return Ru.register(e,t)}function LP(e,t){return Wu.register(e,t)}function NP(e,t){return Vu.register(e,{provideHover:function(e,n,i){var o=e.getWordAtPosition(n);return Promise.resolve(t.provideHover(e,n,i)).then((function(e){if(e)return!e.range&&o&&(e.range=new pn(n.lineNumber,o.startColumn,n.lineNumber,o.endColumn)),e.range||(e.range=new pn(n.lineNumber,n.column,n.lineNumber,n.column)),e}))}})}function DP(e,t){return Bu.register(e,t)}function EP(e,t){return Hu.register(e,t)}function xP(e,t){return zu.register(e,t)}function kP(e,t){return Uu.register(e,t)}function OP(e,t){return Ku.register(e,t)}function TP(e,t){return qu.register(e,t)}function MP(e,t){return Gu.register(e,{provideCodeActions:function(e,n,i,o){var r=bA.markerService.get().read({resource:e.uri}).filter((function(e){return pn.areIntersectingOrTouching(e,n)}));return t.provideCodeActions(e,n,{markers:r,only:i.only},o)}})}function IP(e,t){return Yu.register(e,t)}function AP(e,t){return Zu.register(e,t)}function PP(e,t){return Xu.register(e,t)}function RP(e,t){return $u.register(e,t)}function FP(e,t){return Fu.register(e,t)}function WP(e,t){return Qu.register(e,t)}function VP(e,t){return el.register(e,t)}function BP(e,t){return ju.register(e,t)}function HP(e,t){return Ju.register(e,t)}function zP(e,t){return tl.register(e,t)}function jP(e,t){return nl.register(e,t)}function UP(){return{register:hP,getLanguages:dP,onLanguage:pP,getEncodedLanguageId:fP,setLanguageConfiguration:gP,setTokensProvider:bP,setMonarchTokensProvider:CP,registerReferenceProvider:wP,registerRenameProvider:SP,registerCompletionItemProvider:FP,registerSignatureHelpProvider:LP,registerHoverProvider:NP,registerDocumentSymbolProvider:DP,registerDocumentHighlightProvider:EP,registerDefinitionProvider:xP,registerImplementationProvider:kP,registerTypeDefinitionProvider:OP,registerCodeLensProvider:TP,registerCodeActionProvider:MP,registerDocumentFormattingEditProvider:IP,registerDocumentRangeFormattingEditProvider:AP,registerOnTypeFormattingEditProvider:PP,registerLinkProvider:RP,registerColorProvider:WP,registerFoldingRangeProvider:VP,registerDeclarationProvider:BP,registerSelectionRangeProvider:HP,registerDocumentSemanticTokensProvider:zP,registerDocumentRangeSemanticTokensProvider:jP,DocumentHighlightKind:Ht,CompletionItemKind:Pt,CompletionItemTag:Rt,CompletionItemInsertTextRule:At,SymbolKind:an,SymbolTag:un,IndentAction:qt,CompletionTriggerKind:Ft,SignatureHelpTriggerKind:sn,FoldingRangeKind:Au}}n.d(t,"CancellationTokenSource",(function(){return GP})),n.d(t,"Emitter",(function(){return YP})),n.d(t,"KeyCode",(function(){return ZP})),n.d(t,"KeyMod",(function(){return XP})),n.d(t,"Position",(function(){return $P})),n.d(t,"Range",(function(){return QP})),n.d(t,"Selection",(function(){return JP})),n.d(t,"SelectionDirection",(function(){return eR})),n.d(t,"MarkerSeverity",(function(){return tR})),n.d(t,"MarkerTag",(function(){return nR})),n.d(t,"Uri",(function(){return iR})),n.d(t,"Token",(function(){return oR})),n.d(t,"editor",(function(){return rR})),n.d(t,"languages",(function(){return sR}));var KP=self;de.wrappingIndent.defaultValue=0,de.glyphMargin.defaultValue=!1,de.autoIndent.defaultValue=3,de.overviewRulerLanes.defaultValue=2;var qP=Cn();qP.editor=JA(),qP.languages=UP();var GP=qP.CancellationTokenSource,YP=qP.Emitter,ZP=qP.KeyCode,XP=qP.KeyMod,$P=qP.Position,QP=qP.Range,JP=qP.Selection,eR=qP.SelectionDirection,tR=qP.MarkerSeverity,nR=qP.MarkerTag,iR=qP.Uri,oR=qP.Token,rR=qP.editor,sR=qP.languages;KP.monaco=qP,"undefined"!==typeof KP.require&&"function"===typeof KP.require.config&&KP.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})},fa12:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i="undefined"===typeof monaco?self.monaco:monaco,o={},r={},s=function(){function e(e){var t=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((function(e,n){t._lazyLoadPromiseResolve=e,t._lazyLoadPromiseReject=n}))}return e.getOrCreate=function(t){return r[t]||(r[t]=new e(t)),r[t]},e.prototype.whenLoaded=function(){return this._lazyLoadPromise},e.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,o[this._languageId].loader().then((function(t){return e._lazyLoadPromiseResolve(t)}),(function(t){return e._lazyLoadPromiseReject(t)}))),this._lazyLoadPromise},e}();function a(e){var t=e.id;o[t]=e,i.languages.register(e);var n=s.getOrCreate(t);i.languages.setMonarchTokensProvider(t,n.whenLoaded().then((function(e){return e.language}))),i.languages.onLanguage(t,(function(){n.load().then((function(e){i.languages.setLanguageConfiguration(t,e.conf)}))}))}}}]);